From 4716040703be1ee906439385d20475dcddad5ce3 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 25 Oct 2010 10:15:22 -0400 Subject: bug #86 : use internal:: namespace instead of ei_ prefix --- Eigen/src/Core/DenseCoeffsBase.h | 100 ++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 48 deletions(-) (limited to 'Eigen/src/Core/DenseCoeffsBase.h') diff --git a/Eigen/src/Core/DenseCoeffsBase.h b/Eigen/src/Core/DenseCoeffsBase.h index 918b246a8..d39aafc08 100644 --- a/Eigen/src/Core/DenseCoeffsBase.h +++ b/Eigen/src/Core/DenseCoeffsBase.h @@ -40,15 +40,15 @@ template class DenseCoeffsBase : public EigenBase { public: - typedef typename ei_traits::StorageKind StorageKind; - typedef typename ei_traits::Index Index; - typedef typename ei_traits::Scalar Scalar; - typedef typename ei_packet_traits::type PacketScalar; - typedef typename ei_meta_if::Flags&LvalueBit), + typedef typename internal::traits::StorageKind StorageKind; + typedef typename internal::traits::Index Index; + typedef typename internal::traits::Scalar Scalar; + typedef typename internal::packet_traits::type PacketScalar; + typedef typename internal::meta_if::Flags&LvalueBit), const Scalar&, - typename ei_meta_if::ret, Scalar, const Scalar>::ret + typename internal::meta_if::ret, Scalar, const Scalar>::ret >::ret CoeffReturnType; - typedef typename ei_makeconst_return_type::type>::type PacketReturnType; + typedef typename internal::makeconst_return_type::type>::type PacketReturnType; typedef EigenBase Base; using Base::rows; @@ -88,7 +88,7 @@ class DenseCoeffsBase : public EigenBase */ EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const { - ei_internal_assert(row >= 0 && row < rows() + eigen_internal_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); return derived().coeff(row, col); } @@ -105,7 +105,7 @@ class DenseCoeffsBase : public EigenBase */ EIGEN_STRONG_INLINE CoeffReturnType operator()(Index row, Index col) const { - ei_assert(row >= 0 && row < rows() + eigen_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); return derived().coeff(row, col); } @@ -128,7 +128,7 @@ class DenseCoeffsBase : public EigenBase EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { - ei_internal_assert(index >= 0 && index < size()); + eigen_internal_assert(index >= 0 && index < size()); return derived().coeff(index); } @@ -146,7 +146,7 @@ class DenseCoeffsBase : public EigenBase { EIGEN_STATIC_ASSERT(Derived::IsVectorAtCompileTime, THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD) - ei_assert(index >= 0 && index < size()); + eigen_assert(index >= 0 && index < size()); return derived().coeff(index); } @@ -163,7 +163,7 @@ class DenseCoeffsBase : public EigenBase EIGEN_STRONG_INLINE CoeffReturnType operator()(Index index) const { - ei_assert(index >= 0 && index < size()); + eigen_assert(index >= 0 && index < size()); return derived().coeff(index); } @@ -199,7 +199,7 @@ class DenseCoeffsBase : public EigenBase template EIGEN_STRONG_INLINE PacketReturnType packet(Index row, Index col) const { - ei_internal_assert(row >= 0 && row < rows() + eigen_internal_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); return derived().template packet(row,col); } @@ -224,7 +224,7 @@ class DenseCoeffsBase : public EigenBase template EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const { - ei_internal_assert(index >= 0 && index < size()); + eigen_internal_assert(index >= 0 && index < size()); return derived().template packet(index); } @@ -267,10 +267,10 @@ class DenseCoeffsBase : public DenseCoeffsBase Base; - typedef typename ei_traits::StorageKind StorageKind; - typedef typename ei_traits::Index Index; - typedef typename ei_traits::Scalar Scalar; - typedef typename ei_packet_traits::type PacketScalar; + typedef typename internal::traits::StorageKind StorageKind; + typedef typename internal::traits::Index Index; + typedef typename internal::traits::Scalar Scalar; + typedef typename internal::packet_traits::type PacketScalar; typedef typename NumTraits::Real RealScalar; using Base::coeff; @@ -303,7 +303,7 @@ class DenseCoeffsBase : public DenseCoeffsBase= 0 && row < rows() + eigen_internal_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); return derived().coeffRef(row, col); } @@ -323,7 +323,7 @@ class DenseCoeffsBase : public DenseCoeffsBase= 0 && row < rows() + eigen_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); return derived().coeffRef(row, col); } @@ -347,7 +347,7 @@ class DenseCoeffsBase : public DenseCoeffsBase= 0 && index < size()); + eigen_internal_assert(index >= 0 && index < size()); return derived().coeffRef(index); } @@ -363,7 +363,7 @@ class DenseCoeffsBase : public DenseCoeffsBase= 0 && index < size()); + eigen_assert(index >= 0 && index < size()); return derived().coeffRef(index); } @@ -379,7 +379,7 @@ class DenseCoeffsBase : public DenseCoeffsBase= 0 && index < size()); + eigen_assert(index >= 0 && index < size()); return derived().coeffRef(index); } @@ -414,9 +414,9 @@ class DenseCoeffsBase : public DenseCoeffsBase EIGEN_STRONG_INLINE void writePacket - (Index row, Index col, const typename ei_packet_traits::type& x) + (Index row, Index col, const typename internal::packet_traits::type& x) { - ei_internal_assert(row >= 0 && row < rows() + eigen_internal_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); derived().template writePacket(row,col,x); } @@ -424,7 +424,7 @@ class DenseCoeffsBase : public DenseCoeffsBase EIGEN_STRONG_INLINE void writePacketByOuterInner - (Index outer, Index inner, const typename ei_packet_traits::type& x) + (Index outer, Index inner, const typename internal::packet_traits::type& x) { writePacket(rowIndexByOuterInner(outer, inner), colIndexByOuterInner(outer, inner), @@ -442,9 +442,9 @@ class DenseCoeffsBase : public DenseCoeffsBase EIGEN_STRONG_INLINE void writePacket - (Index index, const typename ei_packet_traits::type& x) + (Index index, const typename internal::packet_traits::type& x) { - ei_internal_assert(index >= 0 && index < size()); + eigen_internal_assert(index >= 0 && index < size()); derived().template writePacket(index,x); } @@ -461,7 +461,7 @@ class DenseCoeffsBase : public DenseCoeffsBase EIGEN_STRONG_INLINE void copyCoeff(Index row, Index col, const DenseBase& other) { - ei_internal_assert(row >= 0 && row < rows() + eigen_internal_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); derived().coeffRef(row, col) = other.derived().coeff(row, col); } @@ -477,7 +477,7 @@ class DenseCoeffsBase : public DenseCoeffsBase EIGEN_STRONG_INLINE void copyCoeff(Index index, const DenseBase& other) { - ei_internal_assert(index >= 0 && index < size()); + eigen_internal_assert(index >= 0 && index < size()); derived().coeffRef(index) = other.derived().coeff(index); } @@ -502,7 +502,7 @@ class DenseCoeffsBase : public DenseCoeffsBase EIGEN_STRONG_INLINE void copyPacket(Index row, Index col, const DenseBase& other) { - ei_internal_assert(row >= 0 && row < rows() + eigen_internal_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); derived().template writePacket(row, col, other.derived().template packet(row, col)); @@ -519,7 +519,7 @@ class DenseCoeffsBase : public DenseCoeffsBase EIGEN_STRONG_INLINE void copyPacket(Index index, const DenseBase& other) { - ei_internal_assert(index >= 0 && index < size()); + eigen_internal_assert(index >= 0 && index < size()); derived().template writePacket(index, other.derived().template packet(index)); } @@ -553,8 +553,8 @@ class DenseCoeffsBase : public DenseCoeffsBase Base; - typedef typename ei_traits::Index Index; - typedef typename ei_traits::Scalar Scalar; + typedef typename internal::traits::Index Index; + typedef typename internal::traits::Scalar Scalar; typedef typename NumTraits::Real RealScalar; using Base::rows; @@ -606,57 +606,61 @@ class DenseCoeffsBase : public DenseCoeffsBase -struct ei_first_aligned_impl +struct first_aligned_impl { inline static typename Derived::Index run(const Derived&) { return 0; } }; template -struct ei_first_aligned_impl +struct first_aligned_impl { inline static typename Derived::Index run(const Derived& m) { - return ei_first_aligned(&m.const_cast_derived().coeffRef(0,0), m.size()); + return first_aligned(&m.const_cast_derived().coeffRef(0,0), m.size()); } }; /** \internal \returns the index of the first element of the array that is well aligned for vectorization. * - * There is also the variant ei_first_aligned(const Scalar*, Integer) defined in Memory.h. See it for more + * There is also the variant first_aligned(const Scalar*, Integer) defined in Memory.h. See it for more * documentation. */ template -inline static typename Derived::Index ei_first_aligned(const Derived& m) +inline static typename Derived::Index first_aligned(const Derived& m) { - return ei_first_aligned_impl + return first_aligned_impl ::run(m); } -template::ret> -struct ei_inner_stride_at_compile_time +template::ret> +struct inner_stride_at_compile_time { - enum { ret = ei_traits::InnerStrideAtCompileTime }; + enum { ret = traits::InnerStrideAtCompileTime }; }; template -struct ei_inner_stride_at_compile_time +struct inner_stride_at_compile_time { enum { ret = 0 }; }; -template::ret> -struct ei_outer_stride_at_compile_time +template::ret> +struct outer_stride_at_compile_time { - enum { ret = ei_traits::OuterStrideAtCompileTime }; + enum { ret = traits::OuterStrideAtCompileTime }; }; template -struct ei_outer_stride_at_compile_time +struct outer_stride_at_compile_time { enum { ret = 0 }; }; +} // end namespace internal + #endif // EIGEN_DENSECOEFFSBASE_H -- cgit v1.2.3