mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Sparse module: removed some extra copies using markAsRValue()
This commit is contained in:
@@ -94,7 +94,7 @@ SparseMatrix<Scalar,Flags> SparseMatrix<Scalar,Flags>::Map(cholmod_sparse& cm)
|
||||
reinterpret_cast<Scalar*>(cm.x),
|
||||
res.m_outerIndex[cm.ncol]);
|
||||
res.m_data.swap(data);
|
||||
// res.markAsRValue();
|
||||
res.markAsRValue();
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ SparseMatrix<Scalar,Flags> SparseMatrix<Scalar,Flags>::Map(taucs_ccs_matrix& tau
|
||||
reinterpret_cast<Scalar*>(taucsMat.values.v),
|
||||
taucsMat.colptr[taucsMat.n]);
|
||||
res.m_data.swap(data);
|
||||
// res.markAsRValue();
|
||||
res.markAsRValue();
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user