nmod_mat_nmod_vec_mul, nmod_mat_nmod_vec_mul_ptr
#include <flint/nmod_mat.h>void nmod_mat_nmod_vec_mul(ulong * c, const ulong * a, slong alen, const nmod_mat_t B)sourcevoid nmod_mat_nmod_vec_mul_ptr(ulong * const * c, const ulong * const * a, slong alen, const nmod_mat_t B)sourceSets , where is and is the vector of length alen, truncated or extended by zeros to length . The entries of are written. In the _ptr version, entry of and is *a[i] and *c[i]. must not overlap , except in the _ptr version, which copies.
The rows of are accumulated with delayed reductions where a vector code path exists: with AVX512-IFMA for (as in nmod_mat_mul_u52), with AVX2 or AVX-512 without IFMA for (splitting each product at bit 56 as in Splitting at bit 56; the next path is used instead for short vectors: , or and has at least columns), with a vector FMA for (as in nmod_mat_mul_fp50), and with AVX2 or AVX-512 for the other moduli, by accumulating the products of limbs of at most 32 bits of the entries as in Split limbs (AVX2, AVX-512), with one reduction of each entry of at the end (Thin matrices). These code paths are not used when is too narrow for them, with thresholds on the length of and the number of columns that depend on the path (for instance, with AVX512-IFMA, from 16 columns for down to 3 or 4 columns from on; 5 columns for the moduli of the last path). Otherwise, with one column, or up to 8 columns and ( for ), each entry of is a dot product; else each row is added with _nmod_vec_scalar_addmul_nmod when is less than 6 (for ), 8 (up to ) or 10, or when has at least 2048 columns (4096 for ), and the product is done with nmod_mat_mul_classical on blocks of rows of for longer vectors.
The FLINT team, “nmod_mat_nmod_vec_mul, nmod_mat_nmod_vec_mul_ptr (nmod_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_mat/nmod_mat_nmod_vec_mul.html (generated 2026-11-02).
@misc{flint-doc-nmod-mat-nmod-mat-nmod-vec-mul,
author = {{The FLINT team}},
title = {{nmod\_mat\_nmod\_vec\_mul, nmod\_mat\_nmod\_vec\_mul\_ptr (nmod\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nmod_mat/nmod_mat_nmod_vec_mul.html},
note = {Generated 2026-11-02}
}