mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-12 09:23:12 +08:00
Fix/handle some int-to-long conversions.
This commit is contained in:
parent
00c29c2cae
commit
bebc5a2147
@ -434,7 +434,7 @@ struct partial_lu_impl
|
|||||||
// update permutations and apply them to A_0
|
// update permutations and apply them to A_0
|
||||||
for(Index i=k; i<k+bs; ++i)
|
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));
|
A_0.row(i).swap(A_0.row(piv));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,9 +189,9 @@ public:
|
|||||||
StorageIndex p = StorageIndex(start);
|
StorageIndex p = StorageIndex(start);
|
||||||
for(Index k=0; k<m_outerSize.value(); ++k)
|
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())
|
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;
|
matrix.outerIndexPtr()[m_outerStart+k] = p;
|
||||||
p += nnz_k;
|
p += nnz_k;
|
||||||
}
|
}
|
||||||
|
@ -1080,7 +1080,7 @@ EIGEN_DONT_INLINE SparseMatrix<Scalar,_Options,_Index>& SparseMatrix<Scalar,_Opt
|
|||||||
IndexVector positions(dest.outerSize());
|
IndexVector positions(dest.outerSize());
|
||||||
for (Index j=0; j<dest.outerSize(); ++j)
|
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;
|
dest.m_outerIndex[j] = count;
|
||||||
positions[j] = count;
|
positions[j] = count;
|
||||||
count += tmp;
|
count += tmp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user