From a610dd723a233aed1abe31aa32e3137b23b5f983 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 13 Oct 2017 12:28:26 +0000 Subject: OpenBlas: preparing for dgemm use --- src/eigenlib.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/eigenlib.cpp') diff --git a/src/eigenlib.cpp b/src/eigenlib.cpp index a8c545c..4d6aacc 100644 --- a/src/eigenlib.cpp +++ b/src/eigenlib.cpp @@ -17,16 +17,18 @@ */ #include "Eigen/Dense" -#include "gsl/gsl_linalg.h" +// #include "gsl/gsl_linalg.h" #include "gsl/gsl_matrix.h" -#include "gsl/gsl_vector.h" +// #include "gsl/gsl_vector.h" #include #include #include +#include using namespace std; using namespace Eigen; + // On two different clusters, compare eigen vs lapack/gsl: // // dgemm, 5x or 0.5x faster or slower than lapack, 5x or 4x faster than gsl @@ -57,8 +59,6 @@ void eigenlib_dgemm(const char *TransA, const char *TransB, const double alpha, C_mat = alpha * A_mat.transpose() * B_mat.transpose() + beta * C_mat; } } - - return; } void eigenlib_dgemv(const char *TransA, const double alpha, const gsl_matrix *A, @@ -75,15 +75,12 @@ void eigenlib_dgemv(const char *TransA, const double alpha, const gsl_matrix *A, } else { y_vec = alpha * A_mat.transpose() * x_vec + beta * y_vec; } - - return; } void eigenlib_invert(gsl_matrix *A) { Map> A_mat(A->data, A->size1, A->size2); A_mat = A_mat.inverse(); - return; } void eigenlib_dsyr(const double alpha, const gsl_vector *b, gsl_matrix *A) { @@ -92,7 +89,6 @@ void eigenlib_dsyr(const double alpha, const gsl_vector *b, gsl_matrix *A) { Map, 0, OuterStride> b_vec( b->data, b->size, OuterStride(b->stride)); A_mat = alpha * b_vec * b_vec.transpose() + A_mat; - return; } void eigenlib_eigensymm(const gsl_matrix *G, gsl_matrix *U, gsl_vector *eval) { @@ -108,5 +104,4 @@ void eigenlib_eigensymm(const gsl_matrix *G, gsl_matrix *U, gsl_vector *eval) { abort(); eval_vec = es.eigenvalues(); U_mat = es.eigenvectors(); - return; } -- cgit v1.2.3