From 765219aa5180c40be86a380524db691a0fd5861b Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 13 Oct 2008 15:53:27 +0000 Subject: Big API change in Cholesky module: * rename Cholesky to LLT * rename CholeskyWithoutSquareRoot to LDLT * rename MatrixBase::cholesky() to llt() * rename MatrixBase::choleskyNoSqrt() to ldlt() * make {LLT,LDLT}::solve() API consistent with other modules Note that we are going to keep a source compatibility untill the next beta release. E.g., the "old" Cholesky* classes, etc are still available for some time. To be clear, Eigen beta2 should be (hopefully) source compatible with beta1, and so beta2 will contain all the deprecated API of beta1. Those features marked as deprecated will be removed in beta3 (or in the final 2.0 if there is no beta 3 !). Also includes various updated in sparse Cholesky. --- bench/benchCholesky.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'bench/benchCholesky.cpp') diff --git a/bench/benchCholesky.cpp b/bench/benchCholesky.cpp index f64b61b71..e998d8536 100644 --- a/bench/benchCholesky.cpp +++ b/bench/benchCholesky.cpp @@ -1,5 +1,5 @@ -// g++ -DNDEBUG -O3 -I.. benchCholesky.cpp -o benchCholesky && ./benchCholesky +// g++ -DNDEBUG -O3 -I.. benchLLT.cpp -o benchLLT && ./benchLLT // options: // -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3 // -DEIGEN_DONT_VECTORIZE @@ -9,7 +9,7 @@ // -DSCALAR=double #include -#include +#include #include using namespace Eigen; @@ -24,7 +24,7 @@ using namespace Eigen; typedef float Scalar; template -__attribute__ ((noinline)) void benchCholesky(const MatrixType& m) +__attribute__ ((noinline)) void benchLLT(const MatrixType& m) { int rows = m.rows(); int cols = m.cols(); @@ -54,7 +54,7 @@ __attribute__ ((noinline)) void benchCholesky(const MatrixType& m) timerNoSqrt.start(); for (int k=0; k cholnosqrt(covMat); + LDLT cholnosqrt(covMat); acc += cholnosqrt.matrixL().coeff(r,c); } timerNoSqrt.stop(); @@ -65,7 +65,7 @@ __attribute__ ((noinline)) void benchCholesky(const MatrixType& m) timerSqrt.start(); for (int k=0; k chol(covMat); + LLT chol(covMat); acc += chol.matrixL().coeff(r,c); } timerSqrt.stop(); @@ -124,17 +124,17 @@ int main(int argc, char* argv[]) std::cout << "\n"; for (uint i=0; dynsizes[i]>0; ++i) - benchCholesky(Matrix(dynsizes[i],dynsizes[i])); - -// benchCholesky(Matrix()); -// benchCholesky(Matrix()); -// benchCholesky(Matrix()); -// benchCholesky(Matrix()); -// benchCholesky(Matrix()); -// benchCholesky(Matrix()); -// benchCholesky(Matrix()); -// benchCholesky(Matrix()); -// benchCholesky(Matrix()); + benchLLT(Matrix(dynsizes[i],dynsizes[i])); + +// benchLLT(Matrix()); +// benchLLT(Matrix()); +// benchLLT(Matrix()); +// benchLLT(Matrix()); +// benchLLT(Matrix()); +// benchLLT(Matrix()); +// benchLLT(Matrix()); +// benchLLT(Matrix()); +// benchLLT(Matrix()); return 0; } -- cgit v1.2.3