FLINT3.7.0-dev

fft_small_op_pool_init, fft_small_op_pool_fit, fft_small_op_pool_clear

Synopsis#include <flint/fft_small.h>
void fft_small_op_pool_init(fft_small_op_pool_t pool)source
int fft_small_op_pool_fit(fft_small_op_pool_t pool, mpn_ctx_t R, ulong slab_size, slong count, ulong stage_bytes, int flags)source
void fft_small_op_pool_clear(fft_small_op_pool_t pool)source

Initialise an empty pool, give it count slabs of slab_size bytes and a staging region of stage_bytes bytes, and free it. fit returns 0, leaving the pool empty, if the block can be neither reserved nor allocated as flags allow.

slab_size must be a multiple of FLINT_FFT_SMALL_ALIGNMENT, normally fft_small_op_sizeof_data of the plan. With FFT_SMALL_OP_POOL_RESERVE the block is reserved in the scratch buffer of R (mpn_ctx_fit_buffer_reserve), memory that is usually already mapped; with FFT_SMALL_OP_POOL_ALLOC it is allocated if no reservation is possible. A reserved pool must be cleared on the thread that owns R, after every slab has been given back.

Guides#

Cite this page

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