mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add construct_at, destroy_at wrappers. Use throughout.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
dfa5176780
commit
cd2ba9d03e
@@ -531,16 +531,16 @@ class UmfPackLU : public SparseSolverBase<UmfPackLU<MatrixType_> >
|
||||
template<typename MatrixDerived>
|
||||
void grab(const EigenBase<MatrixDerived> &A)
|
||||
{
|
||||
mp_matrix.~UmfpackMatrixRef();
|
||||
::new (&mp_matrix) UmfpackMatrixRef(A.derived());
|
||||
internal::destroy_at(&mp_matrix);
|
||||
internal::construct_at(&mp_matrix, A.derived());
|
||||
}
|
||||
|
||||
void grab(const UmfpackMatrixRef &A)
|
||||
{
|
||||
if(&(A.derived()) != &mp_matrix)
|
||||
{
|
||||
mp_matrix.~UmfpackMatrixRef();
|
||||
::new (&mp_matrix) UmfpackMatrixRef(A);
|
||||
internal::destroy_at(&mp_matrix);
|
||||
internal::construct_at(&mp_matrix, A);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user