add SparseLU in sparse bench

This commit is contained in:
Desire NUENTSA
2012-09-10 12:41:26 +02:00
parent 5433986f5a
commit 2c99d84133
5 changed files with 363 additions and 827 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -27,8 +27,10 @@
#define EIGEN_ORDERING_H
#include "Amd.h"
#include "Eigen_Colamd.h"
namespace Eigen {
#include "Eigen_Colamd.h"
namespace internal {
/**
@@ -131,18 +133,18 @@ class COLAMDOrdering
int n = mat.cols();
int nnz = mat.nonZeros();
// Get the recommended value of Alen to be used by colamd
int Alen = eigen_colamd_recommended(nnz, m, n);
int Alen = internal::colamd_recommended(nnz, m, n);
// Set the default parameters
double knobs [EIGEN_COLAMD_KNOBS];
int stats [EIGEN_COLAMD_STATS];
eigen_colamd_set_defaults(knobs);
double knobs [COLAMD_KNOBS];
int stats [COLAMD_STATS];
internal::colamd_set_defaults(knobs);
int info;
IndexVector p(n+1), A(Alen);
for(int i=0; i <= n; i++) p(i) = mat.outerIndexPtr()[i];
for(int i=0; i < nnz; i++) A(i) = mat.innerIndexPtr()[i];
// Call Colamd routine to compute the ordering
info = eigen_colamd(m, n, Alen, A.data(), p.data(), knobs, stats);
info = internal::colamd(m, n, Alen, A.data(), p.data(), knobs, stats);
eigen_assert( info && "COLAMD failed " );
perm.resize(n);

View File

@@ -205,7 +205,7 @@ class SparseLU
void initperfvalues()
{
m_perfv.panel_size = 12;
m_perfv.relax = 6;
m_perfv.relax = 1;
m_perfv.maxsuper = 100;
m_perfv.rowblk = 200;
m_perfv.colblk = 60;