fmpz_mat_multi_mod_ui, fmpz_mat_multi_mod_ui_precomp
#include <flint/fmpz_mat.h>void fmpz_mat_multi_mod_ui(nmod_mat_t * residues, slong nres, const fmpz_mat_t mat)sourcevoid fmpz_mat_multi_mod_ui_precomp(nmod_mat_t * residues, slong nres, const fmpz_mat_t mat, const fmpz_comb_t comb)sourceReduces mat modulo the moduli of the nres matrices residues, which must be initialised with the dimensions of mat and pairwise coprime moduli, writing the residues into them. The precomp variant uses a comb precomputed with fmpz_comb_init for the same moduli in the same order; comb may be NULL.
The reduction uses the subproduct tree of fmpz_comb_t, so that reducing an entry of b bits modulo k word-size moduli costs about M(b) \log k instead of kb word operations. Rows are distributed over threads when the number of entries times the number of moduli is large enough.
Guides#
The FLINT team, “fmpz_mat_multi_mod_ui, fmpz_mat_multi_mod_ui_precomp (fmpz_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mat/fmpz_mat_multi_mod_ui.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mat-fmpz-mat-multi-mod-ui,
author = {{The FLINT team}},
title = {{fmpz\_mat\_multi\_mod\_ui, fmpz\_mat\_multi\_mod\_ui\_precomp (fmpz\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mat/fmpz_mat_multi_mod_ui.html},
note = {Generated 2026-10-20}
}