aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/benchCholesky.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-07-28 11:26:30 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-07-28 11:26:30 +0200
commit5fbe7aa60453f31e24f9c3fce9e3f788f385d38c (patch)
treefc248136e9c7502a7b5c59684969ac8a8081bb45 /bench/benchCholesky.cpp
parenta72752caacf997864b0f7d32a45bdc0c98b517b6 (diff)
Update and fix Cholesky mini benchmark
Diffstat (limited to 'bench/benchCholesky.cpp')
-rw-r--r--bench/benchCholesky.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/bench/benchCholesky.cpp b/bench/benchCholesky.cpp
index 42b3e1285..9a8e7cf63 100644
--- a/bench/benchCholesky.cpp
+++ b/bench/benchCholesky.cpp
@@ -31,7 +31,7 @@ __attribute__ ((noinline)) void benchLLT(const MatrixType& m)
int rows = m.rows();
int cols = m.cols();
- int cost = 0;
+ double cost = 0;
for (int j=0; j<rows; ++j)
{
int r = std::max(rows - j -1,0);
@@ -78,10 +78,10 @@ __attribute__ ((noinline)) void benchLLT(const MatrixType& m)
else
std::cout << "fixed ";
std::cout << covMat.rows() << " \t"
- << (timerNoSqrt.value() * REPEAT) / repeats << "s "
- << "(" << 1e-6 * cost*repeats/timerNoSqrt.value() << " MFLOPS)\t"
- << (timerSqrt.value() * REPEAT) / repeats << "s "
- << "(" << 1e-6 * cost*repeats/timerSqrt.value() << " MFLOPS)\n";
+ << (timerNoSqrt.best()) / repeats << "s "
+ << "(" << 1e-9 * cost*repeats/timerNoSqrt.best() << " GFLOPS)\t"
+ << (timerSqrt.best()) / repeats << "s "
+ << "(" << 1e-9 * cost*repeats/timerSqrt.best() << " GFLOPS)\n";
#ifdef BENCH_GSL
@@ -119,13 +119,13 @@ __attribute__ ((noinline)) void benchLLT(const MatrixType& m)
int main(int argc, char* argv[])
{
- const int dynsizes[] = {4,6,8,16,24,32,49,64,128,256,512,900,0};
- std::cout << "size no sqrt standard";
+ const int dynsizes[] = {4,6,8,16,24,32,49,64,128,256,512,900,1500,0};
+ std::cout << "size LDLT LLT";
// #ifdef BENCH_GSL
// std::cout << " GSL (standard + double + ATLAS) ";
// #endif
std::cout << "\n";
- for (uint i=0; dynsizes[i]>0; ++i)
+ for (int i=0; dynsizes[i]>0; ++i)
benchLLT(Matrix<Scalar,Dynamic,Dynamic>(dynsizes[i],dynsizes[i]));
benchLLT(Matrix<Scalar,2,2>());