aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseCore/SparseSolverBase.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-02-16 13:19:05 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-02-16 13:19:05 +0100
commitaa6c516ec17fb44dff85b1abf3a1b05d58d3bc01 (patch)
treecd0b6ce4d023ff6734beecc167749d00f301c017 /Eigen/src/SparseCore/SparseSolverBase.h
parentfc202bab398ed9b78ef8452f8e4ef35e233965f6 (diff)
Fix many long to int conversion warnings:
- fix usage of Index (API) versus StorageIndex (when multiple indexes are stored) - use StorageIndex(val) when the input has already been check - use internal::convert_index<StorageIndex>(val) when val is potentially unsafe (directly comes from user input)
Diffstat (limited to 'Eigen/src/SparseCore/SparseSolverBase.h')
-rw-r--r--Eigen/src/SparseCore/SparseSolverBase.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Eigen/src/SparseCore/SparseSolverBase.h b/Eigen/src/SparseCore/SparseSolverBase.h
index df4e2f017..1cb7080cf 100644
--- a/Eigen/src/SparseCore/SparseSolverBase.h
+++ b/Eigen/src/SparseCore/SparseSolverBase.h
@@ -24,16 +24,16 @@ void solve_sparse_through_dense_panels(const Decomposition &dec, const Rhs& rhs,
EIGEN_STATIC_ASSERT((Dest::Flags&RowMajorBit)==0,THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);
typedef typename Dest::Scalar DestScalar;
// we process the sparse rhs per block of NbColsAtOnce columns temporarily stored into a dense matrix.
- static const int NbColsAtOnce = 4;
- int rhsCols = rhs.cols();
- int size = rhs.rows();
+ static const Index NbColsAtOnce = 4;
+ Index rhsCols = rhs.cols();
+ Index size = rhs.rows();
// the temporary matrices do not need more columns than NbColsAtOnce:
- int tmpCols = (std::min)(rhsCols, NbColsAtOnce);
+ Index tmpCols = (std::min)(rhsCols, NbColsAtOnce);
Eigen::Matrix<DestScalar,Dynamic,Dynamic> tmp(size,tmpCols);
Eigen::Matrix<DestScalar,Dynamic,Dynamic> tmpX(size,tmpCols);
- for(int k=0; k<rhsCols; k+=NbColsAtOnce)
+ for(Index k=0; k<rhsCols; k+=NbColsAtOnce)
{
- int actualCols = std::min<int>(rhsCols-k, NbColsAtOnce);
+ Index actualCols = std::min<Index>(rhsCols-k, NbColsAtOnce);
tmp.leftCols(actualCols) = rhs.middleCols(k,actualCols);
tmpX.leftCols(actualCols) = dec.solve(tmp.leftCols(actualCols));
dest.middleCols(k,actualCols) = tmpX.leftCols(actualCols).sparseView();