flint_mpn_mulmod_precond_matrix_alloc, flint_mpn_mulmod_precond_matrix_precompute, flint_mpn_mulmod_precond_matrix, flint_mpn_fmmamod_precond_matrix
#include <flint/mpn_extras.h>mp_size_t flint_mpn_mulmod_precond_matrix_alloc(mp_size_t n)sourcevoid flint_mpn_mulmod_precond_matrix_precompute(mp_ptr apre, mp_srcptr a, mp_size_t n, mp_srcptr dnormed, mp_srcptr dinv, ulong norm)sourcevoid flint_mpn_mulmod_precond_matrix(mp_ptr rp, mp_srcptr apre, mp_srcptr b, mp_size_t n, mp_srcptr dnormed, mp_srcptr dinv, ulong norm)sourcevoid flint_mpn_fmmamod_precond_matrix(mp_ptr rp, mp_srcptr a1pre, mp_srcptr b1, mp_srcptr a2pre, mp_srcptr b2, mp_size_t n, mp_srcptr dnormed, mp_srcptr dinv, ulong norm)sourceThe matrix method of preconditioned multiplication (multiword modular multiplication): the precomputation writes a 2^{\mathrm{norm}} B^i \bmod d 2^{\mathrm{norm}} for 0 \le i < n (plus one junk limb) to apre, which must have room for flint_mpn_mulmod_precond_matrix_alloc(n) limbs; ab \bmod d is then a matrix-vector product with the limbs of b followed by one short reduction, in O(n^2) operations. The fmma version computes a_1 b_1 + a_2 b_2 \bmod d. Requires n \ge 2 and b reduced modulo d.
The FLINT team, “flint_mpn_mulmod_precond_matrix_alloc, flint_mpn_mulmod_precond_matrix_precompute, flint_mpn_mulmod_precond_matrix, flint_mpn_fmmamod_precond_matrix (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/flint_mpn_mulmod_precond_matrix_alloc.html (generated 2026-10-20).
@misc{flint-doc-mpn-extras-flint-mpn-mulmod-precond-matrix-alloc,
author = {{The FLINT team}},
title = {{flint\_mpn\_mulmod\_precond\_matrix\_alloc, flint\_mpn\_mulmod\_precond\_matrix\_precompute, flint\_mpn\_mulmod\_precond\_matrix, flint\_mpn\_fmmamod\_precond\_matrix (mpn\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_extras/flint_mpn_mulmod_precond_matrix_alloc.html},
note = {Generated 2026-10-20}
}