1 /*
2 Copyright (C) 2008-2009 William Hart
3 Copyright (C) 2010 Fredrik Johansson
4 Copyright (C) 2013 Mike Hansen
5
6 This file is part of FLINT.
7
8 FLINT is free software: you can redistribute it and/or modify it under
9 the terms of the GNU Lesser General Public License (LGPL) as published
10 by the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version. See <http://www.gnu.org/licenses/>.
12 */
13
14 #ifdef T
15
16 #include "templates.h"
17
18 void
TEMPLATE(T,mat_set)19 TEMPLATE(T, mat_set) (TEMPLATE(T, mat_t) mat1, const TEMPLATE(T, mat_t) mat2,
20 const TEMPLATE(T, ctx_t) ctx)
21 {
22 if (mat1 != mat2)
23 {
24 slong i;
25
26 if (mat2->r && mat2->c)
27 for (i = 0; i < mat2->r; i++)
28 _TEMPLATE(T, vec_set) (mat1->rows[i], mat2->rows[i], mat2->c,
29 ctx);
30 }
31 }
32
33
34 #endif
35