From 8d81a2339cde86ff21aec665ed07bb47bb632182 Mon Sep 17 00:00:00 2001 From: Kolja Brix Date: Mon, 10 Jan 2022 20:53:29 +0000 Subject: [PATCH] Reduce usage of reserved names --- Eigen/src/Core/BandMatrix.h | 26 ++-- Eigen/src/Core/Block.h | 2 +- Eigen/src/Core/CwiseBinaryOp.h | 14 +- Eigen/src/Core/CwiseTernaryOp.h | 20 +-- Eigen/src/Core/CwiseUnaryOp.h | 4 +- Eigen/src/Core/CwiseUnaryView.h | 4 +- Eigen/src/Core/Diagonal.h | 4 +- Eigen/src/Core/Dot.h | 8 +- Eigen/src/Core/GeneralProduct.h | 20 +-- Eigen/src/Core/PartialReduxEvaluator.h | 8 +- Eigen/src/Core/PermutationMatrix.h | 12 +- Eigen/src/Core/ProductEvaluators.h | 20 +-- Eigen/src/Core/Ref.h | 14 +- Eigen/src/Core/Replicate.h | 6 +- Eigen/src/Core/Reverse.h | 4 +- Eigen/src/Core/Transpositions.h | 6 +- Eigen/src/Core/arch/AVX/MathFunctions.h | 12 +- Eigen/src/Core/arch/AVX/PacketMath.h | 8 +- Eigen/src/Core/arch/AVX512/MathFunctions.h | 54 +++---- Eigen/src/Core/arch/AltiVec/PacketMath.h | 70 ++++----- Eigen/src/Core/arch/MSA/MathFunctions.h | 136 +++++++++--------- Eigen/src/Core/arch/MSA/PacketMath.h | 12 +- Eigen/src/Core/arch/NEON/PacketMath.h | 6 +- Eigen/src/Core/arch/SSE/MathFunctions.h | 8 +- Eigen/src/Core/arch/SSE/PacketMath.h | 8 +- Eigen/src/Core/arch/ZVector/MathFunctions.h | 92 ++++++------ Eigen/src/Core/arch/ZVector/PacketMath.h | 36 ++--- .../Core/products/GeneralBlockPanelKernel.h | 88 ++++++------ .../products/GeneralMatrixMatrixTriangular.h | 22 +-- Eigen/src/Core/products/GeneralMatrixVector.h | 30 ++-- Eigen/src/Core/products/SelfadjointProduct.h | 12 +- .../Core/products/SelfadjointRank2Update.h | 8 +- Eigen/src/Core/util/BlasUtil.h | 8 +- Eigen/src/Core/util/ForwardDeclarations.h | 6 +- Eigen/src/Core/util/XprHelper.h | 4 +- Eigen/src/Geometry/AlignedBox.h | 10 +- Eigen/src/Geometry/Homogeneous.h | 4 +- Eigen/src/Geometry/Hyperplane.h | 10 +- Eigen/src/Geometry/ParametrizedLine.h | 44 +++--- Eigen/src/Geometry/RotationBase.h | 10 +- Eigen/src/Geometry/Transform.h | 12 +- Eigen/src/LU/arch/InverseSize4.h | 24 ++-- Eigen/src/SparseCore/SparseBlock.h | 10 +- Eigen/src/SparseCore/SparseDenseProduct.h | 4 +- Eigen/src/SparseCore/SparseMatrix.h | 6 +- Eigen/src/SparseCore/SparseMatrixBase.h | 4 +- Eigen/src/SparseCore/SparseRef.h | 24 ++-- Eigen/src/SparseCore/SparseSelfAdjointView.h | 12 +- Eigen/src/SparseCore/SparseUtil.h | 4 +- Eigen/src/SparseCore/SparseView.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorArgMax.h | 4 +- .../Eigen/CXX11/src/Tensor/TensorAssign.h | 4 +- .../CXX11/src/Tensor/TensorBroadcasting.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorChipping.h | 2 +- .../CXX11/src/Tensor/TensorConcatenation.h | 4 +- .../CXX11/src/Tensor/TensorContraction.h | 4 +- .../Eigen/CXX11/src/Tensor/TensorConversion.h | 2 +- .../CXX11/src/Tensor/TensorConvolution.h | 4 +- .../Eigen/CXX11/src/Tensor/TensorCustomOp.h | 6 +- .../Eigen/CXX11/src/Tensor/TensorEvalTo.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorExpr.h | 14 +- .../Eigen/CXX11/src/Tensor/TensorFFT.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorForcedEval.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorGenerator.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorImagePatch.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorInflation.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorLayoutSwap.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorMorphing.h | 6 +- .../Eigen/CXX11/src/Tensor/TensorPadding.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorPatch.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorReverse.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorScan.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorShuffling.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorStriding.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorTrace.h | 2 +- .../CXX11/src/Tensor/TensorVolumePatch.h | 2 +- .../Eigen/CXX11/src/ThreadPool/EventCount.h | 6 +- .../Eigen/CXX11/src/ThreadPool/RunQueue.h | 6 +- .../Eigen/src/IterativeSolvers/MINRES.h | 4 +- .../src/MoreVectorization/MathFunctions.h | 22 +-- unsupported/Eigen/src/Polynomials/Companion.h | 20 +-- .../Eigen/src/Polynomials/PolynomialSolver.h | 22 +-- .../Eigen/src/Skyline/SkylineProduct.h | 42 +++--- unsupported/Eigen/src/Skyline/SkylineUtil.h | 16 +-- unsupported/Eigen/src/Splines/Spline.h | 100 ++++++------- unsupported/Eigen/src/Splines/SplineFwd.h | 14 +- unsupported/test/polynomialsolver.cpp | 14 +- unsupported/test/polynomialutils.cpp | 12 +- 88 files changed, 666 insertions(+), 666 deletions(-) diff --git a/Eigen/src/Core/BandMatrix.h b/Eigen/src/Core/BandMatrix.h index a8d8b19e3..913a96791 100644 --- a/Eigen/src/Core/BandMatrix.h +++ b/Eigen/src/Core/BandMatrix.h @@ -235,17 +235,17 @@ class BandMatrix : public BandMatrixBase m_subs; }; -template +template class BandMatrixWrapper; -template -struct traits > +template +struct traits > { - typedef typename _CoefficientsType::Scalar Scalar; - typedef typename _CoefficientsType::StorageKind StorageKind; - typedef typename _CoefficientsType::StorageIndex StorageIndex; + typedef typename CoefficientsType_::Scalar Scalar; + typedef typename CoefficientsType_::StorageKind StorageKind; + typedef typename CoefficientsType_::StorageIndex StorageIndex; enum { - CoeffReadCost = internal::traits<_CoefficientsType>::CoeffReadCost, + CoeffReadCost = internal::traits::CoeffReadCost, RowsAtCompileTime = Rows_, ColsAtCompileTime = Cols_, MaxRowsAtCompileTime = Rows_, @@ -256,11 +256,11 @@ struct traits -class BandMatrixWrapper : public BandMatrixBase > +template +class BandMatrixWrapper : public BandMatrixBase > { public: @@ -339,9 +339,9 @@ struct evaluator_traits > typedef BandShape Shape; }; -template -struct evaluator_traits > - : public evaluator_traits_base > +template +struct evaluator_traits > + : public evaluator_traits_base > { typedef BandShape Shape; }; diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index 585323c70..afbea8667 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -23,7 +23,7 @@ struct traits > : traits::StorageKind StorageKind; typedef typename traits::XprKind XprKind; typedef typename ref_selector::type XprTypeNested; - typedef typename remove_reference::type _XprTypeNested; + typedef typename remove_reference::type XprTypeNested_; enum{ MatrixRows = traits::RowsAtCompileTime, MatrixCols = traits::ColsAtCompileTime, diff --git a/Eigen/src/Core/CwiseBinaryOp.h b/Eigen/src/Core/CwiseBinaryOp.h index a3828d197..ea491c658 100644 --- a/Eigen/src/Core/CwiseBinaryOp.h +++ b/Eigen/src/Core/CwiseBinaryOp.h @@ -45,10 +45,10 @@ struct traits > typename traits::StorageIndex>::type StorageIndex; typedef typename Lhs::Nested LhsNested; typedef typename Rhs::Nested RhsNested; - typedef typename remove_reference::type _LhsNested; - typedef typename remove_reference::type _RhsNested; + typedef typename remove_reference::type LhsNested_; + typedef typename remove_reference::type RhsNested_; enum { - Flags = cwise_promote_storage_order::StorageKind,typename traits::StorageKind,_LhsNested::Flags & RowMajorBit,_RhsNested::Flags & RowMajorBit>::value + Flags = cwise_promote_storage_order::StorageKind,typename traits::StorageKind,LhsNested_::Flags & RowMajorBit,RhsNested_::Flags & RowMajorBit>::value }; }; } // end namespace internal @@ -102,8 +102,8 @@ class CwiseBinaryOp : typedef typename internal::ref_selector::type LhsNested; typedef typename internal::ref_selector::type RhsNested; - typedef typename internal::remove_reference::type _LhsNested; - typedef typename internal::remove_reference::type _RhsNested; + typedef typename internal::remove_reference::type LhsNested_; + typedef typename internal::remove_reference::type RhsNested_; #if EIGEN_COMP_MSVC //Required for Visual Studio or the Copy constructor will probably not get inlined! @@ -131,10 +131,10 @@ class CwiseBinaryOp : /** \returns the left hand side nested expression */ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - const _LhsNested& lhs() const { return m_lhs; } + const LhsNested_& lhs() const { return m_lhs; } /** \returns the right hand side nested expression */ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - const _RhsNested& rhs() const { return m_rhs; } + const RhsNested_& rhs() const { return m_rhs; } /** \returns the functor representing the binary operation */ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const BinaryOp& functor() const { return m_functor; } diff --git a/Eigen/src/Core/CwiseTernaryOp.h b/Eigen/src/Core/CwiseTernaryOp.h index 52a0ae7ae..393279bc5 100644 --- a/Eigen/src/Core/CwiseTernaryOp.h +++ b/Eigen/src/Core/CwiseTernaryOp.h @@ -43,10 +43,10 @@ struct traits > { typedef typename Arg1::Nested Arg1Nested; typedef typename Arg2::Nested Arg2Nested; typedef typename Arg3::Nested Arg3Nested; - typedef typename remove_reference::type _Arg1Nested; - typedef typename remove_reference::type _Arg2Nested; - typedef typename remove_reference::type _Arg3Nested; - enum { Flags = _Arg1Nested::Flags & RowMajorBit }; + typedef typename remove_reference::type Arg1Nested_; + typedef typename remove_reference::type Arg2Nested_; + typedef typename remove_reference::type Arg3Nested_; + enum { Flags = Arg1Nested_::Flags & RowMajorBit }; }; } // end namespace internal @@ -115,9 +115,9 @@ class CwiseTernaryOp : public CwiseTernaryOpImpl< typedef typename internal::ref_selector::type Arg1Nested; typedef typename internal::ref_selector::type Arg2Nested; typedef typename internal::ref_selector::type Arg3Nested; - typedef typename internal::remove_reference::type _Arg1Nested; - typedef typename internal::remove_reference::type _Arg2Nested; - typedef typename internal::remove_reference::type _Arg3Nested; + typedef typename internal::remove_reference::type Arg1Nested_; + typedef typename internal::remove_reference::type Arg2Nested_; + typedef typename internal::remove_reference::type Arg3Nested_; EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CwiseTernaryOp(const Arg1& a1, const Arg2& a2, @@ -165,13 +165,13 @@ class CwiseTernaryOp : public CwiseTernaryOpImpl< /** \returns the first argument nested expression */ EIGEN_DEVICE_FUNC - const _Arg1Nested& arg1() const { return m_arg1; } + const Arg1Nested_& arg1() const { return m_arg1; } /** \returns the first argument nested expression */ EIGEN_DEVICE_FUNC - const _Arg2Nested& arg2() const { return m_arg2; } + const Arg2Nested_& arg2() const { return m_arg2; } /** \returns the third argument nested expression */ EIGEN_DEVICE_FUNC - const _Arg3Nested& arg3() const { return m_arg3; } + const Arg3Nested_& arg3() const { return m_arg3; } /** \returns the functor representing the ternary operation */ EIGEN_DEVICE_FUNC const TernaryOp& functor() const { return m_functor; } diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index f2c651842..d9985c096 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -24,9 +24,9 @@ struct traits > UnaryOp(const typename XprType::Scalar&) >::type Scalar; typedef typename XprType::Nested XprTypeNested; - typedef typename remove_reference::type _XprTypeNested; + typedef typename remove_reference::type XprTypeNested_; enum { - Flags = _XprTypeNested::Flags & RowMajorBit + Flags = XprTypeNested_::Flags & RowMajorBit }; }; } diff --git a/Eigen/src/Core/CwiseUnaryView.h b/Eigen/src/Core/CwiseUnaryView.h index b25471154..fabb3f824 100644 --- a/Eigen/src/Core/CwiseUnaryView.h +++ b/Eigen/src/Core/CwiseUnaryView.h @@ -23,10 +23,10 @@ struct traits > ViewOp(const typename traits::Scalar&) >::type Scalar; typedef typename MatrixType::Nested MatrixTypeNested; - typedef typename remove_all::type _MatrixTypeNested; + typedef typename remove_all::type MatrixTypeNested_; enum { FlagsLvalueBit = is_lvalue::value ? LvalueBit : 0, - Flags = traits<_MatrixTypeNested>::Flags & (RowMajorBit | FlagsLvalueBit | DirectAccessBit), // FIXME DirectAccessBit should not be handled by expressions + Flags = traits::Flags & (RowMajorBit | FlagsLvalueBit | DirectAccessBit), // FIXME DirectAccessBit should not be handled by expressions MatrixTypeInnerStride = inner_stride_at_compile_time::ret, // need to cast the sizeof's from size_t to int explicitly, otherwise: // "error: no integral type can represent all of the enumerator values diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h index 4dd56db0e..2bf452795 100644 --- a/Eigen/src/Core/Diagonal.h +++ b/Eigen/src/Core/Diagonal.h @@ -40,7 +40,7 @@ struct traits > : traits { typedef typename ref_selector::type MatrixTypeNested; - typedef typename remove_reference::type _MatrixTypeNested; + typedef typename remove_reference::type MatrixTypeNested_; typedef typename MatrixType::StorageKind StorageKind; enum { RowsAtCompileTime = (int(DiagIndex) == DynamicIndex || int(MatrixType::SizeAtCompileTime) == Dynamic) ? Dynamic @@ -54,7 +54,7 @@ struct traits > MatrixType::MaxColsAtCompileTime - plain_enum_max( DiagIndex, 0))), MaxColsAtCompileTime = 1, MaskLvalueBit = is_lvalue::value ? LvalueBit : 0, - Flags = (unsigned int)_MatrixTypeNested::Flags & (RowMajorBit | MaskLvalueBit | DirectAccessBit) & ~RowMajorBit, // FIXME DirectAccessBit should not be handled by expressions + Flags = (unsigned int)MatrixTypeNested_::Flags & (RowMajorBit | MaskLvalueBit | DirectAccessBit) & ~RowMajorBit, // FIXME DirectAccessBit should not be handled by expressions MatrixTypeOuterStride = outer_stride_at_compile_time::ret, InnerStrideAtCompileTime = MatrixTypeOuterStride == Dynamic ? Dynamic : MatrixTypeOuterStride+1, OuterStrideAtCompileTime = 0 diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index 387b6ce4e..a7c20f5d0 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -125,8 +125,8 @@ template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase::PlainObject MatrixBase::normalized() const { - typedef typename internal::nested_eval::type _Nested; - _Nested n(derived()); + typedef typename internal::nested_eval::type Nested_; + Nested_ n(derived()); RealScalar z = n.squaredNorm(); // NOTE: after extensive benchmarking, this conditional does not impact performance, at least on recent x86 CPU if(z>RealScalar(0)) @@ -168,8 +168,8 @@ template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase::PlainObject MatrixBase::stableNormalized() const { - typedef typename internal::nested_eval::type _Nested; - _Nested n(derived()); + typedef typename internal::nested_eval::type Nested_; + Nested_ n(derived()); RealScalar w = n.cwiseAbs().maxCoeff(); RealScalar z = (n/w).squaredNorm(); if(z>RealScalar(0)) diff --git a/Eigen/src/Core/GeneralProduct.h b/Eigen/src/Core/GeneralProduct.h index 33b667d12..0d24a00af 100644 --- a/Eigen/src/Core/GeneralProduct.h +++ b/Eigen/src/Core/GeneralProduct.h @@ -52,17 +52,17 @@ template struct product_size_category template struct product_type { - typedef typename remove_all::type _Lhs; - typedef typename remove_all::type _Rhs; + typedef typename remove_all::type Lhs_; + typedef typename remove_all::type Rhs_; enum { - MaxRows = traits<_Lhs>::MaxRowsAtCompileTime, - Rows = traits<_Lhs>::RowsAtCompileTime, - MaxCols = traits<_Rhs>::MaxColsAtCompileTime, - Cols = traits<_Rhs>::ColsAtCompileTime, - MaxDepth = min_size_prefer_fixed(traits<_Lhs>::MaxColsAtCompileTime, - traits<_Rhs>::MaxRowsAtCompileTime), - Depth = min_size_prefer_fixed(traits<_Lhs>::ColsAtCompileTime, - traits<_Rhs>::RowsAtCompileTime) + MaxRows = traits::MaxRowsAtCompileTime, + Rows = traits::RowsAtCompileTime, + MaxCols = traits::MaxColsAtCompileTime, + Cols = traits::ColsAtCompileTime, + MaxDepth = min_size_prefer_fixed(traits::MaxColsAtCompileTime, + traits::MaxRowsAtCompileTime), + Depth = min_size_prefer_fixed(traits::ColsAtCompileTime, + traits::RowsAtCompileTime) }; // the splitting into different lines of code here, introducing the _select enums and the typedef below, diff --git a/Eigen/src/Core/PartialReduxEvaluator.h b/Eigen/src/Core/PartialReduxEvaluator.h index a17968881..b6f31f992 100644 --- a/Eigen/src/Core/PartialReduxEvaluator.h +++ b/Eigen/src/Core/PartialReduxEvaluator.h @@ -154,16 +154,16 @@ struct evaluator > : TraversalSize==0 ? 1 : int(TraversalSize) * int(evaluator::CoeffReadCost) + int(CostOpType::value), - _ArgFlags = evaluator::Flags, + ArgFlags_ = evaluator::Flags, - _Vectorizable = bool(int(_ArgFlags)&PacketAccessBit) + Vectorizable_ = bool(int(ArgFlags_)&PacketAccessBit) && bool(MemberOp::Vectorizable) - && (Direction==int(Vertical) ? bool(_ArgFlags&RowMajorBit) : (_ArgFlags&RowMajorBit)==0) + && (Direction==int(Vertical) ? bool(ArgFlags_&RowMajorBit) : (ArgFlags_&RowMajorBit)==0) && (TraversalSize!=0), Flags = (traits::Flags&RowMajorBit) | (evaluator::Flags&(HereditaryBits&(~RowMajorBit))) - | (_Vectorizable ? PacketAccessBit : 0) + | (Vectorizable_ ? PacketAccessBit : 0) | LinearAccessBit, Alignment = 0 // FIXME this will need to be improved once PartialReduxExpr is vectorized diff --git a/Eigen/src/Core/PermutationMatrix.h b/Eigen/src/Core/PermutationMatrix.h index a6910e2c9..1b4195a79 100644 --- a/Eigen/src/Core/PermutationMatrix.h +++ b/Eigen/src/Core/PermutationMatrix.h @@ -391,20 +391,20 @@ class PermutationMatrix : public PermutationBase -struct traits,_PacketAccess> > +template +struct traits,PacketAccess_> > : traits > { typedef PermutationStorage StorageKind; - typedef Map, _PacketAccess> IndicesType; + typedef Map, PacketAccess_> IndicesType; typedef StorageIndex_ StorageIndex; typedef void Scalar; }; } -template -class Map,_PacketAccess> - : public PermutationBase,_PacketAccess> > +template +class Map,PacketAccess_> + : public PermutationBase,PacketAccess_> > { typedef PermutationBase Base; typedef internal::traits Traits; diff --git a/Eigen/src/Core/ProductEvaluators.h b/Eigen/src/Core/ProductEvaluators.h index aff3572aa..5f9ffe86b 100644 --- a/Eigen/src/Core/ProductEvaluators.h +++ b/Eigen/src/Core/ProductEvaluators.h @@ -841,19 +841,19 @@ public: StorageOrder_ = (Derived::MaxRowsAtCompileTime==1 && Derived::MaxColsAtCompileTime!=1) ? RowMajor : (Derived::MaxColsAtCompileTime==1 && Derived::MaxRowsAtCompileTime!=1) ? ColMajor : MatrixFlags & RowMajorBit ? RowMajor : ColMajor, - _SameStorageOrder = StorageOrder_ == (MatrixFlags & RowMajorBit ? RowMajor : ColMajor), + SameStorageOrder_ = StorageOrder_ == (MatrixFlags & RowMajorBit ? RowMajor : ColMajor), - _ScalarAccessOnDiag = !((int(StorageOrder_) == ColMajor && int(ProductOrder) == OnTheLeft) + ScalarAccessOnDiag_ = !((int(StorageOrder_) == ColMajor && int(ProductOrder) == OnTheLeft) ||(int(StorageOrder_) == RowMajor && int(ProductOrder) == OnTheRight)), - _SameTypes = is_same::value, + SameTypes_ = is_same::value, // FIXME currently we need same types, but in the future the next rule should be the one - //_Vectorizable = bool(int(MatrixFlags)&PacketAccessBit) && ((!_PacketOnDiag) || (_SameTypes && bool(int(DiagFlags)&PacketAccessBit))), - _Vectorizable = bool(int(MatrixFlags)&PacketAccessBit) - && _SameTypes - && (_SameStorageOrder || (MatrixFlags&LinearAccessBit)==LinearAccessBit) - && (_ScalarAccessOnDiag || (bool(int(DiagFlags)&PacketAccessBit))), - _LinearAccessMask = (MatrixType::RowsAtCompileTime==1 || MatrixType::ColsAtCompileTime==1) ? LinearAccessBit : 0, - Flags = ((HereditaryBits|_LinearAccessMask) & (unsigned int)(MatrixFlags)) | (_Vectorizable ? PacketAccessBit : 0), + //Vectorizable_ = bool(int(MatrixFlags)&PacketAccessBit) && ((!_PacketOnDiag) || (SameTypes_ && bool(int(DiagFlags)&PacketAccessBit))), + Vectorizable_ = bool(int(MatrixFlags)&PacketAccessBit) + && SameTypes_ + && (SameStorageOrder_ || (MatrixFlags&LinearAccessBit)==LinearAccessBit) + && (ScalarAccessOnDiag_ || (bool(int(DiagFlags)&PacketAccessBit))), + LinearAccessMask_ = (MatrixType::RowsAtCompileTime==1 || MatrixType::ColsAtCompileTime==1) ? LinearAccessBit : 0, + Flags = ((HereditaryBits|LinearAccessMask_) & (unsigned int)(MatrixFlags)) | (Vectorizable_ ? PacketAccessBit : 0), Alignment = evaluator::Alignment, AsScalarProduct = (DiagonalType::SizeAtCompileTime==1) diff --git a/Eigen/src/Core/Ref.h b/Eigen/src/Core/Ref.h index 3e1d99cfa..c31dfccb3 100644 --- a/Eigen/src/Core/Ref.h +++ b/Eigen/src/Core/Ref.h @@ -16,16 +16,16 @@ namespace Eigen { namespace internal { -template -struct traits > - : public traits > +template +struct traits > + : public traits > { - typedef _PlainObjectType PlainObjectType; - typedef _StrideType StrideType; + typedef PlainObjectType_ PlainObjectType; + typedef StrideType_ StrideType; enum { Options = Options_, - Flags = traits >::Flags | NestByRefBit, - Alignment = traits >::Alignment + Flags = traits >::Flags | NestByRefBit, + Alignment = traits >::Alignment }; template struct match { diff --git a/Eigen/src/Core/Replicate.h b/Eigen/src/Core/Replicate.h index 0ee9a100b..6b5f9fed3 100644 --- a/Eigen/src/Core/Replicate.h +++ b/Eigen/src/Core/Replicate.h @@ -23,7 +23,7 @@ struct traits > typedef typename traits::StorageKind StorageKind; typedef typename traits::XprKind XprKind; typedef typename ref_selector::type MatrixTypeNested; - typedef typename remove_reference::type _MatrixTypeNested; + typedef typename remove_reference::type MatrixTypeNested_; enum { RowsAtCompileTime = RowFactor==Dynamic || int(MatrixType::RowsAtCompileTime)==Dynamic ? Dynamic @@ -64,7 +64,7 @@ template class Replicate : public internal::dense_xpr_base< Replicate >::type { typedef typename internal::traits::MatrixTypeNested MatrixTypeNested; - typedef typename internal::traits::_MatrixTypeNested _MatrixTypeNested; + typedef typename internal::traits::MatrixTypeNested_ MatrixTypeNested_; public: typedef typename internal::dense_xpr_base::type Base; @@ -96,7 +96,7 @@ template class Replicate inline Index cols() const { return m_matrix.cols() * m_colFactor.value(); } EIGEN_DEVICE_FUNC - const _MatrixTypeNested& nestedExpression() const + const MatrixTypeNested_& nestedExpression() const { return m_matrix; } diff --git a/Eigen/src/Core/Reverse.h b/Eigen/src/Core/Reverse.h index 7ad502379..dbc69295a 100644 --- a/Eigen/src/Core/Reverse.h +++ b/Eigen/src/Core/Reverse.h @@ -26,13 +26,13 @@ struct traits > typedef typename traits::StorageKind StorageKind; typedef typename traits::XprKind XprKind; typedef typename ref_selector::type MatrixTypeNested; - typedef typename remove_reference::type _MatrixTypeNested; + typedef typename remove_reference::type MatrixTypeNested_; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, - Flags = _MatrixTypeNested::Flags & (RowMajorBit | LvalueBit) + Flags = MatrixTypeNested_::Flags & (RowMajorBit | LvalueBit) }; }; diff --git a/Eigen/src/Core/Transpositions.h b/Eigen/src/Core/Transpositions.h index 6996ca213..84a977326 100644 --- a/Eigen/src/Core/Transpositions.h +++ b/Eigen/src/Core/Transpositions.h @@ -201,11 +201,11 @@ class Transpositions : public TranspositionsBase -struct traits,_PacketAccess> > +template +struct traits,PacketAccess_> > : traits > { - typedef Map, _PacketAccess> IndicesType; + typedef Map, PacketAccess_> IndicesType; typedef StorageIndex_ StorageIndex; typedef TranspositionsStorage StorageKind; }; diff --git a/Eigen/src/Core/arch/AVX/MathFunctions.h b/Eigen/src/Core/arch/AVX/MathFunctions.h index 30243ca65..d517dffb7 100644 --- a/Eigen/src/Core/arch/AVX/MathFunctions.h +++ b/Eigen/src/Core/arch/AVX/MathFunctions.h @@ -136,10 +136,10 @@ Packet4d psqrt(const Packet4d& _x) { #if EIGEN_FAST_MATH template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8f prsqrt(const Packet8f& _x) { - _EIGEN_DECLARE_CONST_Packet8f_FROM_INT(inf, 0x7f800000); - _EIGEN_DECLARE_CONST_Packet8f(one_point_five, 1.5f); - _EIGEN_DECLARE_CONST_Packet8f(minus_half, -0.5f); - _EIGEN_DECLARE_CONST_Packet8f_FROM_INT(flt_min, 0x00800000); + EIGEN_DECLARE_CONST_Packet8f_FROM_INT(inf, 0x7f800000); + EIGEN_DECLARE_CONST_Packet8f(one_point_five, 1.5f); + EIGEN_DECLARE_CONST_Packet8f(minus_half, -0.5f); + EIGEN_DECLARE_CONST_Packet8f_FROM_INT(flt_min, 0x00800000); Packet8f neg_half = pmul(_x, p8f_minus_half); @@ -169,14 +169,14 @@ Packet8f prsqrt(const Packet8f& _x) { #else template <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8f prsqrt(const Packet8f& _x) { - _EIGEN_DECLARE_CONST_Packet8f(one, 1.0f); + EIGEN_DECLARE_CONST_Packet8f(one, 1.0f); return _mm256_div_ps(p8f_one, _mm256_sqrt_ps(_x)); } #endif template <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4d prsqrt(const Packet4d& _x) { - _EIGEN_DECLARE_CONST_Packet4d(one, 1.0); + EIGEN_DECLARE_CONST_Packet4d(one, 1.0); return _mm256_div_pd(p4d_one, _mm256_sqrt_pd(_x)); } diff --git a/Eigen/src/Core/arch/AVX/PacketMath.h b/Eigen/src/Core/arch/AVX/PacketMath.h index fdf1afbf0..ef73d35c5 100644 --- a/Eigen/src/Core/arch/AVX/PacketMath.h +++ b/Eigen/src/Core/arch/AVX/PacketMath.h @@ -42,16 +42,16 @@ template<> struct is_arithmetic<__m256d> { enum { value = true }; }; template<> struct is_arithmetic { enum { value = true }; }; template<> struct is_arithmetic { enum { value = true }; }; -#define _EIGEN_DECLARE_CONST_Packet8f(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet8f(NAME,X) \ const Packet8f p8f_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet4d(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4d(NAME,X) \ const Packet4d p4d_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet8f_FROM_INT(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet8f_FROM_INT(NAME,X) \ const Packet8f p8f_##NAME = _mm256_castsi256_ps(pset1(X)) -#define _EIGEN_DECLARE_CONST_Packet8i(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet8i(NAME,X) \ const Packet8i p8i_##NAME = pset1(X) // Use the packet_traits defined in AVX512/PacketMath.h instead if we're going diff --git a/Eigen/src/Core/arch/AVX512/MathFunctions.h b/Eigen/src/Core/arch/AVX512/MathFunctions.h index 26ab1686b..54be6cfc4 100644 --- a/Eigen/src/Core/arch/AVX512/MathFunctions.h +++ b/Eigen/src/Core/arch/AVX512/MathFunctions.h @@ -19,22 +19,22 @@ namespace internal { // Disable the code for older versions of gcc that don't support many of the required avx512 instrinsics. #if EIGEN_GNUC_AT_LEAST(5, 3) || EIGEN_COMP_CLANG || EIGEN_COMP_MSVC >= 1923 -#define _EIGEN_DECLARE_CONST_Packet16f(NAME, X) \ +#define EIGEN_DECLARE_CONST_Packet16f(NAME, X) \ const Packet16f p16f_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet16f_FROM_INT(NAME, X) \ +#define EIGEN_DECLARE_CONST_Packet16f_FROM_INT(NAME, X) \ const Packet16f p16f_##NAME = preinterpret(pset1(X)) -#define _EIGEN_DECLARE_CONST_Packet8d(NAME, X) \ +#define EIGEN_DECLARE_CONST_Packet8d(NAME, X) \ const Packet8d p8d_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet8d_FROM_INT64(NAME, X) \ +#define EIGEN_DECLARE_CONST_Packet8d_FROM_INT64(NAME, X) \ const Packet8d p8d_##NAME = _mm512_castsi512_pd(_mm512_set1_epi64(X)) -#define _EIGEN_DECLARE_CONST_Packet16bf(NAME, X) \ +#define EIGEN_DECLARE_CONST_Packet16bf(NAME, X) \ const Packet16bf p16bf_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet16bf_FROM_INT(NAME, X) \ +#define EIGEN_DECLARE_CONST_Packet16bf_FROM_INT(NAME, X) \ const Packet16bf p16bf_##NAME = preinterpret(pset1(X)) template <> @@ -73,21 +73,21 @@ BF16_PACKET_FUNCTION(Packet16f, Packet16bf, plog2) template <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f pexp(const Packet16f& _x) { - _EIGEN_DECLARE_CONST_Packet16f(1, 1.0f); - _EIGEN_DECLARE_CONST_Packet16f(half, 0.5f); - _EIGEN_DECLARE_CONST_Packet16f(127, 127.0f); + EIGEN_DECLARE_CONST_Packet16f(1, 1.0f); + EIGEN_DECLARE_CONST_Packet16f(half, 0.5f); + EIGEN_DECLARE_CONST_Packet16f(127, 127.0f); - _EIGEN_DECLARE_CONST_Packet16f(exp_hi, 88.3762626647950f); - _EIGEN_DECLARE_CONST_Packet16f(exp_lo, -88.3762626647949f); + EIGEN_DECLARE_CONST_Packet16f(exp_hi, 88.3762626647950f); + EIGEN_DECLARE_CONST_Packet16f(exp_lo, -88.3762626647949f); - _EIGEN_DECLARE_CONST_Packet16f(cephes_LOG2EF, 1.44269504088896341f); + EIGEN_DECLARE_CONST_Packet16f(cephes_LOG2EF, 1.44269504088896341f); - _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p0, 1.9875691500E-4f); - _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p1, 1.3981999507E-3f); - _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p2, 8.3334519073E-3f); - _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p3, 4.1665795894E-2f); - _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p4, 1.6666665459E-1f); - _EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p5, 5.0000001201E-1f); + EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p0, 1.9875691500E-4f); + EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p1, 1.3981999507E-3f); + EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p2, 8.3334519073E-3f); + EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p3, 4.1665795894E-2f); + EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p4, 1.6666665459E-1f); + EIGEN_DECLARE_CONST_Packet16f(cephes_exp_p5, 5.0000001201E-1f); // Clamp x. Packet16f x = pmax(pmin(_x, p16f_exp_hi), p16f_exp_lo); @@ -98,7 +98,7 @@ pexp(const Packet16f& _x) { // Get r = x - m*ln(2). Note that we can do this without losing more than one // ulp precision due to the FMA instruction. - _EIGEN_DECLARE_CONST_Packet16f(nln2, -0.6931471805599453f); + EIGEN_DECLARE_CONST_Packet16f(nln2, -0.6931471805599453f); Packet16f r = _mm512_fmadd_ps(m, p16f_nln2, x); Packet16f r2 = pmul(r, r); Packet16f r3 = pmul(r2, r); @@ -227,9 +227,9 @@ EIGEN_STRONG_INLINE Packet16f prsqrt(const Packet16f& x) { template <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f prsqrt(const Packet16f& _x) { - _EIGEN_DECLARE_CONST_Packet16f_FROM_INT(inf, 0x7f800000); - _EIGEN_DECLARE_CONST_Packet16f(one_point_five, 1.5f); - _EIGEN_DECLARE_CONST_Packet16f(minus_half, -0.5f); + EIGEN_DECLARE_CONST_Packet16f_FROM_INT(inf, 0x7f800000); + EIGEN_DECLARE_CONST_Packet16f(one_point_five, 1.5f); + EIGEN_DECLARE_CONST_Packet16f(minus_half, -0.5f); Packet16f neg_half = pmul(_x, p16f_minus_half); @@ -257,7 +257,7 @@ prsqrt(const Packet16f& _x) { template <> EIGEN_STRONG_INLINE Packet16f prsqrt(const Packet16f& x) { - _EIGEN_DECLARE_CONST_Packet16f(one, 1.0f); + EIGEN_DECLARE_CONST_Packet16f(one, 1.0f); return _mm512_div_ps(p16f_one, _mm512_sqrt_ps(x)); } #endif @@ -270,9 +270,9 @@ BF16_PACKET_FUNCTION(Packet16f, Packet16bf, prsqrt) template <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8d prsqrt(const Packet8d& _x) { - _EIGEN_DECLARE_CONST_Packet8d(one_point_five, 1.5); - _EIGEN_DECLARE_CONST_Packet8d(minus_half, -0.5); - _EIGEN_DECLARE_CONST_Packet8d_FROM_INT64(inf, 0x7ff0000000000000LL); + EIGEN_DECLARE_CONST_Packet8d(one_point_five, 1.5); + EIGEN_DECLARE_CONST_Packet8d(minus_half, -0.5); + EIGEN_DECLARE_CONST_Packet8d_FROM_INT64(inf, 0x7ff0000000000000LL); Packet8d neg_half = pmul(_x, p8d_minus_half); @@ -307,7 +307,7 @@ prsqrt(const Packet8d& _x) { #else template <> EIGEN_STRONG_INLINE Packet8d prsqrt(const Packet8d& x) { - _EIGEN_DECLARE_CONST_Packet8d(one, 1.0f); + EIGEN_DECLARE_CONST_Packet8d(one, 1.0f); return _mm512_div_pd(p8d_one, _mm512_sqrt_pd(x)); } #endif diff --git a/Eigen/src/Core/arch/AltiVec/PacketMath.h b/Eigen/src/Core/arch/AltiVec/PacketMath.h index c6b632f76..efb0242ba 100755 --- a/Eigen/src/Core/arch/AltiVec/PacketMath.h +++ b/Eigen/src/Core/arch/AltiVec/PacketMath.h @@ -41,34 +41,34 @@ typedef eigen_packet_wrapper<__vector unsigned short int,0> Packet8bf; // We don't want to write the same code all the time, but we need to reuse the constants // and it doesn't really work to declare them global, so we define macros instead -#define _EIGEN_DECLARE_CONST_FAST_Packet4f(NAME,X) \ +#define EIGEN_DECLARE_CONST_FAST_Packet4f(NAME,X) \ Packet4f p4f_##NAME = {X, X, X, X} -#define _EIGEN_DECLARE_CONST_FAST_Packet4i(NAME,X) \ +#define EIGEN_DECLARE_CONST_FAST_Packet4i(NAME,X) \ Packet4i p4i_##NAME = vec_splat_s32(X) -#define _EIGEN_DECLARE_CONST_FAST_Packet4ui(NAME,X) \ +#define EIGEN_DECLARE_CONST_FAST_Packet4ui(NAME,X) \ Packet4ui p4ui_##NAME = {X, X, X, X} -#define _EIGEN_DECLARE_CONST_FAST_Packet8us(NAME,X) \ +#define EIGEN_DECLARE_CONST_FAST_Packet8us(NAME,X) \ Packet8us p8us_##NAME = {X, X, X, X, X, X, X, X} -#define _EIGEN_DECLARE_CONST_FAST_Packet16uc(NAME,X) \ +#define EIGEN_DECLARE_CONST_FAST_Packet16uc(NAME,X) \ Packet16uc p16uc_##NAME = {X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X} -#define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4f(NAME,X) \ Packet4f p4f_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4i(NAME,X) \ Packet4i p4i_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet2d(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet2d(NAME,X) \ Packet2d p2d_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet2l(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet2l(NAME,X) \ Packet2l p2l_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \ const Packet4f p4f_##NAME = reinterpret_cast(pset1(X)) #define DST_CHAN 1 @@ -76,15 +76,15 @@ typedef eigen_packet_wrapper<__vector unsigned short int,0> Packet8bf; #define __UNPACK_TYPE__(PACKETNAME) typename unpacket_traits::type // These constants are endian-agnostic -static _EIGEN_DECLARE_CONST_FAST_Packet4f(ZERO, 0); //{ 0.0, 0.0, 0.0, 0.0} -static _EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0); //{ 0, 0, 0, 0,} -static _EIGEN_DECLARE_CONST_FAST_Packet4i(ONE,1); //{ 1, 1, 1, 1} -static _EIGEN_DECLARE_CONST_FAST_Packet4i(MINUS16,-16); //{ -16, -16, -16, -16} -static _EIGEN_DECLARE_CONST_FAST_Packet4i(MINUS1,-1); //{ -1, -1, -1, -1} -static _EIGEN_DECLARE_CONST_FAST_Packet4ui(SIGN, 0x80000000u); -static _EIGEN_DECLARE_CONST_FAST_Packet4ui(PREV0DOT5, 0x3EFFFFFFu); -static _EIGEN_DECLARE_CONST_FAST_Packet8us(ONE,1); //{ 1, 1, 1, 1, 1, 1, 1, 1} -static _EIGEN_DECLARE_CONST_FAST_Packet16uc(ONE,1); +static EIGEN_DECLARE_CONST_FAST_Packet4f(ZERO, 0); //{ 0.0, 0.0, 0.0, 0.0} +static EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0); //{ 0, 0, 0, 0,} +static EIGEN_DECLARE_CONST_FAST_Packet4i(ONE,1); //{ 1, 1, 1, 1} +static EIGEN_DECLARE_CONST_FAST_Packet4i(MINUS16,-16); //{ -16, -16, -16, -16} +static EIGEN_DECLARE_CONST_FAST_Packet4i(MINUS1,-1); //{ -1, -1, -1, -1} +static EIGEN_DECLARE_CONST_FAST_Packet4ui(SIGN, 0x80000000u); +static EIGEN_DECLARE_CONST_FAST_Packet4ui(PREV0DOT5, 0x3EFFFFFFu); +static EIGEN_DECLARE_CONST_FAST_Packet8us(ONE,1); //{ 1, 1, 1, 1, 1, 1, 1, 1} +static EIGEN_DECLARE_CONST_FAST_Packet16uc(ONE,1); static Packet4f p4f_MZERO = (Packet4f) vec_sl((Packet4ui)p4i_MINUS1, (Packet4ui)p4i_MINUS1); //{ 0x80000000, 0x80000000, 0x80000000, 0x80000000} #ifndef __VSX__ static Packet4f p4f_ONE = vec_ctf(p4i_ONE, 0); //{ 1.0, 1.0, 1.0, 1.0} @@ -1182,7 +1182,7 @@ template<> EIGEN_STRONG_INLINE Packet8us pabs(const Packet8us& a) { return a; } template<> EIGEN_STRONG_INLINE Packet16c pabs(const Packet16c& a) { return vec_abs(a); } template<> EIGEN_STRONG_INLINE Packet16uc pabs(const Packet16uc& a) { return a; } template<> EIGEN_STRONG_INLINE Packet8bf pabs(const Packet8bf& a) { - _EIGEN_DECLARE_CONST_FAST_Packet8us(abs_mask,0x7FFF); + EIGEN_DECLARE_CONST_FAST_Packet8us(abs_mask,0x7FFF); return pand(p8us_abs_mask, a); } @@ -1194,38 +1194,38 @@ template EIGEN_STRONG_INLINE Packet4i plogical_shift_left(const Packet4i& { return vec_sl(a,reinterpret_cast(pset1(N))); } template EIGEN_STRONG_INLINE Packet4f plogical_shift_left(const Packet4f& a) { - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(mask, N); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(mask, N); Packet4ui r = vec_sl(reinterpret_cast(a), p4ui_mask); return reinterpret_cast(r); } template EIGEN_STRONG_INLINE Packet4f plogical_shift_right(const Packet4f& a) { - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(mask, N); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(mask, N); Packet4ui r = vec_sr(reinterpret_cast(a), p4ui_mask); return reinterpret_cast(r); } template EIGEN_STRONG_INLINE Packet4ui plogical_shift_right(const Packet4ui& a) { - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(mask, N); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(mask, N); return vec_sr(a, p4ui_mask); } template EIGEN_STRONG_INLINE Packet4ui plogical_shift_left(const Packet4ui& a) { - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(mask, N); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(mask, N); return vec_sl(a, p4ui_mask); } template EIGEN_STRONG_INLINE Packet8us plogical_shift_left(const Packet8us& a) { - const _EIGEN_DECLARE_CONST_FAST_Packet8us(mask, N); + const EIGEN_DECLARE_CONST_FAST_Packet8us(mask, N); return vec_sl(a, p8us_mask); } template EIGEN_STRONG_INLINE Packet8us plogical_shift_right(const Packet8us& a) { - const _EIGEN_DECLARE_CONST_FAST_Packet8us(mask, N); + const EIGEN_DECLARE_CONST_FAST_Packet8us(mask, N); return vec_sr(a, p8us_mask); } @@ -1234,7 +1234,7 @@ EIGEN_STRONG_INLINE Packet4f Bf16ToF32Even(const Packet8bf& bf){ } EIGEN_STRONG_INLINE Packet4f Bf16ToF32Odd(const Packet8bf& bf){ - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(high_mask, 0xFFFF0000); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(high_mask, 0xFFFF0000); return pand( reinterpret_cast(bf.m_val), reinterpret_cast(p4ui_high_mask) @@ -1244,7 +1244,7 @@ EIGEN_STRONG_INLINE Packet4f Bf16ToF32Odd(const Packet8bf& bf){ // Simple interleaving of bool masks, prevents true values from being // converted to NaNs. EIGEN_STRONG_INLINE Packet8bf F32ToBf16Bool(Packet4f even, Packet4f odd) { - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(high_mask, 0xFFFF0000); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(high_mask, 0xFFFF0000); Packet4f bf_odd, bf_even; bf_odd = pand(reinterpret_cast(p4ui_high_mask), odd); bf_even = plogical_shift_right<16>(even); @@ -1256,18 +1256,18 @@ EIGEN_STRONG_INLINE Packet8bf F32ToBf16(Packet4f p4f){ Packet4ui lsb = plogical_shift_right<16>(input); lsb = pand(lsb, reinterpret_cast(p4i_ONE)); - _EIGEN_DECLARE_CONST_FAST_Packet4ui(BIAS,0x7FFFu); + EIGEN_DECLARE_CONST_FAST_Packet4ui(BIAS,0x7FFFu); Packet4ui rounding_bias = padd(lsb, p4ui_BIAS); input = padd(input, rounding_bias); //Test NaN and Subnormal - Begin - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(exp_mask, 0x7F800000); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(exp_mask, 0x7F800000); Packet4ui exp = pand(p4ui_exp_mask, reinterpret_cast(p4f)); - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(mantissa_mask, 0x7FFFFF); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(mantissa_mask, 0x7FFFFF); Packet4ui mantissa = pand(p4ui_mantissa_mask, reinterpret_cast(p4f)); - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(max_exp, 0x7F800000); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(max_exp, 0x7F800000); Packet4bi is_max_exp = vec_cmpeq(exp, p4ui_max_exp); Packet4bi is_zero_exp = vec_cmpeq(exp, reinterpret_cast(p4i_ZERO)); @@ -1282,7 +1282,7 @@ EIGEN_STRONG_INLINE Packet8bf F32ToBf16(Packet4f p4f){ reinterpret_cast(is_mant_zero) ); - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(nan, 0x7FC00000); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(nan, 0x7FC00000); input = vec_sel(input, p4ui_nan, nan_selector); input = vec_sel(input, reinterpret_cast(p4f), subnormal_selector); //Test NaN and Subnormal - End @@ -2210,7 +2210,7 @@ template<> EIGEN_STRONG_INLINE Packet8us pcast(const Packe Packet4f float_odd = Bf16ToF32Odd(a); Packet4ui int_even = pcast(float_even); Packet4ui int_odd = pcast(float_odd); - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(low_mask, 0x0000FFFF); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(low_mask, 0x0000FFFF); Packet4ui low_even = pand(int_even, p4ui_low_mask); Packet4ui low_odd = pand(int_odd, p4ui_low_mask); @@ -2233,7 +2233,7 @@ template<> EIGEN_STRONG_INLINE Packet8us pcast(const Packe template<> EIGEN_STRONG_INLINE Packet8bf pcast(const Packet8us& a) { //short -> int -> float -> bfloat16 - const _EIGEN_DECLARE_CONST_FAST_Packet4ui(low_mask, 0x0000FFFF); + const EIGEN_DECLARE_CONST_FAST_Packet4ui(low_mask, 0x0000FFFF); Packet4ui int_cast = reinterpret_cast(a); Packet4ui int_even = pand(int_cast, p4ui_low_mask); Packet4ui int_odd = plogical_shift_right<16>(int_cast); diff --git a/Eigen/src/Core/arch/MSA/MathFunctions.h b/Eigen/src/Core/arch/MSA/MathFunctions.h index bbebde5e3..c3295a51b 100644 --- a/Eigen/src/Core/arch/MSA/MathFunctions.h +++ b/Eigen/src/Core/arch/MSA/MathFunctions.h @@ -35,20 +35,20 @@ namespace internal { template <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f plog(const Packet4f& _x) { - static _EIGEN_DECLARE_CONST_Packet4f(cephes_SQRTHF, 0.707106781186547524f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p0, 7.0376836292e-2f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p1, -1.1514610310e-1f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p2, 1.1676998740e-1f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p3, -1.2420140846e-1f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p4, +1.4249322787e-1f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p5, -1.6668057665e-1f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p6, +2.0000714765e-1f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p7, -2.4999993993e-1f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p8, +3.3333331174e-1f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_q1, -2.12194440e-4f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_q2, 0.693359375f); - static _EIGEN_DECLARE_CONST_Packet4f(half, 0.5f); - static _EIGEN_DECLARE_CONST_Packet4f(1, 1.0f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_SQRTHF, 0.707106781186547524f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p0, 7.0376836292e-2f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p1, -1.1514610310e-1f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p2, 1.1676998740e-1f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p3, -1.2420140846e-1f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p4, +1.4249322787e-1f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p5, -1.6668057665e-1f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p6, +2.0000714765e-1f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p7, -2.4999993993e-1f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p8, +3.3333331174e-1f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_log_q1, -2.12194440e-4f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_log_q2, 0.693359375f); + static EIGEN_DECLARE_CONST_Packet4f(half, 0.5f); + static EIGEN_DECLARE_CONST_Packet4f(1, 1.0f); // Convert negative argument into NAN (quiet negative, to be specific). Packet4f zero = (Packet4f)__builtin_msa_ldi_w(0); @@ -125,19 +125,19 @@ EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f pexp(const Packet4f& _x) { // Limiting single-precision pexp's argument to [-128, +128] lets pexp // reach 0 and INFINITY naturally. - static _EIGEN_DECLARE_CONST_Packet4f(exp_lo, -128.0f); - static _EIGEN_DECLARE_CONST_Packet4f(exp_hi, +128.0f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_LOG2EF, 1.44269504088896341f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C1, 0.693359375f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C2, -2.12194440e-4f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p0, 1.9875691500e-4f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p1, 1.3981999507e-3f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p2, 8.3334519073e-3f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p3, 4.1665795894e-2f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p4, 1.6666665459e-1f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p5, 5.0000001201e-1f); - static _EIGEN_DECLARE_CONST_Packet4f(half, 0.5f); - static _EIGEN_DECLARE_CONST_Packet4f(1, 1.0f); + static EIGEN_DECLARE_CONST_Packet4f(exp_lo, -128.0f); + static EIGEN_DECLARE_CONST_Packet4f(exp_hi, +128.0f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_LOG2EF, 1.44269504088896341f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C1, 0.693359375f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C2, -2.12194440e-4f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p0, 1.9875691500e-4f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p1, 1.3981999507e-3f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p2, 8.3334519073e-3f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p3, 4.1665795894e-2f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p4, 1.6666665459e-1f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p5, 5.0000001201e-1f); + static EIGEN_DECLARE_CONST_Packet4f(half, 0.5f); + static EIGEN_DECLARE_CONST_Packet4f(1, 1.0f); Packet4f x = _x; @@ -176,21 +176,21 @@ pexp(const Packet4f& _x) { template <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f ptanh(const Packet4f& _x) { - static _EIGEN_DECLARE_CONST_Packet4f(tanh_tiny, 1e-4f); - static _EIGEN_DECLARE_CONST_Packet4f(tanh_hi, 9.0f); + static EIGEN_DECLARE_CONST_Packet4f(tanh_tiny, 1e-4f); + static EIGEN_DECLARE_CONST_Packet4f(tanh_hi, 9.0f); // The monomial coefficients of the numerator polynomial (odd). - static _EIGEN_DECLARE_CONST_Packet4f(alpha_1, 4.89352455891786e-3f); - static _EIGEN_DECLARE_CONST_Packet4f(alpha_3, 6.37261928875436e-4f); - static _EIGEN_DECLARE_CONST_Packet4f(alpha_5, 1.48572235717979e-5f); - static _EIGEN_DECLARE_CONST_Packet4f(alpha_7, 5.12229709037114e-8f); - static _EIGEN_DECLARE_CONST_Packet4f(alpha_9, -8.60467152213735e-11f); - static _EIGEN_DECLARE_CONST_Packet4f(alpha_11, 2.00018790482477e-13f); - static _EIGEN_DECLARE_CONST_Packet4f(alpha_13, -2.76076847742355e-16f); + static EIGEN_DECLARE_CONST_Packet4f(alpha_1, 4.89352455891786e-3f); + static EIGEN_DECLARE_CONST_Packet4f(alpha_3, 6.37261928875436e-4f); + static EIGEN_DECLARE_CONST_Packet4f(alpha_5, 1.48572235717979e-5f); + static EIGEN_DECLARE_CONST_Packet4f(alpha_7, 5.12229709037114e-8f); + static EIGEN_DECLARE_CONST_Packet4f(alpha_9, -8.60467152213735e-11f); + static EIGEN_DECLARE_CONST_Packet4f(alpha_11, 2.00018790482477e-13f); + static EIGEN_DECLARE_CONST_Packet4f(alpha_13, -2.76076847742355e-16f); // The monomial coefficients of the denominator polynomial (even). - static _EIGEN_DECLARE_CONST_Packet4f(beta_0, 4.89352518554385e-3f); - static _EIGEN_DECLARE_CONST_Packet4f(beta_2, 2.26843463243900e-3f); - static _EIGEN_DECLARE_CONST_Packet4f(beta_4, 1.18534705686654e-4f); - static _EIGEN_DECLARE_CONST_Packet4f(beta_6, 1.19825839466702e-6f); + static EIGEN_DECLARE_CONST_Packet4f(beta_0, 4.89352518554385e-3f); + static EIGEN_DECLARE_CONST_Packet4f(beta_2, 2.26843463243900e-3f); + static EIGEN_DECLARE_CONST_Packet4f(beta_4, 1.18534705686654e-4f); + static EIGEN_DECLARE_CONST_Packet4f(beta_6, 1.19825839466702e-6f); Packet4f x = pabs(_x); Packet4i tiny_mask = __builtin_msa_fclt_w(x, p4f_tanh_tiny); @@ -231,19 +231,19 @@ ptanh(const Packet4f& _x) { template Packet4f psincos_inner_msa_float(const Packet4f& _x) { - static _EIGEN_DECLARE_CONST_Packet4f(sincos_max_arg, 13176795.0f); // Approx. (2**24) / (4/Pi). - static _EIGEN_DECLARE_CONST_Packet4f(minus_cephes_DP1, -0.78515625f); - static _EIGEN_DECLARE_CONST_Packet4f(minus_cephes_DP2, -2.4187564849853515625e-4f); - static _EIGEN_DECLARE_CONST_Packet4f(minus_cephes_DP3, -3.77489497744594108e-8f); - static _EIGEN_DECLARE_CONST_Packet4f(sincof_p0, -1.9515295891e-4f); - static _EIGEN_DECLARE_CONST_Packet4f(sincof_p1, 8.3321608736e-3f); - static _EIGEN_DECLARE_CONST_Packet4f(sincof_p2, -1.6666654611e-1f); - static _EIGEN_DECLARE_CONST_Packet4f(coscof_p0, 2.443315711809948e-5f); - static _EIGEN_DECLARE_CONST_Packet4f(coscof_p1, -1.388731625493765e-3f); - static _EIGEN_DECLARE_CONST_Packet4f(coscof_p2, 4.166664568298827e-2f); - static _EIGEN_DECLARE_CONST_Packet4f(cephes_FOPI, 1.27323954473516f); // 4/Pi. - static _EIGEN_DECLARE_CONST_Packet4f(half, 0.5f); - static _EIGEN_DECLARE_CONST_Packet4f(1, 1.0f); + static EIGEN_DECLARE_CONST_Packet4f(sincos_max_arg, 13176795.0f); // Approx. (2**24) / (4/Pi). + static EIGEN_DECLARE_CONST_Packet4f(minus_cephes_DP1, -0.78515625f); + static EIGEN_DECLARE_CONST_Packet4f(minus_cephes_DP2, -2.4187564849853515625e-4f); + static EIGEN_DECLARE_CONST_Packet4f(minus_cephes_DP3, -3.77489497744594108e-8f); + static EIGEN_DECLARE_CONST_Packet4f(sincof_p0, -1.9515295891e-4f); + static EIGEN_DECLARE_CONST_Packet4f(sincof_p1, 8.3321608736e-3f); + static EIGEN_DECLARE_CONST_Packet4f(sincof_p2, -1.6666654611e-1f); + static EIGEN_DECLARE_CONST_Packet4f(coscof_p0, 2.443315711809948e-5f); + static EIGEN_DECLARE_CONST_Packet4f(coscof_p1, -1.388731625493765e-3f); + static EIGEN_DECLARE_CONST_Packet4f(coscof_p2, 4.166664568298827e-2f); + static EIGEN_DECLARE_CONST_Packet4f(cephes_FOPI, 1.27323954473516f); // 4/Pi. + static EIGEN_DECLARE_CONST_Packet4f(half, 0.5f); + static EIGEN_DECLARE_CONST_Packet4f(1, 1.0f); Packet4f x = pabs(_x); @@ -328,21 +328,21 @@ EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2d pexp(const Packet2d& _x) { // Limiting double-precision pexp's argument to [-1024, +1024] lets pexp // reach 0 and INFINITY naturally. - static _EIGEN_DECLARE_CONST_Packet2d(exp_lo, -1024.0); - static _EIGEN_DECLARE_CONST_Packet2d(exp_hi, +1024.0); - static _EIGEN_DECLARE_CONST_Packet2d(cephes_LOG2EF, 1.4426950408889634073599); - static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C1, 0.693145751953125); - static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C2, 1.42860682030941723212e-6); - static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p0, 1.26177193074810590878e-4); - static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p1, 3.02994407707441961300e-2); - static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p2, 9.99999999999999999910e-1); - static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q0, 3.00198505138664455042e-6); - static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q1, 2.52448340349684104192e-3); - static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q2, 2.27265548208155028766e-1); - static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q3, 2.00000000000000000009e0); - static _EIGEN_DECLARE_CONST_Packet2d(half, 0.5); - static _EIGEN_DECLARE_CONST_Packet2d(1, 1.0); - static _EIGEN_DECLARE_CONST_Packet2d(2, 2.0); + static EIGEN_DECLARE_CONST_Packet2d(exp_lo, -1024.0); + static EIGEN_DECLARE_CONST_Packet2d(exp_hi, +1024.0); + static EIGEN_DECLARE_CONST_Packet2d(cephes_LOG2EF, 1.4426950408889634073599); + static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C1, 0.693145751953125); + static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C2, 1.42860682030941723212e-6); + static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p0, 1.26177193074810590878e-4); + static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p1, 3.02994407707441961300e-2); + static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p2, 9.99999999999999999910e-1); + static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q0, 3.00198505138664455042e-6); + static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q1, 2.52448340349684104192e-3); + static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q2, 2.27265548208155028766e-1); + static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q3, 2.00000000000000000009e0); + static EIGEN_DECLARE_CONST_Packet2d(half, 0.5); + static EIGEN_DECLARE_CONST_Packet2d(1, 1.0); + static EIGEN_DECLARE_CONST_Packet2d(2, 2.0); Packet2d x = _x; diff --git a/Eigen/src/Core/arch/MSA/PacketMath.h b/Eigen/src/Core/arch/MSA/PacketMath.h index 3dc95a14e..f03dbedae 100644 --- a/Eigen/src/Core/arch/MSA/PacketMath.h +++ b/Eigen/src/Core/arch/MSA/PacketMath.h @@ -53,9 +53,9 @@ typedef v4f32 Packet4f; typedef v4i32 Packet4i; typedef v4u32 Packet4ui; -#define _EIGEN_DECLARE_CONST_Packet4f(NAME, X) const Packet4f p4f_##NAME = { X, X, X, X } -#define _EIGEN_DECLARE_CONST_Packet4i(NAME, X) const Packet4i p4i_##NAME = { X, X, X, X } -#define _EIGEN_DECLARE_CONST_Packet4ui(NAME, X) const Packet4ui p4ui_##NAME = { X, X, X, X } +#define EIGEN_DECLARE_CONST_Packet4f(NAME, X) const Packet4f p4f_##NAME = { X, X, X, X } +#define EIGEN_DECLARE_CONST_Packet4i(NAME, X) const Packet4i p4i_##NAME = { X, X, X, X } +#define EIGEN_DECLARE_CONST_Packet4ui(NAME, X) const Packet4ui p4ui_##NAME = { X, X, X, X } inline std::ostream& operator<<(std::ostream& os, const Packet4f& value) { os << "[ " << value[0] << ", " << value[1] << ", " << value[2] << ", " << value[3] << " ]"; @@ -823,9 +823,9 @@ typedef v2f64 Packet2d; typedef v2i64 Packet2l; typedef v2u64 Packet2ul; -#define _EIGEN_DECLARE_CONST_Packet2d(NAME, X) const Packet2d p2d_##NAME = { X, X } -#define _EIGEN_DECLARE_CONST_Packet2l(NAME, X) const Packet2l p2l_##NAME = { X, X } -#define _EIGEN_DECLARE_CONST_Packet2ul(NAME, X) const Packet2ul p2ul_##NAME = { X, X } +#define EIGEN_DECLARE_CONST_Packet2d(NAME, X) const Packet2d p2d_##NAME = { X, X } +#define EIGEN_DECLARE_CONST_Packet2l(NAME, X) const Packet2l p2l_##NAME = { X, X } +#define EIGEN_DECLARE_CONST_Packet2ul(NAME, X) const Packet2ul p2ul_##NAME = { X, X } inline std::ostream& operator<<(std::ostream& os, const Packet2d& value) { os << "[ " << value[0] << ", " << value[1] << " ]"; diff --git a/Eigen/src/Core/arch/NEON/PacketMath.h b/Eigen/src/Core/arch/NEON/PacketMath.h index 707f7d7bd..dda0a1efb 100644 --- a/Eigen/src/Core/arch/NEON/PacketMath.h +++ b/Eigen/src/Core/arch/NEON/PacketMath.h @@ -139,13 +139,13 @@ EIGEN_STRONG_INLINE Packet4f vec4f_unpackhi(const Packet4f& a, const Packet4f& b #define vec4f_duplane(a, p) \ vdupq_lane_f32(vget_low_f32(a), p) -#define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4f(NAME,X) \ const Packet4f p4f_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \ const Packet4f p4f_##NAME = vreinterpretq_f32_u32(pset1(X)) -#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4i(NAME,X) \ const Packet4i p4i_##NAME = pset1(X) #if EIGEN_ARCH_ARM64 diff --git a/Eigen/src/Core/arch/SSE/MathFunctions.h b/Eigen/src/Core/arch/SSE/MathFunctions.h index f5c72a766..5a063d358 100644 --- a/Eigen/src/Core/arch/SSE/MathFunctions.h +++ b/Eigen/src/Core/arch/SSE/MathFunctions.h @@ -118,10 +118,10 @@ Packet16b psqrt(const Packet16b& x) { return x; } template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f prsqrt(const Packet4f& _x) { - _EIGEN_DECLARE_CONST_Packet4f(one_point_five, 1.5f); - _EIGEN_DECLARE_CONST_Packet4f(minus_half, -0.5f); - _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(inf, 0x7f800000u); - _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(flt_min, 0x00800000u); + EIGEN_DECLARE_CONST_Packet4f(one_point_five, 1.5f); + EIGEN_DECLARE_CONST_Packet4f(minus_half, -0.5f); + EIGEN_DECLARE_CONST_Packet4f_FROM_INT(inf, 0x7f800000u); + EIGEN_DECLARE_CONST_Packet4f_FROM_INT(flt_min, 0x00800000u); Packet4f neg_half = pmul(_x, p4f_minus_half); diff --git a/Eigen/src/Core/arch/SSE/PacketMath.h b/Eigen/src/Core/arch/SSE/PacketMath.h index 45e219c2d..a843226ac 100755 --- a/Eigen/src/Core/arch/SSE/PacketMath.h +++ b/Eigen/src/Core/arch/SSE/PacketMath.h @@ -108,16 +108,16 @@ EIGEN_STRONG_INLINE Packet2d vec2d_unpackhi(const Packet2d& a, const Packet2d& b #define vec2d_duplane(a,p) \ vec2d_swizzle2(a,a,(p<<1)|p) -#define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4f(NAME,X) \ const Packet4f p4f_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet2d(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet2d(NAME,X) \ const Packet2d p2d_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \ const Packet4f p4f_##NAME = pset1frombits(X) -#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4i(NAME,X) \ const Packet4i p4i_##NAME = pset1(X) diff --git a/Eigen/src/Core/arch/ZVector/MathFunctions.h b/Eigen/src/Core/arch/ZVector/MathFunctions.h index bad16a61f..7ee14aba5 100644 --- a/Eigen/src/Core/arch/ZVector/MathFunctions.h +++ b/Eigen/src/Core/arch/ZVector/MathFunctions.h @@ -23,69 +23,69 @@ namespace Eigen { namespace internal { #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12) -static _EIGEN_DECLARE_CONST_Packet4f(1 , 1.0f); -static _EIGEN_DECLARE_CONST_Packet4f(half, 0.5f); -static _EIGEN_DECLARE_CONST_Packet4i(0x7f, 0x7f); -static _EIGEN_DECLARE_CONST_Packet4i(23, 23); +static EIGEN_DECLARE_CONST_Packet4f(1 , 1.0f); +static EIGEN_DECLARE_CONST_Packet4f(half, 0.5f); +static EIGEN_DECLARE_CONST_Packet4i(0x7f, 0x7f); +static EIGEN_DECLARE_CONST_Packet4i(23, 23); -static _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(inv_mant_mask, ~0x7f800000); +static EIGEN_DECLARE_CONST_Packet4f_FROM_INT(inv_mant_mask, ~0x7f800000); /* the smallest non denormalized float number */ -static _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(min_norm_pos, 0x00800000); -static _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(minus_inf, 0xff800000); // -1.f/0.f -static _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(minus_nan, 0xffffffff); +static EIGEN_DECLARE_CONST_Packet4f_FROM_INT(min_norm_pos, 0x00800000); +static EIGEN_DECLARE_CONST_Packet4f_FROM_INT(minus_inf, 0xff800000); // -1.f/0.f +static EIGEN_DECLARE_CONST_Packet4f_FROM_INT(minus_nan, 0xffffffff); /* natural logarithm computed for 4 simultaneous float return NaN for x <= 0 */ -static _EIGEN_DECLARE_CONST_Packet4f(cephes_SQRTHF, 0.707106781186547524f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p0, 7.0376836292E-2f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p1, - 1.1514610310E-1f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p2, 1.1676998740E-1f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p3, - 1.2420140846E-1f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p4, + 1.4249322787E-1f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p5, - 1.6668057665E-1f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p6, + 2.0000714765E-1f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p7, - 2.4999993993E-1f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_p8, + 3.3333331174E-1f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_q1, -2.12194440e-4f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_log_q2, 0.693359375f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_SQRTHF, 0.707106781186547524f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p0, 7.0376836292E-2f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p1, - 1.1514610310E-1f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p2, 1.1676998740E-1f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p3, - 1.2420140846E-1f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p4, + 1.4249322787E-1f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p5, - 1.6668057665E-1f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p6, + 2.0000714765E-1f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p7, - 2.4999993993E-1f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_log_p8, + 3.3333331174E-1f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_log_q1, -2.12194440e-4f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_log_q2, 0.693359375f); -static _EIGEN_DECLARE_CONST_Packet4f(exp_hi, 88.3762626647950f); -static _EIGEN_DECLARE_CONST_Packet4f(exp_lo, -88.3762626647949f); +static EIGEN_DECLARE_CONST_Packet4f(exp_hi, 88.3762626647950f); +static EIGEN_DECLARE_CONST_Packet4f(exp_lo, -88.3762626647949f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_LOG2EF, 1.44269504088896341f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C1, 0.693359375f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C2, -2.12194440e-4f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_LOG2EF, 1.44269504088896341f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C1, 0.693359375f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_C2, -2.12194440e-4f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p0, 1.9875691500E-4f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p1, 1.3981999507E-3f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p2, 8.3334519073E-3f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p3, 4.1665795894E-2f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p4, 1.6666665459E-1f); -static _EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p5, 5.0000001201E-1f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p0, 1.9875691500E-4f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p1, 1.3981999507E-3f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p2, 8.3334519073E-3f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p3, 4.1665795894E-2f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p4, 1.6666665459E-1f); +static EIGEN_DECLARE_CONST_Packet4f(cephes_exp_p5, 5.0000001201E-1f); #endif -static _EIGEN_DECLARE_CONST_Packet2d(1 , 1.0); -static _EIGEN_DECLARE_CONST_Packet2d(2 , 2.0); -static _EIGEN_DECLARE_CONST_Packet2d(half, 0.5); +static EIGEN_DECLARE_CONST_Packet2d(1 , 1.0); +static EIGEN_DECLARE_CONST_Packet2d(2 , 2.0); +static EIGEN_DECLARE_CONST_Packet2d(half, 0.5); -static _EIGEN_DECLARE_CONST_Packet2d(exp_hi, 709.437); -static _EIGEN_DECLARE_CONST_Packet2d(exp_lo, -709.436139303); +static EIGEN_DECLARE_CONST_Packet2d(exp_hi, 709.437); +static EIGEN_DECLARE_CONST_Packet2d(exp_lo, -709.436139303); -static _EIGEN_DECLARE_CONST_Packet2d(cephes_LOG2EF, 1.4426950408889634073599); +static EIGEN_DECLARE_CONST_Packet2d(cephes_LOG2EF, 1.4426950408889634073599); -static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p0, 1.26177193074810590878e-4); -static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p1, 3.02994407707441961300e-2); -static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p2, 9.99999999999999999910e-1); +static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p0, 1.26177193074810590878e-4); +static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p1, 3.02994407707441961300e-2); +static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_p2, 9.99999999999999999910e-1); -static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q0, 3.00198505138664455042e-6); -static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q1, 2.52448340349684104192e-3); -static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q2, 2.27265548208155028766e-1); -static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q3, 2.00000000000000000009e0); +static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q0, 3.00198505138664455042e-6); +static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q1, 2.52448340349684104192e-3); +static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q2, 2.27265548208155028766e-1); +static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_q3, 2.00000000000000000009e0); -static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C1, 0.693145751953125); -static _EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C2, 1.42860682030941723212e-6); +static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C1, 0.693145751953125); +static EIGEN_DECLARE_CONST_Packet2d(cephes_exp_C2, 1.42860682030941723212e-6); template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2d pexp(const Packet2d& _x) diff --git a/Eigen/src/Core/arch/ZVector/PacketMath.h b/Eigen/src/Core/arch/ZVector/PacketMath.h index 3d81aedd4..26b6f0dd7 100755 --- a/Eigen/src/Core/arch/ZVector/PacketMath.h +++ b/Eigen/src/Core/arch/ZVector/PacketMath.h @@ -66,48 +66,48 @@ typedef union { // We don't want to write the same code all the time, but we need to reuse the constants // and it doesn't really work to declare them global, so we define macros instead -#define _EIGEN_DECLARE_CONST_FAST_Packet4i(NAME,X) \ +#define EIGEN_DECLARE_CONST_FAST_Packet4i(NAME,X) \ Packet4i p4i_##NAME = reinterpret_cast(vec_splat_s32(X)) -#define _EIGEN_DECLARE_CONST_FAST_Packet2d(NAME,X) \ +#define EIGEN_DECLARE_CONST_FAST_Packet2d(NAME,X) \ Packet2d p2d_##NAME = reinterpret_cast(vec_splat_s64(X)) -#define _EIGEN_DECLARE_CONST_FAST_Packet2l(NAME,X) \ +#define EIGEN_DECLARE_CONST_FAST_Packet2l(NAME,X) \ Packet2l p2l_##NAME = reinterpret_cast(vec_splat_s64(X)) -#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4i(NAME,X) \ Packet4i p4i_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet2d(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet2d(NAME,X) \ Packet2d p2d_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet2l(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet2l(NAME,X) \ Packet2l p2l_##NAME = pset1(X) // These constants are endian-agnostic -static _EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0); //{ 0, 0, 0, 0,} -static _EIGEN_DECLARE_CONST_FAST_Packet4i(ONE, 1); //{ 1, 1, 1, 1} +static EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0); //{ 0, 0, 0, 0,} +static EIGEN_DECLARE_CONST_FAST_Packet4i(ONE, 1); //{ 1, 1, 1, 1} -static _EIGEN_DECLARE_CONST_FAST_Packet2d(ZERO, 0); -static _EIGEN_DECLARE_CONST_FAST_Packet2l(ZERO, 0); -static _EIGEN_DECLARE_CONST_FAST_Packet2l(ONE, 1); +static EIGEN_DECLARE_CONST_FAST_Packet2d(ZERO, 0); +static EIGEN_DECLARE_CONST_FAST_Packet2l(ZERO, 0); +static EIGEN_DECLARE_CONST_FAST_Packet2l(ONE, 1); static Packet2d p2d_ONE = { 1.0, 1.0 }; static Packet2d p2d_ZERO_ = { numext::bit_cast(0x8000000000000000ull), numext::bit_cast(0x8000000000000000ull) }; #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12) -#define _EIGEN_DECLARE_CONST_FAST_Packet4f(NAME,X) \ +#define EIGEN_DECLARE_CONST_FAST_Packet4f(NAME,X) \ Packet4f p4f_##NAME = reinterpret_cast(vec_splat_s32(X)) -#define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4f(NAME,X) \ Packet4f p4f_##NAME = pset1(X) -#define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \ +#define EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \ const Packet4f p4f_##NAME = reinterpret_cast(pset1(X)) -static _EIGEN_DECLARE_CONST_FAST_Packet4f(ZERO, 0); //{ 0.0, 0.0, 0.0, 0.0} -static _EIGEN_DECLARE_CONST_FAST_Packet4i(MINUS1,-1); //{ -1, -1, -1, -1} +static EIGEN_DECLARE_CONST_FAST_Packet4f(ZERO, 0); //{ 0.0, 0.0, 0.0, 0.0} +static EIGEN_DECLARE_CONST_FAST_Packet4i(MINUS1,-1); //{ -1, -1, -1, -1} static Packet4f p4f_MZERO = { 0x80000000, 0x80000000, 0x80000000, 0x80000000}; #endif @@ -119,9 +119,9 @@ static Packet16uc p16uc_PSET64_HI = { 0,1,2,3, 4,5,6,7, 0,1,2,3, 4,5,6,7 }; static Packet16uc p16uc_DUPLICATE32_HI = { 0,1,2,3, 0,1,2,3, 4,5,6,7, 4,5,6,7 }; // Mask alignment -#define _EIGEN_MASK_ALIGNMENT 0xfffffffffffffff0 +#define EIGEN_MASK_ALIGNMENT 0xfffffffffffffff0 -#define _EIGEN_ALIGNED_PTR(x) ((std::ptrdiff_t)(x) & _EIGEN_MASK_ALIGNMENT) +#define EIGEN_ALIGNED_PTR(x) ((std::ptrdiff_t)(x) & EIGEN_MASK_ALIGNMENT) // Handle endianness properly while loading constants // Define global static constants: diff --git a/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/Eigen/src/Core/products/GeneralBlockPanelKernel.h index 938f5fb8b..758088703 100644 --- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h +++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h @@ -378,12 +378,12 @@ struct packet_conditional { typedef T1 type; }; template struct packet_conditional { typedef T2 type; }; -#define PACKET_DECL_COND_PREFIX(prefix, name, packet_size) \ +#define PACKET_DECL_COND_POSTFIX(postfix, name, packet_size) \ typedef typename packet_conditional::type, \ typename packet_traits::half, \ typename unpacket_traits::half>::half>::type \ - prefix ## name ## Packet + name ## Packet ## postfix #define PACKET_DECL_COND(name, packet_size) \ typedef typename packet_conditional { typedef T2 type; }; typename unpacket_traits::half>::half>::type \ name ## Packet -#define PACKET_DECL_COND_SCALAR_PREFIX(prefix, packet_size) \ +#define PACKET_DECL_COND_SCALAR_POSTFIX(postfix, packet_size) \ typedef typename packet_conditional::type, \ typename packet_traits::half, \ typename unpacket_traits::half>::half>::type \ - prefix ## ScalarPacket + ScalarPacket ## postfix #define PACKET_DECL_COND_SCALAR(packet_size) \ typedef typename packet_conditional::ReturnType ResScalar; - PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_); - PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_); - PACKET_DECL_COND_PREFIX(_, Res, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Lhs, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Rhs, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Res, PacketSize_); enum { ConjLhs = ConjLhs_, ConjRhs = ConjRhs_, - Vectorizable = unpacket_traits<_LhsPacket>::vectorizable && unpacket_traits<_RhsPacket>::vectorizable, - LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1, - RhsPacketSize = Vectorizable ? unpacket_traits<_RhsPacket>::size : 1, - ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1, + Vectorizable = unpacket_traits::vectorizable && unpacket_traits::vectorizable, + LhsPacketSize = Vectorizable ? unpacket_traits::size : 1, + RhsPacketSize = Vectorizable ? unpacket_traits::size : 1, + ResPacketSize = Vectorizable ? unpacket_traits::size : 1, NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS, @@ -459,9 +459,9 @@ public: }; - typedef typename conditional::type LhsPacket; - typedef typename conditional::type RhsPacket; - typedef typename conditional::type ResPacket; + typedef typename conditional::type LhsPacket; + typedef typename conditional::type RhsPacket; + typedef typename conditional::type ResPacket; typedef LhsPacket LhsPacket4Packing; typedef QuadPacket RhsPacketx4; @@ -553,17 +553,17 @@ public: typedef RealScalar RhsScalar; typedef typename ScalarBinaryOpTraits::ReturnType ResScalar; - PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_); - PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_); - PACKET_DECL_COND_PREFIX(_, Res, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Lhs, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Rhs, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Res, PacketSize_); enum { ConjLhs = ConjLhs_, ConjRhs = false, - Vectorizable = unpacket_traits<_LhsPacket>::vectorizable && unpacket_traits<_RhsPacket>::vectorizable, - LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1, - RhsPacketSize = Vectorizable ? unpacket_traits<_RhsPacket>::size : 1, - ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1, + Vectorizable = unpacket_traits::vectorizable && unpacket_traits::vectorizable, + LhsPacketSize = Vectorizable ? unpacket_traits::size : 1, + RhsPacketSize = Vectorizable ? unpacket_traits::size : 1, + ResPacketSize = Vectorizable ? unpacket_traits::size : 1, NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS, nr = 4, @@ -578,9 +578,9 @@ public: RhsProgress = 1 }; - typedef typename conditional::type LhsPacket; - typedef typename conditional::type RhsPacket; - typedef typename conditional::type ResPacket; + typedef typename conditional::type LhsPacket; + typedef typename conditional::type RhsPacket; + typedef typename conditional::type ResPacket; typedef LhsPacket LhsPacket4Packing; typedef QuadPacket RhsPacketx4; @@ -765,9 +765,9 @@ public: typedef std::complex RhsScalar; typedef std::complex ResScalar; - PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_); - PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_); - PACKET_DECL_COND_PREFIX(_, Res, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Lhs, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Rhs, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Res, PacketSize_); PACKET_DECL_COND(Real, PacketSize_); PACKET_DECL_COND_SCALAR(PacketSize_); @@ -776,8 +776,8 @@ public: ConjRhs = ConjRhs_, Vectorizable = unpacket_traits::vectorizable && unpacket_traits::vectorizable, - ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1, - LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1, + ResPacketSize = Vectorizable ? unpacket_traits::size : 1, + LhsPacketSize = Vectorizable ? unpacket_traits::size : 1, RhsPacketSize = Vectorizable ? unpacket_traits::size : 1, RealPacketSize = Vectorizable ? unpacket_traits::size : 1, @@ -931,25 +931,25 @@ public: typedef Scalar RhsScalar; typedef Scalar ResScalar; - PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_); - PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_); - PACKET_DECL_COND_PREFIX(_, Res, PacketSize_); - PACKET_DECL_COND_PREFIX(_, Real, PacketSize_); - PACKET_DECL_COND_SCALAR_PREFIX(_, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Lhs, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Rhs, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Res, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Real, PacketSize_); + PACKET_DECL_COND_SCALAR_POSTFIX(_, PacketSize_); -#undef PACKET_DECL_COND_SCALAR_PREFIX -#undef PACKET_DECL_COND_PREFIX +#undef PACKET_DECL_COND_SCALAR_POSTFIX +#undef PACKET_DECL_COND_POSTFIX #undef PACKET_DECL_COND_SCALAR #undef PACKET_DECL_COND enum { ConjLhs = false, ConjRhs = ConjRhs_, - Vectorizable = unpacket_traits<_RealPacket>::vectorizable - && unpacket_traits<_ScalarPacket>::vectorizable, - LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1, - RhsPacketSize = Vectorizable ? unpacket_traits<_RhsPacket>::size : 1, - ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1, + Vectorizable = unpacket_traits::vectorizable + && unpacket_traits::vectorizable, + LhsPacketSize = Vectorizable ? unpacket_traits::size : 1, + RhsPacketSize = Vectorizable ? unpacket_traits::size : 1, + ResPacketSize = Vectorizable ? unpacket_traits::size : 1, NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS, // FIXME: should depend on NumberOfRegisters @@ -960,9 +960,9 @@ public: RhsProgress = 1 }; - typedef typename conditional::type LhsPacket; - typedef typename conditional::type RhsPacket; - typedef typename conditional::type ResPacket; + typedef typename conditional::type LhsPacket; + typedef typename conditional::type RhsPacket; + typedef typename conditional::type ResPacket; typedef LhsPacket LhsPacket4Packing; typedef QuadPacket RhsPacketx4; typedef ResPacket AccPacket; diff --git a/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h b/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h index 465294bdf..9728f30b9 100644 --- a/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +++ b/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h @@ -213,13 +213,13 @@ struct general_product_to_triangular_selector typedef typename internal::remove_all::type Lhs; typedef internal::blas_traits LhsBlasTraits; typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhs; - typedef typename internal::remove_all::type _ActualLhs; + typedef typename internal::remove_all::type ActualLhs_; typename internal::add_const_on_value_type::type actualLhs = LhsBlasTraits::extract(prod.lhs()); typedef typename internal::remove_all::type Rhs; typedef internal::blas_traits RhsBlasTraits; typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhs; - typedef typename internal::remove_all::type _ActualRhs; + typedef typename internal::remove_all::type ActualRhs_; typename internal::add_const_on_value_type::type actualRhs = RhsBlasTraits::extract(prod.rhs()); Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(prod.lhs().derived()) * RhsBlasTraits::extractScalarFactor(prod.rhs().derived()); @@ -229,19 +229,19 @@ struct general_product_to_triangular_selector enum { StorageOrder = (internal::traits::Flags&RowMajorBit) ? RowMajor : ColMajor, - UseLhsDirectly = _ActualLhs::InnerStrideAtCompileTime==1, - UseRhsDirectly = _ActualRhs::InnerStrideAtCompileTime==1 + UseLhsDirectly = ActualLhs_::InnerStrideAtCompileTime==1, + UseRhsDirectly = ActualRhs_::InnerStrideAtCompileTime==1 }; internal::gemv_static_vector_if static_lhs; ei_declare_aligned_stack_constructed_variable(Scalar, actualLhsPtr, actualLhs.size(), (UseLhsDirectly ? const_cast(actualLhs.data()) : static_lhs.data())); - if(!UseLhsDirectly) Map(actualLhsPtr, actualLhs.size()) = actualLhs; + if(!UseLhsDirectly) Map(actualLhsPtr, actualLhs.size()) = actualLhs; internal::gemv_static_vector_if static_rhs; ei_declare_aligned_stack_constructed_variable(Scalar, actualRhsPtr, actualRhs.size(), (UseRhsDirectly ? const_cast(actualRhs.data()) : static_rhs.data())); - if(!UseRhsDirectly) Map(actualRhsPtr, actualRhs.size()) = actualRhs; + if(!UseRhsDirectly) Map(actualRhsPtr, actualRhs.size()) = actualRhs; selfadjoint_rank1_update typedef typename internal::remove_all::type Lhs; typedef internal::blas_traits LhsBlasTraits; typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhs; - typedef typename internal::remove_all::type _ActualLhs; + typedef typename internal::remove_all::type ActualLhs_; typename internal::add_const_on_value_type::type actualLhs = LhsBlasTraits::extract(prod.lhs()); typedef typename internal::remove_all::type Rhs; typedef internal::blas_traits RhsBlasTraits; typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhs; - typedef typename internal::remove_all::type _ActualRhs; + typedef typename internal::remove_all::type ActualRhs_; typename internal::add_const_on_value_type::type actualRhs = RhsBlasTraits::extract(prod.rhs()); typename ProductType::Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(prod.lhs().derived()) * RhsBlasTraits::extractScalarFactor(prod.rhs().derived()); @@ -275,8 +275,8 @@ struct general_product_to_triangular_selector enum { IsRowMajor = (internal::traits::Flags&RowMajorBit) ? 1 : 0, - LhsIsRowMajor = _ActualLhs::Flags&RowMajorBit ? 1 : 0, - RhsIsRowMajor = _ActualRhs::Flags&RowMajorBit ? 1 : 0, + LhsIsRowMajor = ActualLhs_::Flags&RowMajorBit ? 1 : 0, + RhsIsRowMajor = ActualRhs_::Flags&RowMajorBit ? 1 : 0, SkipDiag = (UpLo&(UnitDiag|ZeroDiag))!=0 }; @@ -286,7 +286,7 @@ struct general_product_to_triangular_selector Index depth = actualLhs.cols(); typedef internal::gemm_blocking_space BlockingType; + MatrixType::MaxColsAtCompileTime, MatrixType::MaxColsAtCompileTime, ActualRhs_::MaxColsAtCompileTime> BlockingType; BlockingType blocking(size, size, depth, 1, false); diff --git a/Eigen/src/Core/products/GeneralMatrixVector.h b/Eigen/src/Core/products/GeneralMatrixVector.h index b775dbe99..e7dd61d64 100644 --- a/Eigen/src/Core/products/GeneralMatrixVector.h +++ b/Eigen/src/Core/products/GeneralMatrixVector.h @@ -36,31 +36,31 @@ class gemv_traits { typedef typename ScalarBinaryOpTraits::ReturnType ResScalar; -#define PACKET_DECL_COND_PREFIX(prefix, name, packet_size) \ +#define PACKET_DECL_COND_POSTFIX(postfix, name, packet_size) \ typedef typename gemv_packet_cond::type, \ typename packet_traits::half, \ typename unpacket_traits::half>::half>::type \ - prefix ## name ## Packet + name ## Packet ## postfix - PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_); - PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_); - PACKET_DECL_COND_PREFIX(_, Res, PacketSize_); -#undef PACKET_DECL_COND_PREFIX + PACKET_DECL_COND_POSTFIX(_, Lhs, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Rhs, PacketSize_); + PACKET_DECL_COND_POSTFIX(_, Res, PacketSize_); +#undef PACKET_DECL_COND_POSTFIX public: enum { - Vectorizable = unpacket_traits<_LhsPacket>::vectorizable && - unpacket_traits<_RhsPacket>::vectorizable && - int(unpacket_traits<_LhsPacket>::size)==int(unpacket_traits<_RhsPacket>::size), - LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1, - RhsPacketSize = Vectorizable ? unpacket_traits<_RhsPacket>::size : 1, - ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1 + Vectorizable = unpacket_traits::vectorizable && + unpacket_traits::vectorizable && + int(unpacket_traits::size)==int(unpacket_traits::size), + LhsPacketSize = Vectorizable ? unpacket_traits::size : 1, + RhsPacketSize = Vectorizable ? unpacket_traits::size : 1, + ResPacketSize = Vectorizable ? unpacket_traits::size : 1 }; - typedef typename conditional::type LhsPacket; - typedef typename conditional::type RhsPacket; - typedef typename conditional::type ResPacket; + typedef typename conditional::type LhsPacket; + typedef typename conditional::type RhsPacket; + typedef typename conditional::type ResPacket; }; diff --git a/Eigen/src/Core/products/SelfadjointProduct.h b/Eigen/src/Core/products/SelfadjointProduct.h index 629ce1d83..026bc1924 100644 --- a/Eigen/src/Core/products/SelfadjointProduct.h +++ b/Eigen/src/Core/products/SelfadjointProduct.h @@ -57,14 +57,14 @@ struct selfadjoint_product_selector typedef typename MatrixType::Scalar Scalar; typedef internal::blas_traits OtherBlasTraits; typedef typename OtherBlasTraits::DirectLinearAccessType ActualOtherType; - typedef typename internal::remove_all::type _ActualOtherType; + typedef typename internal::remove_all::type ActualOtherType_; typename internal::add_const_on_value_type::type actualOther = OtherBlasTraits::extract(other.derived()); Scalar actualAlpha = alpha * OtherBlasTraits::extractScalarFactor(other.derived()); enum { StorageOrder = (internal::traits::Flags&RowMajorBit) ? RowMajor : ColMajor, - UseOtherDirectly = _ActualOtherType::InnerStrideAtCompileTime==1 + UseOtherDirectly = ActualOtherType_::InnerStrideAtCompileTime==1 }; internal::gemv_static_vector_if static_other; @@ -72,7 +72,7 @@ struct selfadjoint_product_selector (UseOtherDirectly ? const_cast(actualOther.data()) : static_other.data())); if(!UseOtherDirectly) - Map(actualOtherPtr, actualOther.size()) = actualOther; + Map(actualOtherPtr, actualOther.size()) = actualOther; selfadjoint_rank1_update::IsComplex, @@ -89,21 +89,21 @@ struct selfadjoint_product_selector typedef typename MatrixType::Scalar Scalar; typedef internal::blas_traits OtherBlasTraits; typedef typename OtherBlasTraits::DirectLinearAccessType ActualOtherType; - typedef typename internal::remove_all::type _ActualOtherType; + typedef typename internal::remove_all::type ActualOtherType_; typename internal::add_const_on_value_type::type actualOther = OtherBlasTraits::extract(other.derived()); Scalar actualAlpha = alpha * OtherBlasTraits::extractScalarFactor(other.derived()); enum { IsRowMajor = (internal::traits::Flags&RowMajorBit) ? 1 : 0, - OtherIsRowMajor = _ActualOtherType::Flags&RowMajorBit ? 1 : 0 + OtherIsRowMajor = ActualOtherType_::Flags&RowMajorBit ? 1 : 0 }; Index size = mat.cols(); Index depth = actualOther.cols(); typedef internal::gemm_blocking_space BlockingType; + MatrixType::MaxColsAtCompileTime, MatrixType::MaxColsAtCompileTime, ActualOtherType_::MaxColsAtCompileTime> BlockingType; BlockingType blocking(size, size, depth, 1, false); diff --git a/Eigen/src/Core/products/SelfadjointRank2Update.h b/Eigen/src/Core/products/SelfadjointRank2Update.h index 315300952..44c3381d9 100644 --- a/Eigen/src/Core/products/SelfadjointRank2Update.h +++ b/Eigen/src/Core/products/SelfadjointRank2Update.h @@ -65,12 +65,12 @@ EIGEN_DEVICE_FUNC SelfAdjointView& SelfAdjointView UBlasTraits; typedef typename UBlasTraits::DirectLinearAccessType ActualUType; - typedef typename internal::remove_all::type _ActualUType; + typedef typename internal::remove_all::type ActualUType_; typename internal::add_const_on_value_type::type actualU = UBlasTraits::extract(u.derived()); typedef internal::blas_traits VBlasTraits; typedef typename VBlasTraits::DirectLinearAccessType ActualVType; - typedef typename internal::remove_all::type _ActualVType; + typedef typename internal::remove_all::type ActualVType_; typename internal::add_const_on_value_type::type actualV = VBlasTraits::extract(v.derived()); // If MatrixType is row major, then we use the routine for lower triangular in the upper triangular case and @@ -82,8 +82,8 @@ EIGEN_DEVICE_FUNC SelfAdjointView& SelfAdjointView::type>::type UType; - typedef typename internal::remove_all::type>::type VType; + typedef typename internal::remove_all::type>::type UType; + typedef typename internal::remove_all::type>::type VType; internal::selfadjoint_rank2_update_selector ::run(_expression().const_cast_derived().data(),_expression().outerStride(),UType(actualU),VType(actualV),actualAlpha); diff --git a/Eigen/src/Core/util/BlasUtil.h b/Eigen/src/Core/util/BlasUtil.h index 22685931a..d2dd702ad 100755 --- a/Eigen/src/Core/util/BlasUtil.h +++ b/Eigen/src/Core/util/BlasUtil.h @@ -405,7 +405,7 @@ template struct blas_traits { typedef typename traits::Scalar Scalar; typedef const XprType& ExtractType; - typedef XprType _ExtractType; + typedef XprType ExtractType_; enum { IsComplex = NumTraits::IsComplex, IsTransposed = false, @@ -418,7 +418,7 @@ template struct blas_traits }; typedef typename conditional::type DirectLinearAccessType; static inline EIGEN_DEVICE_FUNC ExtractType extract(const XprType& x) { return x; } static inline EIGEN_DEVICE_FUNC const Scalar extractScalarFactor(const XprType&) { return Scalar(1); } @@ -500,8 +500,8 @@ struct blas_traits > typedef typename NestedXpr::Scalar Scalar; typedef blas_traits Base; typedef Transpose XprType; - typedef Transpose ExtractType; // const to get rid of a compile error; anyway blas traits are only used on the RHS - typedef Transpose _ExtractType; + typedef Transpose ExtractType; // const to get rid of a compile error; anyway blas traits are only used on the RHS + typedef Transpose ExtractType_; typedef typename conditional class Inverse; template class Product; template class DiagonalBase; -template class DiagonalWrapper; +template class DiagonalWrapper; template class DiagonalMatrix; template class DiagonalProduct; template class Diagonal; @@ -277,8 +277,8 @@ template class Translation; template class AlignedBox; template class Quaternion; template class Transform; -template class ParametrizedLine; -template class Hyperplane; +template class ParametrizedLine; +template class Hyperplane; template class UniformScaling; template class Homogeneous; diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 4ed6ae2a4..73bad6c79 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -503,8 +503,8 @@ struct generic_xpr_base template struct cast_return_type { typedef typename XprType::Scalar CurrentScalarType; - typedef typename remove_all::type _CastType; - typedef typename _CastType::Scalar NewScalarType; + typedef typename remove_all::type CastType_; + typedef typename CastType_::Scalar NewScalarType; typedef typename conditional::value, const XprType&,CastType>::type type; }; diff --git a/Eigen/src/Geometry/AlignedBox.h b/Eigen/src/Geometry/AlignedBox.h index d9f6306a5..a82481714 100644 --- a/Eigen/src/Geometry/AlignedBox.h +++ b/Eigen/src/Geometry/AlignedBox.h @@ -58,18 +58,18 @@ namespace Eigen { * \brief An axis aligned box * * \tparam Scalar_ the type of the scalar coefficients - * \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic. + * \tparam AmbientDim_ the dimension of the ambient space, can be a compile time value or Dynamic. * * This class represents an axis aligned box as a pair of the minimal and maximal corners. * \warning The result of most methods is undefined when applied to an empty box. You can check for empty boxes using isEmpty(). * \sa alignedboxtypedefs */ -template +template class AlignedBox { public: -EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_AmbientDim) - enum { AmbientDimAtCompileTime = _AmbientDim }; +EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,AmbientDim_) + enum { AmbientDimAtCompileTime = AmbientDim_ }; typedef Scalar_ Scalar; typedef NumTraits ScalarTraits; typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3 @@ -183,7 +183,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_AmbientDim) */ EIGEN_DEVICE_FUNC inline VectorType corner(CornerType corner) const { - EIGEN_STATIC_ASSERT(_AmbientDim <= 3, THIS_METHOD_IS_ONLY_FOR_VECTORS_OF_A_SPECIFIC_SIZE); + EIGEN_STATIC_ASSERT(AmbientDim_ <= 3, THIS_METHOD_IS_ONLY_FOR_VECTORS_OF_A_SPECIFIC_SIZE); VectorType res; diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h index e1ddb3e62..d6949f6de 100644 --- a/Eigen/src/Geometry/Homogeneous.h +++ b/Eigen/src/Geometry/Homogeneous.h @@ -37,7 +37,7 @@ struct traits > { typedef typename traits::StorageKind StorageKind; typedef typename ref_selector::type MatrixTypeNested; - typedef typename remove_reference::type _MatrixTypeNested; + typedef typename remove_reference::type MatrixTypeNested_; enum { RowsPlusOne = (MatrixType::RowsAtCompileTime != Dynamic) ? int(MatrixType::RowsAtCompileTime) + 1 : Dynamic, @@ -47,7 +47,7 @@ struct traits > ColsAtCompileTime = Direction==Horizontal ? ColsPlusOne : MatrixType::ColsAtCompileTime, MaxRowsAtCompileTime = RowsAtCompileTime, MaxColsAtCompileTime = ColsAtCompileTime, - TmpFlags = _MatrixTypeNested::Flags & HereditaryBits, + TmpFlags = MatrixTypeNested_::Flags & HereditaryBits, Flags = ColsAtCompileTime==1 ? (TmpFlags & ~RowMajorBit) : RowsAtCompileTime==1 ? (TmpFlags | RowMajorBit) : TmpFlags diff --git a/Eigen/src/Geometry/Hyperplane.h b/Eigen/src/Geometry/Hyperplane.h index db0a48585..b39c9cae9 100644 --- a/Eigen/src/Geometry/Hyperplane.h +++ b/Eigen/src/Geometry/Hyperplane.h @@ -25,20 +25,20 @@ namespace Eigen { * For example, a hyperplane in a plane is a line; a hyperplane in 3-space is a plane. * * \tparam Scalar_ the scalar type, i.e., the type of the coefficients - * \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic. - * Notice that the dimension of the hyperplane is _AmbientDim-1. + * \tparam AmbientDim_ the dimension of the ambient space, can be a compile time value or Dynamic. + * Notice that the dimension of the hyperplane is AmbientDim_-1. * * This class represents an hyperplane as the zero set of the implicit equation * \f$ n \cdot x + d = 0 \f$ where \f$ n \f$ is a unit normal vector of the plane (linear part) * and \f$ d \f$ is the distance (offset) to the origin. */ -template +template class Hyperplane { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_AmbientDim==Dynamic ? Dynamic : _AmbientDim+1) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,AmbientDim_==Dynamic ? Dynamic : AmbientDim_+1) enum { - AmbientDimAtCompileTime = _AmbientDim, + AmbientDimAtCompileTime = AmbientDim_, Options = Options_ }; typedef Scalar_ Scalar; diff --git a/Eigen/src/Geometry/ParametrizedLine.h b/Eigen/src/Geometry/ParametrizedLine.h index fa90a9ea5..757692243 100644 --- a/Eigen/src/Geometry/ParametrizedLine.h +++ b/Eigen/src/Geometry/ParametrizedLine.h @@ -26,15 +26,15 @@ namespace Eigen { * the set \f$ l(t) = \mathbf{o} + t \mathbf{d} \f$, \f$ t \in \mathbf{R} \f$. * * \tparam Scalar_ the scalar type, i.e., the type of the coefficients - * \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic. + * \tparam AmbientDim_ the dimension of the ambient space, can be a compile time value or Dynamic. */ -template +template class ParametrizedLine { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_AmbientDim) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,AmbientDim_) enum { - AmbientDimAtCompileTime = _AmbientDim, + AmbientDimAtCompileTime = AmbientDim_, Options = Options_ }; typedef Scalar_ Scalar; @@ -61,7 +61,7 @@ public: : m_origin(origin), m_direction(direction) {} template - EIGEN_DEVICE_FUNC explicit ParametrizedLine(const Hyperplane& hyperplane); + EIGEN_DEVICE_FUNC explicit ParametrizedLine(const Hyperplane& hyperplane); /** Constructs a parametrized line going from \a p0 to \a p1. */ EIGEN_DEVICE_FUNC static inline ParametrizedLine Through(const VectorType& p0, const VectorType& p1) @@ -98,13 +98,13 @@ public: EIGEN_DEVICE_FUNC VectorType pointAt(const Scalar& t) const; template - EIGEN_DEVICE_FUNC Scalar intersectionParameter(const Hyperplane& hyperplane) const; - + EIGEN_DEVICE_FUNC Scalar intersectionParameter(const Hyperplane& hyperplane) const; + template - EIGEN_DEVICE_FUNC Scalar intersection(const Hyperplane& hyperplane) const; - + EIGEN_DEVICE_FUNC Scalar intersection(const Hyperplane& hyperplane) const; + template - EIGEN_DEVICE_FUNC VectorType intersectionPoint(const Hyperplane& hyperplane) const; + EIGEN_DEVICE_FUNC VectorType intersectionPoint(const Hyperplane& hyperplane) const; /** Applies the transformation matrix \a mat to \c *this and returns a reference to \c *this. * @@ -180,9 +180,9 @@ protected: * * \warning the ambient space must have dimension 2 such that the hyperplane actually describes a line */ -template +template template -EIGEN_DEVICE_FUNC inline ParametrizedLine::ParametrizedLine(const Hyperplane& hyperplane) +EIGEN_DEVICE_FUNC inline ParametrizedLine::ParametrizedLine(const Hyperplane& hyperplane) { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 2) direction() = hyperplane.normal().unitOrthogonal(); @@ -191,18 +191,18 @@ EIGEN_DEVICE_FUNC inline ParametrizedLine::Parame /** \returns the point at \a t along this line */ -template -EIGEN_DEVICE_FUNC inline typename ParametrizedLine::VectorType -ParametrizedLine::pointAt(const Scalar_& t) const +template +EIGEN_DEVICE_FUNC inline typename ParametrizedLine::VectorType +ParametrizedLine::pointAt(const Scalar_& t) const { return origin() + (direction()*t); } /** \returns the parameter value of the intersection between \c *this and the given \a hyperplane */ -template +template template -EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine::intersectionParameter(const Hyperplane& hyperplane) const +EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine::intersectionParameter(const Hyperplane& hyperplane) const { return -(hyperplane.offset()+hyperplane.normal().dot(origin())) / hyperplane.normal().dot(direction()); @@ -212,19 +212,19 @@ EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine /** \deprecated use intersectionParameter() * \returns the parameter value of the intersection between \c *this and the given \a hyperplane */ -template +template template -EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine::intersection(const Hyperplane& hyperplane) const +EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine::intersection(const Hyperplane& hyperplane) const { return intersectionParameter(hyperplane); } /** \returns the point of the intersection between \c *this and the given hyperplane */ -template +template template -EIGEN_DEVICE_FUNC inline typename ParametrizedLine::VectorType -ParametrizedLine::intersectionPoint(const Hyperplane& hyperplane) const +EIGEN_DEVICE_FUNC inline typename ParametrizedLine::VectorType +ParametrizedLine::intersectionPoint(const Hyperplane& hyperplane) const { return pointAt(intersectionParameter(hyperplane)); } diff --git a/Eigen/src/Geometry/RotationBase.h b/Eigen/src/Geometry/RotationBase.h index b05e24b70..f21277f41 100644 --- a/Eigen/src/Geometry/RotationBase.h +++ b/Eigen/src/Geometry/RotationBase.h @@ -137,9 +137,9 @@ struct rotation_base_generic_product_selector +template template -EIGEN_DEVICE_FUNC Matrix +EIGEN_DEVICE_FUNC Matrix ::Matrix(const RotationBase& r) { EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix,int(OtherDerived::Dim),int(OtherDerived::Dim)) @@ -150,10 +150,10 @@ EIGEN_DEVICE_FUNC Matrix * * \brief Set a Dim x Dim rotation matrix from the rotation \a r */ -template +template template -EIGEN_DEVICE_FUNC Matrix& -Matrix +EIGEN_DEVICE_FUNC Matrix& +Matrix ::operator=(const RotationBase& r) { EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix,int(OtherDerived::Dim),int(OtherDerived::Dim)) diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index ca9e34ff1..78d51e619 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -65,15 +65,15 @@ struct transform_construct_from_matrix; template struct transform_take_affine_part; -template -struct traits > +template +struct traits > { typedef Scalar_ Scalar; typedef Eigen::Index StorageIndex; typedef Dense StorageKind; enum { Dim1 = Dim_==Dynamic ? Dim_ : Dim_ + 1, - RowsAtCompileTime = _Mode==Projective ? Dim1 : Dim_, + RowsAtCompileTime = Mode_==Projective ? Dim1 : Dim_, ColsAtCompileTime = Dim1, MaxRowsAtCompileTime = RowsAtCompileTime, MaxColsAtCompileTime = ColsAtCompileTime, @@ -93,7 +93,7 @@ template struct transform_make_affine; * * \tparam Scalar_ the scalar type, i.e., the type of the coefficients * \tparam Dim_ the dimension of the space - * \tparam _Mode the type of the transformation. Can be: + * \tparam Mode_ the type of the transformation. Can be: * - #Affine: the transformation is stored as a (Dim+1)^2 matrix, * where the last row is assumed to be [0 ... 0 1]. * - #AffineCompact: the transformation is stored as a (Dim)x(Dim+1) matrix. @@ -202,13 +202,13 @@ template struct transform_make_affine; * * \sa class Matrix, class Quaternion */ -template +template class Transform { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,Dim_==Dynamic ? Dynamic : (Dim_+1)*(Dim_+1)) enum { - Mode = _Mode, + Mode = Mode_, Options = Options_, Dim = Dim_, ///< space dimension in which the transformation holds HDim = Dim_+1, ///< size of a respective homogeneous vector diff --git a/Eigen/src/LU/arch/InverseSize4.h b/Eigen/src/LU/arch/InverseSize4.h index ecb3a6b28..220da03d4 100644 --- a/Eigen/src/LU/arch/InverseSize4.h +++ b/Eigen/src/LU/arch/InverseSize4.h @@ -58,10 +58,10 @@ struct compute_inverse_size4(data); - Packet4f _L2 = ploadt(data + stride*4); - Packet4f _L3 = ploadt(data + stride*8); - Packet4f _L4 = ploadt(data + stride*12); + Packet4f L1_ = ploadt(data); + Packet4f L2_ = ploadt(data + stride*4); + Packet4f L3_ = ploadt(data + stride*8); + Packet4f L4_ = ploadt(data + stride*12); // Four 2x2 sub-matrices of the input matrix // input = [[A, B], @@ -70,17 +70,17 @@ struct compute_inverse_size4 class BlockImpl : public SparseMatrixBase > { - typedef typename internal::remove_all::type _MatrixTypeNested; + typedef typename internal::remove_all::type MatrixTypeNested_; typedef Block BlockType; public: enum { IsRowMajor = internal::traits::IsRowMajor }; @@ -98,7 +98,7 @@ template class sparse_matrix_block_impl : public SparseCompressedBase > { - typedef typename internal::remove_all::type _MatrixTypeNested; + typedef typename internal::remove_all::type MatrixTypeNested_; typedef Block BlockType; typedef SparseCompressedBase > Base; using Base::convert_index; @@ -121,8 +121,8 @@ public: template inline BlockType& operator=(const SparseMatrixBase& other) { - typedef typename internal::remove_all::type _NestedMatrixType; - _NestedMatrixType& matrix = m_matrix; + typedef typename internal::remove_all::type NestedMatrixType_; + NestedMatrixType_& matrix = m_matrix; // This assignment is slow if this vector set is not empty // and/or it is not at the end of the nonzeros of the underlying matrix. @@ -342,7 +342,7 @@ public: enum { IsRowMajor = internal::traits::IsRowMajor }; EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType) - typedef typename internal::remove_all::type _MatrixTypeNested; + typedef typename internal::remove_all::type MatrixTypeNested_; /** Column or Row constructor */ diff --git a/Eigen/src/SparseCore/SparseDenseProduct.h b/Eigen/src/SparseCore/SparseDenseProduct.h index 6f433fcf9..6309a2025 100644 --- a/Eigen/src/SparseCore/SparseDenseProduct.h +++ b/Eigen/src/SparseCore/SparseDenseProduct.h @@ -83,8 +83,8 @@ struct sparse_time_dense_product_impl let's disable it for now as it is conflicting with generic scalar*matrix and matrix*scalar operators -// template -// struct ScalarBinaryOpTraits > +// template +// struct ScalarBinaryOpTraits > // { // enum { // Defined = 1 diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index 5d31c7d94..f681bc20b 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -67,7 +67,7 @@ struct traits, DiagIndex { typedef SparseMatrix MatrixType; typedef typename ref_selector::type MatrixTypeNested; - typedef typename remove_reference::type _MatrixTypeNested; + typedef typename remove_reference::type MatrixTypeNested_; typedef Scalar_ Scalar; typedef Dense StorageKind; @@ -1179,8 +1179,8 @@ EIGEN_DONT_INLINE SparseMatrix& SparseMatrix::type >::type OtherCopy; - typedef typename internal::remove_all::type _OtherCopy; - typedef internal::evaluator<_OtherCopy> OtherCopyEval; + typedef typename internal::remove_all::type OtherCopy_; + typedef internal::evaluator OtherCopyEval; OtherCopy otherCopy(other.derived()); OtherCopyEval otherCopyEval(otherCopy); diff --git a/Eigen/src/SparseCore/SparseMatrixBase.h b/Eigen/src/SparseCore/SparseMatrixBase.h index fd6547f01..8c8b66a9e 100644 --- a/Eigen/src/SparseCore/SparseMatrixBase.h +++ b/Eigen/src/SparseCore/SparseMatrixBase.h @@ -105,7 +105,7 @@ template class SparseMatrixBase : int(IsRowMajor) ? int(ColsAtCompileTime) : int(RowsAtCompileTime), #ifndef EIGEN_PARSED_BY_DOXYGEN - _HasDirectAccess = (int(Flags)&DirectAccessBit) ? 1 : 0 // workaround sunCC + HasDirectAccess_ = (int(Flags)&DirectAccessBit) ? 1 : 0 // workaround sunCC #endif }; @@ -131,7 +131,7 @@ template class SparseMatrixBase /** \internal the return type of coeff() */ - typedef typename internal::conditional<_HasDirectAccess, const Scalar&, Scalar>::type CoeffReturnType; + typedef typename internal::conditional::type CoeffReturnType; /** \internal Represents a matrix with all coefficients equal to one another*/ typedef CwiseNullaryOp,Matrix > ConstantReturnType; diff --git a/Eigen/src/SparseCore/SparseRef.h b/Eigen/src/SparseCore/SparseRef.h index 26403ac4d..519b72f53 100644 --- a/Eigen/src/SparseCore/SparseRef.h +++ b/Eigen/src/SparseCore/SparseRef.h @@ -22,8 +22,8 @@ namespace internal { template class SparseRefBase; -template -struct traits, Options_, _StrideType> > +template +struct traits, Options_, StrideType_> > : public traits > { typedef SparseMatrix PlainObjectType; @@ -42,17 +42,17 @@ struct traits, Options_, _Stride }; -template -struct traits, Options_, _StrideType> > - : public traits, Options_, _StrideType> > +template +struct traits, Options_, StrideType_> > + : public traits, Options_, StrideType_> > { enum { Flags = (traits >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit }; }; -template -struct traits, Options_, _StrideType> > +template +struct traits, Options_, StrideType_> > : public traits > { typedef SparseVector PlainObjectType; @@ -70,9 +70,9 @@ struct traits, Options_, _Stride }; -template -struct traits, Options_, _StrideType> > - : public traits, Options_, _StrideType> > +template +struct traits, Options_, StrideType_> > + : public traits, Options_, StrideType_> > { enum { Flags = (traits >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit @@ -357,7 +357,7 @@ struct evaluator, Options, Strid : evaluator, Options, StrideType> > > { typedef evaluator, Options, StrideType> > > Base; - typedef Ref, Options, StrideType> XprType; + typedef Ref, Options, StrideType> XprType; evaluator() : Base() {} explicit evaluator(const XprType &mat) : Base(mat) {} }; @@ -367,7 +367,7 @@ struct evaluator, Options, : evaluator, Options, StrideType> > > { typedef evaluator, Options, StrideType> > > Base; - typedef Ref, Options, StrideType> XprType; + typedef Ref, Options, StrideType> XprType; evaluator() : Base() {} explicit evaluator(const XprType &mat) : Base(mat) {} }; diff --git a/Eigen/src/SparseCore/SparseSelfAdjointView.h b/Eigen/src/SparseCore/SparseSelfAdjointView.h index 0302ef3a4..06f2571b2 100644 --- a/Eigen/src/SparseCore/SparseSelfAdjointView.h +++ b/Eigen/src/SparseCore/SparseSelfAdjointView.h @@ -59,7 +59,7 @@ template class SparseSelfAdjointView typedef typename MatrixType::StorageIndex StorageIndex; typedef Matrix VectorI; typedef typename internal::ref_selector::non_const_type MatrixTypeNested; - typedef typename internal::remove_all::type _MatrixTypeNested; + typedef typename internal::remove_all::type MatrixTypeNested_; explicit inline SparseSelfAdjointView(MatrixType& matrix) : m_matrix(matrix) { @@ -70,7 +70,7 @@ template class SparseSelfAdjointView inline Index cols() const { return m_matrix.cols(); } /** \internal \returns a reference to the nested matrix */ - const _MatrixTypeNested& matrix() const { return m_matrix; } + const MatrixTypeNested_& matrix() const { return m_matrix; } typename internal::remove_reference::type& matrix() { return m_matrix; } /** \returns an expression of the matrix product between a sparse self-adjoint matrix \c *this and a sparse matrix \a rhs. @@ -126,9 +126,9 @@ template class SparseSelfAdjointView /** \returns an expression of P H P^-1 */ // TODO implement twists in a more evaluator friendly fashion - SparseSymmetricPermutationProduct<_MatrixTypeNested,Mode> twistedBy(const PermutationMatrix& perm) const + SparseSymmetricPermutationProduct twistedBy(const PermutationMatrix& perm) const { - return SparseSymmetricPermutationProduct<_MatrixTypeNested,Mode>(m_matrix, perm); + return SparseSymmetricPermutationProduct(m_matrix, perm); } template @@ -340,7 +340,7 @@ struct generic_product_impl static void scaleAndAddTo(Dest& dst, const LhsView& lhsView, const Rhs& rhs, const typename Dest::Scalar& alpha) { - typedef typename LhsView::_MatrixTypeNested Lhs; + typedef typename LhsView::MatrixTypeNested_ Lhs; typedef typename nested_eval::type LhsNested; typedef typename nested_eval::type RhsNested; LhsNested lhsNested(lhsView.matrix()); @@ -357,7 +357,7 @@ struct generic_product_impl static void scaleAndAddTo(Dest& dst, const Lhs& lhs, const RhsView& rhsView, const typename Dest::Scalar& alpha) { - typedef typename RhsView::_MatrixTypeNested Rhs; + typedef typename RhsView::MatrixTypeNested_ Rhs; typedef typename nested_eval::type LhsNested; typedef typename nested_eval::type RhsNested; LhsNested lhsNested(lhs); diff --git a/Eigen/src/SparseCore/SparseUtil.h b/Eigen/src/SparseCore/SparseUtil.h index 33049b9f8..47f5ef618 100644 --- a/Eigen/src/SparseCore/SparseUtil.h +++ b/Eigen/src/SparseCore/SparseUtil.h @@ -51,8 +51,8 @@ const int InnerRandomAccessPattern = 0x2 | CoherentAccessPattern; const int OuterRandomAccessPattern = 0x4 | CoherentAccessPattern; const int RandomAccessPattern = 0x8 | OuterRandomAccessPattern | InnerRandomAccessPattern; -template class SparseMatrix; -template class SparseVector; +template class SparseMatrix; +template class SparseVector; template class SparseSelfAdjointView; template class SparseDiagonalProduct; diff --git a/Eigen/src/SparseCore/SparseView.h b/Eigen/src/SparseCore/SparseView.h index 0b9d70abc..6666fa75a 100644 --- a/Eigen/src/SparseCore/SparseView.h +++ b/Eigen/src/SparseCore/SparseView.h @@ -47,7 +47,7 @@ template class SparseView : public SparseMatrixBase > { typedef typename MatrixType::Nested MatrixTypeNested; - typedef typename internal::remove_all::type _MatrixTypeNested; + typedef typename internal::remove_all::type MatrixTypeNested_; typedef SparseMatrixBase Base; public: EIGEN_SPARSE_PUBLIC_INTERFACE(SparseView) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorArgMax.h b/unsupported/Eigen/CXX11/src/Tensor/TensorArgMax.h index 9bf537383..3e1e539ac 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorArgMax.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorArgMax.h @@ -31,7 +31,7 @@ struct traits > : public traits typedef typename XprTraits::Index Index; typedef Pair Scalar; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; }; @@ -154,7 +154,7 @@ struct traits > : public traits::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions - array_size::value; static const int Layout = XprTraits::Layout; }; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h b/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h index c896eae6c..36cc4dfbb 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h @@ -32,8 +32,8 @@ struct traits > typename traits::Index>::type Index; typedef typename LhsXprType::Nested LhsNested; typedef typename RhsXprType::Nested RhsNested; - typedef typename remove_reference::type _LhsNested; - typedef typename remove_reference::type _RhsNested; + typedef typename remove_reference::type LhsNested_; + typedef typename remove_reference::type RhsNested_; static const std::size_t NumDimensions = internal::traits::NumDimensions; static const int Layout = internal::traits::Layout; typedef typename traits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h b/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h index ab6dcb678..ce43377ba 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h @@ -30,7 +30,7 @@ struct traits > : public traits::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h b/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h index 1fff5b7fe..1c7c46574 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h @@ -31,7 +31,7 @@ struct traits > : public traits typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions - 1; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorConcatenation.h b/unsupported/Eigen/CXX11/src/Tensor/TensorConcatenation.h index 368ad78c2..00759a565 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorConcatenation.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorConcatenation.h @@ -34,8 +34,8 @@ struct traits > typename traits::Index>::type Index; typedef typename LhsXprType::Nested LhsNested; typedef typename RhsXprType::Nested RhsNested; - typedef typename remove_reference::type _LhsNested; - typedef typename remove_reference::type _RhsNested; + typedef typename remove_reference::type LhsNested_; + typedef typename remove_reference::type RhsNested_; static const int NumDimensions = traits::NumDimensions; static const int Layout = traits::Layout; enum { Flags = 0 }; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h index 3477595d0..ec19fd4f8 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h @@ -36,8 +36,8 @@ struct traits::Index>::type Index; typedef typename LhsXprType::Nested LhsNested; typedef typename RhsXprType::Nested RhsNested; - typedef typename remove_reference::type _LhsNested; - typedef typename remove_reference::type _RhsNested; + typedef typename remove_reference::type LhsNested_; + typedef typename remove_reference::type RhsNested_; // From NumDims below. static const int NumDimensions = traits::NumDimensions + traits::NumDimensions - 2 * array_size::value; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorConversion.h b/unsupported/Eigen/CXX11/src/Tensor/TensorConversion.h index a2f9e578d..a50099676 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorConversion.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorConversion.h @@ -30,7 +30,7 @@ struct traits > typedef typename traits::StorageKind StorageKind; typedef typename traits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = traits::NumDimensions; static const int Layout = traits::Layout; enum { Flags = 0 }; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h b/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h index 98b4de356..c1531998b 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h @@ -229,8 +229,8 @@ struct traits > typename traits::Index>::type Index; typedef typename InputXprType::Nested LhsNested; typedef typename KernelXprType::Nested RhsNested; - typedef typename remove_reference::type _LhsNested; - typedef typename remove_reference::type _RhsNested; + typedef typename remove_reference::type LhsNested_; + typedef typename remove_reference::type RhsNested_; static const int NumDimensions = traits::NumDimensions; static const int Layout = traits::Layout; typedef typename conditional::val, diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorCustomOp.h b/unsupported/Eigen/CXX11/src/Tensor/TensorCustomOp.h index dd71415b5..19a5dec86 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorCustomOp.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorCustomOp.h @@ -29,7 +29,7 @@ struct traits > typedef typename XprType::StorageKind StorageKind; typedef typename XprType::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = traits::NumDimensions; static const int Layout = traits::Layout; typedef typename traits::PointerType PointerType; @@ -193,8 +193,8 @@ struct traits > typename traits::Index>::type Index; typedef typename LhsXprType::Nested LhsNested; typedef typename RhsXprType::Nested RhsNested; - typedef typename remove_reference::type _LhsNested; - typedef typename remove_reference::type _RhsNested; + typedef typename remove_reference::type LhsNested_; + typedef typename remove_reference::type RhsNested_; static const int NumDimensions = traits::NumDimensions; static const int Layout = traits::Layout; typedef typename conditional::val, diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h b/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h index 6ced0e8c2..cd43ac1b1 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h @@ -31,7 +31,7 @@ struct traits > typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename MakePointer_::Type PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorExpr.h b/unsupported/Eigen/CXX11/src/Tensor/TensorExpr.h index bd2631181..16daa318d 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorExpr.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorExpr.h @@ -37,7 +37,7 @@ struct traits > typedef traits XprTraits; typedef typename XprType::Scalar Scalar; typedef typename XprType::Nested XprTypeNested; - typedef typename remove_reference::type _XprTypeNested; + typedef typename remove_reference::type XprTypeNested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; @@ -88,7 +88,7 @@ struct traits > typedef typename result_of::type Scalar; typedef traits XprTraits; typedef typename XprType::Nested XprTypeNested; - typedef typename remove_reference::type _XprTypeNested; + typedef typename remove_reference::type XprTypeNested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename TypeConversion > typename traits::Index>::type Index; typedef typename LhsXprType::Nested LhsNested; typedef typename RhsXprType::Nested RhsNested; - typedef typename remove_reference::type _LhsNested; - typedef typename remove_reference::type _RhsNested; + typedef typename remove_reference::type LhsNested_; + typedef typename remove_reference::type RhsNested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename TypeConversion::type _Arg1Nested; - typedef typename remove_reference::type _Arg2Nested; - typedef typename remove_reference::type _Arg3Nested; + typedef typename remove_reference::type Arg1Nested_; + typedef typename remove_reference::type Arg2Nested_; + typedef typename remove_reference::type Arg3Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename TypeConversion > : public traits typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename traits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h b/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h index 3514060b5..07a03b288 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h @@ -31,7 +31,7 @@ struct traits > typedef typename traits::StorageKind StorageKind; typedef typename traits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h b/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h index dfbb3f9f2..8be5a8c0d 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h @@ -30,7 +30,7 @@ struct traits > : public traits typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h b/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h index 9f99b7375..8305a74ea 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h @@ -38,7 +38,7 @@ struct traits > : public traits typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions + 1; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorInflation.h b/unsupported/Eigen/CXX11/src/Tensor/TensorInflation.h index 39c40a68f..38449536a 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorInflation.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorInflation.h @@ -30,7 +30,7 @@ struct traits > : public traits typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorLayoutSwap.h b/unsupported/Eigen/CXX11/src/Tensor/TensorLayoutSwap.h index ee89621c8..6a361ab48 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorLayoutSwap.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorLayoutSwap.h @@ -45,7 +45,7 @@ struct traits > : public traits typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = traits::NumDimensions; static const int Layout = (traits::Layout == ColMajor) ? RowMajor : ColMajor; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h index 7b36b5f48..ba79907ea 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h @@ -30,7 +30,7 @@ struct traits > : public traits::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = array_size::value; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; @@ -317,7 +317,7 @@ struct traits > : public traits::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = array_size::value; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; @@ -813,7 +813,7 @@ struct traits::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = array_size::value; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h b/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h index d48b714bf..a9706dac8 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h @@ -30,7 +30,7 @@ struct traits > : public traits::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h b/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h index 92de9817b..64965e871 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h @@ -30,7 +30,7 @@ struct traits > : public traits typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions + 1; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h index 9c2d1460e..f73578875 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h @@ -30,7 +30,7 @@ struct traits::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorScan.h b/unsupported/Eigen/CXX11/src/Tensor/TensorScan.h index 497e9c0bc..eac70cbab 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorScan.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorScan.h @@ -23,7 +23,7 @@ struct traits > typedef traits XprTraits; typedef typename XprTraits::StorageKind StorageKind; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorShuffling.h b/unsupported/Eigen/CXX11/src/Tensor/TensorShuffling.h index be02a082a..487cb026e 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorShuffling.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorShuffling.h @@ -30,7 +30,7 @@ struct traits > : public traits typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorStriding.h b/unsupported/Eigen/CXX11/src/Tensor/TensorStriding.h index e3f9d8ff3..8d22f3ced 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorStriding.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorStriding.h @@ -30,7 +30,7 @@ struct traits > : public traits typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorTrace.h b/unsupported/Eigen/CXX11/src/Tensor/TensorTrace.h index 524990d79..40bdc0a25 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorTrace.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorTrace.h @@ -32,7 +32,7 @@ struct traits > : public traits typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions - array_size::value; static const int Layout = XprTraits::Layout; }; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h b/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h index c34b7f336..df7f293eb 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h @@ -33,7 +33,7 @@ struct traits > : public traits typedef typename XprTraits::StorageKind StorageKind; typedef typename XprTraits::Index Index; typedef typename XprType::Nested Nested; - typedef typename remove_reference::type _Nested; + typedef typename remove_reference::type Nested_; static const int NumDimensions = XprTraits::NumDimensions + 1; static const int Layout = XprTraits::Layout; typedef typename XprTraits::PointerType PointerType; diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h b/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h index 59e192ef5..8fdf70e7e 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h @@ -7,8 +7,8 @@ // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -#ifndef EIGEN_CXX11_THREADPOOL_EVENTCOUNT_H_ -#define EIGEN_CXX11_THREADPOOL_EVENTCOUNT_H_ +#ifndef EIGEN_CXX11_THREADPOOL_EVENTCOUNT_H +#define EIGEN_CXX11_THREADPOOL_EVENTCOUNT_H #include "./InternalHeaderCheck.h" @@ -248,4 +248,4 @@ class EventCount { } // namespace Eigen -#endif // EIGEN_CXX11_THREADPOOL_EVENTCOUNT_H_ +#endif // EIGEN_CXX11_THREADPOOL_EVENTCOUNT_H diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h b/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h index 257313da2..f99ce1a24 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h @@ -7,8 +7,8 @@ // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -#ifndef EIGEN_CXX11_THREADPOOL_RUNQUEUE_H_ -#define EIGEN_CXX11_THREADPOOL_RUNQUEUE_H_ +#ifndef EIGEN_CXX11_THREADPOOL_RUNQUEUE_H +#define EIGEN_CXX11_THREADPOOL_RUNQUEUE_H #include "./InternalHeaderCheck.h" @@ -235,4 +235,4 @@ class RunQueue { } // namespace Eigen -#endif // EIGEN_CXX11_THREADPOOL_RUNQUEUE_H_ +#endif // EIGEN_CXX11_THREADPOOL_RUNQUEUE_H diff --git a/unsupported/Eigen/src/IterativeSolvers/MINRES.h b/unsupported/Eigen/src/IterativeSolvers/MINRES.h index 70f8ae591..ac78c0e33 100644 --- a/unsupported/Eigen/src/IterativeSolvers/MINRES.h +++ b/unsupported/Eigen/src/IterativeSolvers/MINRES.h @@ -10,8 +10,8 @@ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -#ifndef EIGEN_MINRES_H_ -#define EIGEN_MINRES_H_ +#ifndef EIGEN_MINRES_H +#define EIGEN_MINRES_H #include "./InternalHeaderCheck.h" diff --git a/unsupported/Eigen/src/MoreVectorization/MathFunctions.h b/unsupported/Eigen/src/MoreVectorization/MathFunctions.h index 559d0a826..9084298e0 100644 --- a/unsupported/Eigen/src/MoreVectorization/MathFunctions.h +++ b/unsupported/Eigen/src/MoreVectorization/MathFunctions.h @@ -24,20 +24,20 @@ template inline static Packet pasin(Packet a) { return std::asi template<> EIGEN_DONT_INLINE Packet4f pasin(Packet4f x) { - _EIGEN_DECLARE_CONST_Packet4f(half, 0.5); - _EIGEN_DECLARE_CONST_Packet4f(minus_half, -0.5); - _EIGEN_DECLARE_CONST_Packet4f(3half, 1.5); + EIGEN_DECLARE_CONST_Packet4f(half, 0.5); + EIGEN_DECLARE_CONST_Packet4f(minus_half, -0.5); + EIGEN_DECLARE_CONST_Packet4f(3half, 1.5); - _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(sign_mask, 0x80000000); + EIGEN_DECLARE_CONST_Packet4f_FROM_INT(sign_mask, 0x80000000); - _EIGEN_DECLARE_CONST_Packet4f(pi, 3.141592654); - _EIGEN_DECLARE_CONST_Packet4f(pi_over_2, 3.141592654*0.5); + EIGEN_DECLARE_CONST_Packet4f(pi, 3.141592654); + EIGEN_DECLARE_CONST_Packet4f(pi_over_2, 3.141592654*0.5); - _EIGEN_DECLARE_CONST_Packet4f(asin1, 4.2163199048E-2); - _EIGEN_DECLARE_CONST_Packet4f(asin2, 2.4181311049E-2); - _EIGEN_DECLARE_CONST_Packet4f(asin3, 4.5470025998E-2); - _EIGEN_DECLARE_CONST_Packet4f(asin4, 7.4953002686E-2); - _EIGEN_DECLARE_CONST_Packet4f(asin5, 1.6666752422E-1); + EIGEN_DECLARE_CONST_Packet4f(asin1, 4.2163199048E-2); + EIGEN_DECLARE_CONST_Packet4f(asin2, 2.4181311049E-2); + EIGEN_DECLARE_CONST_Packet4f(asin3, 4.5470025998E-2); + EIGEN_DECLARE_CONST_Packet4f(asin4, 7.4953002686E-2); + EIGEN_DECLARE_CONST_Packet4f(asin5, 1.6666752422E-1); Packet4f a = pabs(x);//got the absolute value diff --git a/unsupported/Eigen/src/Polynomials/Companion.h b/unsupported/Eigen/src/Polynomials/Companion.h index 91bdea8bb..23c281aa4 100644 --- a/unsupported/Eigen/src/Polynomials/Companion.h +++ b/unsupported/Eigen/src/Polynomials/Companion.h @@ -31,14 +31,14 @@ struct decrement_if_fixed_size #endif -template< typename Scalar_, int _Deg > +template< typename Scalar_, int Deg_ > class companion { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_Deg==Dynamic ? Dynamic : _Deg) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,Deg_==Dynamic ? Dynamic : Deg_) enum { - Deg = _Deg, + Deg = Deg_, Deg_1=decrement_if_fixed_size::ret }; @@ -49,7 +49,7 @@ class companion typedef Matrix BottomLeftDiagonal; typedef Matrix DenseCompanionMatrixType; - typedef Matrix< Scalar, _Deg, Deg_1 > LeftBlock; + typedef Matrix< Scalar, Deg_, Deg_1 > LeftBlock; typedef Matrix< Scalar, Deg_1, Deg_1 > BottomLeftBlock; typedef Matrix< Scalar, 1, Deg_1 > LeftBlockFirstRow; @@ -132,9 +132,9 @@ class companion -template< typename Scalar_, int _Deg > +template< typename Scalar_, int Deg_ > inline -bool companion::balanced( RealScalar colNorm, RealScalar rowNorm, +bool companion::balanced( RealScalar colNorm, RealScalar rowNorm, bool& isBalanced, RealScalar& colB, RealScalar& rowB ) { if( RealScalar(0) == colNorm || RealScalar(0) == rowNorm @@ -186,9 +186,9 @@ bool companion::balanced( RealScalar colNorm, RealScalar rowNorm, } } -template< typename Scalar_, int _Deg > +template< typename Scalar_, int Deg_ > inline -bool companion::balancedR( RealScalar colNorm, RealScalar rowNorm, +bool companion::balancedR( RealScalar colNorm, RealScalar rowNorm, bool& isBalanced, RealScalar& colB, RealScalar& rowB ) { if( RealScalar(0) == colNorm || RealScalar(0) == rowNorm ){ return true; } @@ -213,8 +213,8 @@ bool companion::balancedR( RealScalar colNorm, RealScalar rowNorm, } -template< typename Scalar_, int _Deg > -void companion::balance() +template< typename Scalar_, int Deg_ > +void companion::balance() { using std::abs; EIGEN_STATIC_ASSERT( Deg == Dynamic || 1 < Deg, YOU_MADE_A_PROGRAMMING_MISTAKE ); diff --git a/unsupported/Eigen/src/Polynomials/PolynomialSolver.h b/unsupported/Eigen/src/Polynomials/PolynomialSolver.h index fb3e38c25..0c44ca88b 100644 --- a/unsupported/Eigen/src/Polynomials/PolynomialSolver.h +++ b/unsupported/Eigen/src/Polynomials/PolynomialSolver.h @@ -27,16 +27,16 @@ namespace Eigen { * It stores the set of roots as a vector of complexes. * */ -template< typename Scalar_, int _Deg > +template< typename Scalar_, int Deg_ > class PolynomialSolverBase { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_Deg==Dynamic ? Dynamic : _Deg) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,Deg_==Dynamic ? Dynamic : Deg_) typedef Scalar_ Scalar; typedef typename NumTraits::Real RealScalar; typedef std::complex RootType; - typedef Matrix RootsType; + typedef Matrix RootsType; typedef DenseIndex Index; @@ -309,8 +309,8 @@ class PolynomialSolverBase * Computes the complex roots of a real polynomial. * * \param Scalar_ the scalar type, i.e., the type of the polynomial coefficients - * \param _Deg the degree of the polynomial, can be a compile time value or Dynamic. - * Notice that the number of polynomial coefficients is _Deg+1. + * \param Deg_ the degree of the polynomial, can be a compile time value or Dynamic. + * Notice that the number of polynomial coefficients is Deg_+1. * * This class implements a polynomial solver and provides convenient methods such as * - real roots, @@ -329,16 +329,16 @@ class PolynomialSolverBase * However, almost always, correct accuracy is reached even in these cases for 64bit * (double) floating types and small polynomial degree (<20). */ -template -class PolynomialSolver : public PolynomialSolverBase +template +class PolynomialSolver : public PolynomialSolverBase { public: - EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_Deg==Dynamic ? Dynamic : _Deg) + EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,Deg_==Dynamic ? Dynamic : Deg_) - typedef PolynomialSolverBase PS_Base; + typedef PolynomialSolverBase PS_Base; EIGEN_POLYNOMIAL_SOLVER_BASE_INHERITED_TYPES( PS_Base ) - typedef Matrix CompanionMatrixType; + typedef Matrix CompanionMatrixType; typedef typename internal::conditional::IsComplex, ComplexEigenSolver, EigenSolver >::type EigenSolverType; @@ -353,7 +353,7 @@ class PolynomialSolver : public PolynomialSolverBase eigen_assert( poly.size() > 1 ); if(poly.size() > 2 ) { - internal::companion companion( poly ); + internal::companion companion( poly ); companion.balance(); m_eigenSolver.compute( companion.denseMatrix() ); m_roots = m_eigenSolver.eigenvalues(); diff --git a/unsupported/Eigen/src/Skyline/SkylineProduct.h b/unsupported/Eigen/src/Skyline/SkylineProduct.h index dab75361f..f3ea46ea7 100644 --- a/unsupported/Eigen/src/Skyline/SkylineProduct.h +++ b/unsupported/Eigen/src/Skyline/SkylineProduct.h @@ -25,22 +25,22 @@ struct SkylineProductReturnType { template struct internal::traits > { // clean the nested types: - typedef typename internal::remove_all::type _LhsNested; - typedef typename internal::remove_all::type _RhsNested; - typedef typename _LhsNested::Scalar Scalar; + typedef typename internal::remove_all::type LhsNested_; + typedef typename internal::remove_all::type RhsNested_; + typedef typename LhsNested_::Scalar Scalar; enum { - LhsCoeffReadCost = _LhsNested::CoeffReadCost, - RhsCoeffReadCost = _RhsNested::CoeffReadCost, - LhsFlags = _LhsNested::Flags, - RhsFlags = _RhsNested::Flags, + LhsCoeffReadCost = LhsNested_::CoeffReadCost, + RhsCoeffReadCost = RhsNested_::CoeffReadCost, + LhsFlags = LhsNested_::Flags, + RhsFlags = RhsNested_::Flags, - RowsAtCompileTime = _LhsNested::RowsAtCompileTime, - ColsAtCompileTime = _RhsNested::ColsAtCompileTime, - InnerSize = internal::min_size_prefer_fixed(_LhsNested::ColsAtCompileTime, _RhsNested::RowsAtCompileTime), + RowsAtCompileTime = LhsNested_::RowsAtCompileTime, + ColsAtCompileTime = RhsNested_::ColsAtCompileTime, + InnerSize = internal::min_size_prefer_fixed(LhsNested_::ColsAtCompileTime, RhsNested_::RowsAtCompileTime), - MaxRowsAtCompileTime = _LhsNested::MaxRowsAtCompileTime, - MaxColsAtCompileTime = _RhsNested::MaxColsAtCompileTime, + MaxRowsAtCompileTime = LhsNested_::MaxRowsAtCompileTime, + MaxColsAtCompileTime = RhsNested_::MaxColsAtCompileTime, EvalToRowMajor = (RhsFlags & LhsFlags & RowMajorBit), ResultIsSkyline = ProductMode == SkylineTimeSkylineProduct, @@ -69,8 +69,8 @@ public: private: - typedef typename traits::_LhsNested _LhsNested; - typedef typename traits::_RhsNested _RhsNested; + typedef typename traits::LhsNested_ LhsNested_; + typedef typename traits::RhsNested_ RhsNested_; public: @@ -80,11 +80,11 @@ public: eigen_assert(lhs.cols() == rhs.rows()); enum { - ProductIsValid = _LhsNested::ColsAtCompileTime == Dynamic - || _RhsNested::RowsAtCompileTime == Dynamic - || int(_LhsNested::ColsAtCompileTime) == int(_RhsNested::RowsAtCompileTime), - AreVectors = _LhsNested::IsVectorAtCompileTime && _RhsNested::IsVectorAtCompileTime, - SameSizes = EIGEN_PREDICATE_SAME_MATRIX_SIZE(_LhsNested, _RhsNested) + ProductIsValid = LhsNested_::ColsAtCompileTime == Dynamic + || RhsNested_::RowsAtCompileTime == Dynamic + || int(LhsNested_::ColsAtCompileTime) == int(RhsNested_::RowsAtCompileTime), + AreVectors = LhsNested_::IsVectorAtCompileTime && RhsNested_::IsVectorAtCompileTime, + SameSizes = EIGEN_PREDICATE_SAME_MATRIX_SIZE(LhsNested_, RhsNested_) }; // note to the lost user: // * for a dot product use: v1.dot(v2) @@ -104,11 +104,11 @@ public: return m_rhs.cols(); } - EIGEN_STRONG_INLINE const _LhsNested& lhs() const { + EIGEN_STRONG_INLINE const LhsNested_& lhs() const { return m_lhs; } - EIGEN_STRONG_INLINE const _RhsNested& rhs() const { + EIGEN_STRONG_INLINE const RhsNested_& rhs() const { return m_rhs; } diff --git a/unsupported/Eigen/src/Skyline/SkylineUtil.h b/unsupported/Eigen/src/Skyline/SkylineUtil.h index d90c918ad..47fb4e328 100644 --- a/unsupported/Eigen/src/Skyline/SkylineUtil.h +++ b/unsupported/Eigen/src/Skyline/SkylineUtil.h @@ -51,7 +51,7 @@ EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \ EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, *=) \ EIGEN_SKYLINE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=) -#define _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, BaseClass) \ +#define EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE_(Derived, BaseClass) \ typedef BaseClass Base; \ typedef typename Eigen::internal::traits::Scalar Scalar; \ typedef typename Eigen::NumTraits::Real RealScalar; \ @@ -60,13 +60,13 @@ EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \ enum { Flags = Eigen::internal::traits::Flags, }; #define EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived) \ - _EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::SkylineMatrixBase) + EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE_(Derived, Eigen::SkylineMatrixBase) template class SkylineMatrixBase; -template class SkylineMatrix; -template class DynamicSkylineMatrix; -template class SkylineVector; -template class MappedSkylineMatrix; +template class SkylineMatrix; +template class DynamicSkylineMatrix; +template class SkylineVector; +template class MappedSkylineMatrix; namespace internal { @@ -77,11 +77,11 @@ template class eval { typedef typename traits::Scalar Scalar_; enum { - _Flags = traits::Flags + Flags_ = traits::Flags }; public: - typedef SkylineMatrix type; + typedef SkylineMatrix type; }; } // end namespace internal diff --git a/unsupported/Eigen/src/Splines/Spline.h b/unsupported/Eigen/src/Splines/Spline.h index 2e66ec3e1..ce786ee9a 100644 --- a/unsupported/Eigen/src/Splines/Spline.h +++ b/unsupported/Eigen/src/Splines/Spline.h @@ -29,17 +29,17 @@ namespace Eigen * * \tparam Scalar_ The underlying data type (typically float or double) * \tparam Dim_ The curve dimension (e.g. 2 or 3) - * \tparam _Degree Per default set to Dynamic; could be set to the actual desired + * \tparam Degree_ Per default set to Dynamic; could be set to the actual desired * degree for optimization purposes (would result in stack allocation * of several temporary variables). **/ - template + template class Spline { public: typedef Scalar_ Scalar; /*!< The spline curve's scalar type. */ enum { Dimension = Dim_ /*!< The spline curve's dimension. */ }; - enum { Degree = _Degree /*!< The spline curve's degree. */ }; + enum { Degree = Degree_ /*!< The spline curve's degree. */ }; /** \brief The point type the spline is representing. */ typedef typename SplineTraits::PointType PointType; @@ -225,18 +225,18 @@ namespace Eigen template static void BasisFunctionDerivativesImpl( - const typename Spline::Scalar u, + const typename Spline::Scalar u, const DenseIndex order, - const DenseIndex p, - const typename Spline::KnotVectorType& U, + const DenseIndex p, + const typename Spline::KnotVectorType& U, DerivativeType& N_); }; - template - DenseIndex Spline::Span( - typename SplineTraits< Spline >::Scalar u, + template + DenseIndex Spline::Span( + typename SplineTraits< Spline >::Scalar u, DenseIndex degree, - const typename SplineTraits< Spline >::KnotVectorType& knots) + const typename SplineTraits< Spline >::KnotVectorType& knots) { // Piegl & Tiller, "The NURBS Book", A2.1 (p. 68) if (u <= knots(0)) return degree; @@ -244,12 +244,12 @@ namespace Eigen return static_cast( std::distance(knots.data(), pos) - 1 ); } - template - typename Spline::BasisVectorType - Spline::BasisFunctions( - typename Spline::Scalar u, + template + typename Spline::BasisVectorType + Spline::BasisFunctions( + typename Spline::Scalar u, DenseIndex degree, - const typename Spline::KnotVectorType& knots) + const typename Spline::KnotVectorType& knots) { const DenseIndex p = degree; const DenseIndex i = Spline::Span(u, degree, knots); @@ -278,23 +278,23 @@ namespace Eigen return N; } - template - DenseIndex Spline::degree() const + template + DenseIndex Spline::degree() const { - if (_Degree == Dynamic) + if (Degree_ == Dynamic) return m_knots.size() - m_ctrls.cols() - 1; else - return _Degree; + return Degree_; } - template - DenseIndex Spline::span(Scalar u) const + template + DenseIndex Spline::span(Scalar u) const { return Spline::Span(u, degree(), knots()); } - template - typename Spline::PointType Spline::operator()(Scalar u) const + template + typename Spline::PointType Spline::operator()(Scalar u) const { enum { Order = SplineTraits::OrderAtCompileTime }; @@ -339,28 +339,28 @@ namespace Eigen } } - template - typename SplineTraits< Spline >::DerivativeType - Spline::derivatives(Scalar u, DenseIndex order) const + template + typename SplineTraits< Spline >::DerivativeType + Spline::derivatives(Scalar u, DenseIndex order) const { typename SplineTraits< Spline >::DerivativeType res; derivativesImpl(*this, u, order, res); return res; } - template + template template - typename SplineTraits< Spline, DerivativeOrder >::DerivativeType - Spline::derivatives(Scalar u, DenseIndex order) const + typename SplineTraits< Spline, DerivativeOrder >::DerivativeType + Spline::derivatives(Scalar u, DenseIndex order) const { typename SplineTraits< Spline, DerivativeOrder >::DerivativeType res; derivativesImpl(*this, u, order, res); return res; } - template - typename SplineTraits< Spline >::BasisVectorType - Spline::basisFunctions(Scalar u) const + template + typename SplineTraits< Spline >::BasisVectorType + Spline::basisFunctions(Scalar u) const { return Spline::BasisFunctions(u, degree(), knots()); } @@ -368,16 +368,16 @@ namespace Eigen /* --------------------------------------------------------------------------------------------- */ - template + template template - void Spline::BasisFunctionDerivativesImpl( - const typename Spline::Scalar u, + void Spline::BasisFunctionDerivativesImpl( + const typename Spline::Scalar u, const DenseIndex order, const DenseIndex p, - const typename Spline::KnotVectorType& U, + const typename Spline::KnotVectorType& U, DerivativeType& N_) { - typedef Spline SplineType; + typedef Spline SplineType; enum { Order = SplineTraits::OrderAtCompileTime }; const DenseIndex span = SplineType::Span(u, p, U); @@ -473,32 +473,32 @@ namespace Eigen } } - template - typename SplineTraits< Spline >::BasisDerivativeType - Spline::basisFunctionDerivatives(Scalar u, DenseIndex order) const + template + typename SplineTraits< Spline >::BasisDerivativeType + Spline::basisFunctionDerivatives(Scalar u, DenseIndex order) const { - typename SplineTraits >::BasisDerivativeType der; + typename SplineTraits >::BasisDerivativeType der; BasisFunctionDerivativesImpl(u, order, degree(), knots(), der); return der; } - template + template template - typename SplineTraits< Spline, DerivativeOrder >::BasisDerivativeType - Spline::basisFunctionDerivatives(Scalar u, DenseIndex order) const + typename SplineTraits< Spline, DerivativeOrder >::BasisDerivativeType + Spline::basisFunctionDerivatives(Scalar u, DenseIndex order) const { - typename SplineTraits< Spline, DerivativeOrder >::BasisDerivativeType der; + typename SplineTraits< Spline, DerivativeOrder >::BasisDerivativeType der; BasisFunctionDerivativesImpl(u, order, degree(), knots(), der); return der; } - template - typename SplineTraits >::BasisDerivativeType - Spline::BasisFunctionDerivatives( - const typename Spline::Scalar u, + template + typename SplineTraits >::BasisDerivativeType + Spline::BasisFunctionDerivatives( + const typename Spline::Scalar u, const DenseIndex order, const DenseIndex degree, - const typename Spline::KnotVectorType& knots) + const typename Spline::KnotVectorType& knots) { typename SplineTraits::BasisDerivativeType der; BasisFunctionDerivativesImpl(u, order, degree, knots, der); diff --git a/unsupported/Eigen/src/Splines/SplineFwd.h b/unsupported/Eigen/src/Splines/SplineFwd.h index 0348ebad1..2cc097798 100644 --- a/unsupported/Eigen/src/Splines/SplineFwd.h +++ b/unsupported/Eigen/src/Splines/SplineFwd.h @@ -23,14 +23,14 @@ namespace Eigen * \ingroup Splines_Module * \brief Compile-time attributes of the Spline class for Dynamic degree. **/ - template - struct SplineTraits< Spline, Dynamic > + template + struct SplineTraits< Spline, Dynamic > { typedef Scalar_ Scalar; /*!< The spline curve's scalar type. */ enum { Dimension = Dim_ /*!< The spline curve's dimension. */ }; - enum { Degree = _Degree /*!< The spline curve's degree. */ }; + enum { Degree = Degree_ /*!< The spline curve's degree. */ }; - enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 /*!< The spline curve's order at compile-time. */ }; + enum { OrderAtCompileTime = Degree_==Dynamic ? Dynamic : Degree_+1 /*!< The spline curve's order at compile-time. */ }; enum { NumOfDerivativesAtCompileTime = OrderAtCompileTime /*!< The number of derivatives defined for the current spline. */ }; enum { DerivativeMemoryLayout = Dimension==1 ? RowMajor : ColMajor /*!< The derivative type's memory layout. */ }; @@ -63,10 +63,10 @@ namespace Eigen * * The traits class inherits all attributes from the SplineTraits of Dynamic degree. **/ - template < typename Scalar_, int Dim_, int _Degree, int _DerivativeOrder > - struct SplineTraits< Spline, _DerivativeOrder > : public SplineTraits< Spline > + template < typename Scalar_, int Dim_, int Degree_, int _DerivativeOrder > + struct SplineTraits< Spline, _DerivativeOrder > : public SplineTraits< Spline > { - enum { OrderAtCompileTime = _Degree==Dynamic ? Dynamic : _Degree+1 /*!< The spline curve's order at compile-time. */ }; + enum { OrderAtCompileTime = Degree_==Dynamic ? Dynamic : Degree_+1 /*!< The spline curve's order at compile-time. */ }; enum { NumOfDerivativesAtCompileTime = _DerivativeOrder==Dynamic ? Dynamic : _DerivativeOrder+1 /*!< The number of derivatives defined for the current spline. */ }; enum { DerivativeMemoryLayout = Dim_==1 ? RowMajor : ColMajor /*!< The derivative type's memory layout. */ }; diff --git a/unsupported/test/polynomialsolver.cpp b/unsupported/test/polynomialsolver.cpp index 4cf4bc2b2..fed9f894d 100644 --- a/unsupported/test/polynomialsolver.cpp +++ b/unsupported/test/polynomialsolver.cpp @@ -179,29 +179,29 @@ void evalSolverSugarFunction( const POLYNOMIAL& pols, const ROOTS& roots, const } -template +template void polynomialsolver(int deg) { typedef typename NumTraits::Real RealScalar; - typedef internal::increment_if_fixed_size<_Deg> Dim; + typedef internal::increment_if_fixed_size Dim; typedef Matrix PolynomialType; - typedef Matrix EvalRootsType; - typedef Matrix RealRootsType; + typedef Matrix EvalRootsType; + typedef Matrix RealRootsType; cout << "Standard cases" << endl; PolynomialType pols = PolynomialType::Random(deg+1); - evalSolver<_Deg,PolynomialType>( pols ); + evalSolver( pols ); cout << "Hard cases" << endl; Scalar_ multipleRoot = internal::random(); EvalRootsType allRoots = EvalRootsType::Constant(deg,multipleRoot); roots_to_monicPolynomial( allRoots, pols ); - evalSolver<_Deg,PolynomialType>( pols ); + evalSolver( pols ); cout << "Test sugar" << endl; RealRootsType realRoots = RealRootsType::Random(deg); roots_to_monicPolynomial( realRoots, pols ); - evalSolverSugarFunction<_Deg>( + evalSolverSugarFunction( pols, realRoots.template cast >().eval(), realRoots ); diff --git a/unsupported/test/polynomialutils.cpp b/unsupported/test/polynomialutils.cpp index fb86913d7..15a0f2786 100644 --- a/unsupported/test/polynomialutils.cpp +++ b/unsupported/test/polynomialutils.cpp @@ -25,12 +25,12 @@ struct increment_if_fixed_size } } -template +template void realRoots_to_monicPolynomial_test(int deg) { - typedef internal::increment_if_fixed_size<_Deg> Dim; + typedef internal::increment_if_fixed_size Dim; typedef Matrix PolynomialType; - typedef Matrix EvalRootsType; + typedef Matrix EvalRootsType; PolynomialType pols(deg+1); EvalRootsType roots = EvalRootsType::Random(deg); @@ -63,12 +63,12 @@ template void realRoots_to_monicPolynomial_scalar() -template +template void CauchyBounds(int deg) { - typedef internal::increment_if_fixed_size<_Deg> Dim; + typedef internal::increment_if_fixed_size Dim; typedef Matrix PolynomialType; - typedef Matrix EvalRootsType; + typedef Matrix EvalRootsType; PolynomialType pols(deg+1); EvalRootsType roots = EvalRootsType::Random(deg);