aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/spbench/test_sparseLU.cpp
diff options
context:
space:
mode:
authorGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2012-08-06 14:55:02 +0200
committerGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2012-08-06 14:55:02 +0200
commit4d3b7e2a1351d60b9ee26d0fe3442cd5b3a1f8a9 (patch)
tree8ad3484157af2e83be037c40634ba58d29a00720 /bench/spbench/test_sparseLU.cpp
parenta51806993b1a437af308db9c6893cab71e7ca814 (diff)
Add support for Metis fill-reducing ordering ; it is generally more efficient than COLAMD ordering
Diffstat (limited to 'bench/spbench/test_sparseLU.cpp')
-rw-r--r--bench/spbench/test_sparseLU.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/bench/spbench/test_sparseLU.cpp b/bench/spbench/test_sparseLU.cpp
index 59f8252d0..8c78b0c9b 100644
--- a/bench/spbench/test_sparseLU.cpp
+++ b/bench/spbench/test_sparseLU.cpp
@@ -7,6 +7,9 @@
#include <unsupported/Eigen/SparseExtra>
#include <Eigen/SparseLU>
#include <bench/BenchTimer.h>
+#ifdef EIGEN_METIS_SUPPORT
+#include <Eigen/MetisSupport>
+#endif
using namespace std;
using namespace Eigen;
@@ -21,7 +24,12 @@ int main(int argc, char **args)
typedef Matrix<scalar, Dynamic, 1> DenseRhs;
Matrix<scalar, Dynamic, 1> b, x, tmp;
// SparseLU<SparseMatrix<scalar, ColMajor>, AMDOrdering<int> > solver;
+#ifdef EIGEN_METIS_SUPPORT
+ SparseLU<SparseMatrix<scalar, ColMajor>, MetisOrdering<int> > solver;
+#else
SparseLU<SparseMatrix<scalar, ColMajor>, COLAMDOrdering<int> > solver;
+#endif
+
ifstream matrix_file;
string line;
int n;