CRT_DEFINE
#include <flint/crt_helpers.h>CRT_DEFINE(NP, N, M)sourceDefines a static function with the fft_small CRT callback signature that reconstructs output coefficients from NP prime images, where N is the limb length of the product of the primes and M that of the cofactors (N = M or M + 1, 1 \le N \le 7). Before instantiating, the including file defines CRT_FN(NP) (the function name), CRT_Z_TYPE (the output pointer type), CRT_HEAD (declarations run once), CRT_EMIT(zi, r, NP, N, M) (which writes output coefficient zi from the reconstructed N-limb value r; the half product of the primes is available as Mhalf for signed outputs) and CRT_TAIL (statements run at the end), and afterwards undefines all of them. The generated function converts blocks of transform outputs to residues and applies the kernels above to each coefficient. This is how fft_small emits integer products, signed and unsigned polynomial coefficients and windowed products without duplicating the reconstruction loop.
The FLINT team, “CRT_DEFINE (crt_helpers.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/crt_helpers/CRT_DEFINE.html (generated 2026-10-20).
@misc{flint-doc-crt-helpers-CRT-DEFINE,
author = {{The FLINT team}},
title = {{CRT\_DEFINE (crt\_helpers.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/crt_helpers/CRT_DEFINE.html},
note = {Generated 2026-10-20}
}