1 /*
2     Copyright (C) 2013 Mike Hansen
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 #ifndef FQ_MAT_H
13 #define FQ_MAT_H
14 
15 #ifdef FQ_MAT_INLINES_C
16 #define FQ_MAT_TEMPLATES_INLINE FLINT_DLL
17 #define FQ_MAT_INLINE FLINT_DLL
18 #else
19 #define FQ_MAT_TEMPLATES_INLINE static __inline__
20 #define FQ_MAT_INLINE static __inline__
21 #endif
22 
23 
24 #include "fq.h"
25 #include "fq_vec.h"
26 
27 /* Cutoff between classical and recursive triangular solving */
28 #define FQ_MAT_SOLVE_TRI_ROWS_CUTOFF 64
29 #define FQ_MAT_SOLVE_TRI_COLS_CUTOFF 64
30 
31 /* Cutoff between classical and recursive LU decomposition */
32 #define FQ_MAT_LU_RECURSIVE_CUTOFF 4
33 
FQ_MAT_MUL_KS_CUTOFF(slong r,slong c,const fq_ctx_t ctx)34 FQ_MAT_INLINE int FQ_MAT_MUL_KS_CUTOFF(slong r, slong c, const fq_ctx_t ctx)
35 {
36     if (5 * FLINT_MIN(r, c) > 8 * fq_ctx_degree(ctx) + 29)
37         return 1;
38     else
39         return 0;
40 }
41 
42 #define T fq
43 #define CAP_T FQ
44 #include "fq_mat_templates.h"
45 #undef CAP_T
46 #undef T
47 
48 #endif
49