about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rw-r--r--src/eigenlib.cpp2
-rw-r--r--src/fastblas.cpp2
-rw-r--r--src/fastopenblas.h5
4 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 33fe3dd..916115e 100644
--- a/Makefile
+++ b/Makefile
@@ -128,6 +128,8 @@ ifdef WITH_OPENBLAS
     # Legacy version (mostly for Travis-CI)
     CPPFLAGS += -DOPENBLAS_LEGACY
   endif
+else
+  CPPFLAGS += -DUSE_BLAS=atlas
 endif
 
 ifeq ($(CXX), clang++)
@@ -158,7 +160,12 @@ ifdef SHOW_COMPILER_WARNINGS
 endif
 
 ifndef FORCE_STATIC
-  LIBS = -lgsl -lopenblas -lz
+  LIBS = -lgsl -lz
+  ifdef WITH_OPENBLAS
+    LIBS += -lopenblas
+  else
+    LIBS += -L$(GUIX_ENVIRONMENT) -latlas -lcblas -llapack -lblas
+  endif
   ifdef WITH_GSLCBLAS
     LIBS += -lgslcblas
   else
diff --git a/src/eigenlib.cpp b/src/eigenlib.cpp
index 4d6aacc..470aa08 100644
--- a/src/eigenlib.cpp
+++ b/src/eigenlib.cpp
@@ -23,7 +23,7 @@
 #include <cmath>
 #include <iostream>
 #include <vector>
-#include <cblas.h>
+// #include <cblas.h>
 
 using namespace std;
 using namespace Eigen;
diff --git a/src/fastblas.cpp b/src/fastblas.cpp
index de63e08..b3fcddb 100644
--- a/src/fastblas.cpp
+++ b/src/fastblas.cpp
@@ -23,9 +23,9 @@
 #include <cmath>
 #include <iomanip>
 #include <vector>
-#include <cblas.h>
 #include "debug.h"
 #include "fastblas.h"
+#include "fastopenblas.h"
 #include "mathfunc.h"
 #include <string.h>
 #include "eigenlib.h"
diff --git a/src/fastopenblas.h b/src/fastopenblas.h
index 3dd8ef7..e98e62f 100644
--- a/src/fastopenblas.h
+++ b/src/fastopenblas.h
@@ -23,7 +23,10 @@
 
 #include <assert.h>
 #include <iostream>
-#include <cblas.h>   // For OpenBlas
+extern "C"
+{
+   #include <cblas.h>   // For OpenBlas / Atlas
+}
 #include "gsl/gsl_matrix.h"
 
 void fast_cblas_dgemm(const enum CBLAS_ORDER Order,