From 68069af969239f717cb8acfa927c03b6e8cefb8d Mon Sep 17 00:00:00 2001 From: Pavel Holoborodko Date: Tue, 20 Aug 2013 15:00:28 +0900 Subject: [PATCH] Added support for custom scalars --- Eigen/src/SparseLU/SparseLU.h | 6 ++++-- Eigen/src/SparseLU/SparseLU_pivotL.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Eigen/src/SparseLU/SparseLU.h b/Eigen/src/SparseLU/SparseLU.h index ca932d64f..a504cb972 100644 --- a/Eigen/src/SparseLU/SparseLU.h +++ b/Eigen/src/SparseLU/SparseLU.h @@ -268,7 +268,8 @@ class SparseLU : public internal::SparseLUImpl::pivotL(const Index jcol, const RealScalar& dia RealScalar rtemp; Index isub, icol, itemp, k; for (isub = nsupc; isub < nsupr; ++isub) { - rtemp = std::abs(lu_col_ptr[isub]); + using std::abs; + rtemp = abs(lu_col_ptr[isub]); if (rtemp > pivmax) { pivmax = rtemp; pivptr = isub; @@ -101,7 +102,8 @@ Index SparseLUImpl::pivotL(const Index jcol, const RealScalar& dia if (diag >= 0 ) { // Diagonal element exists - rtemp = std::abs(lu_col_ptr[diag]); + using std::abs; + rtemp = abs(lu_col_ptr[diag]); if (rtemp != 0.0 && rtemp >= thresh) pivptr = diag; } pivrow = lsub_ptr[pivptr];