mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Update and fix Cholesky mini benchmark
This commit is contained in:
parent
a72752caac
commit
5fbe7aa604
@ -31,7 +31,7 @@ __attribute__ ((noinline)) void benchLLT(const MatrixType& m)
|
|||||||
int rows = m.rows();
|
int rows = m.rows();
|
||||||
int cols = m.cols();
|
int cols = m.cols();
|
||||||
|
|
||||||
int cost = 0;
|
double cost = 0;
|
||||||
for (int j=0; j<rows; ++j)
|
for (int j=0; j<rows; ++j)
|
||||||
{
|
{
|
||||||
int r = std::max(rows - j -1,0);
|
int r = std::max(rows - j -1,0);
|
||||||
@ -78,10 +78,10 @@ __attribute__ ((noinline)) void benchLLT(const MatrixType& m)
|
|||||||
else
|
else
|
||||||
std::cout << "fixed ";
|
std::cout << "fixed ";
|
||||||
std::cout << covMat.rows() << " \t"
|
std::cout << covMat.rows() << " \t"
|
||||||
<< (timerNoSqrt.value() * REPEAT) / repeats << "s "
|
<< (timerNoSqrt.best()) / repeats << "s "
|
||||||
<< "(" << 1e-6 * cost*repeats/timerNoSqrt.value() << " MFLOPS)\t"
|
<< "(" << 1e-9 * cost*repeats/timerNoSqrt.best() << " GFLOPS)\t"
|
||||||
<< (timerSqrt.value() * REPEAT) / repeats << "s "
|
<< (timerSqrt.best()) / repeats << "s "
|
||||||
<< "(" << 1e-6 * cost*repeats/timerSqrt.value() << " MFLOPS)\n";
|
<< "(" << 1e-9 * cost*repeats/timerSqrt.best() << " GFLOPS)\n";
|
||||||
|
|
||||||
|
|
||||||
#ifdef BENCH_GSL
|
#ifdef BENCH_GSL
|
||||||
@ -119,13 +119,13 @@ __attribute__ ((noinline)) void benchLLT(const MatrixType& m)
|
|||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
const int dynsizes[] = {4,6,8,16,24,32,49,64,128,256,512,900,0};
|
const int dynsizes[] = {4,6,8,16,24,32,49,64,128,256,512,900,1500,0};
|
||||||
std::cout << "size no sqrt standard";
|
std::cout << "size LDLT LLT";
|
||||||
// #ifdef BENCH_GSL
|
// #ifdef BENCH_GSL
|
||||||
// std::cout << " GSL (standard + double + ATLAS) ";
|
// std::cout << " GSL (standard + double + ATLAS) ";
|
||||||
// #endif
|
// #endif
|
||||||
std::cout << "\n";
|
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,Dynamic,Dynamic>(dynsizes[i],dynsizes[i]));
|
||||||
|
|
||||||
benchLLT(Matrix<Scalar,2,2>());
|
benchLLT(Matrix<Scalar,2,2>());
|
||||||
|
Loading…
Reference in New Issue
Block a user