mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-25 15:53:19 +08:00
Remove unnecessary code. lazyAssign seems to fix all (noalias, initialization, etc.)
This commit is contained in:
parent
334532b7f5
commit
d387dfa9dc
@ -80,10 +80,6 @@ class NoAlias
|
|||||||
template<typename Lhs, typename Rhs, int NestingFlags>
|
template<typename Lhs, typename Rhs, int NestingFlags>
|
||||||
EIGEN_STRONG_INLINE ExpressionType& operator-=(const CoeffBasedProduct<Lhs,Rhs,NestingFlags>& other)
|
EIGEN_STRONG_INLINE ExpressionType& operator-=(const CoeffBasedProduct<Lhs,Rhs,NestingFlags>& other)
|
||||||
{ return m_expression.derived() -= CoeffBasedProduct<Lhs,Rhs,NestByRefBit>(other.lhs(), other.rhs()); }
|
{ return m_expression.derived() -= CoeffBasedProduct<Lhs,Rhs,NestByRefBit>(other.lhs(), other.rhs()); }
|
||||||
|
|
||||||
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
|
#endif
|
||||||
|
|
||||||
ExpressionType& expression() const
|
ExpressionType& expression() const
|
||||||
|
@ -250,26 +250,11 @@ class MatrixPowerProductBase : public MatrixBase<Derived>
|
|||||||
typedef MatrixBase<Derived> Base;
|
typedef MatrixBase<Derived> Base;
|
||||||
EIGEN_DENSE_PUBLIC_INTERFACE(MatrixPowerProductBase)
|
EIGEN_DENSE_PUBLIC_INTERFACE(MatrixPowerProductBase)
|
||||||
|
|
||||||
typedef typename Base::PlainObject PlainObject;
|
|
||||||
|
|
||||||
inline Index rows() const { return derived().rows(); }
|
inline Index rows() const { return derived().rows(); }
|
||||||
inline Index cols() const { return derived().cols(); }
|
inline Index cols() const { return derived().cols(); }
|
||||||
|
|
||||||
template<typename ResultType>
|
template<typename ResultType>
|
||||||
inline void evalTo(ResultType& res) const { derived().evalTo(res); }
|
inline void evalTo(ResultType& res) const { derived().evalTo(res); }
|
||||||
|
|
||||||
const PlainObject& eval() const
|
|
||||||
{
|
|
||||||
m_result.resize(rows(), cols());
|
|
||||||
derived().evalTo(m_result);
|
|
||||||
return m_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
operator const PlainObject&() const
|
|
||||||
{ return eval(); }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
mutable PlainObject m_result;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user