diff options
Diffstat (limited to 'Eigen/src/Core/products')
-rw-r--r-- | Eigen/src/Core/products/CoeffBasedProduct.h | 4 | ||||
-rw-r--r-- | Eigen/src/Core/products/GeneralBlockPanelKernel.h | 38 | ||||
-rw-r--r-- | Eigen/src/Core/products/GeneralMatrixMatrix.h | 16 | ||||
-rw-r--r-- | Eigen/src/Core/products/GeneralMatrixVector.h | 12 | ||||
-rw-r--r-- | Eigen/src/Core/products/SelfadjointRank2Update.h | 6 | ||||
-rw-r--r-- | Eigen/src/Core/products/TriangularMatrixVector.h | 8 |
6 files changed, 42 insertions, 42 deletions
diff --git a/Eigen/src/Core/products/CoeffBasedProduct.h b/Eigen/src/Core/products/CoeffBasedProduct.h index e1f19d787..97cdddcdf 100644 --- a/Eigen/src/Core/products/CoeffBasedProduct.h +++ b/Eigen/src/Core/products/CoeffBasedProduct.h @@ -75,7 +75,7 @@ struct traits<CoeffBasedProduct<LhsNested,RhsNested,NestingFlags> > LhsRowMajor = LhsFlags & RowMajorBit, RhsRowMajor = RhsFlags & RowMajorBit, - SameType = is_same_type<typename _LhsNested::Scalar,typename _RhsNested::Scalar>::ret, + SameType = is_same<typename _LhsNested::Scalar,typename _RhsNested::Scalar>::value, CanVectorizeRhs = RhsRowMajor && (RhsFlags & PacketAccessBit) && (ColsAtCompileTime == Dynamic @@ -162,7 +162,7 @@ class CoeffBasedProduct { // we don't allow taking products of matrices of different real types, as that wouldn't be vectorizable. // We still allow to mix T and complex<T>. - EIGEN_STATIC_ASSERT((internal::is_same_type<typename Lhs::RealScalar, typename Rhs::RealScalar>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<typename Lhs::RealScalar, typename Rhs::RealScalar>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) eigen_assert(lhs.cols() == rhs.rows() && "invalid matrix product" diff --git a/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/Eigen/src/Core/products/GeneralBlockPanelKernel.h index 94ed792f7..074534861 100644 --- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h +++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h @@ -185,9 +185,9 @@ public: typedef typename packet_traits<RhsScalar>::type _RhsPacket; typedef typename packet_traits<ResScalar>::type _ResPacket; - typedef typename meta_if<Vectorizable,_LhsPacket,LhsScalar>::ret LhsPacket; - typedef typename meta_if<Vectorizable,_RhsPacket,RhsScalar>::ret RhsPacket; - typedef typename meta_if<Vectorizable,_ResPacket,ResScalar>::ret ResPacket; + typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket; + typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket; + typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket; typedef ResPacket AccPacket; @@ -256,9 +256,9 @@ public: typedef typename packet_traits<RhsScalar>::type _RhsPacket; typedef typename packet_traits<ResScalar>::type _ResPacket; - typedef typename meta_if<Vectorizable,_LhsPacket,LhsScalar>::ret LhsPacket; - typedef typename meta_if<Vectorizable,_RhsPacket,RhsScalar>::ret RhsPacket; - typedef typename meta_if<Vectorizable,_ResPacket,ResScalar>::ret ResPacket; + typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket; + typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket; + typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket; typedef ResPacket AccPacket; @@ -285,15 +285,15 @@ public: EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp) const { - madd_impl(a, b, c, tmp, typename meta_if<Vectorizable,meta_true,meta_false>::ret()); + madd_impl(a, b, c, tmp, typename conditional<Vectorizable,true_type,false_type>::type()); } - EIGEN_STRONG_INLINE void madd_impl(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp, const meta_true&) const + EIGEN_STRONG_INLINE void madd_impl(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp, const true_type&) const { tmp = b; tmp = pmul(a.v,tmp); c.v = padd(c.v,tmp); } - EIGEN_STRONG_INLINE void madd_impl(const LhsScalar& a, const RhsScalar& b, ResScalar& c, RhsScalar& /*tmp*/, const meta_false&) const + EIGEN_STRONG_INLINE void madd_impl(const LhsScalar& a, const RhsScalar& b, ResScalar& c, RhsScalar& /*tmp*/, const false_type&) const { c += a * b; } @@ -340,10 +340,10 @@ public: RealPacket second; }; - typedef typename meta_if<Vectorizable,RealPacket, Scalar>::ret LhsPacket; - typedef typename meta_if<Vectorizable,DoublePacket,Scalar>::ret RhsPacket; - typedef typename meta_if<Vectorizable,ScalarPacket,Scalar>::ret ResPacket; - typedef typename meta_if<Vectorizable,DoublePacket,Scalar>::ret AccPacket; + typedef typename conditional<Vectorizable,RealPacket, Scalar>::type LhsPacket; + typedef typename conditional<Vectorizable,DoublePacket,Scalar>::type RhsPacket; + typedef typename conditional<Vectorizable,ScalarPacket,Scalar>::type ResPacket; + typedef typename conditional<Vectorizable,DoublePacket,Scalar>::type AccPacket; EIGEN_STRONG_INLINE void initAcc(Scalar& p) { p = Scalar(0); } @@ -461,9 +461,9 @@ public: typedef typename packet_traits<RhsScalar>::type _RhsPacket; typedef typename packet_traits<ResScalar>::type _ResPacket; - typedef typename meta_if<Vectorizable,_LhsPacket,LhsScalar>::ret LhsPacket; - typedef typename meta_if<Vectorizable,_RhsPacket,RhsScalar>::ret RhsPacket; - typedef typename meta_if<Vectorizable,_ResPacket,ResScalar>::ret ResPacket; + typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket; + typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket; + typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket; typedef ResPacket AccPacket; @@ -490,15 +490,15 @@ public: EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp) const { - madd_impl(a, b, c, tmp, typename meta_if<Vectorizable,meta_true,meta_false>::ret()); + madd_impl(a, b, c, tmp, typename conditional<Vectorizable,true_type,false_type>::type()); } - EIGEN_STRONG_INLINE void madd_impl(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp, const meta_true&) const + EIGEN_STRONG_INLINE void madd_impl(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp, const true_type&) const { tmp = b; tmp.v = pmul(a,tmp.v); c = padd(c,tmp); } - EIGEN_STRONG_INLINE void madd_impl(const LhsScalar& a, const RhsScalar& b, ResScalar& c, RhsScalar& /*tmp*/, const meta_false&) const + EIGEN_STRONG_INLINE void madd_impl(const LhsScalar& a, const RhsScalar& b, ResScalar& c, RhsScalar& /*tmp*/, const false_type&) const { c += a * b; } diff --git a/Eigen/src/Core/products/GeneralMatrixMatrix.h b/Eigen/src/Core/products/GeneralMatrixMatrix.h index 39e65599d..61e1406e7 100644 --- a/Eigen/src/Core/products/GeneralMatrixMatrix.h +++ b/Eigen/src/Core/products/GeneralMatrixMatrix.h @@ -287,16 +287,16 @@ class level3_blocking template<int StorageOrder, typename _LhsScalar, typename _RhsScalar, int MaxRows, int MaxCols, int MaxDepth> class gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols, MaxDepth, true> : public level3_blocking< - typename meta_if<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::ret, - typename meta_if<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::ret> + typename conditional<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::type, + typename conditional<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::type> { enum { Transpose = StorageOrder==RowMajor, ActualRows = Transpose ? MaxCols : MaxRows, ActualCols = Transpose ? MaxRows : MaxCols }; - typedef typename meta_if<Transpose,_RhsScalar,_LhsScalar>::ret LhsScalar; - typedef typename meta_if<Transpose,_LhsScalar,_RhsScalar>::ret RhsScalar; + typedef typename conditional<Transpose,_RhsScalar,_LhsScalar>::type LhsScalar; + typedef typename conditional<Transpose,_LhsScalar,_RhsScalar>::type RhsScalar; typedef gebp_traits<LhsScalar,RhsScalar> Traits; enum { SizeA = ActualRows * MaxDepth, @@ -329,14 +329,14 @@ class gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols, M template<int StorageOrder, typename _LhsScalar, typename _RhsScalar, int MaxRows, int MaxCols, int MaxDepth> class gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols, MaxDepth, false> : public level3_blocking< - typename meta_if<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::ret, - typename meta_if<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::ret> + typename conditional<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::type, + typename conditional<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::type> { enum { Transpose = StorageOrder==RowMajor }; - typedef typename meta_if<Transpose,_RhsScalar,_LhsScalar>::ret LhsScalar; - typedef typename meta_if<Transpose,_LhsScalar,_RhsScalar>::ret RhsScalar; + typedef typename conditional<Transpose,_RhsScalar,_LhsScalar>::type LhsScalar; + typedef typename conditional<Transpose,_LhsScalar,_RhsScalar>::type RhsScalar; typedef gebp_traits<LhsScalar,RhsScalar> Traits; DenseIndex m_sizeA; diff --git a/Eigen/src/Core/products/GeneralMatrixVector.h b/Eigen/src/Core/products/GeneralMatrixVector.h index 41df6170c..540638b5a 100644 --- a/Eigen/src/Core/products/GeneralMatrixVector.h +++ b/Eigen/src/Core/products/GeneralMatrixVector.h @@ -57,9 +57,9 @@ typedef typename packet_traits<LhsScalar>::type _LhsPacket; typedef typename packet_traits<RhsScalar>::type _RhsPacket; typedef typename packet_traits<ResScalar>::type _ResPacket; -typedef typename meta_if<Vectorizable,_LhsPacket,LhsScalar>::ret LhsPacket; -typedef typename meta_if<Vectorizable,_RhsPacket,RhsScalar>::ret RhsPacket; -typedef typename meta_if<Vectorizable,_ResPacket,ResScalar>::ret ResPacket; +typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket; +typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket; +typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket; EIGEN_DONT_INLINE static void run( Index rows, Index cols, @@ -313,9 +313,9 @@ typedef typename packet_traits<LhsScalar>::type _LhsPacket; typedef typename packet_traits<RhsScalar>::type _RhsPacket; typedef typename packet_traits<ResScalar>::type _ResPacket; -typedef typename meta_if<Vectorizable,_LhsPacket,LhsScalar>::ret LhsPacket; -typedef typename meta_if<Vectorizable,_RhsPacket,RhsScalar>::ret RhsPacket; -typedef typename meta_if<Vectorizable,_ResPacket,ResScalar>::ret ResPacket; +typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket; +typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket; +typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket; EIGEN_DONT_INLINE static void run( Index rows, Index cols, diff --git a/Eigen/src/Core/products/SelfadjointRank2Update.h b/Eigen/src/Core/products/SelfadjointRank2Update.h index 13b088031..ece4c426b 100644 --- a/Eigen/src/Core/products/SelfadjointRank2Update.h +++ b/Eigen/src/Core/products/SelfadjointRank2Update.h @@ -63,7 +63,7 @@ struct selfadjoint_rank2_update_selector<Scalar,Index,UType,VType,Upper> }; template<bool Cond, typename T> struct conj_expr_if - : meta_if<!Cond, const T&, + : conditional<!Cond, const T&, CwiseUnaryOp<scalar_conjugate_op<typename traits<T>::Scalar>,T> > {}; } // end namespace internal @@ -88,8 +88,8 @@ SelfAdjointView<MatrixType,UpLo>& SelfAdjointView<MatrixType,UpLo> enum { IsRowMajor = (internal::traits<MatrixType>::Flags&RowMajorBit) ? 1 : 0 }; internal::selfadjoint_rank2_update_selector<Scalar, Index, - typename internal::cleantype<typename internal::conj_expr_if<IsRowMajor ^ UBlasTraits::NeedToConjugate,_ActualUType>::ret>::type, - typename internal::cleantype<typename internal::conj_expr_if<IsRowMajor ^ VBlasTraits::NeedToConjugate,_ActualVType>::ret>::type, + typename internal::cleantype<typename internal::conj_expr_if<IsRowMajor ^ UBlasTraits::NeedToConjugate,_ActualUType>::type>::type, + typename internal::cleantype<typename internal::conj_expr_if<IsRowMajor ^ VBlasTraits::NeedToConjugate,_ActualVType>::type>::type, (IsRowMajor ? int(UpLo==Upper ? Lower : Upper) : UpLo)> ::run(const_cast<Scalar*>(_expression().data()),_expression().outerStride(),actualU,actualV,actualAlpha); diff --git a/Eigen/src/Core/products/TriangularMatrixVector.h b/Eigen/src/Core/products/TriangularMatrixVector.h index 4c1cfc492..2b175fdf3 100644 --- a/Eigen/src/Core/products/TriangularMatrixVector.h +++ b/Eigen/src/Core/products/TriangularMatrixVector.h @@ -57,8 +57,8 @@ struct product_triangular_vector_selector<true,Lhs,Rhs,Result,Mode,ConjLhs,ConjR static EIGEN_DONT_INLINE void run(const Lhs& lhs, const Rhs& rhs, Result& res, typename traits<Lhs>::Scalar alpha) { static const Index PanelWidth = EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH; - typename conj_expr_if<ConjLhs,Lhs>::ret cjLhs(lhs); - typename conj_expr_if<ConjRhs,Rhs>::ret cjRhs(rhs); + typename conj_expr_if<ConjLhs,Lhs>::type cjLhs(lhs); + typename conj_expr_if<ConjRhs,Rhs>::type cjRhs(rhs); Index size = lhs.cols(); for (Index pi=0; pi<size; pi+=PanelWidth) @@ -100,8 +100,8 @@ struct product_triangular_vector_selector<true,Lhs,Rhs,Result,Mode,ConjLhs,ConjR static void run(const Lhs& lhs, const Rhs& rhs, Result& res, typename traits<Lhs>::Scalar alpha) { static const Index PanelWidth = EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH; - typename conj_expr_if<ConjLhs,Lhs>::ret cjLhs(lhs); - typename conj_expr_if<ConjRhs,Rhs>::ret cjRhs(rhs); + typename conj_expr_if<ConjLhs,Lhs>::type cjLhs(lhs); + typename conj_expr_if<ConjRhs,Rhs>::type cjRhs(rhs); Index size = lhs.cols(); for (Index pi=0; pi<size; pi+=PanelWidth) { |