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 | |
parent | 00c29c2caef8fb0c6b1d2ba5ecdf6780c0c766d4 (diff) |
Fix/handle some int-to-long conversions.
-rw-r--r-- | Eigen/src/LU/PartialPivLU.h | 2 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseBlock.h | 4 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseMatrix.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/LU/PartialPivLU.h b/Eigen/src/LU/PartialPivLU.h index 715d2b09c..b68916287 100644 --- a/Eigen/src/LU/PartialPivLU.h +++ b/Eigen/src/LU/PartialPivLU.h @@ -434,7 +434,7 @@ struct partial_lu_impl // update permutations and apply them to A_0 for(Index i=k; i<k+bs; ++i) { - Index piv = (row_transpositions[i] += k); + Index piv = (row_transpositions[i] += internal::convert_index<PivIndex>(k)); A_0.row(i).swap(A_0.row(piv)); } 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; |