mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-09 07:00:27 +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>
|
||||
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, typename Lhs, typename Rhs>
|
||||
EIGEN_STRONG_INLINE ExpressionType& operator=(const MatrixPowerProductBase<Derived,Lhs,Rhs>& other)
|
||||
{ other.derived().evalTo(m_expression); return m_expression; }
|
||||
#endif
|
||||
|
||||
ExpressionType& expression() const
|
||||
|
@ -250,26 +250,11 @@ class MatrixPowerProductBase : public MatrixBase<Derived>
|
||||
typedef MatrixBase<Derived> Base;
|
||||
EIGEN_DENSE_PUBLIC_INTERFACE(MatrixPowerProductBase)
|
||||
|
||||
typedef typename Base::PlainObject PlainObject;
|
||||
|
||||
inline Index rows() const { return derived().rows(); }
|
||||
inline Index cols() const { return derived().cols(); }
|
||||
|
||||
template<typename ResultType>
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user