mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-27 22:34:21 +08:00
Sparse module: removed some extra copies using markAsRValue()
This commit is contained in:
parent
b730c6f57d
commit
3c155ab073
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user