aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/benchBlasGemm.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-08-23 23:21:25 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-08-23 23:21:25 -0400
commit6924d4eec53963dd521e943d407361774ee8db43 (patch)
tree226d04c86babb209ffe1d5447444d8bd4f6e7d13 /bench/benchBlasGemm.cpp
parent6261f4629f7a41cff0095ab62eec0f97dd5d4cba (diff)
update this test to build against current eigen.
remove the 'normal' path as it was not compiling anymore and I couldn't see the point of it (?)
Diffstat (limited to 'bench/benchBlasGemm.cpp')
-rw-r--r--bench/benchBlasGemm.cpp30
1 files changed, 3 insertions, 27 deletions
diff --git a/bench/benchBlasGemm.cpp b/bench/benchBlasGemm.cpp
index 85fbdb219..de7359f5e 100644
--- a/bench/benchBlasGemm.cpp
+++ b/bench/benchBlasGemm.cpp
@@ -1,5 +1,4 @@
-
-// g++-4.2 -O3 -DNDEBUG -I.. benchBlasGemm.cpp /usr/lib/libcblas.so.3 - o benchBlasGemm
+// g++ -O3 -DNDEBUG -I.. -L /usr/lib64/atlas/ benchBlasGemm.cpp -o benchBlasGemm -lrt -lcblas
// possible options:
// -DEIGEN_DONT_VECTORIZE
// -msse2
@@ -13,7 +12,9 @@
#include "BenchTimer.h"
// include the BLAS headers
+extern "C" {
#include <cblas.h>
+}
#include <string>
#ifdef _FLOAT
@@ -27,7 +28,6 @@ typedef double Scalar;
typedef Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic> MyMatrix;
void bench_eigengemm(MyMatrix& mc, const MyMatrix& ma, const MyMatrix& mb, int nbloops);
-void bench_eigengemm_normal(MyMatrix& mc, const MyMatrix& ma, const MyMatrix& mb, int nbloops);
void check_product(int M, int N, int K);
void check_product(void);
@@ -153,24 +153,6 @@ int main(int argc, char *argv[])
std::cout << M << " : " << timer.value() << " ; " << 1e-3*floor(1e-6*nbmad/timer.value()) << "\n";
}
- // clear
- ma = MyMatrix::Random(M,K);
- mb = MyMatrix::Random(K,N);
- mc = MyMatrix::Random(M,N);
-
- // eigen normal
- if (!(std::string(argv[1])=="auto"))
- {
- timer.reset();
- for (uint k=0 ; k<nbtries ; ++k)
- {
- timer.start();
- bench_eigengemm_normal(mc, ma, mb, nbloops);
- timer.stop();
- }
- std::cout << "eigen : " << timer.value() << " (" << 1e-3*floor(1e-6*nbmad/timer.value()) << " GFlops/s)\n";
- }
-
return 0;
}
@@ -182,12 +164,6 @@ void bench_eigengemm(MyMatrix& mc, const MyMatrix& ma, const MyMatrix& mb, int n
mc.noalias() += ma * mb;
}
-void bench_eigengemm_normal(MyMatrix& mc, const MyMatrix& ma, const MyMatrix& mb, int nbloops)
-{
- for (uint j=0 ; j<nbloops ; ++j)
- mc.noalias() += GeneralProduct<MyMatrix,MyMatrix,UnrolledProduct>(ma,mb);
-}
-
#define MYVERIFY(A,M) if (!(A)) { \
std::cout << "FAIL: " << M << "\n"; \
}