aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/bench_gemm.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-06-22 11:10:38 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-06-22 11:10:38 +0200
commitfd9a9fa0aedea13866481309e8a5408d1d7c652b (patch)
tree92318e74abaed5d729cf2239ae2892087ac2abe1 /bench/bench_gemm.cpp
parent3ae0eee0b853d3a8b9c61a078af55f3035ace152 (diff)
slightly optimize computeProductBlockingSizes by explicitely precomputing what is known at compile time
Diffstat (limited to 'bench/bench_gemm.cpp')
-rw-r--r--bench/bench_gemm.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/bench/bench_gemm.cpp b/bench/bench_gemm.cpp
index e5b991130..4142236e9 100644
--- a/bench/bench_gemm.cpp
+++ b/bench/bench_gemm.cpp
@@ -2,8 +2,8 @@
// g++-4.4 bench_gemm.cpp -I .. -O2 -DNDEBUG -lrt -fopenmp && OMP_NUM_THREADS=2 ./a.out
// icpc bench_gemm.cpp -I .. -O3 -DNDEBUG -lrt -openmp && OMP_NUM_THREADS=2 ./a.out
-#include <Eigen/Core>
#include <iostream>
+#include <Eigen/Core>
#include <bench/BenchTimer.h>
using namespace std;
@@ -70,8 +70,6 @@ int main(int argc, char ** argv)
std::cout << "L1 cache size = " << (l1>0 ? l1/1024 : -1) << " KB\n";
std::cout << "L2/L3 cache size = " << (l2>0 ? l2/1024 : -1) << " KB\n";
- setCpuCacheSizes(ei_queryL1CacheSize()/1,ei_queryTopLevelCacheSize()/2);
-
int rep = 1; // number of repetitions per try
int tries = 2; // number of tries, we keep the best
@@ -85,13 +83,17 @@ int main(int argc, char ** argv)
s = atoi(argv[i]+1);
else if(argv[i][0]=='c')
cache_size = atoi(argv[i]+1);
+ else if(argv[i][0]=='t')
+ tries = atoi(argv[i]+1);
+ else if(argv[i][0]=='p')
+ rep = atoi(argv[i]+1);
else
need_help = true;
}
if(need_help)
{
- std::cout << argv[0] << " s<matrix size> c<cache size> \n";
+ std::cout << argv[0] << " s<matrix size> c<cache size> t<nb tries> p<nb repeats>\n";
return 1;
}