1 /*
2     Copyright (C) 2011 Fredrik Johansson
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 
14 void
fmpz_mat_scalar_addmul_nmod_mat_fmpz(fmpz_mat_t B,const nmod_mat_t A,const fmpz_t c)15 fmpz_mat_scalar_addmul_nmod_mat_fmpz(fmpz_mat_t B,
16                         const nmod_mat_t A, const fmpz_t c)
17 {
18     slong i, j;
19 
20     for (i = 0; i < A->r; i++)
21         for (j = 0; j < A->c; j++)
22             fmpz_addmul_ui(fmpz_mat_entry(B,i,j), c, nmod_mat_entry(A,i,j));
23 }
24