aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/benchCholesky.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-02-03 19:05:10 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-02-03 19:05:10 +0000
commitb0dd22cc7271523ba83d2bc8a85504b8445587b5 (patch)
treef5d415824fa859c9e1a8b391d0cc1b4781a96afb /bench/benchCholesky.cpp
parentb9a82be7271f21f78c1bce858bace71407c070c1 (diff)
update cholesky benchmark
Diffstat (limited to 'bench/benchCholesky.cpp')
-rw-r--r--bench/benchCholesky.cpp43
1 files changed, 22 insertions, 21 deletions
diff --git a/bench/benchCholesky.cpp b/bench/benchCholesky.cpp
index e998d8536..6772b86cc 100644
--- a/bench/benchCholesky.cpp
+++ b/bench/benchCholesky.cpp
@@ -9,7 +9,7 @@
// -DSCALAR=double
#include <Eigen/Array>
-#include <Eigen/LLT>
+#include <Eigen/Cholesky>
#include <bench/BenchUtil.h>
using namespace Eigen;
@@ -76,7 +76,8 @@ __attribute__ ((noinline)) void benchLLT(const MatrixType& m)
else
std::cout << "fixed ";
std::cout << covMat.rows() << " \t"
- << (timerNoSqrt.value() * REPEAT) / repeats << "s \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";
@@ -88,7 +89,7 @@ __attribute__ ((noinline)) void benchLLT(const MatrixType& m)
gsl_matrix* gslCovMat = gsl_matrix_alloc(covMat.rows(),covMat.cols());
gsl_matrix* gslCopy = gsl_matrix_alloc(covMat.rows(),covMat.cols());
-
+
eiToGsl(covMat, &gslCovMat);
for (int t=0; t<TRIES; ++t)
{
@@ -116,25 +117,25 @@ __attribute__ ((noinline)) void benchLLT(const MatrixType& m)
int main(int argc, char* argv[])
{
- const int dynsizes[] = {/*4,6,8,12,16,24,32,49,64,67,128,129,130,131,132,*/256,257,258,259,260,512,900,0};
- std::cout << "size no sqrt standard";
- #ifdef BENCH_GSL
- std::cout << " GSL (standard + double + ATLAS) ";
- #endif
+// const int dynsizes[] = {/*4,6,8,12,16,24,32,49,64,67,128,129,130,131,132,*/256,257,258,259,260,512,900,0};
+ std::cout << "size no sqrt standard";
+// #ifdef BENCH_GSL
+// std::cout << " GSL (standard + double + ATLAS) ";
+// #endif
std::cout << "\n";
-
- for (uint i=0; dynsizes[i]>0; ++i)
- benchLLT(Matrix<Scalar,Dynamic,Dynamic>(dynsizes[i],dynsizes[i]));
-
-// benchLLT(Matrix<Scalar,2,2>());
-// benchLLT(Matrix<Scalar,3,3>());
-// benchLLT(Matrix<Scalar,4,4>());
-// benchLLT(Matrix<Scalar,5,5>());
-// benchLLT(Matrix<Scalar,6,6>());
-// benchLLT(Matrix<Scalar,7,7>());
-// benchLLT(Matrix<Scalar,8,8>());
-// benchLLT(Matrix<Scalar,12,12>());
-// benchLLT(Matrix<Scalar,16,16>());
+//
+// for (uint i=0; dynsizes[i]>0; ++i)
+// benchLLT(Matrix<Scalar,Dynamic,Dynamic>(dynsizes[i],dynsizes[i]));
+
+ benchLLT(Matrix<Scalar,2,2>());
+ benchLLT(Matrix<Scalar,3,3>());
+ benchLLT(Matrix<Scalar,4,4>());
+ benchLLT(Matrix<Scalar,5,5>());
+ benchLLT(Matrix<Scalar,6,6>());
+ benchLLT(Matrix<Scalar,7,7>());
+ benchLLT(Matrix<Scalar,8,8>());
+ benchLLT(Matrix<Scalar,12,12>());
+ benchLLT(Matrix<Scalar,16,16>());
return 0;
}