Eliminate unnecessary evaluations

This commit is contained in:
Chen-Pang He
2012-09-23 00:20:19 +08:00
parent 7e64f78f65
commit 963794b04a
5 changed files with 72 additions and 55 deletions

View File

@@ -162,6 +162,9 @@ template<typename Derived> class MatrixBase
#ifndef EIGEN_PARSED_BY_DOXYGEN
template<typename ProductDerived, typename Lhs, typename Rhs>
Derived& lazyAssign(const ProductBase<ProductDerived, Lhs,Rhs>& other);
template<typename ProductDerived, typename Lhs, typename Rhs>
Derived& lazyAssign(const MatrixPowerProductBase<ProductDerived, Lhs,Rhs>& other);
#endif // not EIGEN_PARSED_BY_DOXYGEN
template<typename OtherDerived>

View File

@@ -81,8 +81,8 @@ class NoAlias
EIGEN_STRONG_INLINE ExpressionType& operator-=(const CoeffBasedProduct<Lhs,Rhs,NestingFlags>& other)
{ return m_expression.derived() -= CoeffBasedProduct<Lhs,Rhs,NestByRefBit>(other.lhs(), other.rhs()); }
template<typename Derived>
EIGEN_STRONG_INLINE ExpressionType& operator=(const MatrixPowerProductBase<Derived>& other)
template<typename Derived, typename Lhs, typename Rhs>
EIGEN_STRONG_INLINE ExpressionType& operator=(const MatrixPowerProductBase<Derived,Lhs,Rhs>& other)
{ other.derived().evalTo(m_expression); return m_expression; }
#endif

View File

@@ -272,7 +272,7 @@ template<typename Derived> class MatrixFunctionReturnValue;
template<typename Derived> class MatrixSquareRootReturnValue;
template<typename Derived> class MatrixLogarithmReturnValue;
template<typename Derived> class MatrixPowerReturnValue;
template<typename Derived> class MatrixPowerProductBase;
template<typename Derived, typename Lhs, typename Rhs> class MatrixPowerProductBase;
namespace internal {
template <typename Scalar>