mpn_mod_mat_lu, mpn_mod_mat_lu_classical_delayed
#include <flint/mpn_mod.h>int mpn_mod_mat_lu(slong * rank, slong * P, gr_mat_t LU, const gr_mat_t A, int rank_check, gr_ctx_t ctx)sourceint mpn_mod_mat_lu_classical_delayed(slong * res_rank, slong * P, gr_mat_t A, const gr_mat_t A_in, int rank_check, gr_ctx_t ctx)sourceLU decomposition with the conventions of gr_mat_lu: PA = LU with the permutation in P, L unit lower triangular and U in row echelon form, both stored in the output, and the rank in *rank. If rank_check is nonzero, the decomposition stops with rank 0 as soon as the matrix is found to be singular. Returns GR_DOMAIN (or GR_UNABLE when pretending to be a field) if a nonzero pivot is not invertible.
mpn_mod_mat_lu_classical_delayed is Gaussian elimination in which each entry of the active submatrix is kept unreduced in 2\ell + 1 limbs and reduced only when it enters the pivot column or the pivot row (Gaussian elimination); the update of a row is a single long mpn_add_n over its unreduced entries. mpn_mod_mat_lu uses gr_mat_lu_classical for \min(m, n) below a first cutoff (23 for \ell = 2, 5 to 8 for larger \ell), the delayed version below a second cutoff (200 for \ell = 2, decreasing to 20 for \ell \ge 9), and gr_mat_lu_recursive above it.
The FLINT team, “mpn_mod_mat_lu, mpn_mod_mat_lu_classical_delayed (mpn_mod.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_mod/mpn_mod_mat_lu.html (generated 2026-10-20).
@misc{flint-doc-mpn-mod-mpn-mod-mat-lu,
author = {{The FLINT team}},
title = {{mpn\_mod\_mat\_lu, mpn\_mod\_mat\_lu\_classical\_delayed (mpn\_mod.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_mod/mpn_mod_mat_lu.html},
note = {Generated 2026-10-20}
}