* improved product performance:

- fallback to normal product for small dynamic matrices
 - overloaded "c += (a * b).lazy()" to avoid the expensive and useless temporary and setZero()
   in such very common cases.
* fix a couple of issues with the flags
This commit is contained in:
Gael Guennebaud
2008-05-22 14:51:25 +00:00
parent 106a0c1bef
commit 94e1629a1b
5 changed files with 77 additions and 23 deletions

View File

@@ -163,7 +163,7 @@ template<typename Derived> class MatrixBase
* \sa rows(), cols(), IsVectorAtCompileTime. */
inline bool isVector() const { return rows()==1 || cols()==1; }
//@}
/// \name Default return types
//@{
/** Represents a constant matrix */
@@ -255,6 +255,9 @@ template<typename Derived> class MatrixBase
template<typename OtherDerived>
Derived& operator-=(const MatrixBase<OtherDerived>& other);
template<typename Lhs,typename Rhs>
Derived& operator+=(const Flagged<Product<Lhs,Rhs,CacheFriendlyProduct>, 0, EvalBeforeNestingBit | EvalBeforeAssigningBit>& other);
Derived& operator*=(const Scalar& other);
Derived& operator/=(const Scalar& other);
@@ -407,7 +410,7 @@ template<typename Derived> class MatrixBase
bool isOrtho(const MatrixBase<OtherDerived>& other,
RealScalar prec = precision<Scalar>()) const;
bool isOrtho(RealScalar prec = precision<Scalar>()) const;
template<typename OtherDerived>
inline bool operator==(const MatrixBase<OtherDerived>& other) const
{ return derived().cwiseEqualTo(other.derived()).all(); }
@@ -583,8 +586,8 @@ template<typename Derived> class MatrixBase
//@{
const QR<typename ei_eval<Derived>::type> qr() const;
//@}
#ifdef EIGEN_MATRIX_CUSTOM_ADDONS_FILE
#include EIGEN_MATRIX_CUSTOM_ADDONS_FILE
#endif