mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
hehe, the complicated nesting scheme in Flagged in the previous commit
was a sign that we were doing something wrong. In fact, having NestByValue as a special case of Flagged was wrong, and the previous commit, while not buggy, was inefficient because then when the resulting NestByValue xpr was nested -- hence copied -- the original xpr which was already nested by value was copied again; hence instead of 1 copy we got 3 copies. The solution was to ressuscitate the old Temporary.h (renamed NestByValue.h) as it was the right approach.
This commit is contained in:
@@ -94,11 +94,7 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> clas
|
||||
}
|
||||
|
||||
protected:
|
||||
const typename ei_meta_if<
|
||||
Added & ~Removed & NestByValueBit,
|
||||
ExpressionType,
|
||||
typename ExpressionType::Nested
|
||||
>::ret m_matrix;
|
||||
typename ExpressionType::Nested m_matrix;
|
||||
};
|
||||
|
||||
/** \returns an expression of *this with added flags
|
||||
@@ -121,13 +117,4 @@ MatrixBase<Derived>::lazy() const
|
||||
return derived();
|
||||
}
|
||||
|
||||
/** \returns an expression of *this with the NestByValueBit flag added.
|
||||
*/
|
||||
template<typename Derived>
|
||||
inline const Flagged<Derived, NestByValueBit, 0>
|
||||
MatrixBase<Derived>::nestByValue() const
|
||||
{
|
||||
return derived();
|
||||
}
|
||||
|
||||
#endif // EIGEN_FLAGGED_H
|
||||
|
||||
Reference in New Issue
Block a user