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 <http://www.gnu.org/licenses/>.
10 */
11 
12 #include "fmpz_mat.h"
13 
14 void
fmpz_mat_neg(fmpz_mat_t res,const fmpz_mat_t mat)15 fmpz_mat_neg(fmpz_mat_t res, const fmpz_mat_t mat)
16 {
17     slong i;
18 
19     if (res->c < 1)
20         return;
21 
22     for (i = 0; i < res->r; i++)
23         _fmpz_vec_neg(res->rows[i], mat->rows[i], res->c);
24 }
25