diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-04-17 21:01:45 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-04-17 21:01:45 +0200 |
commit | 9777a5ca60f0a82bb789f55912fd046ab7f3d15d (patch) | |
tree | 294378a09230f2abbf9f6da52234b9ce77c3005c /bench/btl | |
parent | 9746396d1b8d039d3d0d6537ad477135e5e9d3f5 (diff) |
Various minor fixes in BTL
Diffstat (limited to 'bench/btl')
-rw-r--r-- | bench/btl/cmake/FindOPENBLAS.cmake (renamed from bench/btl/cmake/FindOpenBLAS.cmake) | 0 | ||||
-rw-r--r-- | bench/btl/generic_bench/bench_parameter.hh | 2 | ||||
-rw-r--r-- | bench/btl/libs/BLAS/CMakeLists.txt | 2 | ||||
-rw-r--r-- | bench/btl/libs/BLAS/main.cpp | 10 | ||||
-rw-r--r-- | bench/btl/libs/blaze/CMakeLists.txt | 6 | ||||
-rw-r--r-- | bench/btl/libs/blaze/blaze_interface.hh | 24 | ||||
-rw-r--r-- | bench/btl/libs/blaze/main.cpp | 8 | ||||
-rw-r--r-- | bench/btl/libs/eigen3/main_adv.cpp | 14 |
8 files changed, 31 insertions, 35 deletions
diff --git a/bench/btl/cmake/FindOpenBLAS.cmake b/bench/btl/cmake/FindOPENBLAS.cmake index c76fc251c..c76fc251c 100644 --- a/bench/btl/cmake/FindOpenBLAS.cmake +++ b/bench/btl/cmake/FindOPENBLAS.cmake diff --git a/bench/btl/generic_bench/bench_parameter.hh b/bench/btl/generic_bench/bench_parameter.hh index 5e341c14c..0f62bd421 100644 --- a/bench/btl/generic_bench/bench_parameter.hh +++ b/bench/btl/generic_bench/bench_parameter.hh @@ -41,7 +41,7 @@ // min matrix size for LU bench #define MIN_LU 5 // max matrix size for LU bench -#define MAX_LU 5000 +#define MAX_LU 3000 // max size for tiny vector and matrix #define TINY_MV_MAX_SIZE 16 // default nb_sample for x86 timer diff --git a/bench/btl/libs/BLAS/CMakeLists.txt b/bench/btl/libs/BLAS/CMakeLists.txt index 22f09527d..0272ccad0 100644 --- a/bench/btl/libs/BLAS/CMakeLists.txt +++ b/bench/btl/libs/BLAS/CMakeLists.txt @@ -22,7 +22,7 @@ find_package(OPENBLAS) if (OPENBLAS_FOUND) btl_add_bench(btl_openblas main.cpp) if(BUILD_btl_openblas) - target_link_libraries(btl_openblas ${GOTO_LIBRARIES} ) + target_link_libraries(btl_openblas ${OPENBLAS_LIBRARIES} ) set_target_properties(btl_openblas PROPERTIES COMPILE_FLAGS "-DCBLASNAME=OPENBLAS") endif(BUILD_btl_openblas) endif (OPENBLAS_FOUND) diff --git a/bench/btl/libs/BLAS/main.cpp b/bench/btl/libs/BLAS/main.cpp index 8347c9f0b..564d55ef2 100644 --- a/bench/btl/libs/BLAS/main.cpp +++ b/bench/btl/libs/BLAS/main.cpp @@ -56,13 +56,13 @@ int main() bench<Action_trmm<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); - bench<Action_cholesky<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); - bench<Action_partial_lu<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); + bench<Action_cholesky<blas_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); + bench<Action_partial_lu<blas_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); #ifdef HAS_LAPACK - bench<Action_lu_decomp<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); - bench<Action_hessenberg<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); - bench<Action_tridiagonalization<blas_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); +// bench<Action_lu_decomp<blas_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); + bench<Action_hessenberg<blas_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); + bench<Action_tridiagonalization<blas_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); #endif //bench<Action_lu_solve<blas_LU_solve_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); diff --git a/bench/btl/libs/blaze/CMakeLists.txt b/bench/btl/libs/blaze/CMakeLists.txt index 54ab929d8..f8b1b2ec3 100644 --- a/bench/btl/libs/blaze/CMakeLists.txt +++ b/bench/btl/libs/blaze/CMakeLists.txt @@ -4,5 +4,7 @@ find_package(Boost) if (BLAZE_FOUND AND Boost_FOUND) include_directories(${BLAZE_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}) btl_add_bench(btl_blaze main.cpp) - target_link_libraries(btl_blaze ${Boost_LIBRARIES} ${Boost_system_LIBRARY} /opt/local/lib/libboost_system-mt.a ) -endif (BLAZE_FOUND) + if(BUILD_btl_blaze) + target_link_libraries(btl_blaze ${Boost_LIBRARIES} ${Boost_system_LIBRARY} /opt/local/lib/libboost_system-mt.a ) + endif() +endif () diff --git a/bench/btl/libs/blaze/blaze_interface.hh b/bench/btl/libs/blaze/blaze_interface.hh index 8020fef27..ed43ecdd4 100644 --- a/bench/btl/libs/blaze/blaze_interface.hh +++ b/bench/btl/libs/blaze/blaze_interface.hh @@ -84,25 +84,25 @@ public : X = (A*B); } -// static inline void transposed_matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){ -// X = (trans(A)*trans(B)); -// } + static inline void transposed_matrix_matrix_product(const gene_matrix & A, const gene_matrix & B, gene_matrix & X, int N){ + X = A.transpose()*B.transpose(); + } -// static inline void ata_product(const gene_matrix & A, gene_matrix & X, int N){ -// X = (trans(A)*A); -// } + static inline void ata_product(const gene_matrix & A, gene_matrix & X, int N){ + X = (A.transpose()*A); + } -// static inline void aat_product(const gene_matrix & A, gene_matrix & X, int N){ -// X = (A*trans(A)); -// } + static inline void aat_product(const gene_matrix & A, gene_matrix & X, int N){ + X = (A*A.transpose()); + } static inline void matrix_vector_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){ X = (A*B); } -// static inline void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){ -// X = (trans(A)*B); -// } + static inline void atv_product(gene_matrix & A, gene_vector & B, gene_vector & X, int N){ + X = (A.transpose()*B); + } static inline void axpy(const real coef, const gene_vector & X, gene_vector & Y, int N){ Y += coef * X; diff --git a/bench/btl/libs/blaze/main.cpp b/bench/btl/libs/blaze/main.cpp index b8508c8f3..582a2956b 100644 --- a/bench/btl/libs/blaze/main.cpp +++ b/bench/btl/libs/blaze/main.cpp @@ -19,8 +19,6 @@ #include "blaze_interface.hh" #include "bench.hh" #include "basic_actions.hh" -// #include "action_cholesky.hh" -// #include "action_lu_decomp.hh" BTL_MAIN; @@ -32,14 +30,10 @@ int main() bench<Action_matrix_vector_product<blaze_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT); // bench<Action_atv_product<blaze_interface<REAL_TYPE> > >(MIN_MV,MAX_MV,NB_POINT); - bench<Action_matrix_matrix_product<blaze_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); +// bench<Action_matrix_matrix_product<blaze_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); // bench<Action_ata_product<blaze_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); // bench<Action_aat_product<blaze_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); -// bench<Action_trisolve<blaze_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); -// bench<Action_cholesky<blaze_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); -// bench<Action_lu_decomp<blaze_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); - return 0; } diff --git a/bench/btl/libs/eigen3/main_adv.cpp b/bench/btl/libs/eigen3/main_adv.cpp index efe5857e4..95865357e 100644 --- a/bench/btl/libs/eigen3/main_adv.cpp +++ b/bench/btl/libs/eigen3/main_adv.cpp @@ -29,14 +29,14 @@ BTL_MAIN; int main() { - bench<Action_trisolve<eigen3_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); - bench<Action_trisolve_matrix<eigen3_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); - bench<Action_cholesky<eigen3_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); - bench<Action_lu_decomp<eigen3_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); - bench<Action_partial_lu<eigen3_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); + bench<Action_trisolve<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); + bench<Action_trisolve_matrix<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); + bench<Action_cholesky<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); +// bench<Action_lu_decomp<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); + bench<Action_partial_lu<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); - bench<Action_hessenberg<eigen3_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); - bench<Action_tridiagonalization<eigen3_interface<REAL_TYPE> > >(MIN_MM,MAX_MM,NB_POINT); +// bench<Action_hessenberg<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); + bench<Action_tridiagonalization<eigen3_interface<REAL_TYPE> > >(MIN_LU,MAX_LU,NB_POINT); return 0; } |