FLINT3.7.0-dev

_nmod_poly_powers_mod_preinv_threaded_pool, _nmod_poly_powers_mod_preinv_threaded, nmod_poly_powers_mod_bsgs

Synopsis#include <flint/nmod_poly.h>
void _nmod_poly_powers_mod_preinv_threaded_pool(nn_ptr * res, nn_srcptr f, slong flen, slong n, nn_srcptr g, slong glen, nn_srcptr ginv, slong ginvlen, const nmod_t mod, thread_pool_handle * threads, slong num_threads)source
void _nmod_poly_powers_mod_preinv_threaded(nn_ptr * res, nn_srcptr f, slong flen, slong n, nn_srcptr g, slong glen, nn_srcptr ginv, slong ginvlen, const nmod_t mod)source
void nmod_poly_powers_mod_bsgs(nmod_poly_struct * res, const nmod_poly_t f, slong n, const nmod_poly_t g)source

The same as the naive functions, computed with baby steps and giant steps in parallel: with k = \lfloor \sqrt{n} \rfloor, the powers f^0, \ldots, f^k and f^{2k}, f^{3k}, \ldots are computed first, and then the threads fill in f^{ik + j} = f^{ik} f^j, taking blocks of k powers from a shared counter. _nmod_poly_powers_mod_preinv_threaded and nmod_poly_powers_mod_bsgs take their threads from the global pool (see thread_pool.h), the _pool version uses the num_threads threads given.

Guides#

Cite this page

The FLINT team, “_nmod_poly_powers_mod_preinv_threaded_pool, _nmod_poly_powers_mod_preinv_threaded, nmod_poly_powers_mod_bsgs (nmod_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_poly/_nmod_poly_powers_mod_preinv_threaded_pool.html (generated 2026-10-20).