1 /*
2     Copyright (C) 2021 Daniel Schultz
3 
4     This file is part of FLINT.
5 
6     FLINT is free software: you can redistribute it and/or modify it under
7     the terms of the GNU Lesser General Public License (LGPL) as published
8     by the Free Software Foundation; either version 2.1 of the License, or
9     (at your option) any later version.  See <https://www.gnu.org/licenses/>.
10 */
11 
12 #include "fmpz_mat.h"
13 
fmpz_mat_fmpz_vec_mul(fmpz * c,const fmpz * a,slong alen,const fmpz_mat_t B)14 void fmpz_mat_fmpz_vec_mul(
15     fmpz * c,
16     const fmpz * a, slong alen,
17     const fmpz_mat_t B)
18 {
19     slong i, j;
20     slong len = FLINT_MIN(B->r, alen);
21 
22     for (i = B->c - 1; i >= 0; i--)
23     {
24         fmpz_zero(c + i);
25         for (j = 0; j < len; j++)
26             fmpz_addmul(c + i, a + j, fmpz_mat_entry(B, j, i));
27     }
28 }
29 
30