mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-07 03:39:04 +08:00
LLT: avoid making a copy when decomposing in place
This commit is contained in:
parent
e27f17bf5c
commit
be281e5289
@ -428,6 +428,7 @@ LLT<MatrixType,_UpLo>& LLT<MatrixType,_UpLo>::compute(const EigenBase<InputType>
|
|||||||
eigen_assert(a.rows()==a.cols());
|
eigen_assert(a.rows()==a.cols());
|
||||||
const Index size = a.rows();
|
const Index size = a.rows();
|
||||||
m_matrix.resize(size, size);
|
m_matrix.resize(size, size);
|
||||||
|
if (!internal::is_same_dense(m_matrix, a.derived()))
|
||||||
m_matrix = a.derived();
|
m_matrix = a.derived();
|
||||||
|
|
||||||
// Compute matrix L1 norm = max abs column sum.
|
// Compute matrix L1 norm = max abs column sum.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user