Reduce usage of reserved names

This commit is contained in:
Kolja Brix 2022-01-10 20:53:29 +00:00 committed by Rasmus Munk Larsen
parent c61b3cb0db
commit 8d81a2339c
88 changed files with 666 additions and 666 deletions

View File

@ -235,17 +235,17 @@ class BandMatrix : public BandMatrixBase<BandMatrix<Scalar_,Rows,Cols,Supers,Sub
internal::variable_if_dynamic<Index, Subs> m_subs;
};
template<typename _CoefficientsType,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
template<typename CoefficientsType_,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
class BandMatrixWrapper;
template<typename _CoefficientsType,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
struct traits<BandMatrixWrapper<_CoefficientsType,Rows_,Cols_,Supers_,Subs_,Options_> >
template<typename CoefficientsType_,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
struct traits<BandMatrixWrapper<CoefficientsType_,Rows_,Cols_,Supers_,Subs_,Options_> >
{
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<CoefficientsType_>::CoeffReadCost,
RowsAtCompileTime = Rows_,
ColsAtCompileTime = Cols_,
MaxRowsAtCompileTime = Rows_,
@ -256,11 +256,11 @@ struct traits<BandMatrixWrapper<_CoefficientsType,Rows_,Cols_,Supers_,Subs_,Opti
Options = Options_,
DataRowsAtCompileTime = ((Supers!=Dynamic) && (Subs!=Dynamic)) ? 1 + Supers + Subs : Dynamic
};
typedef _CoefficientsType CoefficientsType;
typedef CoefficientsType_ CoefficientsType;
};
template<typename _CoefficientsType,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
class BandMatrixWrapper : public BandMatrixBase<BandMatrixWrapper<_CoefficientsType,Rows_,Cols_,Supers_,Subs_,Options_> >
template<typename CoefficientsType_,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
class BandMatrixWrapper : public BandMatrixBase<BandMatrixWrapper<CoefficientsType_,Rows_,Cols_,Supers_,Subs_,Options_> >
{
public:
@ -339,9 +339,9 @@ struct evaluator_traits<BandMatrix<Scalar_,Rows_,Cols_,Supers_,Subs_,Options_> >
typedef BandShape Shape;
};
template<typename _CoefficientsType,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
struct evaluator_traits<BandMatrixWrapper<_CoefficientsType,Rows_,Cols_,Supers_,Subs_,Options_> >
: public evaluator_traits_base<BandMatrixWrapper<_CoefficientsType,Rows_,Cols_,Supers_,Subs_,Options_> >
template<typename CoefficientsType_,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
struct evaluator_traits<BandMatrixWrapper<CoefficientsType_,Rows_,Cols_,Supers_,Subs_,Options_> >
: public evaluator_traits_base<BandMatrixWrapper<CoefficientsType_,Rows_,Cols_,Supers_,Subs_,Options_> >
{
typedef BandShape Shape;
};

View File

@ -23,7 +23,7 @@ struct traits<Block<XprType, BlockRows, BlockCols, InnerPanel> > : traits<XprTyp
typedef typename traits<XprType>::StorageKind StorageKind;
typedef typename traits<XprType>::XprKind XprKind;
typedef typename ref_selector<XprType>::type XprTypeNested;
typedef typename remove_reference<XprTypeNested>::type _XprTypeNested;
typedef typename remove_reference<XprTypeNested>::type XprTypeNested_;
enum{
MatrixRows = traits<XprType>::RowsAtCompileTime,
MatrixCols = traits<XprType>::ColsAtCompileTime,

View File

@ -45,10 +45,10 @@ struct traits<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >
typename traits<Rhs>::StorageIndex>::type StorageIndex;
typedef typename Lhs::Nested LhsNested;
typedef typename Rhs::Nested RhsNested;
typedef typename remove_reference<LhsNested>::type _LhsNested;
typedef typename remove_reference<RhsNested>::type _RhsNested;
typedef typename remove_reference<LhsNested>::type LhsNested_;
typedef typename remove_reference<RhsNested>::type RhsNested_;
enum {
Flags = cwise_promote_storage_order<typename traits<Lhs>::StorageKind,typename traits<Rhs>::StorageKind,_LhsNested::Flags & RowMajorBit,_RhsNested::Flags & RowMajorBit>::value
Flags = cwise_promote_storage_order<typename traits<Lhs>::StorageKind,typename traits<Rhs>::StorageKind,LhsNested_::Flags & RowMajorBit,RhsNested_::Flags & RowMajorBit>::value
};
};
} // end namespace internal
@ -102,8 +102,8 @@ class CwiseBinaryOp :
typedef typename internal::ref_selector<LhsType>::type LhsNested;
typedef typename internal::ref_selector<RhsType>::type RhsNested;
typedef typename internal::remove_reference<LhsNested>::type _LhsNested;
typedef typename internal::remove_reference<RhsNested>::type _RhsNested;
typedef typename internal::remove_reference<LhsNested>::type LhsNested_;
typedef typename internal::remove_reference<RhsNested>::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; }

View File

@ -43,10 +43,10 @@ struct traits<CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> > {
typedef typename Arg1::Nested Arg1Nested;
typedef typename Arg2::Nested Arg2Nested;
typedef typename Arg3::Nested Arg3Nested;
typedef typename remove_reference<Arg1Nested>::type _Arg1Nested;
typedef typename remove_reference<Arg2Nested>::type _Arg2Nested;
typedef typename remove_reference<Arg3Nested>::type _Arg3Nested;
enum { Flags = _Arg1Nested::Flags & RowMajorBit };
typedef typename remove_reference<Arg1Nested>::type Arg1Nested_;
typedef typename remove_reference<Arg2Nested>::type Arg2Nested_;
typedef typename remove_reference<Arg3Nested>::type Arg3Nested_;
enum { Flags = Arg1Nested_::Flags & RowMajorBit };
};
} // end namespace internal
@ -115,9 +115,9 @@ class CwiseTernaryOp : public CwiseTernaryOpImpl<
typedef typename internal::ref_selector<Arg1Type>::type Arg1Nested;
typedef typename internal::ref_selector<Arg2Type>::type Arg2Nested;
typedef typename internal::ref_selector<Arg3Type>::type Arg3Nested;
typedef typename internal::remove_reference<Arg1Nested>::type _Arg1Nested;
typedef typename internal::remove_reference<Arg2Nested>::type _Arg2Nested;
typedef typename internal::remove_reference<Arg3Nested>::type _Arg3Nested;
typedef typename internal::remove_reference<Arg1Nested>::type Arg1Nested_;
typedef typename internal::remove_reference<Arg2Nested>::type Arg2Nested_;
typedef typename internal::remove_reference<Arg3Nested>::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; }

View File

@ -24,9 +24,9 @@ struct traits<CwiseUnaryOp<UnaryOp, XprType> >
UnaryOp(const typename XprType::Scalar&)
>::type Scalar;
typedef typename XprType::Nested XprTypeNested;
typedef typename remove_reference<XprTypeNested>::type _XprTypeNested;
typedef typename remove_reference<XprTypeNested>::type XprTypeNested_;
enum {
Flags = _XprTypeNested::Flags & RowMajorBit
Flags = XprTypeNested_::Flags & RowMajorBit
};
};
}

View File

