From fd9a9fa0aedea13866481309e8a5408d1d7c652b Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 22 Jun 2010 11:10:38 +0200 Subject: slightly optimize computeProductBlockingSizes by explicitely precomputing what is known at compile time --- bench/bench_gemm.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'bench/bench_gemm.cpp') 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 #include +#include #include 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 c \n"; + std::cout << argv[0] << " s c t p\n"; return 1; } -- cgit v1.2.3