diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-05-26 17:35:53 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-05-26 17:35:53 +0200 |
commit | bebc5a2147dafb86d786bf0543ddb4dd6a35fb82 (patch) | |
tree | d651c8f68a3273fec83b3a1a0cb52a834c167e3e /Eigen/src/SparseCore | |
parent | 00c29c2caef8fb0c6b1d2ba5ecdf6780c0c766d4 (diff) |
Fix/handle some int-to-long conversions.
Diffstat (limited to 'Eigen/src/SparseCore')
-rw-r--r-- | Eigen/src/SparseCore/SparseBlock.h | 4 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseMatrix.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/SparseCore/SparseBlock.h b/Eigen/src/SparseCore/SparseBlock.h index 82fae8c4b..0e447f15f 100644 --- a/Eigen/src/SparseCore/SparseBlock.h +++ b/Eigen/src/SparseCore/SparseBlock.h @@ -189,9 +189,9 @@ public: StorageIndex p = StorageIndex(start);
for(Index k=0; k<m_outerSize.value(); ++k)
{
- Index nnz_k = tmp.innerVector(k).nonZeros();
+ StorageIndex nnz_k = internal::convert_index<StorageIndex>(tmp.innerVector(k).nonZeros());
if(!m_matrix.isCompressed())
- matrix.innerNonZeroPtr()[m_outerStart+k] = StorageIndex(nnz_k);
+ matrix.innerNonZeroPtr()[m_outerStart+k] = nnz_k;
matrix.outerIndexPtr()[m_outerStart+k] = p;
p += nnz_k;
}
diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index 760e151eb..a78bd57c3 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -1080,7 +1080,7 @@ EIGEN_DONT_INLINE SparseMatrix<Scalar,_Options,_Index>& SparseMatrix<Scalar,_Opt IndexVector positions(dest.outerSize()); for (Index j=0; j<dest.outerSize(); ++j) { - Index tmp = dest.m_outerIndex[j]; + StorageIndex tmp = dest.m_outerIndex[j]; dest.m_outerIndex[j] = count; positions[j] = count; count += tmp; |