From 5b192930b613aad28cf61efb680a8a8601ad63b0 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 10 Jun 2010 23:30:15 +0200 Subject: add runtime API to control multithreading --- bench/bench_gemm.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bench/bench_gemm.cpp') diff --git a/bench/bench_gemm.cpp b/bench/bench_gemm.cpp index 5c55d4b7c..77cc420f4 100644 --- a/bench/bench_gemm.cpp +++ b/bench/bench_gemm.cpp @@ -112,7 +112,8 @@ int main(int argc, char ** argv) if(procs>1) { BenchTimer tmono; - omp_set_num_threads(1); + //omp_set_num_threads(1); + Eigen::setNbThreads(1); BENCH(tmono, tries, rep, gemm(a,b,c)); std::cout << "eigen mono cpu " << tmono.best(CPU_TIMER)/rep << "s \t" << (double(m)*n*p*rep*2/tmono.best(CPU_TIMER))*1e-9 << " GFLOPS \t(" << tmono.total(CPU_TIMER) << "s)\n"; std::cout << "eigen mono real " << tmono.best(REAL_TIMER)/rep << "s \t" << (double(m)*n*p*rep*2/tmono.best(REAL_TIMER))*1e-9 << " GFLOPS \t(" << tmono.total(REAL_TIMER) << "s)\n"; -- cgit v1.2.3