aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseLU/SparseLU_Utils.h
diff options
context:
space:
mode:
authorGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2012-06-11 18:52:26 +0200
committerGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2012-06-11 18:52:26 +0200
commitbccf64d34281066da48cf2da29fd61f7ed703025 (patch)
treeab930f43ff368ef45612f9b4e7f0b701536ed007 /Eigen/src/SparseLU/SparseLU_Utils.h
parent0591011d5cedccf62feb86bee70cd658192ea3df (diff)
Checking Syntax...
Diffstat (limited to 'Eigen/src/SparseLU/SparseLU_Utils.h')
-rw-r--r--Eigen/src/SparseLU/SparseLU_Utils.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/Eigen/src/SparseLU/SparseLU_Utils.h b/Eigen/src/SparseLU/SparseLU_Utils.h
index 8d3d5efee..5c12b6243 100644
--- a/Eigen/src/SparseLU/SparseLU_Utils.h
+++ b/Eigen/src/SparseLU/SparseLU_Utils.h
@@ -25,15 +25,13 @@
#ifdef EIGEN_SPARSELU_UTILS_H
#define EIGEN_SPARSELU_UTILS_H
-// Number of marker arrays used in the symbolic factorization each of size n
-#define LU_NO_MARKER 3
-#define LU_NUM_TEMPV(m,w,t,b) (std::max(m, (t+b)*w) )
-#define IND_EMPTY (-1)
+// Number of marker arrays used in the factorization each of size n
-void SparseLU::LU_countnz(const int n, VectorXi& xprune, int& nnzL, int& nnzU, GlobalLU_t& Glu)
+template <typename IndexVector>
+void SparseLU::LU_countnz(const int n, IndexVector& xprune, int& nnzL, int& nnzU, GlobalLU_t& Glu)
{
- VectorXi& xsup = Glu.xsup;
- VectorXi& xlsub = Glu.xlsub;
+ IndexVector& xsup = Glu.xsup;
+ IndexVector& xlsub = Glu.xlsub;
nnzL = 0;
nnzU = (Glu.xusub)(n);
int nnzL0 = 0;
@@ -65,12 +63,13 @@ void SparseLU::LU_countnz(const int n, VectorXi& xprune, int& nnzL, int& nnzU, G
* and applies permutation to the remaining subscripts
*
*/
-void SparseLU::LU_fixupL(const int n, const VectorXi& perm_r, GlobalLU_t& Glu)
+template <typename IndexVector>
+void SparseLU::LU_fixupL(const int n, const IndexVector& perm_r, GlobalLU_t& Glu)
{
int nsuper, fsupc, i, j, k, jstart;
- VectorXi& xsup = GLu.xsup;
- VectorXi& lsub = Glu.lsub;
- VectorXi& xlsub = Glu.xlsub;
+ IndexVector& xsup = GLu.xsup;
+ IndexVector& lsub = Glu.lsub;
+ IndexVector& xlsub = Glu.xlsub;
int nextl = 0;
int nsuper = (Glu.supno)(n);