aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/btl
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-03-23 11:00:31 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-03-23 11:00:31 +0100
commitb3e43246bc3f1e73ffe83af546b173ba7bd76a43 (patch)
tree11131eb0891508c3668ac47e953356211333ffd8 /bench/btl
parentf9da1ccc3b0140450b6a8615d4a7449fc73d92c6 (diff)
BTL: add a Eigen-blas backend
Diffstat (limited to 'bench/btl')
-rw-r--r--bench/btl/data/perlib_plot_settings.txt1
-rw-r--r--bench/btl/libs/BLAS/CMakeLists.txt21
-rw-r--r--bench/btl/libs/BLAS/blas_interface_impl.hh2
3 files changed, 14 insertions, 10 deletions
diff --git a/bench/btl/data/perlib_plot_settings.txt b/bench/btl/data/perlib_plot_settings.txt
index 709cc2140..0f61979d7 100644
--- a/bench/btl/data/perlib_plot_settings.txt
+++ b/bench/btl/data/perlib_plot_settings.txt
@@ -1,4 +1,5 @@
eigen3 ; with lines lw 4 lt 1 lc rgbcolor "black"
+EigenBLAS ; with lines lw 4 lt 3 lc rgbcolor "#999999"
eigen3_novec ; with lines lw 2 lt 1 lc rgbcolor "#999999"
eigen3_nogccvec ; with lines lw 2 lt 2 lc rgbcolor "#991010"
INTEL_MKL ; with lines lw 3 lt 1 lc rgbcolor "#ff0000"
diff --git a/bench/btl/libs/BLAS/CMakeLists.txt b/bench/btl/libs/BLAS/CMakeLists.txt
index 59065cb9b..ad3858ee0 100644
--- a/bench/btl/libs/BLAS/CMakeLists.txt
+++ b/bench/btl/libs/BLAS/CMakeLists.txt
@@ -1,7 +1,6 @@
find_package(ATLAS)
if (ATLAS_FOUND)
- include_directories(${PROJECT_SOURCE_DIR}/libs/f77)
btl_add_bench(btl_atlas main.cpp)
if(BUILD_btl_atlas)
target_link_libraries(btl_atlas ${ATLAS_LIBRARIES})
@@ -11,7 +10,6 @@ endif (ATLAS_FOUND)
find_package(MKL)
if (MKL_FOUND)
- include_directories(${PROJECT_SOURCE_DIR}/libs/f77)
btl_add_bench(btl_mkl main.cpp)
if(BUILD_btl_mkl)
target_link_libraries(btl_mkl ${MKL_LIBRARIES})
@@ -21,31 +19,38 @@ endif (MKL_FOUND)
find_package(GOTO)
if (GOTO_FOUND)
- include_directories(${PROJECT_SOURCE_DIR}/libs/f77)
btl_add_bench(btl_goto main.cpp)
if(BUILD_btl_goto)
target_link_libraries(btl_goto ${GOTO_LIBRARIES} )
- set_target_properties(btl_goto PROPERTIES COMPILE_FLAGS "-DCBLASNAME=GOTO -DPUREBLAS")
+ set_target_properties(btl_goto PROPERTIES COMPILE_FLAGS "-DCBLASNAME=GOTO")
endif(BUILD_btl_goto)
endif (GOTO_FOUND)
find_package(GOTO2)
if (GOTO2_FOUND)
- include_directories(${PROJECT_SOURCE_DIR}/libs/f77)
btl_add_bench(btl_goto2 main.cpp)
if(BUILD_btl_goto2)
target_link_libraries(btl_goto2 ${GOTO_LIBRARIES} )
- set_target_properties(btl_goto2 PROPERTIES COMPILE_FLAGS "-DCBLASNAME=GOTO2 -DPUREBLAS")
+ set_target_properties(btl_goto2 PROPERTIES COMPILE_FLAGS "-DCBLASNAME=GOTO2")
endif(BUILD_btl_goto2)
endif (GOTO2_FOUND)
find_package(ACML)
if (ACML_FOUND)
- include_directories(${PROJECT_SOURCE_DIR}/libs/f77)
btl_add_bench(btl_acml main.cpp)
if(BUILD_btl_acml)
target_link_libraries(btl_acml ${ACML_LIBRARIES} )
- set_target_properties(btl_acml PROPERTIES COMPILE_FLAGS "-DCBLASNAME=ACML -DHAS_LAPACK=1 -DPUREBLAS")
+ set_target_properties(btl_acml PROPERTIES COMPILE_FLAGS "-DCBLASNAME=ACML -DHAS_LAPACK=1")
endif(BUILD_btl_acml)
endif (ACML_FOUND)
+
+if(Eigen_SOURCE_DIR AND CMAKE_Fortran_COMPILER_WORKS)
+ # we are inside Eigen and blas/lapack interface is compilable
+ include_directories(${Eigen_SOURCE_DIR})
+ btl_add_bench(btl_eigenblas main.cpp)
+ if(BUILD_btl_eigenblas)
+ target_link_libraries(btl_eigenblas eigen_blas eigen_lapack )
+ set_target_properties(btl_eigenblas PROPERTIES COMPILE_FLAGS "-DCBLASNAME=EigenBLAS")
+ endif()
+endif()
diff --git a/bench/btl/libs/BLAS/blas_interface_impl.hh b/bench/btl/libs/BLAS/blas_interface_impl.hh
index 9859238d7..0e84df038 100644
--- a/bench/btl/libs/BLAS/blas_interface_impl.hh
+++ b/bench/btl/libs/BLAS/blas_interface_impl.hh
@@ -147,7 +147,5 @@ public :
};
-
SCALAR blas_interface<SCALAR>::fone = SCALAR(1);
SCALAR blas_interface<SCALAR>::fzero = SCALAR(0);
-