From d5d99dd1f001b6bb05d530ab40e455a69703dcc6 Mon Sep 17 00:00:00 2001 From: Chen-Pang He Date: Sun, 16 Sep 2012 14:42:42 +0800 Subject: [PATCH] Optimize matrix functions: m_fT is triangular and trmm is faster than gemm --- unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h b/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h index c57ca87ed..e87a28f6c 100644 --- a/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h +++ b/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h @@ -209,7 +209,7 @@ void MatrixFunction::compute(ResultType& result) permuteSchur(); computeBlockAtomic(); computeOffDiagonal(); - result = m_U * m_fT * m_U.adjoint(); + result = m_U * (m_fT.template triangularView() * m_U.adjoint()); } /** \brief Store the Schur decomposition of #m_A in #m_T and #m_U */