From c08e633d2f858b35d2939d92c8a1b82d36168944 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 27 Sep 2018 09:35:13 +0000 Subject: Inlining GSL calls --- src/fastblas.cpp | 3 +++ src/fastblas.h | 3 +++ src/lapack.cpp | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') 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 #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)); } -- cgit v1.2.3