diff options
author | 2008-06-19 17:33:57 +0000 | |
---|---|---|
committer | 2008-06-19 17:33:57 +0000 | |
commit | 82c3cea1d5f940288359ff1120ae58531f6cd375 (patch) | |
tree | 1f0a22e329d17d5a4e0451c718726cbe8076b827 /Eigen/src/Core/util | |
parent | 5dbfed190264dd39afa9d97f2bb9a1fc18e85e94 (diff) |
* refactoring of Product:
* use ProductReturnType<>::Type to get the correct Product xpr type
* Product is no longer instanciated for xpr types which are evaluated
* vectorization of "a.transpose() * b" for the normal product (small and fixed-size matrix)
* some cleanning
* removed ArrayBase
Diffstat (limited to 'Eigen/src/Core/util')
-rw-r--r-- | Eigen/src/Core/util/Constants.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/util/ForwardDeclarations.h | 5 | ||||
-rw-r--r-- | Eigen/src/Core/util/Meta.h | 9 |
3 files changed, 7 insertions, 9 deletions
diff --git a/Eigen/src/Core/util/Constants.h b/Eigen/src/Core/util/Constants.h index 9cac3e984..0b65a57aa 100644 --- a/Eigen/src/Core/util/Constants.h +++ b/Eigen/src/Core/util/Constants.h @@ -140,7 +140,7 @@ enum { Aligned=0, UnAligned=1 }; enum { ConditionalJumpCost = 5 }; enum CornerType { TopLeft, TopRight, BottomLeft, BottomRight }; enum DirectionType { Vertical, Horizontal }; -enum ProductEvaluationMode { NormalProduct, CacheFriendlyProduct, DiagonalProduct, LazyProduct}; +enum ProductEvaluationMode { NormalProduct, CacheFriendlyProduct, DiagonalProduct }; #endif // EIGEN_CONSTANTS_H diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index 6a3810df6..268b24db0 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -26,7 +26,6 @@ #define EIGEN_FORWARDDECLARATIONS_H template<typename T> struct ei_traits; -template<typename Lhs, typename Rhs> struct ei_product_eval_mode; template<typename T> struct NumTraits; template<typename Scalar, int Rows, int Cols, int MaxRows, int MaxCols, unsigned int SuggestedFlags> class ei_corrected_matrix_flags; @@ -49,7 +48,7 @@ template<typename MatrixType> class Conjugate; template<typename NullaryOp, typename MatrixType> class CwiseNullaryOp; template<typename UnaryOp, typename MatrixType> class CwiseUnaryOp; template<typename BinaryOp, typename Lhs, typename Rhs> class CwiseBinaryOp; -template<typename Lhs, typename Rhs, int EvalMode=ei_product_eval_mode<Lhs,Rhs>::value> class Product; +template<typename Lhs, typename Rhs, int ProductMode> class Product; template<typename CoeffsVectorType> class DiagonalMatrix; template<typename MatrixType> class DiagonalCoeffs; template<typename MatrixType> class Map; @@ -63,6 +62,8 @@ template<typename Scalar> class Rotation2D; template<typename Scalar> class AngleAxis; template<typename Scalar,int Dim> class Transform; +template<typename Lhs, typename Rhs> struct ei_product_mode; +template<typename Lhs, typename Rhs, int ProductMode = ei_product_mode<Lhs,Rhs>::value> struct ProductReturnType; template<typename Scalar> struct ei_scalar_sum_op; template<typename Scalar> struct ei_scalar_difference_op; diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index 33a09f87c..509b72cc0 100644 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -160,10 +160,7 @@ class ei_corrected_matrix_flags packet_access_bit = ei_packet_traits<Scalar>::size > 1 && (is_big || inner_size%ei_packet_traits<Scalar>::size==0) - ? PacketAccessBit : 0, - - _flags1 = (SuggestedFlags & ~(EvalBeforeNestingBit | EvalBeforeAssigningBit | PacketAccessBit | RowMajorBit)) - | LinearAccessBit | DirectAccessBit + ? PacketAccessBit : 0 }; public: @@ -208,7 +205,7 @@ template<typename T> struct ei_must_nest_by_value { enum { ret = false }; }; template<typename T> struct ei_must_nest_by_value<NestByValue<T> > { enum { ret = true }; }; -template<typename T, int n=1> struct ei_nested +template<typename T, int n=1, typename EvalType = typename ei_eval<T>::type> struct ei_nested { typedef typename ei_meta_if< ei_must_nest_by_value<T>::ret, @@ -216,7 +213,7 @@ template<typename T, int n=1> struct ei_nested typename ei_meta_if< (int(ei_traits<T>::Flags) & EvalBeforeNestingBit) || ((n+1) * int(NumTraits<typename ei_traits<T>::Scalar>::ReadCost) <= (n-1) * int(T::CoeffReadCost)), - typename ei_eval<T>::type, + EvalType, const T& >::ret >::ret type; |