mpn_ctx_struct, mpn_ctx_t
#include <flint/fft_small.h>mpn_ctx_structmpn_ctx_tA multiplication context. It holds the transform contexts of MPN_CTX_NCRTS = 8 primes, the Chinese remaindering data for the first of them for every , tables of powers of two modulo each prime for converting integers, the table of packing profiles, the constants of the two-prime pipeline, and a scratch buffer that grows on demand and is kept between calls.
The primes are generated from the initial prime given to mpn_ctx_init. FLINT always uses , which yields
| form | ||
|---|---|---|
| 0 | 1108307720798209 | |
| 1 | 659706976665601 | |
| 2 | 1086317488242689 | |
| 3 | 910395627798529 | |
| 4 | 699289395265537 | |
| 5 | 1022545813831681 | |
| 6 | 1013749720809473 | |
| 7 | 868614185943041 |
All have 50 bits. A transform of length modulo the first primes needs for each of them, so in general and for the two-prime pipeline: far beyond any realistic size. The fields are described with the low-level functions in Chinese remaindering and integer conversion.
Guides#
The FLINT team, “mpn_ctx_struct, mpn_ctx_t (fft_small.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fft_small/mpn_ctx_struct.html (generated 2026-11-02).
@misc{flint-doc-fft-small-mpn-ctx-struct,
author = {{The FLINT team}},
title = {{mpn\_ctx\_struct, mpn\_ctx\_t (fft\_small.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fft_small/mpn_ctx_struct.html},
note = {Generated 2026-11-02}
}