FLINT3.7.0-dev

fft_small_stage_begin, fft_small_stage_end

Synopsis#include <flint/fft_small.h>
ulong * fft_small_stage_begin(ulong * z, ulong zn, ulong need, fft_small_op_pool_struct * pool, int use_slabs)source
int fft_small_stage_end(ulong * z, ulong zn, ulong * buf, ulong len, fft_small_op_pool_struct * pool)source

Staged conversion of a value whose reconstruction writes need limbs into a window of z_n limbs. begin returns z if z_n \ge need and scratch space from the pool otherwise (pool may be NULL, meaning a plain allocation). After exporting there, and possibly adjusting the value, end copies the normalised value of length len to (z, z_n), zero pads it, releases the scratch space, and returns 0 if it does not fit (the window is then undefined).

Cite this page

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