aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseLU/SparseLU_pivotL.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2012-10-30 15:09:48 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2012-10-30 15:09:48 +0100
commitfea4220f3728e60bde06147ff9b89e10df203466 (patch)
treec26978864d04c3da65f09fe2590feb6b4dce52f0 /Eigen/src/SparseLU/SparseLU_pivotL.h
parentf7e203fb0c3033df26b3f75cc3812989c19041a2 (diff)
SparseLU: add a specialized gemm kernel, and add padding to the supernodes such that supernodes columns are all properly aligned
Diffstat (limited to 'Eigen/src/SparseLU/SparseLU_pivotL.h')
-rw-r--r--Eigen/src/SparseLU/SparseLU_pivotL.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Eigen/src/SparseLU/SparseLU_pivotL.h b/Eigen/src/SparseLU/SparseLU_pivotL.h
index c4a9f1c74..9f56903c8 100644
--- a/Eigen/src/SparseLU/SparseLU_pivotL.h
+++ b/Eigen/src/SparseLU/SparseLU_pivotL.h
@@ -60,6 +60,7 @@ int SparseLUBase<Scalar,Index>::LU_pivotL(const int jcol, const RealScalar diagp
Index nsupc = jcol - fsupc; // Number of columns in the supernode portion, excluding jcol; nsupc >=0
Index lptr = glu.xlsub(fsupc); // pointer to the starting location of the row subscripts for this supernode portion
Index nsupr = glu.xlsub(fsupc+1) - lptr; // Number of rows in the supernode
+ Index lda = glu.xlusup(fsupc+1) - glu.xlusup(fsupc); // leading dimension
Scalar* lu_sup_ptr = &(glu.lusup.data()[glu.xlusup(fsupc)]); // Start of the current supernode
Scalar* lu_col_ptr = &(glu.lusup.data()[glu.xlusup(jcol)]); // Start of jcol in the supernode
Index* lsub_ptr = &(glu.lsub.data()[lptr]); // Start of row indices of the supernode
@@ -112,8 +113,8 @@ int SparseLUBase<Scalar,Index>::LU_pivotL(const int jcol, const RealScalar diagp
// such that L is indexed the same way as A
for (icol = 0; icol <= nsupc; icol++)
{
- itemp = pivptr + icol * nsupr;
- std::swap(lu_sup_ptr[itemp], lu_sup_ptr[nsupc + icol * nsupr]);
+ itemp = pivptr + icol * lda;
+ std::swap(lu_sup_ptr[itemp], lu_sup_ptr[nsupc + icol * lda]);
}
}
// cdiv operations