@ -23,10 +23,10 @@ struct traits<CwiseUnaryView<ViewOp, MatrixType, StrideType> >
ViewOp(const typename traits<MatrixType>::Scalar&)
>::type Scalar;
typedef typename MatrixType::Nested MatrixTypeNested;
typedef typename remove_all<MatrixTypeNested>::type _MatrixTypeNested;
typedef typename remove_all<MatrixTypeNested>::type MatrixTypeNested_;
enum {
FlagsLvalueBit = is_lvalue<MatrixType>::value ? LvalueBit : 0,
Flags = traits<_MatrixTypeNested>::Flags & (RowMajorBit | FlagsLvalueBit | DirectAccessBit), // FIXME DirectAccessBit should not be handled by expressions
Flags = traits<MatrixTypeNested_>::Flags & (RowMajorBit | FlagsLvalueBit | DirectAccessBit), // FIXME DirectAccessBit should not be handled by expressions
MatrixTypeInnerStride = inner_stride_at_compile_time<MatrixType>::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

View File

@ -40,7 +40,7 @@ struct traits<Diagonal<MatrixType,DiagIndex> >
: traits<MatrixType>
{
typedef typename ref_selector<MatrixType>::type MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNested_;
typedef typename MatrixType::StorageKind StorageKind;
enum {
RowsAtCompileTime = (int(DiagIndex) == DynamicIndex || int(MatrixType::SizeAtCompileTime) == Dynamic) ? Dynamic
@ -54,7 +54,7 @@ struct traits<Diagonal<MatrixType,DiagIndex> >
MatrixType::MaxColsAtCompileTime - plain_enum_max( DiagIndex, 0))),
MaxColsAtCompileTime = 1,
MaskLvalueBit = is_lvalue<MatrixType>::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<MatrixType>::ret,
InnerStrideAtCompileTime = MatrixTypeOuterStride == Dynamic ? Dynamic : MatrixTypeOuterStride+1,
OuterStrideAtCompileTime = 0

View File

@ -125,8 +125,8 @@ template<typename Derived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::PlainObject
MatrixBase<Derived>::normalized() const
{
typedef typename internal::nested_eval<Derived,2>::type _Nested;
_Nested n(derived());
typedef typename internal::nested_eval<Derived,2>::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<typename Derived>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::PlainObject
MatrixBase<Derived>::stableNormalized() const
{
typedef typename internal::nested_eval<Derived,3>::type _Nested;
_Nested n(derived());
typedef typename internal::nested_eval<Derived,3>::type Nested_;
Nested_ n(derived());
RealScalar w = n.cwiseAbs().maxCoeff();
RealScalar z = (n/w).squaredNorm();
if(z>RealScalar(0))

View File

@ -52,17 +52,17 @@ template<int Size, int MaxSize> struct product_size_category
template<typename Lhs, typename Rhs> struct product_type
{
typedef typename remove_all<Lhs>::type _Lhs;
typedef typename remove_all<Rhs>::type _Rhs;
typedef typename remove_all<Lhs>::type Lhs_;
typedef typename remove_all<Rhs>::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<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)
};
// the splitting into different lines of code here, introducing the _select enums and the typedef below,

View File

@ -154,16 +154,16 @@ struct evaluator<PartialReduxExpr<ArgType, MemberOp, Direction> >
: TraversalSize==0 ? 1
: int(TraversalSize) * int(evaluator<ArgType>::CoeffReadCost) + int(CostOpType::value),
_ArgFlags = evaluator<ArgType>::Flags,
ArgFlags_ = evaluator<ArgType>::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<XprType>::Flags&RowMajorBit)
| (evaluator<ArgType>::Flags&(HereditaryBits&(~RowMajorBit)))
| (_Vectorizable ? PacketAccessBit : 0)
| (Vectorizable_ ? PacketAccessBit : 0)
| LinearAccessBit,
Alignment = 0 // FIXME this will need to be improved once PartialReduxExpr is vectorized

View File

@ -391,20 +391,20 @@ class PermutationMatrix : public PermutationBase<PermutationMatrix<SizeAtCompile
namespace internal {
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_, int _PacketAccess>
struct traits<Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_>,_PacketAccess> >
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_, int PacketAccess_>
struct traits<Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_>,PacketAccess_> >
: traits<Matrix<StorageIndex_,SizeAtCompileTime,SizeAtCompileTime,0,MaxSizeAtCompileTime,MaxSizeAtCompileTime> >
{
typedef PermutationStorage StorageKind;
typedef Map<const Matrix<StorageIndex_, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1>, _PacketAccess> IndicesType;
typedef Map<const Matrix<StorageIndex_, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1>, PacketAccess_> IndicesType;
typedef StorageIndex_ StorageIndex;
typedef void Scalar;
};
}
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_, int _PacketAccess>
class Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_>,_PacketAccess>
: public PermutationBase<Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_>,_PacketAccess> >
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_, int PacketAccess_>
class Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_>,PacketAccess_>
: public PermutationBase<Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_>,PacketAccess_> >
{
typedef PermutationBase<Map> Base;
typedef internal::traits<Map> Traits;

View File

@ -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<typename MatrixType::Scalar, typename DiagonalType::Scalar>::value,
SameTypes_ = is_same<typename MatrixType::Scalar, typename DiagonalType::Scalar>::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<MatrixType>::Alignment,
AsScalarProduct = (DiagonalType::SizeAtCompileTime==1)

View File

@ -16,16 +16,16 @@ namespace Eigen {
namespace internal {
template<typename _PlainObjectType, int Options_, typename _StrideType>
struct traits<Ref<_PlainObjectType, Options_, _StrideType> >
: public traits<Map<_PlainObjectType, Options_, _StrideType> >
template<typename PlainObjectType_, int Options_, typename StrideType_>
struct traits<Ref<PlainObjectType_, Options_, StrideType_> >
: public traits<Map<PlainObjectType_, Options_, StrideType_> >
{
typedef _PlainObjectType PlainObjectType;
typedef _StrideType StrideType;
typedef PlainObjectType_ PlainObjectType;
typedef StrideType_ StrideType;
enum {
Options = Options_,
Flags = traits<Map<_PlainObjectType, Options_, _StrideType> >::Flags | NestByRefBit,
Alignment = traits<Map<_PlainObjectType, Options_, _StrideType> >::Alignment
Flags = traits<Map<PlainObjectType_, Options_, StrideType_> >::Flags | NestByRefBit,
Alignment = traits<Map<PlainObjectType_, Options_, StrideType_> >::Alignment
};
template<typename Derived> struct match {

View File

@ -23,7 +23,7 @@ struct traits<Replicate<MatrixType,RowFactor,ColFactor> >
typedef typename traits<MatrixType>::StorageKind StorageKind;
typedef typename traits<MatrixType>::XprKind XprKind;
typedef typename ref_selector<MatrixType>::type MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNested_;
enum {
RowsAtCompileTime = RowFactor==Dynamic || int(MatrixType::RowsAtCompileTime)==Dynamic
? Dynamic
@ -64,7 +64,7 @@ template<typename MatrixType,int RowFactor,int ColFactor> class Replicate
: public internal::dense_xpr_base< Replicate<MatrixType,RowFactor,ColFactor> >::type
{
typedef typename internal::traits<Replicate>::MatrixTypeNested MatrixTypeNested;
typedef typename internal::traits<Replicate>::_MatrixTypeNested _MatrixTypeNested;
typedef typename internal::traits<Replicate>::MatrixTypeNested_ MatrixTypeNested_;
public:
typedef typename internal::dense_xpr_base<Replicate>::type Base;
@ -96,7 +96,7 @@ template<typename MatrixType,int RowFactor,int ColFactor> 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;
}

View File

@ -26,13 +26,13 @@ struct traits<Reverse<MatrixType, Direction> >
typedef typename traits<MatrixType>::StorageKind StorageKind;
typedef typename traits<MatrixType>::XprKind XprKind;
typedef typename ref_selector<MatrixType>::type MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::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)
};
};

View File

@ -201,11 +201,11 @@ class Transpositions : public TranspositionsBase<Transpositions<SizeAtCompileTim
namespace internal {
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_, int _PacketAccess>
struct traits<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_>,_PacketAccess> >
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_, int PacketAccess_>
struct traits<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_>,PacketAccess_> >
: traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_> >
{
typedef Map<const Matrix<StorageIndex_,SizeAtCompileTime,1,0,MaxSizeAtCompileTime,1>, _PacketAccess> IndicesType;
typedef Map<const Matrix<StorageIndex_,SizeAtCompileTime,1,0,MaxSizeAtCompileTime,1>, PacketAccess_> IndicesType;
typedef StorageIndex_ StorageIndex;
typedef TranspositionsStorage StorageKind;
};

View File

@ -136,10 +136,10 @@ Packet4d psqrt<Packet4d>(const Packet4d& _x) {
#if EIGEN_FAST_MATH
template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED
Packet8f prsqrt<Packet8f>(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<Packet8f>(const Packet8f& _x) {
#else
template <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED
Packet8f prsqrt<Packet8f>(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<Packet4d>(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));
}

View File

@ -42,16 +42,16 @@ template<> struct is_arithmetic<__m256d> { enum { value = true }; };
template<> struct is_arithmetic<Packet8h> { enum { value = true }; };
template<> struct is_arithmetic<Packet8bf> { enum { value = true }; };
#define _EIGEN_DECLARE_CONST_Packet8f(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet8f(NAME,X) \
const Packet8f p8f_##NAME = pset1<Packet8f>(X)
#define _EIGEN_DECLARE_CONST_Packet4d(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet4d(NAME,X) \
const Packet4d p4d_##NAME = pset1<Packet4d>(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<Packet8i>(X))
#define _EIGEN_DECLARE_CONST_Packet8i(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet8i(NAME,X) \
const Packet8i p8i_##NAME = pset1<Packet8i>(X)
// Use the packet_traits defined in AVX512/PacketMath.h instead if we're going

View File

@ -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<Packet16f>(X)
#define _EIGEN_DECLARE_CONST_Packet16f_FROM_INT(NAME, X) \
#define EIGEN_DECLARE_CONST_Packet16f_FROM_INT(NAME, X) \
const Packet16f p16f_##NAME = preinterpret<Packet16f,Packet16i>(pset1<Packet16i>(X))
#define _EIGEN_DECLARE_CONST_Packet8d(NAME, X) \
#define EIGEN_DECLARE_CONST_Packet8d(NAME, X) \
const Packet8d p8d_##NAME = pset1<Packet8d>(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<Packet16bf>(X)
#define _EIGEN_DECLARE_CONST_Packet16bf_FROM_INT(NAME, X) \
#define EIGEN_DECLARE_CONST_Packet16bf_FROM_INT(NAME, X) \
const Packet16bf p16bf_##NAME = preinterpret<Packet16bf,Packet16i>(pset1<Packet16i>(X))
template <>
@ -73,21 +73,21 @@ BF16_PACKET_FUNCTION(Packet16f, Packet16bf, plog2)
template <>
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f
pexp<Packet16f>(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<Packet16f>(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<Packet16f>(const Packet16f& x) {
template <>
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f
prsqrt<Packet16f>(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<Packet16f>(const Packet16f& _x) {
template <>
EIGEN_STRONG_INLINE Packet16f prsqrt<Packet16f>(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<Packet8d>(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<Packet8d>(const Packet8d& _x) {
#else
template <>
EIGEN_STRONG_INLINE Packet8d prsqrt<Packet8d>(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

View File

@ -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<Packet4f>(X)
#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
Packet4i p4i_##NAME = pset1<Packet4i>(X)
#define _EIGEN_DECLARE_CONST_Packet2d(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet2d(NAME,X) \
Packet2d p2d_##NAME = pset1<Packet2d>(X)
#define _EIGEN_DECLARE_CONST_Packet2l(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet2l(NAME,X) \
Packet2l p2l_##NAME = pset1<Packet2l>(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<Packet4f>(pset1<Packet4i>(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<PACKETNAME>::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<Packet8us>(p8us_abs_mask, a);
}
@ -1194,38 +1194,38 @@ template<int N> EIGEN_STRONG_INLINE Packet4i plogical_shift_left(const Packet4i&
{ return vec_sl(a,reinterpret_cast<Packet4ui>(pset1<Packet4i>(N))); }
template<int N> 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<Packet4ui>(a), p4ui_mask);
return reinterpret_cast<Packet4f>(r);
}
template<int N> 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<Packet4ui>(a), p4ui_mask);
return reinterpret_cast<Packet4f>(r);
}
template<int N> 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<int N> 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<int N> 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<int N> 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<Packet4f>(
reinterpret_cast<Packet4f>(bf.m_val),
reinterpret_cast<Packet4f>(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<Packet4f>(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<Packet4ui>(lsb, reinterpret_cast<Packet4ui>(p4i_ONE));
_EIGEN_DECLARE_CONST_FAST_Packet4ui(BIAS,0x7FFFu);
EIGEN_DECLARE_CONST_FAST_Packet4ui(BIAS,0x7FFFu);
Packet4ui rounding_bias = padd<Packet4ui>(lsb, p4ui_BIAS);
input = padd<Packet4ui>(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<Packet4ui>(p4ui_exp_mask, reinterpret_cast<Packet4ui>(p4f));
const _EIGEN_DECLARE_CONST_FAST_Packet4ui(mantissa_mask, 0x7FFFFF);
const EIGEN_DECLARE_CONST_FAST_Packet4ui(mantissa_mask, 0x7FFFFF);
Packet4ui mantissa = pand<Packet4ui>(p4ui_mantissa_mask, reinterpret_cast<Packet4ui>(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<Packet4ui>(p4i_ZERO));
@ -1282,7 +1282,7 @@ EIGEN_STRONG_INLINE Packet8bf F32ToBf16(Packet4f p4f){
reinterpret_cast<Packet4ui>(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<Packet4ui>(p4f), subnormal_selector);
//Test NaN and Subnormal - End
@ -2210,7 +2210,7 @@ template<> EIGEN_STRONG_INLINE Packet8us pcast<Packet8bf, Packet8us>(const Packe
Packet4f float_odd = Bf16ToF32Odd(a);
Packet4ui int_even = pcast<Packet4f, Packet4ui>(float_even);
Packet4ui int_odd = pcast<Packet4f, Packet4ui>(float_odd);
const _EIGEN_DECLARE_CONST_FAST_Packet4ui(low_mask, 0x0000FFFF);
const EIGEN_DECLARE_CONST_FAST_Packet4ui(low_mask, 0x0000FFFF);
Packet4ui low_even = pand<Packet4ui>(int_even, p4ui_low_mask);
Packet4ui low_odd = pand<Packet4ui>(int_odd, p4ui_low_mask);
@ -2233,7 +2233,7 @@ template<> EIGEN_STRONG_INLINE Packet8us pcast<Packet8bf, Packet8us>(const Packe
template<> EIGEN_STRONG_INLINE Packet8bf pcast<Packet8us, Packet8bf>(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<Packet4ui>(a);
Packet4ui int_even = pand<Packet4ui>(int_cast, p4ui_low_mask);
Packet4ui int_odd = plogical_shift_right<16>(int_cast);

View File

@ -35,20 +35,20 @@ namespace internal {
template <>
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f
plog<Packet4f>(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<Packet4f>(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<Packet4f>(const Packet4f& _x) {
template <>
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f
ptanh<Packet4f>(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<Packet4f>(const Packet4f& _x) {
template <bool sine>
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<Packet2d>(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;

View File

@ -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] << " ]";

View File

@ -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<Packet4f>(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<int32_t>(X))
#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
const Packet4i p4i_##NAME = pset1<Packet4i>(X)
#if EIGEN_ARCH_ARM64

View File

@ -118,10 +118,10 @@ Packet16b psqrt<Packet16b>(const Packet16b& x) { return x; }
template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED
Packet4f prsqrt<Packet4f>(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);

View File

@ -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<Packet4f>(X)
#define _EIGEN_DECLARE_CONST_Packet2d(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet2d(NAME,X) \
const Packet2d p2d_##NAME = pset1<Packet2d>(X)
#define _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet4f_FROM_INT(NAME,X) \
const Packet4f p4f_##NAME = pset1frombits<Packet4f>(X)
#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
const Packet4i p4i_##NAME = pset1<Packet4i>(X)

View File

@ -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<Packet2d>(const Packet2d& _x)

View File

@ -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<Packet4i>(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<Packet2d>(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<Packet2l>(vec_splat_s64(X))
#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
Packet4i p4i_##NAME = pset1<Packet4i>(X)
#define _EIGEN_DECLARE_CONST_Packet2d(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet2d(NAME,X) \
Packet2d p2d_##NAME = pset1<Packet2d>(X)
#define _EIGEN_DECLARE_CONST_Packet2l(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet2l(NAME,X) \
Packet2l p2l_##NAME = pset1<Packet2l>(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<double>(0x8000000000000000ull),
numext::bit_cast<double>(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<Packet4f>(vec_splat_s32(X))
#define _EIGEN_DECLARE_CONST_Packet4f(NAME,X) \
#define EIGEN_DECLARE_CONST_Packet4f(NAME,X) \
Packet4f p4f_##NAME = pset1<Packet4f>(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<Packet4f>(pset1<Packet4i>(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:

View File

@ -378,12 +378,12 @@ struct packet_conditional<GEBPPacketFull, T1, T2, T3> { typedef T1 type; };
template <typename T1, typename T2, typename T3>
struct packet_conditional<GEBPPacketHalf, T1, T2, T3> { 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<packet_size, \
typename packet_traits<name ## Scalar>::type, \
typename packet_traits<name ## Scalar>::half, \
typename unpacket_traits<typename packet_traits<name ## Scalar>::half>::half>::type \
prefix ## name ## Packet
name ## Packet ## postfix
#define PACKET_DECL_COND(name, packet_size) \
typedef typename packet_conditional<packet_size, \
@ -392,12 +392,12 @@ struct packet_conditional<GEBPPacketHalf, T1, T2, T3> { typedef T2 type; };
typename unpacket_traits<typename packet_traits<name ## Scalar>::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<packet_size, \
typename packet_traits<Scalar>::type, \
typename packet_traits<Scalar>::half, \
typename unpacket_traits<typename packet_traits<Scalar>::half>::half>::type \
prefix ## ScalarPacket
ScalarPacket ## postfix
#define PACKET_DECL_COND_SCALAR(packet_size) \
typedef typename packet_conditional<packet_size, \
@ -424,17 +424,17 @@ public:
typedef RhsScalar_ RhsScalar;
typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::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<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,
NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS,
@ -459,9 +459,9 @@ public:
};
typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket;
typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket;
typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket;
typedef typename conditional<Vectorizable,LhsPacket_,LhsScalar>::type LhsPacket;
typedef typename conditional<Vectorizable,RhsPacket_,RhsScalar>::type RhsPacket;
typedef typename conditional<Vectorizable,ResPacket_,ResScalar>::type ResPacket;
typedef LhsPacket LhsPacket4Packing;
typedef QuadPacket<RhsPacket> RhsPacketx4;
@ -553,17 +553,17 @@ public:
typedef RealScalar RhsScalar;
typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::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<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,
NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS,
nr = 4,
@ -578,9 +578,9 @@ public:
RhsProgress = 1
};
typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket;
typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket;
typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket;
typedef typename conditional<Vectorizable,LhsPacket_,LhsScalar>::type LhsPacket;
typedef typename conditional<Vectorizable,RhsPacket_,RhsScalar>::type RhsPacket;
typedef typename conditional<Vectorizable,ResPacket_,ResScalar>::type ResPacket;
typedef LhsPacket LhsPacket4Packing;
typedef QuadPacket<RhsPacket> RhsPacketx4;
@ -765,9 +765,9 @@ public:
typedef std::complex<RealScalar> RhsScalar;
typedef std::complex<RealScalar> 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<RealPacket>::vectorizable
&& unpacket_traits<ScalarPacket>::vectorizable,
ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1,
LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1,
ResPacketSize = Vectorizable ? unpacket_traits<ResPacket_>::size : 1,
LhsPacketSize = Vectorizable ? unpacket_traits<LhsPacket_>::size : 1,
RhsPacketSize = Vectorizable ? unpacket_traits<RhsScalar>::size : 1,
RealPacketSize = Vectorizable ? unpacket_traits<RealPacket>::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<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,
NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS,
// FIXME: should depend on NumberOfRegisters
@ -960,9 +960,9 @@ public:
RhsProgress = 1
};
typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket;
typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket;
typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket;
typedef typename conditional<Vectorizable,LhsPacket_,LhsScalar>::type LhsPacket;
typedef typename conditional<Vectorizable,RhsPacket_,RhsScalar>::type RhsPacket;
typedef typename conditional<Vectorizable,ResPacket_,ResScalar>::type ResPacket;
typedef LhsPacket LhsPacket4Packing;
typedef QuadPacket<RhsPacket> RhsPacketx4;
typedef ResPacket AccPacket;

View File

@ -213,13 +213,13 @@ struct general_product_to_triangular_selector<MatrixType,ProductType,UpLo,true>
typedef typename internal::remove_all<typename ProductType::LhsNested>::type Lhs;
typedef internal::blas_traits<Lhs> LhsBlasTraits;
typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhs;
typedef typename internal::remove_all<ActualLhs>::type _ActualLhs;
typedef typename internal::remove_all<ActualLhs>::type ActualLhs_;
typename internal::add_const_on_value_type<ActualLhs>::type actualLhs = LhsBlasTraits::extract(prod.lhs());
typedef typename internal::remove_all<typename ProductType::RhsNested>::type Rhs;
typedef internal::blas_traits<Rhs> RhsBlasTraits;
typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhs;
typedef typename internal::remove_all<ActualRhs>::type _ActualRhs;
typedef typename internal::remove_all<ActualRhs>::type ActualRhs_;
typename internal::add_const_on_value_type<ActualRhs>::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<MatrixType,ProductType,UpLo,true>
enum {
StorageOrder = (internal::traits<MatrixType>::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<Scalar,Lhs::SizeAtCompileTime,Lhs::MaxSizeAtCompileTime,!UseLhsDirectly> static_lhs;
ei_declare_aligned_stack_constructed_variable(Scalar, actualLhsPtr, actualLhs.size(),
(UseLhsDirectly ? const_cast<Scalar*>(actualLhs.data()) : static_lhs.data()));
if(!UseLhsDirectly) Map<typename _ActualLhs::PlainObject>(actualLhsPtr, actualLhs.size()) = actualLhs;
if(!UseLhsDirectly) Map<typename ActualLhs_::PlainObject>(actualLhsPtr, actualLhs.size()) = actualLhs;
internal::gemv_static_vector_if<Scalar,Rhs::SizeAtCompileTime,Rhs::MaxSizeAtCompileTime,!UseRhsDirectly> static_rhs;
ei_declare_aligned_stack_constructed_variable(Scalar, actualRhsPtr, actualRhs.size(),
(UseRhsDirectly ? const_cast<Scalar*>(actualRhs.data()) : static_rhs.data()));
if(!UseRhsDirectly) Map<typename _ActualRhs::PlainObject>(actualRhsPtr, actualRhs.size()) = actualRhs;
if(!UseRhsDirectly) Map<typename ActualRhs_::PlainObject>(actualRhsPtr, actualRhs.size()) = actualRhs;
selfadjoint_rank1_update<Scalar,Index,StorageOrder,UpLo,
@ -259,13 +259,13 @@ struct general_product_to_triangular_selector<MatrixType,ProductType,UpLo,false>
typedef typename internal::remove_all<typename ProductType::LhsNested>::type Lhs;
typedef internal::blas_traits<Lhs> LhsBlasTraits;
typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhs;
typedef typename internal::remove_all<ActualLhs>::type _ActualLhs;
typedef typename internal::remove_all<ActualLhs>::type ActualLhs_;
typename internal::add_const_on_value_type<ActualLhs>::type actualLhs = LhsBlasTraits::extract(prod.lhs());
typedef typename internal::remove_all<typename ProductType::RhsNested>::type Rhs;
typedef internal::blas_traits<Rhs> RhsBlasTraits;
typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhs;
typedef typename internal::remove_all<ActualRhs>::type _ActualRhs;
typedef typename internal::remove_all<ActualRhs>::type ActualRhs_;
typename internal::add_const_on_value_type<ActualRhs>::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<MatrixType,ProductType,UpLo,false>
enum {
IsRowMajor = (internal::traits<MatrixType>::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<MatrixType,ProductType,UpLo,false>
Index depth = actualLhs.cols();
typedef internal::gemm_blocking_space<IsRowMajor ? RowMajor : ColMajor,typename Lhs::Scalar,typename Rhs::Scalar,
MatrixType::MaxColsAtCompileTime, MatrixType::MaxColsAtCompileTime, _ActualRhs::MaxColsAtCompileTime> BlockingType;
MatrixType::MaxColsAtCompileTime, MatrixType::MaxColsAtCompileTime, ActualRhs_::MaxColsAtCompileTime> BlockingType;
BlockingType blocking(size, size, depth, 1, false);

View File

@ -36,31 +36,31 @@ class gemv_traits
{
typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::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<packet_size, \
typename packet_traits<name ## Scalar>::type, \
typename packet_traits<name ## Scalar>::half, \
typename unpacket_traits<typename packet_traits<name ## Scalar>::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<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
};
typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket;
typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket;
typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket;
typedef typename conditional<Vectorizable,LhsPacket_,LhsScalar>::type LhsPacket;
typedef typename conditional<Vectorizable,RhsPacket_,RhsScalar>::type RhsPacket;
typedef typename conditional<Vectorizable,ResPacket_,ResScalar>::type ResPacket;
};

View File

@ -57,14 +57,14 @@ struct selfadjoint_product_selector<MatrixType,OtherType,UpLo,true>
typedef typename MatrixType::Scalar Scalar;
typedef internal::blas_traits<OtherType> OtherBlasTraits;
typedef typename OtherBlasTraits::DirectLinearAccessType ActualOtherType;
typedef typename internal::remove_all<ActualOtherType>::type _ActualOtherType;
typedef typename internal::remove_all<ActualOtherType>::type ActualOtherType_;
typename internal::add_const_on_value_type<ActualOtherType>::type actualOther = OtherBlasTraits::extract(other.derived());
Scalar actualAlpha = alpha * OtherBlasTraits::extractScalarFactor(other.derived());
enum {
StorageOrder = (internal::traits<MatrixType>::Flags&RowMajorBit) ? RowMajor : ColMajor,
UseOtherDirectly = _ActualOtherType::InnerStrideAtCompileTime==1
UseOtherDirectly = ActualOtherType_::InnerStrideAtCompileTime==1
};
internal::gemv_static_vector_if<Scalar,OtherType::SizeAtCompileTime,OtherType::MaxSizeAtCompileTime,!UseOtherDirectly> static_other;
@ -72,7 +72,7 @@ struct selfadjoint_product_selector<MatrixType,OtherType,UpLo,true>
(UseOtherDirectly ? const_cast<Scalar*>(actualOther.data()) : static_other.data()));
if(!UseOtherDirectly)
Map<typename _ActualOtherType::PlainObject>(actualOtherPtr, actualOther.size()) = actualOther;
Map<typename ActualOtherType_::PlainObject>(actualOtherPtr, actualOther.size()) = actualOther;
selfadjoint_rank1_update<Scalar,Index,StorageOrder,UpLo,
OtherBlasTraits::NeedToConjugate && NumTraits<Scalar>::IsComplex,
@ -89,21 +89,21 @@ struct selfadjoint_product_selector<MatrixType,OtherType,UpLo,false>
typedef typename MatrixType::Scalar Scalar;
typedef internal::blas_traits<OtherType> OtherBlasTraits;
typedef typename OtherBlasTraits::DirectLinearAccessType ActualOtherType;
typedef typename internal::remove_all<ActualOtherType>::type _ActualOtherType;
typedef typename internal::remove_all<ActualOtherType>::type ActualOtherType_;
typename internal::add_const_on_value_type<ActualOtherType>::type actualOther = OtherBlasTraits::extract(other.derived());
Scalar actualAlpha = alpha * OtherBlasTraits::extractScalarFactor(other.derived());
enum {
IsRowMajor = (internal::traits<MatrixType>::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<IsRowMajor ? RowMajor : ColMajor,Scalar,Scalar,
MatrixType::MaxColsAtCompileTime, MatrixType::MaxColsAtCompileTime, _ActualOtherType::MaxColsAtCompileTime> BlockingType;
MatrixType::MaxColsAtCompileTime, MatrixType::MaxColsAtCompileTime, ActualOtherType_::MaxColsAtCompileTime> BlockingType;
BlockingType blocking(size, size, depth, 1, false);

View File

@ -65,12 +65,12 @@ EIGEN_DEVICE_FUNC SelfAdjointView<MatrixType,UpLo>& SelfAdjointView<MatrixType,U
{
typedef internal::blas_traits<DerivedU> UBlasTraits;
typedef typename UBlasTraits::DirectLinearAccessType ActualUType;
typedef typename internal::remove_all<ActualUType>::type _ActualUType;
typedef typename internal::remove_all<ActualUType>::type ActualUType_;
typename internal::add_const_on_value_type<ActualUType>::type actualU = UBlasTraits::extract(u.derived());
typedef internal::blas_traits<DerivedV> VBlasTraits;
typedef typename VBlasTraits::DirectLinearAccessType ActualVType;
typedef typename internal::remove_all<ActualVType>::type _ActualVType;
typedef typename internal::remove_all<ActualVType>::type ActualVType_;
typename internal::add_const_on_value_type<ActualVType>::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<MatrixType,UpLo>& SelfAdjointView<MatrixType,U
if (IsRowMajor)
actualAlpha = numext::conj(actualAlpha);
typedef typename internal::remove_all<typename internal::conj_expr_if<int(IsRowMajor) ^ int(UBlasTraits::NeedToConjugate), _ActualUType>::type>::type UType;
typedef typename internal::remove_all<typename internal::conj_expr_if<int(IsRowMajor) ^ int(VBlasTraits::NeedToConjugate), _ActualVType>::type>::type VType;
typedef typename internal::remove_all<typename internal::conj_expr_if<int(IsRowMajor) ^ int(UBlasTraits::NeedToConjugate), ActualUType_>::type>::type UType;
typedef typename internal::remove_all<typename internal::conj_expr_if<int(IsRowMajor) ^ int(VBlasTraits::NeedToConjugate), ActualVType_>::type>::type VType;
internal::selfadjoint_rank2_update_selector<Scalar, Index, UType, VType,
(IsRowMajor ? int(UpLo==Upper ? Lower : Upper) : UpLo)>
::run(_expression().const_cast_derived().data(),_expression().outerStride(),UType(actualU),VType(actualV),actualAlpha);

View File

@ -405,7 +405,7 @@ template<typename XprType> struct blas_traits
{
typedef typename traits<XprType>::Scalar Scalar;
typedef const XprType& ExtractType;
typedef XprType _ExtractType;
typedef XprType ExtractType_;
enum {
IsComplex = NumTraits<Scalar>::IsComplex,
IsTransposed = false,
@ -418,7 +418,7 @@ template<typename XprType> struct blas_traits
};
typedef typename conditional<bool(HasUsableDirectAccess),
ExtractType,
typename _ExtractType::PlainObject
typename ExtractType_::PlainObject
>::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<Transpose<NestedXpr> >
typedef typename NestedXpr::Scalar Scalar;
typedef blas_traits<NestedXpr> Base;
typedef Transpose<NestedXpr> XprType;
typedef Transpose<const typename Base::_ExtractType> ExtractType; // const to get rid of a compile error; anyway blas traits are only used on the RHS
typedef Transpose<const typename Base::_ExtractType> _ExtractType;
typedef Transpose<const typename Base::ExtractType_> ExtractType; // const to get rid of a compile error; anyway blas traits are only used on the RHS
typedef Transpose<const typename Base::ExtractType_> ExtractType_;
typedef typename conditional<bool(Base::HasUsableDirectAccess),
ExtractType,
typename ExtractType::PlainObject

View File

@ -91,7 +91,7 @@ template<typename XprType> class Inverse;
template<typename Lhs, typename Rhs, int Option = DefaultProduct> class Product;
template<typename Derived> class DiagonalBase;
template<typename _DiagonalVectorType> class DiagonalWrapper;
template<typename DiagonalVectorType_> class DiagonalWrapper;
template<typename Scalar_, int SizeAtCompileTime, int MaxSizeAtCompileTime=SizeAtCompileTime> class DiagonalMatrix;
template<typename MatrixType, typename DiagonalType, int ProductOrder> class DiagonalProduct;
template<typename MatrixType, int Index = 0> class Diagonal;
@ -277,8 +277,8 @@ template<typename Scalar,int Dim> class Translation;
template<typename Scalar,int Dim> class AlignedBox;
template<typename Scalar, int Options = AutoAlign> class Quaternion;
template<typename Scalar,int Dim,int Mode,int Options_=AutoAlign> class Transform;
template <typename Scalar_, int _AmbientDim, int Options=AutoAlign> class ParametrizedLine;
template <typename Scalar_, int _AmbientDim, int Options=AutoAlign> class Hyperplane;
template <typename Scalar_, int AmbientDim_, int Options=AutoAlign> class ParametrizedLine;
template <typename Scalar_, int AmbientDim_, int Options=AutoAlign> class Hyperplane;
template<typename Scalar> class UniformScaling;
template<typename MatrixType,int Direction> class Homogeneous;

View File

@ -503,8 +503,8 @@ struct generic_xpr_base<Derived, XprKind, Dense>
template<typename XprType, typename CastType> struct cast_return_type
{
typedef typename XprType::Scalar CurrentScalarType;
typedef typename remove_all<CastType>::type _CastType;
typedef typename _CastType::Scalar NewScalarType;
typedef typename remove_all<CastType>::type CastType_;
typedef typename CastType_::Scalar NewScalarType;
typedef typename conditional<is_same<CurrentScalarType,NewScalarType>::value,
const XprType&,CastType>::type type;
};

View File

@ -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 <typename Scalar_, int _AmbientDim>
template <typename Scalar_, int AmbientDim_>
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<Scalar> 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;

View File

@ -37,7 +37,7 @@ struct traits<Homogeneous<MatrixType,Direction> >
{
typedef typename traits<MatrixType>::StorageKind StorageKind;
typedef typename ref_selector<MatrixType>::type MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNested_;
enum {
RowsPlusOne = (MatrixType::RowsAtCompileTime != Dynamic) ?
int(MatrixType::RowsAtCompileTime) + 1 : Dynamic,
@ -47,7 +47,7 @@ struct traits<Homogeneous<MatrixType,Direction> >
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

View File

@ -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 <typename Scalar_, int _AmbientDim, int Options_>
template <typename Scalar_, int AmbientDim_, int Options_>
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;

View File

@ -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 <typename Scalar_, int _AmbientDim, int Options_>
template <typename Scalar_, int AmbientDim_, int Options_>
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 <int OtherOptions>
EIGEN_DEVICE_FUNC explicit ParametrizedLine(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane);
EIGEN_DEVICE_FUNC explicit ParametrizedLine(const Hyperplane<Scalar_, AmbientDim_, OtherOptions>& 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 <int OtherOptions>
EIGEN_DEVICE_FUNC Scalar intersectionParameter(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const;
EIGEN_DEVICE_FUNC Scalar intersectionParameter(const Hyperplane<Scalar_, AmbientDim_, OtherOptions>& hyperplane) const;
template <int OtherOptions>
EIGEN_DEVICE_FUNC Scalar intersection(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const;
EIGEN_DEVICE_FUNC Scalar intersection(const Hyperplane<Scalar_, AmbientDim_, OtherOptions>& hyperplane) const;
template <int OtherOptions>
EIGEN_DEVICE_FUNC VectorType intersectionPoint(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const;
EIGEN_DEVICE_FUNC VectorType intersectionPoint(const Hyperplane<Scalar_, AmbientDim_, OtherOptions>& 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 <typename Scalar_, int _AmbientDim, int Options_>
template <typename Scalar_, int AmbientDim_, int Options_>
template <int OtherOptions>
EIGEN_DEVICE_FUNC inline ParametrizedLine<Scalar_, _AmbientDim,Options_>::ParametrizedLine(const Hyperplane<Scalar_, _AmbientDim,OtherOptions>& hyperplane)
EIGEN_DEVICE_FUNC inline ParametrizedLine<Scalar_, AmbientDim_,Options_>::ParametrizedLine(const Hyperplane<Scalar_, AmbientDim_,OtherOptions>& hyperplane)
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 2)
direction() = hyperplane.normal().unitOrthogonal();
@ -191,18 +191,18 @@ EIGEN_DEVICE_FUNC inline ParametrizedLine<Scalar_, _AmbientDim,Options_>::Parame
/** \returns the point at \a t along this line
*/
template <typename Scalar_, int _AmbientDim, int Options_>
EIGEN_DEVICE_FUNC inline typename ParametrizedLine<Scalar_, _AmbientDim,Options_>::VectorType
ParametrizedLine<Scalar_, _AmbientDim,Options_>::pointAt(const Scalar_& t) const
template <typename Scalar_, int AmbientDim_, int Options_>
EIGEN_DEVICE_FUNC inline typename ParametrizedLine<Scalar_, AmbientDim_,Options_>::VectorType
ParametrizedLine<Scalar_, AmbientDim_,Options_>::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 <typename Scalar_, int _AmbientDim, int Options_>
template <typename Scalar_, int AmbientDim_, int Options_>
template <int OtherOptions>
EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine<Scalar_, _AmbientDim,Options_>::intersectionParameter(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const
EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine<Scalar_, AmbientDim_,Options_>::intersectionParameter(const Hyperplane<Scalar_, AmbientDim_, OtherOptions>& hyperplane) const
{
return -(hyperplane.offset()+hyperplane.normal().dot(origin()))
/ hyperplane.normal().dot(direction());
@ -212,19 +212,19 @@ EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine<Scalar_, _AmbientDim,Options_>
/** \deprecated use intersectionParameter()
* \returns the parameter value of the intersection between \c *this and the given \a hyperplane
*/
template <typename Scalar_, int _AmbientDim, int Options_>
template <typename Scalar_, int AmbientDim_, int Options_>
template <int OtherOptions>
EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine<Scalar_, _AmbientDim,Options_>::intersection(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const
EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine<Scalar_, AmbientDim_,Options_>::intersection(const Hyperplane<Scalar_, AmbientDim_, OtherOptions>& hyperplane) const
{
return intersectionParameter(hyperplane);
}
/** \returns the point of the intersection between \c *this and the given hyperplane
*/
template <typename Scalar_, int _AmbientDim, int Options_>
template <typename Scalar_, int AmbientDim_, int Options_>
template <int OtherOptions>
EIGEN_DEVICE_FUNC inline typename ParametrizedLine<Scalar_, _AmbientDim,Options_>::VectorType
ParametrizedLine<Scalar_, _AmbientDim,Options_>::intersectionPoint(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const
EIGEN_DEVICE_FUNC inline typename ParametrizedLine<Scalar_, AmbientDim_,Options_>::VectorType
ParametrizedLine<Scalar_, AmbientDim_,Options_>::intersectionPoint(const Hyperplane<Scalar_, AmbientDim_, OtherOptions>& hyperplane) const
{
return pointAt(intersectionParameter(hyperplane));
}

View File

@ -137,9 +137,9 @@ struct rotation_base_generic_product_selector<RotationDerived,OtherVectorType,tr
*
* \brief Constructs a Dim x Dim rotation matrix from the rotation \a r
*/
template<typename Scalar_, int Rows_, int Cols_, int _Storage, int MaxRows_, int MaxCols_>
template<typename Scalar_, int Rows_, int Cols_, int Storage_, int MaxRows_, int MaxCols_>
template<typename OtherDerived>
EIGEN_DEVICE_FUNC Matrix<Scalar_, Rows_, Cols_, _Storage, MaxRows_, MaxCols_>
EIGEN_DEVICE_FUNC Matrix<Scalar_, Rows_, Cols_, Storage_, MaxRows_, MaxCols_>
::Matrix(const RotationBase<OtherDerived,ColsAtCompileTime>& r)
{
EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix,int(OtherDerived::Dim),int(OtherDerived::Dim))
@ -150,10 +150,10 @@ EIGEN_DEVICE_FUNC Matrix<Scalar_, Rows_, Cols_, _Storage, MaxRows_, MaxCols_>
*
* \brief Set a Dim x Dim rotation matrix from the rotation \a r
*/
template<typename Scalar_, int Rows_, int Cols_, int _Storage, int MaxRows_, int MaxCols_>
template<typename Scalar_, int Rows_, int Cols_, int Storage_, int MaxRows_, int MaxCols_>
template<typename OtherDerived>
EIGEN_DEVICE_FUNC Matrix<Scalar_, Rows_, Cols_, _Storage, MaxRows_, MaxCols_>&
Matrix<Scalar_, Rows_, Cols_, _Storage, MaxRows_, MaxCols_>
EIGEN_DEVICE_FUNC Matrix<Scalar_, Rows_, Cols_, Storage_, MaxRows_, MaxCols_>&
Matrix<Scalar_, Rows_, Cols_, Storage_, MaxRows_, MaxCols_>
::operator=(const RotationBase<OtherDerived,ColsAtCompileTime>& r)
{
EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix,int(OtherDerived::Dim),int(OtherDerived::Dim))

View File

@ -65,15 +65,15 @@ struct transform_construct_from_matrix;
template<typename TransformType> struct transform_take_affine_part;
template<typename Scalar_, int Dim_, int _Mode, int Options_>
struct traits<Transform<Scalar_,Dim_,_Mode,Options_> >
template<typename Scalar_, int Dim_, int Mode_, int Options_>
struct traits<Transform<Scalar_,Dim_,Mode_,Options_> >
{
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<int Mode> 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<int Mode> struct transform_make_affine;
*
* \sa class Matrix, class Quaternion
*/
template<typename Scalar_, int Dim_, int _Mode, int Options_>
template<typename Scalar_, int Dim_, int Mode_, int Options_>
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

View File

@ -58,10 +58,10 @@ struct compute_inverse_size4<Architecture::Target, float, MatrixType, ResultType
const float* data = matrix.data();
const Index stride = matrix.innerStride();
Packet4f _L1 = ploadt<Packet4f,MatrixAlignment>(data);
Packet4f _L2 = ploadt<Packet4f,MatrixAlignment>(data + stride*4);
Packet4f _L3 = ploadt<Packet4f,MatrixAlignment>(data + stride*8);
Packet4f _L4 = ploadt<Packet4f,MatrixAlignment>(data + stride*12);
Packet4f L1_ = ploadt<Packet4f,MatrixAlignment>(data);
Packet4f L2_ = ploadt<Packet4f,MatrixAlignment>(data + stride*4);
Packet4f L3_ = ploadt<Packet4f,MatrixAlignment>(data + stride*8);
Packet4f L4_ = ploadt<Packet4f,MatrixAlignment>(data + stride*12);
// Four 2x2 sub-matrices of the input matrix
// input = [[A, B],
@ -70,17 +70,17 @@ struct compute_inverse_size4<Architecture::Target, float, MatrixType, ResultType
if (!StorageOrdersMatch)
{
A = vec4f_unpacklo(_L1, _L2);
B = vec4f_unpacklo(_L3, _L4);
C = vec4f_unpackhi(_L1, _L2);
D = vec4f_unpackhi(_L3, _L4);
A = vec4f_unpacklo(L1_, L2_);
B = vec4f_unpacklo(L3_, L4_);
C = vec4f_unpackhi(L1_, L2_);
D = vec4f_unpackhi(L3_, L4_);
}
else
{
A = vec4f_movelh(_L1, _L2);
B = vec4f_movehl(_L2, _L1);
C = vec4f_movelh(_L3, _L4);
D = vec4f_movehl(_L4, _L3);
A = vec4f_movelh(L1_, L2_);
B = vec4f_movehl(L2_, L1_);
C = vec4f_movelh(L3_, L4_);
D = vec4f_movehl(L4_, L3_);
}
Packet4f AB, DC;

View File

@ -19,7 +19,7 @@ template<typename XprType, int BlockRows, int BlockCols>
class BlockImpl<XprType,BlockRows,BlockCols,true,Sparse>
: public SparseMatrixBase<Block<XprType,BlockRows,BlockCols,true> >
{
typedef typename internal::remove_all<typename XprType::Nested>::type _MatrixTypeNested;
typedef typename internal::remove_all<typename XprType::Nested>::type MatrixTypeNested_;
typedef Block<XprType, BlockRows, BlockCols, true> BlockType;
public:
enum { IsRowMajor = internal::traits<BlockType>::IsRowMajor };
@ -98,7 +98,7 @@ template<typename SparseMatrixType, int BlockRows, int BlockCols>
class sparse_matrix_block_impl
: public SparseCompressedBase<Block<SparseMatrixType,BlockRows,BlockCols,true> >
{
typedef typename internal::remove_all<typename SparseMatrixType::Nested>::type _MatrixTypeNested;
typedef typename internal::remove_all<typename SparseMatrixType::Nested>::type MatrixTypeNested_;
typedef Block<SparseMatrixType, BlockRows, BlockCols, true> BlockType;
typedef SparseCompressedBase<Block<SparseMatrixType,BlockRows,BlockCols,true> > Base;
using Base::convert_index;
@ -121,8 +121,8 @@ public:
template<typename OtherDerived>
inline BlockType& operator=(const SparseMatrixBase<OtherDerived>& other)
{
typedef typename internal::remove_all<typename SparseMatrixType::Nested>::type _NestedMatrixType;
_NestedMatrixType& matrix = m_matrix;
typedef typename internal::remove_all<typename SparseMatrixType::Nested>::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<BlockType>::IsRowMajor };
EIGEN_SPARSE_PUBLIC_INTERFACE(BlockType)
typedef typename internal::remove_all<typename XprType::Nested>::type _MatrixTypeNested;
typedef typename internal::remove_all<typename XprType::Nested>::type MatrixTypeNested_;
/** Column or Row constructor
*/

View File

@ -83,8 +83,8 @@ struct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, t
// FIXME: what is the purpose of the following specialization? Is it for the BlockedSparse format?
// -> let's disable it for now as it is conflicting with generic scalar*matrix and matrix*scalar operators
// template<typename T1, typename T2/*, int Options_, typename _StrideType*/>
// struct ScalarBinaryOpTraits<T1, Ref<T2/*, Options_, _StrideType*/> >
// template<typename T1, typename T2/*, int Options_, typename StrideType_*/>
// struct ScalarBinaryOpTraits<T1, Ref<T2/*, Options_, StrideType_*/> >
// {
// enum {
// Defined = 1

View File

@ -67,7 +67,7 @@ struct traits<Diagonal<SparseMatrix<Scalar_, Options_, StorageIndex_>, DiagIndex
{
typedef SparseMatrix<Scalar_, Options_, StorageIndex_> MatrixType;
typedef typename ref_selector<MatrixType>::type MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNested_;
typedef Scalar_ Scalar;
typedef Dense StorageKind;
@ -1179,8 +1179,8 @@ EIGEN_DONT_INLINE SparseMatrix<Scalar,Options_,StorageIndex_>& SparseMatrix<Scal
// 2 - do the actual copy/eval
// Since each coeff of the rhs has to be evaluated twice, let's evaluate it if needed
typedef typename internal::nested_eval<OtherDerived,2,typename internal::plain_matrix_type<OtherDerived>::type >::type OtherCopy;
typedef typename internal::remove_all<OtherCopy>::type _OtherCopy;
typedef internal::evaluator<_OtherCopy> OtherCopyEval;
typedef typename internal::remove_all<OtherCopy>::type OtherCopy_;
typedef internal::evaluator<OtherCopy_> OtherCopyEval;
OtherCopy otherCopy(other.derived());
OtherCopyEval otherCopyEval(otherCopy);

View File

@ -105,7 +105,7 @@ template<typename Derived> 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<typename Derived> class SparseMatrixBase
/** \internal the return type of coeff()
*/
typedef typename internal::conditional<_HasDirectAccess, const Scalar&, Scalar>::type CoeffReturnType;
typedef typename internal::conditional<HasDirectAccess_, const Scalar&, Scalar>::type CoeffReturnType;
/** \internal Represents a matrix with all coefficients equal to one another*/
typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,Matrix<Scalar,Dynamic,Dynamic> > ConstantReturnType;

View File

@ -22,8 +22,8 @@ namespace internal {
template<typename Derived> class SparseRefBase;
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename _StrideType>
struct traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename StrideType_>
struct traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options_, StrideType_> >
: public traits<SparseMatrix<MatScalar,MatOptions,MatIndex> >
{
typedef SparseMatrix<MatScalar,MatOptions,MatIndex> PlainObjectType;
@ -42,17 +42,17 @@ struct traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options_, _Stride
};
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename _StrideType>
struct traits<Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
: public traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename StrideType_>
struct traits<Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options_, StrideType_> >
: public traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options_, StrideType_> >
{
enum {
Flags = (traits<SparseMatrix<MatScalar,MatOptions,MatIndex> >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit
};
};
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename _StrideType>
struct traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename StrideType_>
struct traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options_, StrideType_> >
: public traits<SparseVector<MatScalar,MatOptions,MatIndex> >
{
typedef SparseVector<MatScalar,MatOptions,MatIndex> PlainObjectType;
@ -70,9 +70,9 @@ struct traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options_, _Stride
};
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename _StrideType>
struct traits<Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
: public traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename StrideType_>
struct traits<Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, Options_, StrideType_> >
: public traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options_, StrideType_> >
{
enum {
Flags = (traits<SparseVector<MatScalar,MatOptions,MatIndex> >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit

View File

@ -59,7 +59,7 @@ template<typename MatrixType, unsigned int Mode_> class SparseSelfAdjointView
typedef typename MatrixType::StorageIndex StorageIndex;
typedef Matrix<StorageIndex,Dynamic,1> VectorI;
typedef typename internal::ref_selector<MatrixType>::non_const_type MatrixTypeNested;
typedef typename internal::remove_all<MatrixTypeNested>::type _MatrixTypeNested;
typedef typename internal::remove_all<MatrixTypeNested>::type MatrixTypeNested_;
explicit inline SparseSelfAdjointView(MatrixType& matrix) : m_matrix(matrix)
{
@ -70,7 +70,7 @@ template<typename MatrixType, unsigned int Mode_> 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<MatrixTypeNested>::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<typename MatrixType, unsigned int Mode_> 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<Dynamic,Dynamic,StorageIndex>& perm) const
SparseSymmetricPermutationProduct<MatrixTypeNested_,Mode> twistedBy(const PermutationMatrix<Dynamic,Dynamic,StorageIndex>& perm) const
{
return SparseSymmetricPermutationProduct<_MatrixTypeNested,Mode>(m_matrix, perm);
return SparseSymmetricPermutationProduct<MatrixTypeNested_,Mode>(m_matrix, perm);
}
template<typename SrcMatrixType,int SrcMode>
@ -340,7 +340,7 @@ struct generic_product_impl<LhsView, Rhs, SparseSelfAdjointShape, DenseShape, Pr
template<typename Dest>
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<Lhs,Dynamic>::type LhsNested;
typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;
LhsNested lhsNested(lhsView.matrix());
@ -357,7 +357,7 @@ struct generic_product_impl<Lhs, RhsView, DenseShape, SparseSelfAdjointShape, Pr
template<typename Dest>
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<Lhs,Dynamic>::type LhsNested;
typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;
LhsNested lhsNested(lhs);

View File

@ -51,8 +51,8 @@ const int InnerRandomAccessPattern = 0x2 | CoherentAccessPattern;
const int OuterRandomAccessPattern = 0x4 | CoherentAccessPattern;
const int RandomAccessPattern = 0x8 | OuterRandomAccessPattern | InnerRandomAccessPattern;
template<typename Scalar_, int _Flags = 0, typename StorageIndex_ = int> class SparseMatrix;
template<typename Scalar_, int _Flags = 0, typename StorageIndex_ = int> class SparseVector;
template<typename Scalar_, int Flags_ = 0, typename StorageIndex_ = int> class SparseMatrix;
template<typename Scalar_, int Flags_ = 0, typename StorageIndex_ = int> class SparseVector;
template<typename MatrixType, unsigned int UpLo> class SparseSelfAdjointView;
template<typename Lhs, typename Rhs> class SparseDiagonalProduct;

View File

@ -47,7 +47,7 @@ template<typename MatrixType>
class SparseView : public SparseMatrixBase<SparseView<MatrixType> >
{
typedef typename MatrixType::Nested MatrixTypeNested;
typedef typename internal::remove_all<MatrixTypeNested>::type _MatrixTypeNested;
typedef typename internal::remove_all<MatrixTypeNested>::type MatrixTypeNested_;
typedef SparseMatrixBase<SparseView > Base;
public:
EIGEN_SPARSE_PUBLIC_INTERFACE(SparseView)

View File

@ -31,7 +31,7 @@ struct traits<TensorIndexPairOp<XprType> > : public traits<XprType>
typedef typename XprTraits::Index Index;
typedef Pair<Index, typename XprTraits::Scalar> Scalar;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
};
@ -154,7 +154,7 @@ struct traits<TensorPairReducerOp<ReduceOp, Dims, XprType> > : public traits<Xpr
typedef typename XprTraits::Index Index;
typedef Index Scalar;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions - array_size<Dims>::value;
static const int Layout = XprTraits::Layout;
};

View File

@ -32,8 +32,8 @@ struct traits<TensorAssignOp<LhsXprType, RhsXprType> >
typename traits<RhsXprType>::Index>::type Index;
typedef typename LhsXprType::Nested LhsNested;
typedef typename RhsXprType::Nested RhsNested;
typedef typename remove_reference<LhsNested>::type _LhsNested;
typedef typename remove_reference<RhsNested>::type _RhsNested;
typedef typename remove_reference<LhsNested>::type LhsNested_;
typedef typename remove_reference<RhsNested>::type RhsNested_;
static const std::size_t NumDimensions = internal::traits<LhsXprType>::NumDimensions;
static const int Layout = internal::traits<LhsXprType>::Layout;
typedef typename traits<LhsXprType>::PointerType PointerType;

View File

@ -30,7 +30,7 @@ struct traits<TensorBroadcastingOp<Broadcast, XprType> > : public traits<XprType
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -31,7 +31,7 @@ struct traits<TensorChippingOp<DimId, XprType> > : public traits<XprType>
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions - 1;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -34,8 +34,8 @@ struct traits<TensorConcatenationOp<Axis, LhsXprType, RhsXprType> >
typename traits<RhsXprType>::Index>::type Index;
typedef typename LhsXprType::Nested LhsNested;
typedef typename RhsXprType::Nested RhsNested;
typedef typename remove_reference<LhsNested>::type _LhsNested;
typedef typename remove_reference<RhsNested>::type _RhsNested;
typedef typename remove_reference<LhsNested>::type LhsNested_;
typedef typename remove_reference<RhsNested>::type RhsNested_;
static const int NumDimensions = traits<LhsXprType>::NumDimensions;
static const int Layout = traits<LhsXprType>::Layout;
enum { Flags = 0 };

View File

@ -36,8 +36,8 @@ struct traits<TensorContractionOp<Dimensions, LhsXprType, RhsXprType, OutputKern
typename traits<RhsXprType>::Index>::type Index;
typedef typename LhsXprType::Nested LhsNested;
typedef typename RhsXprType::Nested RhsNested;
typedef typename remove_reference<LhsNested>::type _LhsNested;
typedef typename remove_reference<RhsNested>::type _RhsNested;
typedef typename remove_reference<LhsNested>::type LhsNested_;
typedef typename remove_reference<RhsNested>::type RhsNested_;
// From NumDims below.
static const int NumDimensions = traits<LhsXprType>::NumDimensions + traits<RhsXprType>::NumDimensions - 2 * array_size<Dimensions>::value;

View File

@ -30,7 +30,7 @@ struct traits<TensorConversionOp<TargetType, XprType> >
typedef typename traits<XprType>::StorageKind StorageKind;
typedef typename traits<XprType>::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = traits<XprType>::NumDimensions;
static const int Layout = traits<XprType>::Layout;
enum { Flags = 0 };

View File

@ -229,8 +229,8 @@ struct traits<TensorConvolutionOp<Dimensions, InputXprType, KernelXprType> >
typename traits<KernelXprType>::Index>::type Index;
typedef typename InputXprType::Nested LhsNested;
typedef typename KernelXprType::Nested RhsNested;
typedef typename remove_reference<LhsNested>::type _LhsNested;
typedef typename remove_reference<RhsNested>::type _RhsNested;
typedef typename remove_reference<LhsNested>::type LhsNested_;
typedef typename remove_reference<RhsNested>::type RhsNested_;
static const int NumDimensions = traits<InputXprType>::NumDimensions;
static const int Layout = traits<InputXprType>::Layout;
typedef typename conditional<Pointer_type_promotion<typename InputXprType::Scalar, Scalar>::val,

View File

@ -29,7 +29,7 @@ struct traits<TensorCustomUnaryOp<CustomUnaryFunc, XprType> >
typedef typename XprType::StorageKind StorageKind;
typedef typename XprType::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = traits<XprType>::NumDimensions;
static const int Layout = traits<XprType>::Layout;
typedef typename traits<XprType>::PointerType PointerType;
@ -193,8 +193,8 @@ struct traits<TensorCustomBinaryOp<CustomBinaryFunc, LhsXprType, RhsXprType> >
typename traits<RhsXprType>::Index>::type Index;
typedef typename LhsXprType::Nested LhsNested;
typedef typename RhsXprType::Nested RhsNested;
typedef typename remove_reference<LhsNested>::type _LhsNested;
typedef typename remove_reference<RhsNested>::type _RhsNested;
typedef typename remove_reference<LhsNested>::type LhsNested_;
typedef typename remove_reference<RhsNested>::type RhsNested_;
static const int NumDimensions = traits<LhsXprType>::NumDimensions;
static const int Layout = traits<LhsXprType>::Layout;
typedef typename conditional<Pointer_type_promotion<typename LhsXprType::Scalar, Scalar>::val,

View File

@ -31,7 +31,7 @@ struct traits<TensorEvalToOp<XprType, MakePointer_> >
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename MakePointer_<Scalar>::Type PointerType;

View File

@ -37,7 +37,7 @@ struct traits<TensorCwiseNullaryOp<NullaryOp, XprType> >
typedef traits<XprType> XprTraits;
typedef typename XprType::Scalar Scalar;
typedef typename XprType::Nested XprTypeNested;
typedef typename remove_reference<XprTypeNested>::type _XprTypeNested;
typedef typename remove_reference<XprTypeNested>::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<TensorCwiseUnaryOp<UnaryOp, XprType> >
typedef typename result_of<UnaryOp(typename XprType::Scalar)>::type Scalar;
typedef traits<XprType> XprTraits;
typedef typename XprType::Nested XprTypeNested;
typedef typename remove_reference<XprTypeNested>::type _XprTypeNested;
typedef typename remove_reference<XprTypeNested>::type XprTypeNested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename TypeConversion<Scalar,
@ -163,8 +163,8 @@ struct traits<TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType> >
typename traits<RhsXprType>::Index>::type Index;
typedef typename LhsXprType::Nested LhsNested;
typedef typename RhsXprType::Nested RhsNested;
typedef typename remove_reference<LhsNested>::type _LhsNested;
typedef typename remove_reference<RhsNested>::type _RhsNested;
typedef typename remove_reference<LhsNested>::type LhsNested_;
typedef typename remove_reference<RhsNested>::type RhsNested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename TypeConversion<Scalar,
@ -244,9 +244,9 @@ struct traits<TensorCwiseTernaryOp<TernaryOp, Arg1XprType, Arg2XprType, Arg3XprT
typedef typename Arg1XprType::Nested Arg1Nested;
typedef typename Arg2XprType::Nested Arg2Nested;
typedef typename Arg3XprType::Nested Arg3Nested;
typedef typename remove_reference<Arg1Nested>::type _Arg1Nested;
typedef typename remove_reference<Arg2Nested>::type _Arg2Nested;
typedef typename remove_reference<Arg3Nested>::type _Arg3Nested;
typedef typename remove_reference<Arg1Nested>::type Arg1Nested_;
typedef typename remove_reference<Arg2Nested>::type Arg2Nested_;
typedef typename remove_reference<Arg3Nested>::type Arg3Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename TypeConversion<Scalar,

View File

@ -66,7 +66,7 @@ struct traits<TensorFFTOp<FFT, XprType, FFTResultType, FFTDir> > : public traits
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename traits<XprType>::PointerType PointerType;

View File

@ -31,7 +31,7 @@ struct traits<TensorForcedEvalOp<XprType> >
typedef typename traits<XprType>::StorageKind StorageKind;
typedef typename traits<XprType>::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -30,7 +30,7 @@ struct traits<TensorGeneratorOp<Generator, XprType> > : public traits<XprType>
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -38,7 +38,7 @@ struct traits<TensorImagePatchOp<Rows, Cols, XprType> > : public traits<XprType>
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions + 1;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -30,7 +30,7 @@ struct traits<TensorInflationOp<Strides, XprType> > : public traits<XprType>
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -45,7 +45,7 @@ struct traits<TensorLayoutSwapOp<XprType> > : public traits<XprType>
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = traits<XprType>::NumDimensions;
static const int Layout = (traits<XprType>::Layout == ColMajor) ? RowMajor : ColMajor;
typedef typename XprTraits::PointerType PointerType;

View File

@ -30,7 +30,7 @@ struct traits<TensorReshapingOp<NewDimensions, XprType> > : public traits<XprTyp
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = array_size<NewDimensions>::value;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;
@ -317,7 +317,7 @@ struct traits<TensorSlicingOp<StartIndices, Sizes, XprType> > : public traits<Xp
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = array_size<StartIndices>::value;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;
@ -813,7 +813,7 @@ struct traits<TensorStridingSlicingOp<StartIndices, StopIndices, Strides, XprTyp
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = array_size<StartIndices>::value;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -30,7 +30,7 @@ struct traits<TensorPaddingOp<PaddingDimensions, XprType> > : public traits<XprT
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -30,7 +30,7 @@ struct traits<TensorPatchOp<PatchDim, XprType> > : public traits<XprType>
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions + 1;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -30,7 +30,7 @@ struct traits<TensorReverseOp<ReverseDimensions,
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -23,7 +23,7 @@ struct traits<TensorScanOp<Op, XprType> >
typedef traits<XprType> XprTraits;
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -30,7 +30,7 @@ struct traits<TensorShufflingOp<Shuffle, XprType> > : public traits<XprType>
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -30,7 +30,7 @@ struct traits<TensorStridingOp<Strides, XprType> > : public traits<XprType>
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -32,7 +32,7 @@ struct traits<TensorTraceOp<Dims, XprType> > : public traits<XprType>
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions - array_size<Dims>::value;
static const int Layout = XprTraits::Layout;
};

View File

@ -33,7 +33,7 @@ struct traits<TensorVolumePatchOp<Planes, Rows, Cols, XprType> > : public traits
typedef typename XprTraits::StorageKind StorageKind;
typedef typename XprTraits::Index Index;
typedef typename XprType::Nested Nested;
typedef typename remove_reference<Nested>::type _Nested;
typedef typename remove_reference<Nested>::type Nested_;
static const int NumDimensions = XprTraits::NumDimensions + 1;
static const int Layout = XprTraits::Layout;
typedef typename XprTraits::PointerType PointerType;

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -24,20 +24,20 @@ template<typename Packet> 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

View File

@ -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<Deg>::ret
};
@ -49,7 +49,7 @@ class companion
typedef Matrix<Scalar, Deg_1, 1> BottomLeftDiagonal;
typedef Matrix<Scalar, Deg, Deg> 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<Scalar_,_Deg>::balanced( RealScalar colNorm, RealScalar rowNorm,
bool companion<Scalar_,Deg_>::balanced( RealScalar colNorm, RealScalar rowNorm,
bool& isBalanced, RealScalar& colB, RealScalar& rowB )
{
if( RealScalar(0) == colNorm || RealScalar(0) == rowNorm
@ -186,9 +186,9 @@ bool companion<Scalar_,_Deg>::balanced( RealScalar colNorm, RealScalar rowNorm,
}
}
template< typename Scalar_, int _Deg >
template< typename Scalar_, int Deg_ >
inline
bool companion<Scalar_,_Deg>::balancedR( RealScalar colNorm, RealScalar rowNorm,
bool companion<Scalar_,Deg_>::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<Scalar_,_Deg>::balancedR( RealScalar colNorm, RealScalar rowNorm,
}
template< typename Scalar_, int _Deg >
void companion<Scalar_,_Deg>::balance()
template< typename Scalar_, int Deg_ >
void companion<Scalar_,Deg_>::balance()
{
using std::abs;
EIGEN_STATIC_ASSERT( Deg == Dynamic || 1 < Deg, YOU_MADE_A_PROGRAMMING_MISTAKE );

View File

@ -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<Scalar>::Real RealScalar;
typedef std::complex<RealScalar> RootType;
typedef Matrix<RootType,_Deg,1> RootsType;
typedef Matrix<RootType,Deg_,1> 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<typename Scalar_, int _Deg>
class PolynomialSolver : public PolynomialSolverBase<Scalar_,_Deg>
template<typename Scalar_, int Deg_>
class PolynomialSolver : public PolynomialSolverBase<Scalar_,Deg_>
{
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<Scalar_,_Deg> PS_Base;
typedef PolynomialSolverBase<Scalar_,Deg_> PS_Base;
EIGEN_POLYNOMIAL_SOLVER_BASE_INHERITED_TYPES( PS_Base )
typedef Matrix<Scalar,_Deg,_Deg> CompanionMatrixType;
typedef Matrix<Scalar,Deg_,Deg_> CompanionMatrixType;
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
ComplexEigenSolver<CompanionMatrixType>,
EigenSolver<CompanionMatrixType> >::type EigenSolverType;
@ -353,7 +353,7 @@ class PolynomialSolver : public PolynomialSolverBase<Scalar_,_Deg>
eigen_assert( poly.size() > 1 );
if(poly.size() > 2 )
{
internal::companion<Scalar,_Deg> companion( poly );
internal::companion<Scalar,Deg_> companion( poly );
companion.balance();
m_eigenSolver.compute( companion.denseMatrix() );
m_roots = m_eigenSolver.eigenvalues();

View File

@ -25,22 +25,22 @@ struct SkylineProductReturnType {
template<typename LhsNested, typename RhsNested, int ProductMode>
struct internal::traits<SkylineProduct<LhsNested, RhsNested, ProductMode> > {
// clean the nested types:
typedef typename internal::remove_all<LhsNested>::type _LhsNested;
typedef typename internal::remove_all<RhsNested>::type _RhsNested;
typedef typename _LhsNested::Scalar Scalar;
typedef typename internal::remove_all<LhsNested>::type LhsNested_;
typedef typename internal::remove_all<RhsNested>::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<SkylineProduct>::_LhsNested _LhsNested;
typedef typename traits<SkylineProduct>::_RhsNested _RhsNested;
typedef typename traits<SkylineProduct>::LhsNested_ LhsNested_;
typedef typename traits<SkylineProduct>::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;
}

View File

@ -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<Derived>::Scalar Scalar; \
typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \
@ -60,13 +60,13 @@ EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \
enum { Flags = Eigen::internal::traits<Derived>::Flags, };
#define EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived) \
_EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::SkylineMatrixBase<Derived>)
EIGEN_SKYLINE_GENERIC_PUBLIC_INTERFACE_(Derived, Eigen::SkylineMatrixBase<Derived>)
template<typename Derived> class SkylineMatrixBase;
template<typename Scalar_, int _Flags = 0> class SkylineMatrix;
template<typename Scalar_, int _Flags = 0> class DynamicSkylineMatrix;
template<typename Scalar_, int _Flags = 0> class SkylineVector;
template<typename Scalar_, int _Flags = 0> class MappedSkylineMatrix;
template<typename Scalar_, int Flags_ = 0> class SkylineMatrix;
template<typename Scalar_, int Flags_ = 0> class DynamicSkylineMatrix;
template<typename Scalar_, int Flags_ = 0> class SkylineVector;
template<typename Scalar_, int Flags_ = 0> class MappedSkylineMatrix;
namespace internal {
@ -77,11 +77,11 @@ template<typename T> class eval<T,IsSkyline>
{
typedef typename traits<T>::Scalar Scalar_;
enum {
_Flags = traits<T>::Flags
Flags_ = traits<T>::Flags
};
public:
typedef SkylineMatrix<Scalar_, _Flags> type;
typedef SkylineMatrix<Scalar_, Flags_> type;
};
} // end namespace internal

View File

@ -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 <typename Scalar_, int Dim_, int _Degree>
template <typename Scalar_, int Dim_, int Degree_>
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<Spline>::PointType PointType;
@ -225,18 +225,18 @@ namespace Eigen
template <typename DerivativeType>
static void BasisFunctionDerivativesImpl(
const typename Spline<Scalar_, Dim_, _Degree>::Scalar u,
const typename Spline<Scalar_, Dim_, Degree_>::Scalar u,
const DenseIndex order,
const DenseIndex p,
const typename Spline<Scalar_, Dim_, _Degree>::KnotVectorType& U,
const typename Spline<Scalar_, Dim_, Degree_>::KnotVectorType& U,
DerivativeType& N_);
};
template <typename Scalar_, int Dim_, int _Degree>
DenseIndex Spline<Scalar_, Dim_, _Degree>::Span(
typename SplineTraits< Spline<Scalar_, Dim_, _Degree> >::Scalar u,
template <typename Scalar_, int Dim_, int Degree_>
DenseIndex Spline<Scalar_, Dim_, Degree_>::Span(
typename SplineTraits< Spline<Scalar_, Dim_, Degree_> >::Scalar u,
DenseIndex degree,
const typename SplineTraits< Spline<Scalar_, Dim_, _Degree> >::KnotVectorType& knots)
const typename SplineTraits< Spline<Scalar_, Dim_, Degree_> >::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<DenseIndex>( std::distance(knots.data(), pos) - 1 );
}
template <typename Scalar_, int Dim_, int _Degree>
typename Spline<Scalar_, Dim_, _Degree>::BasisVectorType
Spline<Scalar_, Dim_, _Degree>::BasisFunctions(
typename Spline<Scalar_, Dim_, _Degree>::Scalar u,
template <typename Scalar_, int Dim_, int Degree_>
typename Spline<Scalar_, Dim_, Degree_>::BasisVectorType
Spline<Scalar_, Dim_, Degree_>::BasisFunctions(
typename Spline<Scalar_, Dim_, Degree_>::Scalar u,
DenseIndex degree,
const typename Spline<Scalar_, Dim_, _Degree>::KnotVectorType& knots)
const typename Spline<Scalar_, Dim_, Degree_>::KnotVectorType& knots)
{
const DenseIndex p = degree;
const DenseIndex i = Spline::Span(u, degree, knots);
@ -278,23 +278,23 @@ namespace Eigen
return N;
}
template <typename Scalar_, int Dim_, int _Degree>
DenseIndex Spline<Scalar_, Dim_, _Degree>::degree() const
template <typename Scalar_, int Dim_, int Degree_>
DenseIndex Spline<Scalar_, Dim_, Degree_>::degree() const
{
if (_Degree == Dynamic)
if (Degree_ == Dynamic)
return m_knots.size() - m_ctrls.cols() - 1;
else
return _Degree;
return Degree_;
}
template <typename Scalar_, int Dim_, int _Degree>
DenseIndex Spline<Scalar_, Dim_, _Degree>::span(Scalar u) const
template <typename Scalar_, int Dim_, int Degree_>
DenseIndex Spline<Scalar_, Dim_, Degree_>::span(Scalar u) const
{
return Spline::Span(u, degree(), knots());
}
template <typename Scalar_, int Dim_, int _Degree>
typename Spline<Scalar_, Dim_, _Degree>::PointType Spline<Scalar_, Dim_, _Degree>::operator()(Scalar u) const
template <typename Scalar_, int Dim_, int Degree_>
typename Spline<Scalar_, Dim_, Degree_>::PointType Spline<Scalar_, Dim_, Degree_>::operator()(Scalar u) const
{
enum { Order = SplineTraits<Spline>::OrderAtCompileTime };
@ -339,28 +339,28 @@ namespace Eigen
}
}
template <typename Scalar_, int Dim_, int _Degree>
typename SplineTraits< Spline<Scalar_, Dim_, _Degree> >::DerivativeType
Spline<Scalar_, Dim_, _Degree>::derivatives(Scalar u, DenseIndex order) const
template <typename Scalar_, int Dim_, int Degree_>
typename SplineTraits< Spline<Scalar_, Dim_, Degree_> >::DerivativeType
Spline<Scalar_, Dim_, Degree_>::derivatives(Scalar u, DenseIndex order) const
{
typename SplineTraits< Spline >::DerivativeType res;
derivativesImpl(*this, u, order, res);
return res;
}
template <typename Scalar_, int Dim_, int _Degree>
template <typename Scalar_, int Dim_, int Degree_>
template <int DerivativeOrder>
typename SplineTraits< Spline<Scalar_, Dim_, _Degree>, DerivativeOrder >::DerivativeType
Spline<Scalar_, Dim_, _Degree>::derivatives(Scalar u, DenseIndex order) const
typename SplineTraits< Spline<Scalar_, Dim_, Degree_>, DerivativeOrder >::DerivativeType
Spline<Scalar_, Dim_, Degree_>::derivatives(Scalar u, DenseIndex order) const
{
typename SplineTraits< Spline, DerivativeOrder >::DerivativeType res;
derivativesImpl(*this, u, order, res);
return res;
}
template <typename Scalar_, int Dim_, int _Degree>
typename SplineTraits< Spline<Scalar_, Dim_, _Degree> >::BasisVectorType
Spline<Scalar_, Dim_, _Degree>::basisFunctions(Scalar u) const
template <typename Scalar_, int Dim_, int Degree_>
typename SplineTraits< Spline<Scalar_, Dim_, Degree_> >::BasisVectorType
Spline<Scalar_, Dim_, Degree_>::basisFunctions(Scalar u) const
{
return Spline::BasisFunctions(u, degree(), knots());
}
@ -368,16 +368,16 @@ namespace Eigen
/* --------------------------------------------------------------------------------------------- */
template <typename Scalar_, int Dim_, int _Degree>
template <typename Scalar_, int Dim_, int Degree_>
template <typename DerivativeType>
void Spline<Scalar_, Dim_, _Degree>::BasisFunctionDerivativesImpl(
const typename Spline<Scalar_, Dim_, _Degree>::Scalar u,
void Spline<Scalar_, Dim_, Degree_>::BasisFunctionDerivativesImpl(
const typename Spline<Scalar_, Dim_, Degree_>::Scalar u,
const DenseIndex order,
const DenseIndex p,
const typename Spline<Scalar_, Dim_, _Degree>::KnotVectorType& U,
const typename Spline<Scalar_, Dim_, Degree_>::KnotVectorType& U,
DerivativeType& N_)
{
typedef Spline<Scalar_, Dim_, _Degree> SplineType;
typedef Spline<Scalar_, Dim_, Degree_> SplineType;
enum { Order = SplineTraits<SplineType>::OrderAtCompileTime };
const DenseIndex span = SplineType::Span(u, p, U);
@ -473,32 +473,32 @@ namespace Eigen
}
}
template <typename Scalar_, int Dim_, int _Degree>
typename SplineTraits< Spline<Scalar_, Dim_, _Degree> >::BasisDerivativeType
Spline<Scalar_, Dim_, _Degree>::basisFunctionDerivatives(Scalar u, DenseIndex order) const
template <typename Scalar_, int Dim_, int Degree_>
typename SplineTraits< Spline<Scalar_, Dim_, Degree_> >::BasisDerivativeType
Spline<Scalar_, Dim_, Degree_>::basisFunctionDerivatives(Scalar u, DenseIndex order) const
{
typename SplineTraits<Spline<Scalar_, Dim_, _Degree> >::BasisDerivativeType der;
typename SplineTraits<Spline<Scalar_, Dim_, Degree_> >::BasisDerivativeType der;
BasisFunctionDerivativesImpl(u, order, degree(), knots(), der);
return der;
}
template <typename Scalar_, int Dim_, int _Degree>
template <typename Scalar_, int Dim_, int Degree_>
template <int DerivativeOrder>
typename SplineTraits< Spline<Scalar_, Dim_, _Degree>, DerivativeOrder >::BasisDerivativeType
Spline<Scalar_, Dim_, _Degree>::basisFunctionDerivatives(Scalar u, DenseIndex order) const
typename SplineTraits< Spline<Scalar_, Dim_, Degree_>, DerivativeOrder >::BasisDerivativeType
Spline<Scalar_, Dim_, Degree_>::basisFunctionDerivatives(Scalar u, DenseIndex order) const
{
typename SplineTraits< Spline<Scalar_, Dim_, _Degree>, DerivativeOrder >::BasisDerivativeType der;
typename SplineTraits< Spline<Scalar_, Dim_, Degree_>, DerivativeOrder >::BasisDerivativeType der;
BasisFunctionDerivativesImpl(u, order, degree(), knots(), der);
return der;
}
template <typename Scalar_, int Dim_, int _Degree>
typename SplineTraits<Spline<Scalar_, Dim_, _Degree> >::BasisDerivativeType
Spline<Scalar_, Dim_, _Degree>::BasisFunctionDerivatives(
const typename Spline<Scalar_, Dim_, _Degree>::Scalar u,
template <typename Scalar_, int Dim_, int Degree_>
typename SplineTraits<Spline<Scalar_, Dim_, Degree_> >::BasisDerivativeType
Spline<Scalar_, Dim_, Degree_>::BasisFunctionDerivatives(
const typename Spline<Scalar_, Dim_, Degree_>::Scalar u,
const DenseIndex order,
const DenseIndex degree,
const typename Spline<Scalar_, Dim_, _Degree>::KnotVectorType& knots)
const typename Spline<Scalar_, Dim_, Degree_>::KnotVectorType& knots)
{
typename SplineTraits<Spline>::BasisDerivativeType der;
BasisFunctionDerivativesImpl(u, order, degree, knots, der);

View File

@ -23,14 +23,14 @@ namespace Eigen
* \ingroup Splines_Module
* \brief Compile-time attributes of the Spline class for Dynamic degree.
**/
template <typename Scalar_, int Dim_, int _Degree>
struct SplineTraits< Spline<Scalar_, Dim_, _Degree>, Dynamic >
template <typename Scalar_, int Dim_, int Degree_>
struct SplineTraits< Spline<Scalar_, Dim_, Degree_>, 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<Scalar_, Dim_, _Degree>, _DerivativeOrder > : public SplineTraits< Spline<Scalar_, Dim_, _Degree> >
template < typename Scalar_, int Dim_, int Degree_, int _DerivativeOrder >
struct SplineTraits< Spline<Scalar_, Dim_, Degree_>, _DerivativeOrder > : public SplineTraits< Spline<Scalar_, Dim_, 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 = _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. */ };

View File

@ -179,29 +179,29 @@ void evalSolverSugarFunction( const POLYNOMIAL& pols, const ROOTS& roots, const
}
template<typename Scalar_, int _Deg>
template<typename Scalar_, int Deg_>
void polynomialsolver(int deg)
{
typedef typename NumTraits<Scalar_>::Real RealScalar;
typedef internal::increment_if_fixed_size<_Deg> Dim;
typedef internal::increment_if_fixed_size<Deg_> Dim;
typedef Matrix<Scalar_,Dim::ret,1> PolynomialType;
typedef Matrix<Scalar_,_Deg,1> EvalRootsType;
typedef Matrix<RealScalar,_Deg,1> RealRootsType;
typedef Matrix<Scalar_,Deg_,1> EvalRootsType;
typedef Matrix<RealScalar,Deg_,1> RealRootsType;
cout << "Standard cases" << endl;
PolynomialType pols = PolynomialType::Random(deg+1);
evalSolver<_Deg,PolynomialType>( pols );
evalSolver<Deg_,PolynomialType>( pols );
cout << "Hard cases" << endl;
Scalar_ multipleRoot = internal::random<Scalar_>();
EvalRootsType allRoots = EvalRootsType::Constant(deg,multipleRoot);
roots_to_monicPolynomial( allRoots, pols );
evalSolver<_Deg,PolynomialType>( pols );
evalSolver<Deg_,PolynomialType>( pols );
cout << "Test sugar" << endl;
RealRootsType realRoots = RealRootsType::Random(deg);
roots_to_monicPolynomial( realRoots, pols );
evalSolverSugarFunction<_Deg>(
evalSolverSugarFunction<Deg_>(
pols,
realRoots.template cast <std::complex<RealScalar> >().eval(),
realRoots );

View File

@ -25,12 +25,12 @@ struct increment_if_fixed_size
}
}
template<typename Scalar_, int _Deg>
template<typename Scalar_, int Deg_>
void realRoots_to_monicPolynomial_test(int deg)
{
typedef internal::increment_if_fixed_size<_Deg> Dim;
typedef internal::increment_if_fixed_size<Deg_> Dim;
typedef Matrix<Scalar_,Dim::ret,1> PolynomialType;
typedef Matrix<Scalar_,_Deg,1> EvalRootsType;
typedef Matrix<Scalar_,Deg_,1> EvalRootsType;
PolynomialType pols(deg+1);
EvalRootsType roots = EvalRootsType::Random(deg);
@ -63,12 +63,12 @@ template<typename Scalar_> void realRoots_to_monicPolynomial_scalar()
template<typename Scalar_, int _Deg>
template<typename Scalar_, int Deg_>
void CauchyBounds(int deg)
{
typedef internal::increment_if_fixed_size<_Deg> Dim;
typedef internal::increment_if_fixed_size<Deg_> Dim;
typedef Matrix<Scalar_,Dim::ret,1> PolynomialType;
typedef Matrix<Scalar_,_Deg,1> EvalRootsType;
typedef Matrix<Scalar_,Deg_,1> EvalRootsType;
PolynomialType pols(deg+1);
EvalRootsType roots = EvalRootsType::Random(deg);