From 2e38666d01e395ecb4ffb41e3d031aff1f984308 Mon Sep 17 00:00:00 2001 From: Desire NUENTSA Date: Tue, 4 Sep 2012 11:36:57 +0200 Subject: [PATCH] correct bug in Blas 3 2D block update --- Eigen/src/SparseLU/SparseLU_panel_bmod.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Eigen/src/SparseLU/SparseLU_panel_bmod.h b/Eigen/src/SparseLU/SparseLU_panel_bmod.h index 90d3297a1..36b4f74df 100644 --- a/Eigen/src/SparseLU/SparseLU_panel_bmod.h +++ b/Eigen/src/SparseLU/SparseLU_panel_bmod.h @@ -49,7 +49,7 @@ * */ template -void LU_panel_bmod(const int m, const int w, const int jcol, const int nseg, ScalarVector& dense, ScalarVector& tempv, DenseIndexBlock& segrep, DenseIndexBlock& repfnz, LU_GlobalLU_t& glu) +void LU_panel_bmod(const int m, const int w, const int jcol, const int nseg, ScalarVector& dense, ScalarVector& tempv, DenseIndexBlock& segrep, DenseIndexBlock& repfnz, LU_GlobalLU_t& glu) { typedef typename ScalarVector::Scalar Scalar; @@ -95,7 +95,7 @@ void LU_panel_bmod(const int m, const int w, const int jcol, const int nseg, Sca // if the blocks are large enough, use level 3 // TODO find better heuristics! - if(true /*nsupc >= 50 && nrow > 50 && u_cols>6*/) + if( nsupc >= 50 && nrow > 50 && u_cols>6) { Map > U(tempv.data(), u_rows, u_cols); @@ -117,13 +117,13 @@ void LU_panel_bmod(const int m, const int w, const int jcol, const int nseg, Sca int isub = lptr + no_zeros; int off = u_rows-segsize; + for (int i = 0; i < off; i++) U(i,u_col) = 0; for (int i = 0; i < segsize; i++) { int irow = glu.lsub(isub); U(i+off,u_col) = dense_col(irow); ++isub; } - u_col++; } // solve U = A^-1 U