FLINT3.7.0-dev

sd_fft_ctx_struct, sd_fft_ctx_t

Synopsis#include <flint/fft_small.h>
sd_fft_ctx_struct
sd_fft_ctx_t

The transform context of one prime p: p and pinv = 1/p as doubles, mod for integer arithmetic modulo p, a primitive root of unity primitive_2power_root of order 2^v with 2^v \| p - 1, and the twiddle tables w2tab filled to w2tab_depth, guarded by a mutex.

The twiddle factors are the roots of unity w_j (see sd_fft_ctx_w) with even index, stored in [-p/2, p/2] in tables of doubling length: w2tab[0] holds w_0, w2tab[1] holds w_2, and w2tab[k] for k \ge 2 holds the 2^{k-1} values w_{2j} with 2^{k-1} \le j < 2^k. The tables up to SD_FFT_CTX_W2TAB_INIT are consecutive in memory. Tables that have been filled never move, so readers need no lock.

Cite this page

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