diff options
author | Pjotr Prins | 2018-09-27 09:35:13 +0000 |
---|---|---|
committer | Pjotr Prins | 2018-09-27 09:35:13 +0000 |
commit | c08e633d2f858b35d2939d92c8a1b82d36168944 (patch) | |
tree | 82f7b8785f7af041c48934e89983ef47a8a3b374 /src | |
parent | 5d74d45b5ade5339bca6090bead2d6b37a70fb63 (diff) | |
download | pangemma-c08e633d2f858b35d2939d92c8a1b82d36168944.tar.gz |
Inlining GSL calls
Diffstat (limited to 'src')
-rw-r--r-- | src/fastblas.cpp | 3 | ||||
-rw-r--r-- | src/fastblas.h | 3 | ||||
-rw-r--r-- | src/lapack.cpp | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/fastblas.cpp b/src/fastblas.cpp index 362027c..de63e08 100644 --- a/src/fastblas.cpp +++ b/src/fastblas.cpp @@ -30,6 +30,9 @@ #include <string.h> #include "eigenlib.h" +const char *FastblasTrans = "T"; +const char *FastblasNoTrans = "N"; + using namespace std; /* diff --git a/src/fastblas.h b/src/fastblas.h index 6000983..343a73a 100644 --- a/src/fastblas.h +++ b/src/fastblas.h @@ -27,6 +27,9 @@ gsl_matrix *fast_copy(gsl_matrix *m, const double *mem); +extern const char *FastblasTrans; +extern const char *FastblasNoTrans; + void fast_dgemm(const char *TransA, const char *TransB, const double alpha, const gsl_matrix *A, const gsl_matrix *B, const double beta, gsl_matrix *C); diff --git a/src/lapack.cpp b/src/lapack.cpp index bf73338..eb5b16b 100644 --- a/src/lapack.cpp +++ b/src/lapack.cpp @@ -319,8 +319,8 @@ void LUDecomp(gsl_matrix *LU, gsl_permutation *p, int *signum) { // introductory textbook on numerical linear algebra for details). void LUInvert(const gsl_matrix *LU, const gsl_permutation *p, gsl_matrix *ret_inverse) { // debug_msg("entering"); - auto det = LULndet(LU); - enforce_msg(det != 1.0,"LU determinant is zero -> LU is not invertable"); + if (is_check_mode()) + LULndet(LU); enforce_gsl(gsl_linalg_LU_invert(LU, p, ret_inverse)); } |