FLINT3.7.0-dev

nmod_mat_nmod_vec_mul, nmod_mat_nmod_vec_mul_ptr

Synopsis#include <flint/nmod_mat.h>
void nmod_mat_nmod_vec_mul(ulong * c, const ulong * a, slong alen, const nmod_mat_t B)source
void nmod_mat_nmod_vec_mul_ptr(ulong * const * c, const ulong * const * a, slong alen, const nmod_mat_t B)source

Sets c = aB, where B is k \times n and a is the vector of length alen, truncated or extended by zeros to length k. The n entries of c are written. In the _ptr version, entry i of a and c is *a[i] and *c[i]. c must not overlap a, except in the _ptr version, which copies.

The rows of B are accumulated with delayed reductions where a vector code path exists: with AVX512-IFMA for n \le 2^{52} (as in nmod_mat_mul_u52), with AVX2 or AVX-512 without IFMA for n \le 2^{32} (splitting each product at bit 56 as in Splitting at bit 56), and with a vector FMA for n < 2^{50} (as in nmod_mat_mul_fp50). Otherwise each row is added with _nmod_vec_scalar_addmul_nmod.

Cite this page

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-10-20).