diff options
Diffstat (limited to 'Eigen/src/SPQRSupport/SuiteSparseQRSupport.h')
-rw-r--r-- | Eigen/src/SPQRSupport/SuiteSparseQRSupport.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h b/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h index 0ffb894f6..aa41f434c 100644 --- a/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +++ b/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h @@ -83,10 +83,12 @@ class SPQR ~SPQR() { // Calls SuiteSparseQR_free() - cholmod_free_sparse(&m_H, &m_cc); - cholmod_free_dense(&m_HTau, &m_cc); - delete[] m_E; - delete[] m_HPinv; + cholmod_l_free_sparse(&m_H, &m_cc); + cholmod_l_free_sparse(&m_cR, &m_cc); + cholmod_l_free_dense(&m_HTau, &m_cc); + std::free(m_E); + std::free(m_HPinv); + cholmod_l_finish(&m_cc); } void compute(const _MatrixType& matrix) { @@ -244,7 +246,7 @@ struct SPQR_QProduct : ReturnByValue<SPQR_QProduct<SPQRType,Derived> > y_cd = viewAsCholmod(m_other.const_cast_derived()); x_cd = SuiteSparseQR_qmult<Scalar>(method, m_spqr.m_H, m_spqr.m_HTau, m_spqr.m_HPinv, &y_cd, cc); res = Matrix<Scalar,ResType::RowsAtCompileTime,ResType::ColsAtCompileTime>::Map(reinterpret_cast<Scalar*>(x_cd->x), x_cd->nrow, x_cd->ncol); - cholmod_free_dense(&x_cd, cc); + cholmod_l_free_dense(&x_cd, cc); } const SPQRType& m_spqr; const Derived& m_other; @@ -301,4 +303,4 @@ struct solve_retval<SPQR<_MatrixType>, Rhs> } // end namespace internal }// End namespace Eigen -#endif
\ No newline at end of file +#endif |