mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-02-17 18:09:55 +08:00
Replace Eigen type metaprogramming with corresponding std types and make use of alias templates
This commit is contained in:
parent
514f90c9ff
commit
421cbf0866
@ -242,7 +242,7 @@ static Index llt_rank_update_lower(MatrixType& mat, const VectorType& vec, const
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef typename MatrixType::ColXpr ColXpr;
|
||||
typedef typename internal::remove_all<ColXpr>::type ColXprCleaned;
|
||||
typedef internal::remove_all_t<ColXpr> ColXprCleaned;
|
||||
typedef typename ColXprCleaned::SegmentReturnType ColXprSegment;
|
||||
typedef Matrix<Scalar,Dynamic,1> TempVectorType;
|
||||
typedef typename TempVectorType::SegmentReturnType TempVecSegment;
|
||||
|
@ -200,7 +200,7 @@ namespace internal {
|
||||
// Convert a symbolic span into a usable one (i.e., remove last/end "keywords")
|
||||
template<typename T>
|
||||
struct make_size_type {
|
||||
typedef typename internal::conditional<symbolic::is_symbolic<T>::value, Index, T>::type type;
|
||||
typedef std::conditional_t<symbolic::is_symbolic<T>::value, Index, T> type;
|
||||
};
|
||||
|
||||
template<typename FirstType,typename SizeType,typename IncrType,int XprSize>
|
||||
|
@ -274,8 +274,8 @@ class Array
|
||||
template<typename OtherDerived>
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE Array(const EigenBase<OtherDerived> &other,
|
||||
typename internal::enable_if<internal::is_convertible<typename OtherDerived::Scalar,Scalar>::value,
|
||||
PrivateType>::type = PrivateType())
|
||||
std::enable_if_t<internal::is_convertible<typename OtherDerived::Scalar,Scalar>::value,
|
||||
PrivateType> = PrivateType())
|
||||
: Base(other.derived())
|
||||
{ }
|
||||
|
||||
|
@ -28,12 +28,12 @@ namespace Eigen {
|
||||
namespace internal {
|
||||
template<typename ExpressionType>
|
||||
struct traits<ArrayWrapper<ExpressionType> >
|
||||
: public traits<typename remove_all<typename ExpressionType::Nested>::type >
|
||||
: public traits<remove_all_t<typename ExpressionType::Nested> >
|
||||
{
|
||||
typedef ArrayXpr XprKind;
|
||||
// Let's remove NestByRefBit
|
||||
enum {
|
||||
Flags0 = traits<typename remove_all<typename ExpressionType::Nested>::type >::Flags,
|
||||
Flags0 = traits<remove_all_t<typename ExpressionType::Nested> >::Flags,
|
||||
LvalueBitFlag = is_lvalue<ExpressionType>::value ? LvalueBit : 0,
|
||||
Flags = (Flags0 & ~(NestByRefBit | LvalueBit)) | LvalueBitFlag
|
||||
};
|
||||
@ -47,13 +47,13 @@ class ArrayWrapper : public ArrayBase<ArrayWrapper<ExpressionType> >
|
||||
typedef ArrayBase<ArrayWrapper> Base;
|
||||
EIGEN_DENSE_PUBLIC_INTERFACE(ArrayWrapper)
|
||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(ArrayWrapper)
|
||||
typedef typename internal::remove_all<ExpressionType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<ExpressionType> NestedExpression;
|
||||
|
||||
typedef typename internal::conditional<
|
||||
typedef std::conditional_t<
|
||||
internal::is_lvalue<ExpressionType>::value,
|
||||
Scalar,
|
||||
const Scalar
|
||||
>::type ScalarWithConstIfNotLvalue;
|
||||
> ScalarWithConstIfNotLvalue;
|
||||
|
||||
typedef typename internal::ref_selector<ExpressionType>::non_const_type NestedExpressionType;
|
||||
|
||||
@ -93,7 +93,7 @@ class ArrayWrapper : public ArrayBase<ArrayWrapper<ExpressionType> >
|
||||
inline void evalTo(Dest& dst) const { dst = m_expression; }
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
const typename internal::remove_all<NestedExpressionType>::type&
|
||||
const internal::remove_all_t<NestedExpressionType>&
|
||||
nestedExpression() const
|
||||
{
|
||||
return m_expression;
|
||||
@ -126,12 +126,12 @@ class ArrayWrapper : public ArrayBase<ArrayWrapper<ExpressionType> >
|
||||
namespace internal {
|
||||
template<typename ExpressionType>
|
||||
struct traits<MatrixWrapper<ExpressionType> >
|
||||
: public traits<typename remove_all<typename ExpressionType::Nested>::type >
|
||||
: public traits<remove_all_t<typename ExpressionType::Nested> >
|
||||
{
|
||||
typedef MatrixXpr XprKind;
|
||||
// Let's remove NestByRefBit
|
||||
enum {
|
||||
Flags0 = traits<typename remove_all<typename ExpressionType::Nested>::type >::Flags,
|
||||
Flags0 = traits<remove_all_t<typename ExpressionType::Nested> >::Flags,
|
||||
LvalueBitFlag = is_lvalue<ExpressionType>::value ? LvalueBit : 0,
|
||||
Flags = (Flags0 & ~(NestByRefBit | LvalueBit)) | LvalueBitFlag
|
||||
};
|
||||
@ -145,13 +145,13 @@ class MatrixWrapper : public MatrixBase<MatrixWrapper<ExpressionType> >
|
||||
typedef MatrixBase<MatrixWrapper<ExpressionType> > Base;
|
||||
EIGEN_DENSE_PUBLIC_INTERFACE(MatrixWrapper)
|
||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(MatrixWrapper)
|
||||
typedef typename internal::remove_all<ExpressionType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<ExpressionType> NestedExpression;
|
||||
|
||||
typedef typename internal::conditional<
|
||||
internal::is_lvalue<ExpressionType>::value,
|
||||
Scalar,
|
||||
const Scalar
|
||||
>::type ScalarWithConstIfNotLvalue;
|
||||
typedef std::conditional_t<
|
||||
internal::is_lvalue<ExpressionType>::value,
|
||||
Scalar,
|
||||
const Scalar
|
||||
> ScalarWithConstIfNotLvalue;
|
||||
|
||||
typedef typename internal::ref_selector<ExpressionType>::non_const_type NestedExpressionType;
|
||||
|
||||
@ -187,7 +187,7 @@ class MatrixWrapper : public MatrixBase<MatrixWrapper<ExpressionType> >
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
const typename internal::remove_all<NestedExpressionType>::type&
|
||||
const internal::remove_all_t<NestedExpressionType>&
|
||||
nestedExpression() const
|
||||
{
|
||||
return m_expression;
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
|| int(Traversal) == SliceVectorizedTraversal
|
||||
};
|
||||
|
||||
typedef typename conditional<int(Traversal)==LinearVectorizedTraversal, LinearPacketType, InnerPacketType>::type PacketType;
|
||||
typedef std::conditional_t<int(Traversal)==LinearVectorizedTraversal, LinearPacketType, InnerPacketType> PacketType;
|
||||
|
||||
private:
|
||||
enum {
|
||||
@ -846,7 +846,7 @@ void call_assignment(const Dst& dst, const Src& src)
|
||||
// Deal with "assume-aliasing"
|
||||
template<typename Dst, typename Src, typename Func>
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
void call_assignment(Dst& dst, const Src& src, const Func& func, typename enable_if< evaluator_assume_aliasing<Src>::value, void*>::type = 0)
|
||||
void call_assignment(Dst& dst, const Src& src, const Func& func, std::enable_if_t< evaluator_assume_aliasing<Src>::value, void*> = 0)
|
||||
{
|
||||
typename plain_matrix_type<Src>::type tmp(src);
|
||||
call_assignment_no_alias(dst, tmp, func);
|
||||
@ -854,7 +854,7 @@ void call_assignment(Dst& dst, const Src& src, const Func& func, typename enable
|
||||
|
||||
template<typename Dst, typename Src, typename Func>
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
void call_assignment(Dst& dst, const Src& src, const Func& func, typename enable_if<!evaluator_assume_aliasing<Src>::value, void*>::type = 0)
|
||||
void call_assignment(Dst& dst, const Src& src, const Func& func, std::enable_if_t<!evaluator_assume_aliasing<Src>::value, void*> = 0)
|
||||
{
|
||||
call_assignment_no_alias(dst, src, func);
|
||||
}
|
||||
@ -879,8 +879,8 @@ void call_assignment_no_alias(Dst& dst, const Src& src, const Func& func)
|
||||
) && int(Dst::SizeAtCompileTime) != 1
|
||||
};
|
||||
|
||||
typedef typename internal::conditional<NeedToTranspose, Transpose<Dst>, Dst>::type ActualDstTypeCleaned;
|
||||
typedef typename internal::conditional<NeedToTranspose, Transpose<Dst>, Dst&>::type ActualDstType;
|
||||
typedef std::conditional_t<NeedToTranspose, Transpose<Dst>, Dst> ActualDstTypeCleaned;
|
||||
typedef std::conditional_t<NeedToTranspose, Transpose<Dst>, Dst&> ActualDstType;
|
||||
ActualDstType actualDst(dst);
|
||||
|
||||
// TODO check whether this is the right place to perform these checks:
|
||||
|
@ -84,7 +84,7 @@ class vml_assign_traits
|
||||
#define EIGEN_MKL_VML_DECLARE_UNARY_CALL(EIGENOP, VMLOP, EIGENTYPE, VMLTYPE, VMLMODE) \
|
||||
template< typename DstXprType, typename SrcXprNested> \
|
||||
struct Assignment<DstXprType, CwiseUnaryOp<scalar_##EIGENOP##_op<EIGENTYPE>, SrcXprNested>, assign_op<EIGENTYPE,EIGENTYPE>, \
|
||||
Dense2Dense, typename enable_if<vml_assign_traits<DstXprType,SrcXprNested>::EnableVml>::type> { \
|
||||
Dense2Dense, std::enable_if_t<vml_assign_traits<DstXprType,SrcXprNested>::EnableVml>> { \
|
||||
typedef CwiseUnaryOp<scalar_##EIGENOP##_op<EIGENTYPE>, SrcXprNested> SrcXprType; \
|
||||
static void run(DstXprType &dst, const SrcXprType &src, const assign_op<EIGENTYPE,EIGENTYPE> &func) { \
|
||||
resize_if_allowed(dst, src, func); \
|
||||
@ -144,7 +144,7 @@ EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(ceil, Ceil, _)
|
||||
template< typename DstXprType, typename SrcXprNested, typename Plain> \
|
||||
struct Assignment<DstXprType, CwiseBinaryOp<scalar_##EIGENOP##_op<EIGENTYPE,EIGENTYPE>, SrcXprNested, \
|
||||
const CwiseNullaryOp<internal::scalar_constant_op<EIGENTYPE>,Plain> >, assign_op<EIGENTYPE,EIGENTYPE>, \
|
||||
Dense2Dense, typename enable_if<vml_assign_traits<DstXprType,SrcXprNested>::EnableVml>::type> { \
|
||||
Dense2Dense, std::enable_if_t<vml_assign_traits<DstXprType,SrcXprNested>::EnableVml>> { \
|
||||
typedef CwiseBinaryOp<scalar_##EIGENOP##_op<EIGENTYPE,EIGENTYPE>, SrcXprNested, \
|
||||
const CwiseNullaryOp<internal::scalar_constant_op<EIGENTYPE>,Plain> > SrcXprType; \
|
||||
static void run(DstXprType &dst, const SrcXprType &src, const assign_op<EIGENTYPE,EIGENTYPE> &func) { \
|
||||
|
@ -102,9 +102,9 @@ class BandMatrixBase : public EigenBase<Derived>
|
||||
: min_size_prefer_dynamic(RowsAtCompileTime, ColsAtCompileTime - ActualIndex))
|
||||
};
|
||||
typedef Block<CoefficientsType,1, DiagonalSize> BuildType;
|
||||
typedef typename internal::conditional<Conjugate,
|
||||
typedef std::conditional_t<Conjugate,
|
||||
CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>,BuildType >,
|
||||
BuildType>::type Type;
|
||||
BuildType> Type;
|
||||
};
|
||||
|
||||
/** \returns a vector expression of the \a N -th sub or super diagonal */
|
||||
|
@ -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 std::remove_reference_t<XprTypeNested> XprTypeNested_;
|
||||
enum{
|
||||
MatrixRows = traits<XprType>::RowsAtCompileTime,
|
||||
MatrixCols = traits<XprType>::ColsAtCompileTime,
|
||||
@ -112,7 +112,7 @@ template<typename XprType, int BlockRows, int BlockCols, bool InnerPanel> class
|
||||
EIGEN_GENERIC_PUBLIC_INTERFACE(Block)
|
||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block)
|
||||
|
||||
typedef typename internal::remove_all<XprType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<XprType> NestedExpression;
|
||||
|
||||
/** Column or Row constructor
|
||||
*/
|
||||
@ -297,7 +297,7 @@ template<typename XprType, int BlockRows, int BlockCols, bool InnerPanel, bool H
|
||||
#endif
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
const typename internal::remove_all<XprTypeNested>::type& nestedExpression() const
|
||||
const internal::remove_all_t<XprTypeNested>& nestedExpression() const
|
||||
{
|
||||
return m_xpr;
|
||||
}
|
||||
@ -380,7 +380,7 @@ class BlockImpl_dense<XprType,BlockRows,BlockCols, InnerPanel,true>
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
const typename internal::remove_all<XprTypeNested>::type& nestedExpression() const EIGEN_NOEXCEPT
|
||||
const internal::remove_all_t<XprTypeNested>& nestedExpression() const EIGEN_NOEXCEPT
|
||||
{
|
||||
return m_xpr;
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ struct evaluator<CwiseNullaryOp<NullaryOp,PlainObjectType> >
|
||||
: evaluator_base<CwiseNullaryOp<NullaryOp,PlainObjectType> >
|
||||
{
|
||||
typedef CwiseNullaryOp<NullaryOp,PlainObjectType> XprType;
|
||||
typedef typename internal::remove_all<PlainObjectType>::type PlainObjectTypeCleaned;
|
||||
typedef internal::remove_all_t<PlainObjectType> PlainObjectTypeCleaned;
|
||||
|
||||
enum {
|
||||
CoeffReadCost = internal::functor_traits<NullaryOp>::Cost,
|
||||
@ -1298,7 +1298,7 @@ struct unary_evaluator<Replicate<ArgType, RowFactor, ColFactor> >
|
||||
Factor = (RowFactor==Dynamic || ColFactor==Dynamic) ? Dynamic : RowFactor*ColFactor
|
||||
};
|
||||
typedef typename internal::nested_eval<ArgType,Factor>::type ArgTypeNested;
|
||||
typedef typename internal::remove_all<ArgTypeNested>::type ArgTypeNestedCleaned;
|
||||
typedef internal::remove_all_t<ArgTypeNested> ArgTypeNestedCleaned;
|
||||
|
||||
enum {
|
||||
CoeffReadCost = evaluator<ArgTypeNestedCleaned>::CoeffReadCost,
|
||||
@ -1382,7 +1382,7 @@ template<typename XprType>
|
||||
struct evaluator_wrapper_base
|
||||
: evaluator_base<XprType>
|
||||
{
|
||||
typedef typename remove_all<typename XprType::NestedExpressionType>::type ArgType;
|
||||
typedef remove_all_t<typename XprType::NestedExpressionType> ArgType;
|
||||
enum {
|
||||
CoeffReadCost = evaluator<ArgType>::CoeffReadCost,
|
||||
Flags = evaluator<ArgType>::Flags,
|
||||
|
@ -21,7 +21,7 @@ struct traits<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >
|
||||
{
|
||||
// we must not inherit from traits<Lhs> since it has
|
||||
// the potential to cause problems with MSVC
|
||||
typedef typename remove_all<Lhs>::type Ancestor;
|
||||
typedef remove_all_t<Lhs> Ancestor;
|
||||
typedef typename traits<Ancestor>::XprKind XprKind;
|
||||
enum {
|
||||
RowsAtCompileTime = traits<Ancestor>::RowsAtCompileTime,
|
||||
@ -45,8 +45,8 @@ 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 std::remove_reference_t<LhsNested> LhsNested_;
|
||||
typedef std::remove_reference_t<RhsNested> RhsNested_;
|
||||
enum {
|
||||
Flags = cwise_promote_storage_order<typename traits<Lhs>::StorageKind,typename traits<Rhs>::StorageKind,LhsNested_::Flags & RowMajorBit,RhsNested_::Flags & RowMajorBit>::value
|
||||
};
|
||||
@ -86,9 +86,9 @@ class CwiseBinaryOp :
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename internal::remove_all<BinaryOp>::type Functor;
|
||||
typedef typename internal::remove_all<LhsType>::type Lhs;
|
||||
typedef typename internal::remove_all<RhsType>::type Rhs;
|
||||
typedef internal::remove_all_t<BinaryOp> Functor;
|
||||
typedef internal::remove_all_t<LhsType> Lhs;
|
||||
typedef internal::remove_all_t<RhsType> Rhs;
|
||||
|
||||
typedef typename CwiseBinaryOpImpl<
|
||||
BinaryOp, LhsType, RhsType,
|
||||
@ -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 std::remove_reference_t<LhsNested> LhsNested_;
|
||||
typedef std::remove_reference_t<RhsNested> RhsNested_;
|
||||
|
||||
#if EIGEN_COMP_MSVC
|
||||
//Required for Visual Studio or the Copy constructor will probably not get inlined!
|
||||
@ -121,12 +121,12 @@ class CwiseBinaryOp :
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR
|
||||
Index rows() const EIGEN_NOEXCEPT {
|
||||
// return the fixed size type if available to enable compile time optimizations
|
||||
return internal::traits<typename internal::remove_all<LhsNested>::type>::RowsAtCompileTime==Dynamic ? m_rhs.rows() : m_lhs.rows();
|
||||
return internal::traits<internal::remove_all_t<LhsNested>>::RowsAtCompileTime==Dynamic ? m_rhs.rows() : m_lhs.rows();
|
||||
}
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR
|
||||
Index cols() const EIGEN_NOEXCEPT {
|
||||
// return the fixed size type if available to enable compile time optimizations
|
||||
return internal::traits<typename internal::remove_all<LhsNested>::type>::ColsAtCompileTime==Dynamic ? m_rhs.cols() : m_lhs.cols();
|
||||
return internal::traits<internal::remove_all_t<LhsNested>>::ColsAtCompileTime==Dynamic ? m_rhs.cols() : m_lhs.cols();
|
||||
}
|
||||
|
||||
/** \returns the left hand side nested expression */
|
||||
|
@ -21,7 +21,7 @@ template <typename TernaryOp, typename Arg1, typename Arg2, typename Arg3>
|
||||
struct traits<CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> > {
|
||||
// we must not inherit from traits<Arg1> since it has
|
||||
// the potential to cause problems with MSVC
|
||||
typedef typename remove_all<Arg1>::type Ancestor;
|
||||
typedef remove_all_t<Arg1> Ancestor;
|
||||
typedef typename traits<Ancestor>::XprKind XprKind;
|
||||
enum {
|
||||
RowsAtCompileTime = traits<Ancestor>::RowsAtCompileTime,
|
||||
@ -43,9 +43,9 @@ 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_;
|
||||
typedef std::remove_reference_t<Arg1Nested> Arg1Nested_;
|
||||
typedef std::remove_reference_t<Arg2Nested> Arg2Nested_;
|
||||
typedef std::remove_reference_t<Arg3Nested> Arg3Nested_;
|
||||
enum { Flags = Arg1Nested_::Flags & RowMajorBit };
|
||||
};
|
||||
} // end namespace internal
|
||||
@ -89,9 +89,9 @@ class CwiseTernaryOp : public CwiseTernaryOpImpl<
|
||||
internal::no_assignment_operator
|
||||
{
|
||||
public:
|
||||
typedef typename internal::remove_all<Arg1Type>::type Arg1;
|
||||
typedef typename internal::remove_all<Arg2Type>::type Arg2;
|
||||
typedef typename internal::remove_all<Arg3Type>::type Arg3;
|
||||
typedef internal::remove_all_t<Arg1Type> Arg1;
|
||||
typedef internal::remove_all_t<Arg2Type> Arg2;
|
||||
typedef internal::remove_all_t<Arg3Type> Arg3;
|
||||
|
||||
// require the sizes to match
|
||||
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Arg1, Arg2)
|
||||
@ -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 std::remove_reference_t<Arg1Nested> Arg1Nested_;
|
||||
typedef std::remove_reference_t<Arg2Nested> Arg2Nested_;
|
||||
typedef std::remove_reference_t<Arg3Nested> Arg3Nested_;
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE CwiseTernaryOp(const Arg1& a1, const Arg2& a2,
|
||||
@ -132,14 +132,14 @@ class CwiseTernaryOp : public CwiseTernaryOpImpl<
|
||||
EIGEN_STRONG_INLINE Index rows() const {
|
||||
// return the fixed size type if available to enable compile time
|
||||
// optimizations
|
||||
if (internal::traits<typename internal::remove_all<Arg1Nested>::type>::
|
||||
if (internal::traits<internal::remove_all_t<Arg1Nested>>::
|
||||
RowsAtCompileTime == Dynamic &&
|
||||
internal::traits<typename internal::remove_all<Arg2Nested>::type>::
|
||||
internal::traits<internal::remove_all_t<Arg2Nested>>::
|
||||
RowsAtCompileTime == Dynamic)
|
||||
return m_arg3.rows();
|
||||
else if (internal::traits<typename internal::remove_all<Arg1Nested>::type>::
|
||||
else if (internal::traits<internal::remove_all_t<Arg1Nested>>::
|
||||
RowsAtCompileTime == Dynamic &&
|
||||
internal::traits<typename internal::remove_all<Arg3Nested>::type>::
|
||||
internal::traits<internal::remove_all_t<Arg3Nested>>::
|
||||
RowsAtCompileTime == Dynamic)
|
||||
return m_arg2.rows();
|
||||
else
|
||||
@ -149,14 +149,14 @@ class CwiseTernaryOp : public CwiseTernaryOpImpl<
|
||||
EIGEN_STRONG_INLINE Index cols() const {
|
||||
// return the fixed size type if available to enable compile time
|
||||
// optimizations
|
||||
if (internal::traits<typename internal::remove_all<Arg1Nested>::type>::
|
||||
if (internal::traits<internal::remove_all_t<Arg1Nested>>::
|
||||
ColsAtCompileTime == Dynamic &&
|
||||
internal::traits<typename internal::remove_all<Arg2Nested>::type>::
|
||||
internal::traits<internal::remove_all_t<Arg2Nested>>::
|
||||
ColsAtCompileTime == Dynamic)
|
||||
return m_arg3.cols();
|
||||
else if (internal::traits<typename internal::remove_all<Arg1Nested>::type>::
|
||||
else if (internal::traits<internal::remove_all_t<Arg1Nested>>::
|
||||
ColsAtCompileTime == Dynamic &&
|
||||
internal::traits<typename internal::remove_all<Arg3Nested>::type>::
|
||||
internal::traits<internal::remove_all_t<Arg3Nested>>::
|
||||
ColsAtCompileTime == Dynamic)
|
||||
return m_arg2.cols();
|
||||
else
|
||||
|
@ -24,7 +24,7 @@ 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 std::remove_reference_t<XprTypeNested> XprTypeNested_;
|
||||
enum {
|
||||
Flags = XprTypeNested_::Flags & RowMajorBit
|
||||
};
|
||||
@ -61,7 +61,7 @@ class CwiseUnaryOp : public CwiseUnaryOpImpl<UnaryOp, XprType, typename internal
|
||||
typedef typename CwiseUnaryOpImpl<UnaryOp, XprType,typename internal::traits<XprType>::StorageKind>::Base Base;
|
||||
EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseUnaryOp)
|
||||
typedef typename internal::ref_selector<XprType>::type XprTypeNested;
|
||||
typedef typename internal::remove_all<XprType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<XprType> NestedExpression;
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
explicit CwiseUnaryOp(const XprType& xpr, const UnaryOp& func = UnaryOp())
|
||||
@ -78,12 +78,12 @@ class CwiseUnaryOp : public CwiseUnaryOpImpl<UnaryOp, XprType, typename internal
|
||||
|
||||
/** \returns the nested expression */
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
const typename internal::remove_all<XprTypeNested>::type&
|
||||
const internal::remove_all_t<XprTypeNested>&
|
||||
nestedExpression() const { return m_xpr; }
|
||||
|
||||
/** \returns the nested expression */
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
typename internal::remove_all<XprTypeNested>::type&
|
||||
internal::remove_all_t<XprTypeNested>&
|
||||
nestedExpression() { return m_xpr; }
|
||||
|
||||
protected:
|
||||
|
@ -23,7 +23,7 @@ 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 remove_all_t<MatrixTypeNested> MatrixTypeNested_;
|
||||
enum {
|
||||
FlagsLvalueBit = is_lvalue<MatrixType>::value ? LvalueBit : 0,
|
||||
Flags = traits<MatrixTypeNested_>::Flags & (RowMajorBit | FlagsLvalueBit | DirectAccessBit), // FIXME DirectAccessBit should not be handled by expressions
|
||||
@ -69,7 +69,7 @@ class CwiseUnaryView : public CwiseUnaryViewImpl<ViewOp, MatrixType, StrideType,
|
||||
typedef typename CwiseUnaryViewImpl<ViewOp, MatrixType, StrideType, typename internal::traits<MatrixType>::StorageKind>::Base Base;
|
||||
EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseUnaryView)
|
||||
typedef typename internal::ref_selector<MatrixType>::non_const_type MatrixTypeNested;
|
||||
typedef typename internal::remove_all<MatrixType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<MatrixType> NestedExpression;
|
||||
|
||||
explicit EIGEN_DEVICE_FUNC inline CwiseUnaryView(MatrixType& mat, const ViewOp& func = ViewOp())
|
||||
: m_matrix(mat), m_functor(func) {}
|
||||
@ -85,11 +85,11 @@ class CwiseUnaryView : public CwiseUnaryViewImpl<ViewOp, MatrixType, StrideType,
|
||||
EIGEN_DEVICE_FUNC const ViewOp& functor() const { return m_functor; }
|
||||
|
||||
/** \returns the nested expression */
|
||||
EIGEN_DEVICE_FUNC const typename internal::remove_all<MatrixTypeNested>::type&
|
||||
EIGEN_DEVICE_FUNC const internal::remove_all_t<MatrixTypeNested>&
|
||||
nestedExpression() const { return m_matrix; }
|
||||
|
||||
/** \returns the nested expression */
|
||||
EIGEN_DEVICE_FUNC typename internal::remove_reference<MatrixTypeNested>::type&
|
||||
EIGEN_DEVICE_FUNC std::remove_reference_t<MatrixTypeNested>&
|
||||
nestedExpression() { return m_matrix; }
|
||||
|
||||
protected:
|
||||
|
@ -201,8 +201,8 @@ template<typename Derived> class DenseBase
|
||||
* the return type of eval() is a const reference to a matrix, not a matrix! It is however guaranteed
|
||||
* that the return type of eval() is either PlainObject or const PlainObject&.
|
||||
*/
|
||||
typedef typename internal::conditional<internal::is_same<typename internal::traits<Derived>::XprKind,MatrixXpr >::value,
|
||||
PlainMatrix, PlainArray>::type PlainObject;
|
||||
typedef std::conditional_t<internal::is_same<typename internal::traits<Derived>::XprKind,MatrixXpr >::value,
|
||||
PlainMatrix, PlainArray> PlainObject;
|
||||
|
||||
/** \returns the outer size.
|
||||
*
|
||||
@ -314,7 +314,7 @@ template<typename Derived> class DenseBase
|
||||
typedef Transpose<Derived> TransposeReturnType;
|
||||
EIGEN_DEVICE_FUNC
|
||||
TransposeReturnType transpose();
|
||||
typedef typename internal::add_const<Transpose<const Derived> >::type ConstTransposeReturnType;
|
||||
typedef const Transpose<const Derived> ConstTransposeReturnType;
|
||||
EIGEN_DEVICE_FUNC
|
||||
ConstTransposeReturnType transpose() const;
|
||||
EIGEN_DEVICE_FUNC
|
||||
@ -385,7 +385,7 @@ template<typename Derived> class DenseBase
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
Derived& operator/=(const Scalar& other);
|
||||
|
||||
typedef typename internal::add_const_on_value_type<typename internal::eval<Derived>::type>::type EvalReturnType;
|
||||
typedef internal::add_const_on_value_type_t<typename internal::eval<Derived>::type> EvalReturnType;
|
||||
/** \returns the matrix or vector obtained by evaluating this expression.
|
||||
*
|
||||
* Notice that in the case of a plain matrix or vector (not an expression) this function just returns
|
||||
@ -429,9 +429,9 @@ template<typename Derived> class DenseBase
|
||||
EIGEN_DEVICE_FUNC inline const ForceAlignedAccess<Derived> forceAlignedAccess() const;
|
||||
EIGEN_DEVICE_FUNC inline ForceAlignedAccess<Derived> forceAlignedAccess();
|
||||
template<bool Enable> EIGEN_DEVICE_FUNC
|
||||
inline const typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf() const;
|
||||
inline const std::conditional_t<Enable,ForceAlignedAccess<Derived>,Derived&> forceAlignedAccessIf() const;
|
||||
template<bool Enable> EIGEN_DEVICE_FUNC
|
||||
inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf();
|
||||
inline std::conditional_t<Enable,ForceAlignedAccess<Derived>,Derived&> forceAlignedAccessIf();
|
||||
|
||||
EIGEN_DEVICE_FUNC Scalar sum() const;
|
||||
EIGEN_DEVICE_FUNC Scalar mean() const;
|
||||
@ -611,27 +611,21 @@ template<typename Derived> class DenseBase
|
||||
/** This is the const version of iterator (aka read-only) */
|
||||
typedef random_access_iterator_type const_iterator;
|
||||
#else
|
||||
typedef typename internal::conditional< (Flags&DirectAccessBit)==DirectAccessBit,
|
||||
internal::pointer_based_stl_iterator<Derived>,
|
||||
internal::generic_randaccess_stl_iterator<Derived>
|
||||
>::type iterator_type;
|
||||
typedef std::conditional_t< (Flags&DirectAccessBit)==DirectAccessBit,
|
||||
internal::pointer_based_stl_iterator<Derived>,
|
||||
internal::generic_randaccess_stl_iterator<Derived>
|
||||
> iterator_type;
|
||||
|
||||
typedef typename internal::conditional< (Flags&DirectAccessBit)==DirectAccessBit,
|
||||
internal::pointer_based_stl_iterator<const Derived>,
|
||||
internal::generic_randaccess_stl_iterator<const Derived>
|
||||
>::type const_iterator_type;
|
||||
typedef std::conditional_t< (Flags&DirectAccessBit)==DirectAccessBit,
|
||||
internal::pointer_based_stl_iterator<const Derived>,
|
||||
internal::generic_randaccess_stl_iterator<const Derived>
|
||||
> const_iterator_type;
|
||||
|
||||
// Stl-style iterators are supported only for vectors.
|
||||
|
||||
typedef typename internal::conditional< IsVectorAtCompileTime,
|
||||
iterator_type,
|
||||
void
|
||||
>::type iterator;
|
||||
typedef std::conditional_t<IsVectorAtCompileTime, iterator_type, void> iterator;
|
||||
|
||||
typedef typename internal::conditional< IsVectorAtCompileTime,
|
||||
const_iterator_type,
|
||||
void
|
||||
>::type const_iterator;
|
||||
typedef std::conditional_t<IsVectorAtCompileTime, const_iterator_type, void> const_iterator;
|
||||
#endif
|
||||
|
||||
inline iterator begin();
|
||||
|
@ -17,7 +17,7 @@ namespace Eigen {
|
||||
namespace internal {
|
||||
template<typename T> struct add_const_on_value_type_if_arithmetic
|
||||
{
|
||||
typedef typename conditional<is_arithmetic<T>::value, T, typename add_const_on_value_type<T>::type>::type type;
|
||||
typedef std::conditional_t<is_arithmetic<T>::value, T, add_const_on_value_type_t<T>> type;
|
||||
};
|
||||
}
|
||||
|
||||
@ -48,10 +48,10 @@ class DenseCoeffsBase<Derived,ReadOnlyAccessors> : public EigenBase<Derived>
|
||||
// - The is_arithmetic check is required since "const int", "const double", etc. will cause warnings on some systems
|
||||
// while the declaration of "const T", where T is a non arithmetic type does not. Always returning "const Scalar&" is
|
||||
// not possible, since the underlying expressions might not offer a valid address the reference could be referring to.
|
||||
typedef typename internal::conditional<bool(internal::traits<Derived>::Flags&LvalueBit),
|
||||
const Scalar&,
|
||||
typename internal::conditional<internal::is_arithmetic<Scalar>::value, Scalar, const Scalar>::type
|
||||
>::type CoeffReturnType;
|
||||
typedef std::conditional_t<bool(internal::traits<Derived>::Flags&LvalueBit),
|
||||
const Scalar&,
|
||||
std::conditional_t<internal::is_arithmetic<Scalar>::value, Scalar, const Scalar>
|
||||
> CoeffReturnType;
|
||||
|
||||
typedef typename internal::add_const_on_value_type_if_arithmetic<
|
||||
typename internal::packet_traits<Scalar>::type
|
||||
|
@ -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 std::remove_reference_t<MatrixTypeNested> MatrixTypeNested_;
|
||||
typedef typename MatrixType::StorageKind StorageKind;
|
||||
enum {
|
||||
RowsAtCompileTime = (int(DiagIndex) == DynamicIndex || int(MatrixType::SizeAtCompileTime) == Dynamic) ? Dynamic
|
||||
@ -97,11 +97,11 @@ template<typename MatrixType, int DiagIndex_> class Diagonal
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
||||
inline Index outerStride() const EIGEN_NOEXCEPT { return 0; }
|
||||
|
||||
typedef typename internal::conditional<
|
||||
internal::is_lvalue<MatrixType>::value,
|
||||
Scalar,
|
||||
const Scalar
|
||||
>::type ScalarWithConstIfNotLvalue;
|
||||
typedef std::conditional_t<
|
||||
internal::is_lvalue<MatrixType>::value,
|
||||
Scalar,
|
||||
const Scalar
|
||||
> ScalarWithConstIfNotLvalue;
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline ScalarWithConstIfNotLvalue* data() { return &(m_matrix.coeffRef(rowOffset(), colOffset())); }
|
||||
@ -147,7 +147,7 @@ template<typename MatrixType, int DiagIndex_> class Diagonal
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const typename internal::remove_all<typename MatrixType::Nested>::type&
|
||||
inline const internal::remove_all_t<typename MatrixType::Nested>&
|
||||
nestedExpression() const
|
||||
{
|
||||
return m_matrix;
|
||||
|
@ -130,7 +130,7 @@ MatrixBase<Derived>::forceAlignedAccess()
|
||||
*/
|
||||
template<typename Derived>
|
||||
template<bool Enable>
|
||||
inline typename internal::add_const_on_value_type<typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type>::type
|
||||
inline add_const_on_value_type_t<std::conditional_t<Enable,ForceAlignedAccess<Derived>,Derived&>>
|
||||
MatrixBase<Derived>::forceAlignedAccessIf() const
|
||||
{
|
||||
return derived(); // FIXME This should not work but apparently is never used
|
||||
@ -141,7 +141,7 @@ MatrixBase<Derived>::forceAlignedAccessIf() const
|
||||
*/
|
||||
template<typename Derived>
|
||||
template<bool Enable>
|
||||
inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type
|
||||
inline std::conditional_t<Enable,ForceAlignedAccess<Derived>,Derived&>
|
||||
MatrixBase<Derived>::forceAlignedAccessIf()
|
||||
{
|
||||
return derived(); // FIXME This should not work but apparently is never used
|
||||
|
@ -52,8 +52,8 @@ 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 remove_all_t<Lhs> Lhs_;
|
||||
typedef remove_all_t<Rhs> Rhs_;
|
||||
enum {
|
||||
MaxRows = traits<Lhs_>::MaxRowsAtCompileTime,
|
||||
Rows = traits<Lhs_>::RowsAtCompileTime,
|
||||
@ -233,7 +233,7 @@ template<> struct gemv_dense_selector<OnTheRight,ColMajor,true>
|
||||
ResScalar actualAlpha = combine_scalar_factors(alpha, lhs, rhs);
|
||||
|
||||
// make sure Dest is a compile-time vector type (bug 1166)
|
||||
typedef typename conditional<Dest::IsVectorAtCompileTime, Dest, typename Dest::ColXpr>::type ActualDest;
|
||||
typedef std::conditional_t<Dest::IsVectorAtCompileTime, Dest, typename Dest::ColXpr> ActualDest;
|
||||
|
||||
enum {
|
||||
// FIXME find a way to allow an inner stride on the result if packet_traits<Scalar>::size==1
|
||||
@ -316,10 +316,10 @@ template<> struct gemv_dense_selector<OnTheRight,RowMajor,true>
|
||||
typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;
|
||||
typedef internal::blas_traits<Rhs> RhsBlasTraits;
|
||||
typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;
|
||||
typedef typename internal::remove_all<ActualRhsType>::type ActualRhsTypeCleaned;
|
||||
typedef internal::remove_all_t<ActualRhsType> ActualRhsTypeCleaned;
|
||||
|
||||
typename add_const<ActualLhsType>::type actualLhs = LhsBlasTraits::extract(lhs);
|
||||
typename add_const<ActualRhsType>::type actualRhs = RhsBlasTraits::extract(rhs);
|
||||
std::add_const_t<ActualLhsType> actualLhs = LhsBlasTraits::extract(lhs);
|
||||
std::add_const_t<ActualRhsType> actualRhs = RhsBlasTraits::extract(rhs);
|
||||
|
||||
ResScalar actualAlpha = combine_scalar_factors(alpha, lhs, rhs);
|
||||
|
||||
|
@ -262,7 +262,7 @@ struct ptrue_impl {
|
||||
// have another option, since the scalar type requires initialization.
|
||||
template<typename T>
|
||||
struct ptrue_impl<T,
|
||||
typename internal::enable_if<is_scalar<T>::value && NumTraits<T>::RequireInitialization>::type > {
|
||||
std::enable_if_t<is_scalar<T>::value && NumTraits<T>::RequireInitialization> > {
|
||||
static EIGEN_DEVICE_FUNC inline T run(const T& /*a*/){
|
||||
return T(1);
|
||||
}
|
||||
@ -288,7 +288,7 @@ struct pzero_impl {
|
||||
// for zero may not consist of all-zero bits.
|
||||
template<typename T>
|
||||
struct pzero_impl<T,
|
||||
typename internal::enable_if<is_scalar<T>::value>::type> {
|
||||
std::enable_if_t<is_scalar<T>::value>> {
|
||||
static EIGEN_DEVICE_FUNC inline T run(const T& /*a*/) {
|
||||
return T(0);
|
||||
}
|
||||
@ -401,8 +401,8 @@ struct bitwise_helper : public bytewise_bitwise_helper<T> {};
|
||||
// For integers or non-trivial scalars, use binary operators.
|
||||
template<typename T>
|
||||
struct bitwise_helper<T,
|
||||
typename internal::enable_if<
|
||||
is_scalar<T>::value && (NumTraits<T>::IsInteger || NumTraits<T>::RequireInitialization)>::type
|
||||
typename std::enable_if_t<
|
||||
is_scalar<T>::value && (NumTraits<T>::IsInteger || NumTraits<T>::RequireInitialization)>
|
||||
> : public operator_bitwise_helper<T> {};
|
||||
|
||||
/** \internal \returns the bitwise and of \a a and \a b */
|
||||
@ -444,7 +444,7 @@ struct pselect_impl {
|
||||
// For scalars, use ternary select.
|
||||
template<typename Packet>
|
||||
struct pselect_impl<Packet,
|
||||
typename internal::enable_if<is_scalar<Packet>::value>::type > {
|
||||
std::enable_if_t<is_scalar<Packet>::value> > {
|
||||
static EIGEN_DEVICE_FUNC inline Packet run(const Packet& mask, const Packet& a, const Packet& b) {
|
||||
return numext::equal_strict(mask, Packet(0)) ? b : a;
|
||||
}
|
||||
@ -610,7 +610,7 @@ ploadu(const typename unpacket_traits<Packet>::type* from) { return *from; }
|
||||
* cases. Generic case should not be called.
|
||||
*/
|
||||
template<typename Packet> EIGEN_DEVICE_FUNC inline
|
||||
typename enable_if<unpacket_traits<Packet>::masked_load_available, Packet>::type
|
||||
std::enable_if_t<unpacket_traits<Packet>::masked_load_available, Packet>
|
||||
ploadu(const typename unpacket_traits<Packet>::type* from, typename unpacket_traits<Packet>::mask_t umask);
|
||||
|
||||
/** \internal \returns a packet with constant coefficients \a a, e.g.: (a,a,a,a) */
|
||||
@ -709,7 +709,7 @@ template<typename Scalar, typename Packet> EIGEN_DEVICE_FUNC inline void pstoreu
|
||||
*/
|
||||
template<typename Scalar, typename Packet>
|
||||
EIGEN_DEVICE_FUNC inline
|
||||
typename enable_if<unpacket_traits<Packet>::masked_store_available, void>::type
|
||||
std::enable_if_t<unpacket_traits<Packet>::masked_store_available, void>
|
||||
pstoreu(Scalar* to, const Packet& from, typename unpacket_traits<Packet>::mask_t umask);
|
||||
|
||||
template<typename Scalar, typename Packet> EIGEN_DEVICE_FUNC inline Packet pgather(const Scalar* from, Index /*stride*/)
|
||||
@ -845,7 +845,7 @@ pfirst(const Packet& a)
|
||||
* For packet-size smaller or equal to 4, this boils down to a noop.
|
||||
*/
|
||||
template<typename Packet>
|
||||
EIGEN_DEVICE_FUNC inline typename conditional<(unpacket_traits<Packet>::size%8)==0,typename unpacket_traits<Packet>::half,Packet>::type
|
||||
EIGEN_DEVICE_FUNC inline std::conditional_t<(unpacket_traits<Packet>::size%8)==0,typename unpacket_traits<Packet>::half,Packet>
|
||||
predux_half_dowto4(const Packet& a)
|
||||
{ return a; }
|
||||
|
||||
|
@ -133,7 +133,6 @@ template<typename Derived>
|
||||
std::ostream & print_matrix(std::ostream & s, const Derived& _m, const IOFormat& fmt)
|
||||
{
|
||||
using internal::is_same;
|
||||
using internal::conditional;
|
||||
|
||||
if(_m.size() == 0)
|
||||
{
|
||||
@ -143,22 +142,21 @@ std::ostream & print_matrix(std::ostream & s, const Derived& _m, const IOFormat&
|
||||
|
||||
typename Derived::Nested m = _m;
|
||||
typedef typename Derived::Scalar Scalar;
|
||||
typedef typename
|
||||
conditional<
|
||||
typedef std::conditional_t<
|
||||
is_same<Scalar, char>::value ||
|
||||
is_same<Scalar, unsigned char>::value ||
|
||||
is_same<Scalar, numext::int8_t>::value ||
|
||||
is_same<Scalar, numext::uint8_t>::value,
|
||||
int,
|
||||
typename conditional<
|
||||
std::conditional_t<
|
||||
is_same<Scalar, std::complex<char> >::value ||
|
||||
is_same<Scalar, std::complex<unsigned char> >::value ||
|
||||
is_same<Scalar, std::complex<numext::int8_t> >::value ||
|
||||
is_same<Scalar, std::complex<numext::uint8_t> >::value,
|
||||
std::complex<int>,
|
||||
const Scalar&
|
||||
>::type
|
||||
>::type PrintType;
|
||||
>
|
||||
> PrintType;
|
||||
|
||||
Index width = 0;
|
||||
|
||||
|
@ -42,7 +42,7 @@ struct traits<IndexedView<XprType, RowIndices, ColIndices> >
|
||||
|
||||
InnerSize = XprTypeIsRowMajor ? ColsAtCompileTime : RowsAtCompileTime,
|
||||
IsBlockAlike = InnerIncr==1 && OuterIncr==1,
|
||||
IsInnerPannel = HasSameStorageOrderAsXprType && is_same<AllRange<InnerSize>,typename conditional<XprTypeIsRowMajor,ColIndices,RowIndices>::type>::value,
|
||||
IsInnerPannel = HasSameStorageOrderAsXprType && is_same<AllRange<InnerSize>,std::conditional_t<XprTypeIsRowMajor,ColIndices,RowIndices>>::value,
|
||||
|
||||
InnerStrideAtCompileTime = InnerIncr<0 || InnerIncr==DynamicIndex || XprInnerStride==Dynamic || InnerIncr==UndefinedIncr ? Dynamic : XprInnerStride * InnerIncr,
|
||||
OuterStrideAtCompileTime = OuterIncr<0 || OuterIncr==DynamicIndex || XprOuterstride==Dynamic || OuterIncr==UndefinedIncr ? Dynamic : XprOuterstride * OuterIncr,
|
||||
@ -116,7 +116,7 @@ public:
|
||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(IndexedView)
|
||||
|
||||
typedef typename internal::ref_selector<XprType>::non_const_type MatrixTypeNested;
|
||||
typedef typename internal::remove_all<XprType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<XprType> NestedExpression;
|
||||
|
||||
template<typename T0, typename T1>
|
||||
IndexedView(XprType& xpr, const T0& rowIndices, const T1& colIndices)
|
||||
@ -130,11 +130,11 @@ public:
|
||||
Index cols() const { return internal::index_list_size(m_colIndices); }
|
||||
|
||||
/** \returns the nested expression */
|
||||
const typename internal::remove_all<XprType>::type&
|
||||
const internal::remove_all_t<XprType>&
|
||||
nestedExpression() const { return m_xpr; }
|
||||
|
||||
/** \returns the nested expression */
|
||||
typename internal::remove_reference<XprType>::type&
|
||||
std::remove_reference_t<XprType>&
|
||||
nestedExpression() { return m_xpr; }
|
||||
|
||||
/** \returns a const reference to the object storing/generating the row indices */
|
||||
|
@ -48,9 +48,9 @@ public:
|
||||
typedef typename XprType::StorageIndex StorageIndex;
|
||||
typedef typename XprType::Scalar Scalar;
|
||||
typedef typename internal::ref_selector<XprType>::type XprTypeNested;
|
||||
typedef typename internal::remove_all<XprTypeNested>::type XprTypeNestedCleaned;
|
||||
typedef internal::remove_all_t<XprTypeNested> XprTypeNestedCleaned;
|
||||
typedef typename internal::ref_selector<Inverse>::type Nested;
|
||||
typedef typename internal::remove_all<XprType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<XprType> NestedExpression;
|
||||
|
||||
explicit EIGEN_DEVICE_FUNC Inverse(const XprType &xpr)
|
||||
: m_xpr(xpr)
|
||||
|
@ -53,11 +53,11 @@ template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
|
||||
typedef typename internal::traits<Derived>::Scalar Scalar;
|
||||
typedef typename internal::packet_traits<Scalar>::type PacketScalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef typename internal::conditional<
|
||||
bool(internal::is_lvalue<Derived>::value),
|
||||
Scalar *,
|
||||
const Scalar *>::type
|
||||
PointerType;
|
||||
typedef std::conditional_t<
|
||||
bool(internal::is_lvalue<Derived>::value),
|
||||
Scalar *,
|
||||
const Scalar *>
|
||||
PointerType;
|
||||
|
||||
using Base::derived;
|
||||
// using Base::RowsAtCompileTime;
|
||||
@ -191,7 +191,7 @@ template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
void checkSanity(typename internal::enable_if<(internal::traits<T>::Alignment>0),void*>::type = 0) const
|
||||
void checkSanity(std::enable_if_t<(internal::traits<T>::Alignment>0),void*> = 0) const
|
||||
{
|
||||
#if EIGEN_MAX_ALIGN_BYTES>0
|
||||
// innerStride() is not set yet when this function is called, so we optimistically assume the lowest plausible value:
|
||||
@ -204,7 +204,7 @@ template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
void checkSanity(typename internal::enable_if<internal::traits<T>::Alignment==0,void*>::type = 0) const
|
||||
void checkSanity(std::enable_if_t<internal::traits<T>::Alignment==0,void*> = 0) const
|
||||
{}
|
||||
|
||||
PointerType m_data;
|
||||
@ -247,11 +247,11 @@ template<typename Derived> class MapBase<Derived, WriteAccessors>
|
||||
using Base::rowStride;
|
||||
using Base::colStride;
|
||||
|
||||
typedef typename internal::conditional<
|
||||
typedef std::conditional_t<
|
||||
internal::is_lvalue<Derived>::value,
|
||||
Scalar,
|
||||
const Scalar
|
||||
>::type ScalarWithConstIfNotLvalue;
|
||||
> ScalarWithConstIfNotLvalue;
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const Scalar* data() const { return this->m_data; }
|
||||
|
@ -434,9 +434,9 @@ struct cast_impl
|
||||
// generating warnings on clang. Here we explicitly cast the real component.
|
||||
template<typename OldType, typename NewType>
|
||||
struct cast_impl<OldType, NewType,
|
||||
typename internal::enable_if<
|
||||
typename std::enable_if_t<
|
||||
!NumTraits<OldType>::IsComplex && NumTraits<NewType>::IsComplex
|
||||
>::type>
|
||||
>>
|
||||
{
|
||||
EIGEN_DEVICE_FUNC
|
||||
static inline NewType run(const OldType& x)
|
||||
@ -891,7 +891,7 @@ struct random_default_impl<Scalar, false, true>
|
||||
// ScalarX is the widest of ScalarU and unsigned int.
|
||||
// We'll deal only with ScalarX and unsigned int below thus avoiding signed
|
||||
// types and arithmetic and signed overflows (which are undefined behavior).
|
||||
typedef typename conditional<(ScalarU(-1) > unsigned(-1)), ScalarU, unsigned>::type ScalarX;
|
||||
typedef std::conditional_t<(ScalarU(-1) > unsigned(-1)), ScalarU, unsigned> ScalarX;
|
||||
// The following difference doesn't overflow, provided our integer types are two's
|
||||
// complement and have the same number of padding bits in signed and unsigned variants.
|
||||
// This is the case in most modern implementations of C++.
|
||||
@ -962,22 +962,22 @@ inline EIGEN_MATHFUNC_RETVAL(random, Scalar) random()
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
typename internal::enable_if<internal::is_integral<T>::value,bool>::type
|
||||
std::enable_if_t<internal::is_integral<T>::value,bool>
|
||||
isnan_impl(const T&) { return false; }
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
typename internal::enable_if<internal::is_integral<T>::value,bool>::type
|
||||
std::enable_if_t<internal::is_integral<T>::value,bool>
|
||||
isinf_impl(const T&) { return false; }
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
typename internal::enable_if<internal::is_integral<T>::value,bool>::type
|
||||
std::enable_if_t<internal::is_integral<T>::value,bool>
|
||||
isfinite_impl(const T&) { return true; }
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
typename internal::enable_if<(!internal::is_integral<T>::value)&&(!NumTraits<T>::IsComplex),bool>::type
|
||||
std::enable_if_t<(!internal::is_integral<T>::value)&&(!NumTraits<T>::IsComplex),bool>
|
||||
isfinite_impl(const T& x)
|
||||
{
|
||||
#if defined(EIGEN_GPU_COMPILE_PHASE)
|
||||
@ -992,7 +992,7 @@ isfinite_impl(const T& x)
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
typename internal::enable_if<(!internal::is_integral<T>::value)&&(!NumTraits<T>::IsComplex),bool>::type
|
||||
std::enable_if_t<(!internal::is_integral<T>::value)&&(!NumTraits<T>::IsComplex),bool>
|
||||
isinf_impl(const T& x)
|
||||
{
|
||||
#if defined(EIGEN_GPU_COMPILE_PHASE)
|
||||
@ -1007,7 +1007,7 @@ isinf_impl(const T& x)
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
typename internal::enable_if<(!internal::is_integral<T>::value)&&(!NumTraits<T>::IsComplex),bool>::type
|
||||
std::enable_if_t<(!internal::is_integral<T>::value)&&(!NumTraits<T>::IsComplex),bool>
|
||||
isnan_impl(const T& x)
|
||||
{
|
||||
#if defined(EIGEN_GPU_COMPILE_PHASE)
|
||||
@ -1232,7 +1232,7 @@ inline EIGEN_MATHFUNC_RETVAL(real, Scalar) real(const Scalar& x)
|
||||
|
||||
template<typename Scalar>
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline typename internal::add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type real_ref(const Scalar& x)
|
||||
inline internal::add_const_on_value_type_t< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) > real_ref(const Scalar& x)
|
||||
{
|
||||
return internal::real_ref_impl<Scalar>::run(x);
|
||||
}
|
||||
@ -1260,7 +1260,7 @@ inline EIGEN_MATHFUNC_RETVAL(arg, Scalar) arg(const Scalar& x)
|
||||
|
||||
template<typename Scalar>
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline typename internal::add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar) >::type imag_ref(const Scalar& x)
|
||||
inline internal::add_const_on_value_type_t< EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar) > imag_ref(const Scalar& x)
|
||||
{
|
||||
return internal::imag_ref_impl<Scalar>::run(x);
|
||||
}
|
||||
@ -1503,7 +1503,7 @@ double log(const double &x) { return ::log(x); }
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
typename internal::enable_if<NumTraits<T>::IsSigned || NumTraits<T>::IsComplex,typename NumTraits<T>::Real>::type
|
||||
std::enable_if_t<NumTraits<T>::IsSigned || NumTraits<T>::IsComplex,typename NumTraits<T>::Real>
|
||||
abs(const T &x) {
|
||||
EIGEN_USING_STD(abs);
|
||||
return abs(x);
|
||||
@ -1511,7 +1511,7 @@ abs(const T &x) {
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||
typename internal::enable_if<!(NumTraits<T>::IsSigned || NumTraits<T>::IsComplex),typename NumTraits<T>::Real>::type
|
||||
std::enable_if_t<!(NumTraits<T>::IsSigned || NumTraits<T>::IsComplex),typename NumTraits<T>::Real>
|
||||
abs(const T &x) {
|
||||
return x;
|
||||
}
|
||||
|
@ -109,10 +109,10 @@ template<typename Derived> class MatrixBase
|
||||
/** \internal Represents a matrix with all coefficients equal to one another*/
|
||||
typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,PlainObject> ConstantReturnType;
|
||||
/** \internal the return type of MatrixBase::adjoint() */
|
||||
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||
CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, ConstTransposeReturnType>,
|
||||
ConstTransposeReturnType
|
||||
>::type AdjointReturnType;
|
||||
typedef std::conditional_t<NumTraits<Scalar>::IsComplex,
|
||||
CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, ConstTransposeReturnType>,
|
||||
ConstTransposeReturnType
|
||||
> AdjointReturnType;
|
||||
/** \internal Return type of eigenvalues() */
|
||||
typedef Matrix<std::complex<RealScalar>, internal::traits<Derived>::ColsAtCompileTime, 1, ColMajor> EigenvaluesReturnType;
|
||||
/** \internal the return type of identity */
|
||||
@ -208,7 +208,7 @@ template<typename Derived> class MatrixBase
|
||||
EIGEN_DEVICE_FUNC
|
||||
DiagonalReturnType diagonal();
|
||||
|
||||
typedef typename internal::add_const<Diagonal<const Derived> >::type ConstDiagonalReturnType;
|
||||
typedef const Diagonal<const Derived> ConstDiagonalReturnType;
|
||||
EIGEN_DEVICE_FUNC
|
||||
ConstDiagonalReturnType diagonal() const;
|
||||
|
||||
@ -224,7 +224,7 @@ template<typename Derived> class MatrixBase
|
||||
typename ConstDiagonalIndexReturnType<Index>::Type diagonal() const;
|
||||
|
||||
typedef Diagonal<Derived,DynamicIndex> DiagonalDynamicIndexReturnType;
|
||||
typedef typename internal::add_const<Diagonal<const Derived,DynamicIndex> >::type ConstDiagonalDynamicIndexReturnType;
|
||||
typedef const Diagonal<const Derived,DynamicIndex> ConstDiagonalDynamicIndexReturnType;
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
DiagonalDynamicIndexReturnType diagonal(Index index);
|
||||
|
@ -164,11 +164,7 @@ template<typename T> struct GenericNumTraits
|
||||
};
|
||||
|
||||
typedef T Real;
|
||||
typedef typename internal::conditional<
|
||||
IsInteger,
|
||||
typename internal::conditional<sizeof(T)<=2, float, double>::type,
|
||||
T
|
||||
>::type NonInteger;
|
||||
typedef std::conditional_t<IsInteger, std::conditional_t<sizeof(T)<=2, float, double>, T> NonInteger;
|
||||
typedef T Nested;
|
||||
typedef T Literal;
|
||||
|
||||
|
@ -141,8 +141,8 @@ struct evaluator<PartialReduxExpr<ArgType, MemberOp, Direction> >
|
||||
{
|
||||
typedef PartialReduxExpr<ArgType, MemberOp, Direction> XprType;
|
||||
typedef typename internal::nested_eval<ArgType,1>::type ArgTypeNested;
|
||||
typedef typename internal::add_const_on_value_type<ArgTypeNested>::type ConstArgTypeNested;
|
||||
typedef typename internal::remove_all<ArgTypeNested>::type ArgTypeNestedCleaned;
|
||||
typedef add_const_on_value_type_t<ArgTypeNested> ConstArgTypeNested;
|
||||
typedef internal::remove_all_t<ArgTypeNested> ArgTypeNestedCleaned;
|
||||
typedef typename ArgType::Scalar InputScalar;
|
||||
typedef typename XprType::Scalar Scalar;
|
||||
enum {
|
||||
|
@ -500,7 +500,7 @@ class PermutationWrapper : public PermutationBase<PermutationWrapper<IndicesType
|
||||
{}
|
||||
|
||||
/** const version of indices(). */
|
||||
const typename internal::remove_all<typename IndicesType::Nested>::type&
|
||||
const internal::remove_all_t<typename IndicesType::Nested>&
|
||||
indices() const { return m_indices; }
|
||||
|
||||
protected:
|
||||
|
@ -798,7 +798,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
|
||||
template<typename T0, typename T1>
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE void _init2(Index rows, Index cols, typename internal::enable_if<Base::SizeAtCompileTime!=2,T0>::type* = 0)
|
||||
EIGEN_STRONG_INLINE void _init2(Index rows, Index cols, std::enable_if_t<Base::SizeAtCompileTime!=2,T0>* = 0)
|
||||
{
|
||||
const bool t0_is_integer_alike = internal::is_valid_index_type<T0>::value;
|
||||
const bool t1_is_integer_alike = internal::is_valid_index_type<T1>::value;
|
||||
@ -810,7 +810,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
|
||||
template<typename T0, typename T1>
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE void _init2(const T0& val0, const T1& val1, typename internal::enable_if<Base::SizeAtCompileTime==2,T0>::type* = 0)
|
||||
EIGEN_STRONG_INLINE void _init2(const T0& val0, const T1& val1, std::enable_if_t<Base::SizeAtCompileTime==2,T0>* = 0)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 2)
|
||||
m_storage.data()[0] = Scalar(val0);
|
||||
@ -820,10 +820,10 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
template<typename T0, typename T1>
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE void _init2(const Index& val0, const Index& val1,
|
||||
typename internal::enable_if< (!internal::is_same<Index,Scalar>::value)
|
||||
&& (internal::is_same<T0,Index>::value)
|
||||
&& (internal::is_same<T1,Index>::value)
|
||||
&& Base::SizeAtCompileTime==2,T1>::type* = 0)
|
||||
std::enable_if_t< (!internal::is_same<Index,Scalar>::value)
|
||||
&& (internal::is_same<T0,Index>::value)
|
||||
&& (internal::is_same<T1,Index>::value)
|
||||
&& Base::SizeAtCompileTime==2,T1>* = 0)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 2)
|
||||
m_storage.data()[0] = Scalar(val0);
|
||||
@ -834,8 +834,8 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
// then the argument is meant to be the size of the object.
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE void _init1(Index size, typename internal::enable_if< (Base::SizeAtCompileTime!=1 || !internal::is_convertible<T, Scalar>::value)
|
||||
&& ((!internal::is_same<typename internal::traits<Derived>::XprKind,ArrayXpr>::value || Base::SizeAtCompileTime==Dynamic)),T>::type* = 0)
|
||||
EIGEN_STRONG_INLINE void _init1(Index size, std::enable_if_t< (Base::SizeAtCompileTime!=1 || !internal::is_convertible<T, Scalar>::value)
|
||||
&& ((!internal::is_same<typename internal::traits<Derived>::XprKind,ArrayXpr>::value || Base::SizeAtCompileTime==Dynamic)),T>* = 0)
|
||||
{
|
||||
// NOTE MSVC 2008 complains if we directly put bool(NumTraits<T>::IsInteger) as the EIGEN_STATIC_ASSERT argument.
|
||||
const bool is_integer_alike = internal::is_valid_index_type<T>::value;
|
||||
@ -848,7 +848,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
// We have a 1x1 matrix/array => the argument is interpreted as the value of the unique coefficient (case where scalar type can be implicitly converted)
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE void _init1(const Scalar& val0, typename internal::enable_if<Base::SizeAtCompileTime==1 && internal::is_convertible<T, Scalar>::value,T>::type* = 0)
|
||||
EIGEN_STRONG_INLINE void _init1(const Scalar& val0, std::enable_if_t<Base::SizeAtCompileTime==1 && internal::is_convertible<T, Scalar>::value,T>* = 0)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1)
|
||||
m_storage.data()[0] = val0;
|
||||
@ -858,10 +858,10 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE void _init1(const Index& val0,
|
||||
typename internal::enable_if< (!internal::is_same<Index,Scalar>::value)
|
||||
&& (internal::is_same<Index,T>::value)
|
||||
&& Base::SizeAtCompileTime==1
|
||||
&& internal::is_convertible<T, Scalar>::value,T*>::type* = 0)
|
||||
std::enable_if_t< (!internal::is_same<Index,Scalar>::value)
|
||||
&& (internal::is_same<Index,T>::value)
|
||||
&& Base::SizeAtCompileTime==1
|
||||
&& internal::is_convertible<T, Scalar>::value,T*>* = 0)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(PlainObjectBase, 1)
|
||||
m_storage.data()[0] = Scalar(val0);
|
||||
@ -914,10 +914,10 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE void _init1(const Scalar& val0,
|
||||
typename internal::enable_if< Base::SizeAtCompileTime!=Dynamic
|
||||
&& Base::SizeAtCompileTime!=1
|
||||
&& internal::is_convertible<T, Scalar>::value
|
||||
&& internal::is_same<typename internal::traits<Derived>::XprKind,ArrayXpr>::value,T>::type* = 0)
|
||||
std::enable_if_t< Base::SizeAtCompileTime!=Dynamic
|
||||
&& Base::SizeAtCompileTime!=1
|
||||
&& internal::is_convertible<T, Scalar>::value
|
||||
&& internal::is_same<typename internal::traits<Derived>::XprKind,ArrayXpr>::value,T>* = 0)
|
||||
{
|
||||
Base::setConstant(val0);
|
||||
}
|
||||
@ -926,12 +926,12 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE void _init1(const Index& val0,
|
||||
typename internal::enable_if< (!internal::is_same<Index,Scalar>::value)
|
||||
&& (internal::is_same<Index,T>::value)
|
||||
&& Base::SizeAtCompileTime!=Dynamic
|
||||
&& Base::SizeAtCompileTime!=1
|
||||
&& internal::is_convertible<T, Scalar>::value
|
||||
&& internal::is_same<typename internal::traits<Derived>::XprKind,ArrayXpr>::value,T*>::type* = 0)
|
||||
std::enable_if_t< (!internal::is_same<Index,Scalar>::value)
|
||||
&& (internal::is_same<Index,T>::value)
|
||||
&& Base::SizeAtCompileTime!=Dynamic
|
||||
&& Base::SizeAtCompileTime!=1
|
||||
&& internal::is_convertible<T, Scalar>::value
|
||||
&& internal::is_same<typename internal::traits<Derived>::XprKind,ArrayXpr>::value,T*>* = 0)
|
||||
{
|
||||
Base::setConstant(val0);
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ namespace internal {
|
||||
template<typename Lhs, typename Rhs, int Option>
|
||||
struct traits<Product<Lhs, Rhs, Option> >
|
||||
{
|
||||
typedef typename remove_all<Lhs>::type LhsCleaned;
|
||||
typedef typename remove_all<Rhs>::type RhsCleaned;
|
||||
typedef remove_all_t<Lhs> LhsCleaned;
|
||||
typedef remove_all_t<Rhs> RhsCleaned;
|
||||
typedef traits<LhsCleaned> LhsTraits;
|
||||
typedef traits<RhsCleaned> RhsTraits;
|
||||
|
||||
@ -89,8 +89,8 @@ class Product : public ProductImpl<Lhs_,Rhs_,Option,
|
||||
|
||||
typedef typename internal::ref_selector<Lhs>::type LhsNested;
|
||||
typedef typename internal::ref_selector<Rhs>::type RhsNested;
|
||||
typedef typename internal::remove_all<LhsNested>::type LhsNestedCleaned;
|
||||
typedef typename internal::remove_all<RhsNested>::type RhsNestedCleaned;
|
||||
typedef internal::remove_all_t<LhsNested> LhsNestedCleaned;
|
||||
typedef internal::remove_all_t<RhsNested> RhsNestedCleaned;
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
Product(const Lhs& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs)
|
||||
|
@ -115,8 +115,8 @@ struct product_evaluator<Product<Lhs, Rhs, Options>, ProductTag, LhsShape, RhsSh
|
||||
// if so, then we must take care at removing the call to nested_eval in the specializations (e.g., in permutation_matrix_product, transposition_matrix_product, etc.)
|
||||
// typedef typename internal::nested_eval<Lhs,Rhs::ColsAtCompileTime>::type LhsNested;
|
||||
// typedef typename internal::nested_eval<Rhs,Lhs::RowsAtCompileTime>::type RhsNested;
|
||||
// typedef typename internal::remove_all<LhsNested>::type LhsNestedCleaned;
|
||||
// typedef typename internal::remove_all<RhsNested>::type RhsNestedCleaned;
|
||||
// typedef internal::remove_all_t<LhsNested> LhsNestedCleaned;
|
||||
// typedef internal::remove_all_t<RhsNested> RhsNestedCleaned;
|
||||
//
|
||||
// const LhsNested lhs(xpr.lhs());
|
||||
// const RhsNested rhs(xpr.rhs());
|
||||
@ -136,7 +136,7 @@ protected:
|
||||
// Dense = Product
|
||||
template< typename DstXprType, typename Lhs, typename Rhs, int Options, typename Scalar>
|
||||
struct Assignment<DstXprType, Product<Lhs,Rhs,Options>, internal::assign_op<Scalar,Scalar>, Dense2Dense,
|
||||
typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
|
||||
std::enable_if_t<(Options==DefaultProduct || Options==AliasFreeProduct)>>
|
||||
{
|
||||
typedef Product<Lhs,Rhs,Options> SrcXprType;
|
||||
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
@ -154,7 +154,7 @@ struct Assignment<DstXprType, Product<Lhs,Rhs,Options>, internal::assign_op<Scal
|
||||
// Dense += Product
|
||||
template< typename DstXprType, typename Lhs, typename Rhs, int Options, typename Scalar>
|
||||
struct Assignment<DstXprType, Product<Lhs,Rhs,Options>, internal::add_assign_op<Scalar,Scalar>, Dense2Dense,
|
||||
typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
|
||||
std::enable_if_t<(Options==DefaultProduct || Options==AliasFreeProduct)>>
|
||||
{
|
||||
typedef Product<Lhs,Rhs,Options> SrcXprType;
|
||||
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
@ -169,7 +169,7 @@ struct Assignment<DstXprType, Product<Lhs,Rhs,Options>, internal::add_assign_op<
|
||||
// Dense -= Product
|
||||
template< typename DstXprType, typename Lhs, typename Rhs, int Options, typename Scalar>
|
||||
struct Assignment<DstXprType, Product<Lhs,Rhs,Options>, internal::sub_assign_op<Scalar,Scalar>, Dense2Dense,
|
||||
typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
|
||||
std::enable_if_t<(Options==DefaultProduct || Options==AliasFreeProduct)>>
|
||||
{
|
||||
typedef Product<Lhs,Rhs,Options> SrcXprType;
|
||||
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
@ -298,7 +298,7 @@ void EIGEN_DEVICE_FUNC outer_product_selector_run(Dst& dst, const Lhs &lhs, cons
|
||||
template<typename Lhs, typename Rhs>
|
||||
struct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,OuterProduct>
|
||||
{
|
||||
template<typename T> struct is_row_major : internal::conditional<(int(T::Flags)&RowMajorBit), internal::true_type, internal::false_type>::type {};
|
||||
template<typename T> struct is_row_major : std::conditional_t<(int(T::Flags)&RowMajorBit), internal::true_type, internal::false_type> {};
|
||||
typedef typename Product<Lhs,Rhs>::Scalar Scalar;
|
||||
|
||||
// TODO it would be nice to be able to exploit our *_assign_op functors for that purpose
|
||||
@ -372,7 +372,7 @@ struct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,GemvProduct>
|
||||
typedef typename nested_eval<Rhs,1>::type RhsNested;
|
||||
typedef typename Product<Lhs,Rhs>::Scalar Scalar;
|
||||
enum { Side = Lhs::IsVectorAtCompileTime ? OnTheLeft : OnTheRight };
|
||||
typedef typename internal::remove_all<typename internal::conditional<int(Side)==OnTheRight,LhsNested,RhsNested>::type>::type MatrixType;
|
||||
typedef internal::remove_all_t<std::conditional_t<int(Side)==OnTheRight,LhsNested,RhsNested>> MatrixType;
|
||||
|
||||
template<typename Dest>
|
||||
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void scaleAndAddTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, const Scalar& alpha)
|
||||
@ -450,7 +450,7 @@ struct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,CoeffBasedProductMode>
|
||||
blas_traits<Rhs>::extract(rhs).template conjugateIf<ConjRhs>(),
|
||||
func,
|
||||
actualAlpha,
|
||||
typename conditional<HasScalarFactor,true_type,false_type>::type());
|
||||
std::conditional_t<HasScalarFactor,true_type,false_type>());
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -528,8 +528,8 @@ struct product_evaluator<Product<Lhs, Rhs, LazyProduct>, ProductTag, DenseShape,
|
||||
typedef typename internal::nested_eval<Lhs,Rhs::ColsAtCompileTime>::type LhsNested;
|
||||
typedef typename internal::nested_eval<Rhs,Lhs::RowsAtCompileTime>::type RhsNested;
|
||||
|
||||
typedef typename internal::remove_all<LhsNested>::type LhsNestedCleaned;
|
||||
typedef typename internal::remove_all<RhsNested>::type RhsNestedCleaned;
|
||||
typedef internal::remove_all_t<LhsNested> LhsNestedCleaned;
|
||||
typedef internal::remove_all_t<RhsNested> RhsNestedCleaned;
|
||||
|
||||
typedef evaluator<LhsNestedCleaned> LhsEtorType;
|
||||
typedef evaluator<RhsNestedCleaned> RhsEtorType;
|
||||
@ -642,8 +642,8 @@ struct product_evaluator<Product<Lhs, Rhs, LazyProduct>, ProductTag, DenseShape,
|
||||
}
|
||||
|
||||
protected:
|
||||
typename internal::add_const_on_value_type<LhsNested>::type m_lhs;
|
||||
typename internal::add_const_on_value_type<RhsNested>::type m_rhs;
|
||||
add_const_on_value_type_t<LhsNested> m_lhs;
|
||||
add_const_on_value_type_t<RhsNested> m_rhs;
|
||||
|
||||
LhsEtorType m_lhsImpl;
|
||||
RhsEtorType m_rhsImpl;
|
||||
@ -934,7 +934,7 @@ struct product_evaluator<Product<Lhs, Rhs, ProductKind>, ProductTag, DiagonalSha
|
||||
// FIXME: NVCC used to complain about the template keyword, but we have to check whether this is still the case.
|
||||
// See also similar calls below.
|
||||
return this->template packet_impl<LoadMode,PacketType>(row,col, row,
|
||||
typename internal::conditional<int(StorageOrder)==RowMajor, internal::true_type, internal::false_type>::type());
|
||||
std::conditional_t<int(StorageOrder)==RowMajor, internal::true_type, internal::false_type>());
|
||||
}
|
||||
|
||||
template<int LoadMode,typename PacketType>
|
||||
@ -976,7 +976,7 @@ struct product_evaluator<Product<Lhs, Rhs, ProductKind>, ProductTag, DenseShape,
|
||||
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
|
||||
{
|
||||
return this->template packet_impl<LoadMode,PacketType>(row,col, col,
|
||||
typename internal::conditional<int(StorageOrder)==ColMajor, internal::true_type, internal::false_type>::type());
|
||||
std::conditional_t<int(StorageOrder)==ColMajor, internal::true_type, internal::false_type>());
|
||||
}
|
||||
|
||||
template<int LoadMode,typename PacketType>
|
||||
@ -1003,7 +1003,7 @@ template<typename ExpressionType, int Side, bool Transposed>
|
||||
struct permutation_matrix_product<ExpressionType, Side, Transposed, DenseShape>
|
||||
{
|
||||
typedef typename nested_eval<ExpressionType, 1>::type MatrixType;
|
||||
typedef typename remove_all<MatrixType>::type MatrixTypeCleaned;
|
||||
typedef remove_all_t<MatrixType> MatrixTypeCleaned;
|
||||
|
||||
template<typename Dest, typename PermutationType>
|
||||
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Dest& dst, const PermutationType& perm, const ExpressionType& xpr)
|
||||
@ -1111,7 +1111,7 @@ template<typename ExpressionType, int Side, bool Transposed, typename Expression
|
||||
struct transposition_matrix_product
|
||||
{
|
||||
typedef typename nested_eval<ExpressionType, 1>::type MatrixType;
|
||||
typedef typename remove_all<MatrixType>::type MatrixTypeCleaned;
|
||||
typedef remove_all_t<MatrixType> MatrixTypeCleaned;
|
||||
|
||||
template<typename Dest, typename TranspositionType>
|
||||
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(Dest& dst, const TranspositionType& tr, const ExpressionType& xpr)
|
||||
|
@ -48,7 +48,7 @@ struct traits<Ref<PlainObjectType_, Options_, StrideType_> >
|
||||
ScalarTypeMatch = internal::is_same<typename PlainObjectType::Scalar, typename Derived::Scalar>::value,
|
||||
MatchAtCompileTime = HasDirectAccess && StorageOrderMatch && InnerStrideMatch && OuterStrideMatch && AlignmentMatch && ScalarTypeMatch
|
||||
};
|
||||
typedef typename internal::conditional<MatchAtCompileTime,internal::true_type,internal::false_type>::type type;
|
||||
typedef std::conditional_t<MatchAtCompileTime,internal::true_type,internal::false_type> type;
|
||||
};
|
||||
|
||||
};
|
||||
@ -287,7 +287,7 @@ template<typename PlainObjectType, int Options, typename StrideType> class Ref
|
||||
typedef internal::traits<Ref> Traits;
|
||||
template<typename Derived>
|
||||
EIGEN_DEVICE_FUNC inline Ref(const PlainObjectBase<Derived>& expr,
|
||||
typename internal::enable_if<bool(Traits::template match<Derived>::MatchAtCompileTime),Derived>::type* = 0);
|
||||
std::enable_if_t<bool(Traits::template match<Derived>::MatchAtCompileTime),Derived>* = 0);
|
||||
public:
|
||||
|
||||
typedef RefBase<Ref> Base;
|
||||
@ -297,7 +297,7 @@ template<typename PlainObjectType, int Options, typename StrideType> class Ref
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
template<typename Derived>
|
||||
EIGEN_DEVICE_FUNC inline Ref(PlainObjectBase<Derived>& expr,
|
||||
typename internal::enable_if<bool(Traits::template match<Derived>::MatchAtCompileTime),Derived>::type* = 0)
|
||||
std::enable_if_t<bool(Traits::template match<Derived>::MatchAtCompileTime),Derived>* = 0)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT(bool(Traits::template match<Derived>::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);
|
||||
// Construction must pass since we will not create temporary storage in the non-const case.
|
||||
@ -307,7 +307,7 @@ template<typename PlainObjectType, int Options, typename StrideType> class Ref
|
||||
}
|
||||
template<typename Derived>
|
||||
EIGEN_DEVICE_FUNC inline Ref(const DenseBase<Derived>& expr,
|
||||
typename internal::enable_if<bool(Traits::template match<Derived>::MatchAtCompileTime),Derived>::type* = 0)
|
||||
std::enable_if_t<bool(Traits::template match<Derived>::MatchAtCompileTime),Derived>* = 0)
|
||||
#else
|
||||
/** Implicit constructor from any dense expression */
|
||||
template<typename Derived>
|
||||
@ -339,7 +339,7 @@ template<typename TPlainObjectType, int Options, typename StrideType> class Ref<
|
||||
|
||||
template<typename Derived>
|
||||
EIGEN_DEVICE_FUNC inline Ref(const DenseBase<Derived>& expr,
|
||||
typename internal::enable_if<bool(Traits::template match<Derived>::ScalarTypeMatch),Derived>::type* = 0)
|
||||
std::enable_if_t<bool(Traits::template match<Derived>::ScalarTypeMatch),Derived>* = 0)
|
||||
{
|
||||
// std::cout << match_helper<Derived>::HasDirectAccess << "," << match_helper<Derived>::OuterStrideMatch << "," << match_helper<Derived>::InnerStrideMatch << "\n";
|
||||
// std::cout << int(StrideType::OuterStrideAtCompileTime) << " - " << int(Derived::OuterStrideAtCompileTime) << "\n";
|
||||
|
@ -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 std::remove_reference_t<MatrixTypeNested> MatrixTypeNested_;
|
||||
enum {
|
||||
RowsAtCompileTime = RowFactor==Dynamic || int(MatrixType::RowsAtCompileTime)==Dynamic
|
||||
? Dynamic
|
||||
@ -69,14 +69,14 @@ template<typename MatrixType,int RowFactor,int ColFactor> class Replicate
|
||||
|
||||
typedef typename internal::dense_xpr_base<Replicate>::type Base;
|
||||
EIGEN_DENSE_PUBLIC_INTERFACE(Replicate)
|
||||
typedef typename internal::remove_all<MatrixType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<MatrixType> NestedExpression;
|
||||
|
||||
template<typename OriginalMatrixType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline explicit Replicate(const OriginalMatrixType& matrix)
|
||||
: m_matrix(matrix), m_rowFactor(RowFactor), m_colFactor(ColFactor)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<typename internal::remove_const<MatrixType>::type,OriginalMatrixType>::value),
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<std::remove_const_t<MatrixType>,OriginalMatrixType>::value),
|
||||
THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE)
|
||||
eigen_assert(RowFactor!=Dynamic && ColFactor!=Dynamic);
|
||||
}
|
||||
@ -86,7 +86,7 @@ template<typename MatrixType,int RowFactor,int ColFactor> class Replicate
|
||||
inline Replicate(const OriginalMatrixType& matrix, Index rowFactor, Index colFactor)
|
||||
: m_matrix(matrix), m_rowFactor(rowFactor), m_colFactor(colFactor)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<typename internal::remove_const<MatrixType>::type,OriginalMatrixType>::value),
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<std::remove_const_t<MatrixType>,OriginalMatrixType>::value),
|
||||
THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE)
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ class ReshapedImpl_dense<XprType,Rows,Cols,Order,false>
|
||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(ReshapedImpl_dense)
|
||||
|
||||
typedef typename internal::ref_selector<XprType>::non_const_type MatrixTypeNested;
|
||||
typedef typename internal::remove_all<XprType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<XprType> NestedExpression;
|
||||
|
||||
class InnerIterator;
|
||||
|
||||
@ -187,12 +187,12 @@ class ReshapedImpl_dense<XprType,Rows,Cols,Order,false>
|
||||
|
||||
/** \returns the nested expression */
|
||||
EIGEN_DEVICE_FUNC
|
||||
const typename internal::remove_all<XprType>::type&
|
||||
const internal::remove_all_t<XprType>&
|
||||
nestedExpression() const { return m_xpr; }
|
||||
|
||||
/** \returns the nested expression */
|
||||
EIGEN_DEVICE_FUNC
|
||||
typename internal::remove_reference<XprType>::type&
|
||||
std::remove_reference_t<XprType>&
|
||||
nestedExpression() { return m_xpr; }
|
||||
|
||||
protected:
|
||||
@ -232,7 +232,7 @@ class ReshapedImpl_dense<XprType, Rows, Cols, Order, true>
|
||||
{}
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
const typename internal::remove_all<XprTypeNested>::type& nestedExpression() const
|
||||
const internal::remove_all_t<XprTypeNested>& nestedExpression() const
|
||||
{
|
||||
return m_xpr;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ 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 std::remove_reference_t<MatrixTypeNested> MatrixTypeNested_;
|
||||
enum {
|
||||
RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||
ColsAtCompileTime = MatrixType::ColsAtCompileTime,
|
||||
@ -69,7 +69,7 @@ template<typename MatrixType, int Direction> class Reverse
|
||||
|
||||
typedef typename internal::dense_xpr_base<Reverse>::type Base;
|
||||
EIGEN_DENSE_PUBLIC_INTERFACE(Reverse)
|
||||
typedef typename internal::remove_all<MatrixType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<MatrixType> NestedExpression;
|
||||
using Base::IsRowMajor;
|
||||
|
||||
protected:
|
||||
@ -101,7 +101,7 @@ template<typename MatrixType, int Direction> class Reverse
|
||||
return -m_matrix.innerStride();
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC const typename internal::remove_all<typename MatrixType::Nested>::type&
|
||||
EIGEN_DEVICE_FUNC const internal::remove_all_t<typename MatrixType::Nested>&
|
||||
nestedExpression() const
|
||||
{
|
||||
return m_matrix;
|
||||
|
@ -35,7 +35,7 @@ template<typename MatrixType, unsigned int UpLo>
|
||||
struct traits<SelfAdjointView<MatrixType, UpLo> > : traits<MatrixType>
|
||||
{
|
||||
typedef typename ref_selector<MatrixType>::non_const_type MatrixTypeNested;
|
||||
typedef typename remove_all<MatrixTypeNested>::type MatrixTypeNestedCleaned;
|
||||
typedef remove_all_t<MatrixTypeNested> MatrixTypeNestedCleaned;
|
||||
typedef MatrixType ExpressionType;
|
||||
typedef typename MatrixType::PlainObject FullMatrixType;
|
||||
enum {
|
||||
@ -63,8 +63,8 @@ template<typename MatrixType_, unsigned int UpLo> class SelfAdjointView
|
||||
/** \brief The type of coefficients in this matrix */
|
||||
typedef typename internal::traits<SelfAdjointView>::Scalar Scalar;
|
||||
typedef typename MatrixType::StorageIndex StorageIndex;
|
||||
typedef typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type MatrixConjugateReturnType;
|
||||
typedef SelfAdjointView<typename internal::add_const<MatrixType>::type, UpLo> ConstSelfAdjointView;
|
||||
typedef internal::remove_all_t<typename MatrixType::ConjugateReturnType> MatrixConjugateReturnType;
|
||||
typedef SelfAdjointView<std::add_const_t<MatrixType>, UpLo> ConstSelfAdjointView;
|
||||
|
||||
enum {
|
||||
Mode = internal::traits<SelfAdjointView>::Mode,
|
||||
@ -180,16 +180,16 @@ template<typename MatrixType_, unsigned int UpLo> class SelfAdjointView
|
||||
*/
|
||||
template<unsigned int TriMode>
|
||||
EIGEN_DEVICE_FUNC
|
||||
typename internal::conditional<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)),
|
||||
TriangularView<MatrixType,TriMode>,
|
||||
TriangularView<typename MatrixType::AdjointReturnType,TriMode> >::type
|
||||
std::conditional_t<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)),
|
||||
TriangularView<MatrixType,TriMode>,
|
||||
TriangularView<typename MatrixType::AdjointReturnType,TriMode> >
|
||||
triangularView() const
|
||||
{
|
||||
typename internal::conditional<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)), MatrixType&, typename MatrixType::ConstTransposeReturnType>::type tmp1(m_matrix);
|
||||
typename internal::conditional<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)), MatrixType&, typename MatrixType::AdjointReturnType>::type tmp2(tmp1);
|
||||
return typename internal::conditional<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)),
|
||||
TriangularView<MatrixType,TriMode>,
|
||||
TriangularView<typename MatrixType::AdjointReturnType,TriMode> >::type(tmp2);
|
||||
std::conditional_t<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)), MatrixType&, typename MatrixType::ConstTransposeReturnType> tmp1(m_matrix);
|
||||
std::conditional_t<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)), MatrixType&, typename MatrixType::AdjointReturnType> tmp2(tmp1);
|
||||
return std::conditional_t<(TriMode&(Upper|Lower))==(UpLo&(Upper|Lower)),
|
||||
TriangularView<MatrixType,TriMode>,
|
||||
TriangularView<typename MatrixType::AdjointReturnType,TriMode> >(tmp2);
|
||||
}
|
||||
|
||||
typedef SelfAdjointView<const MatrixConjugateReturnType,UpLo> ConjugateReturnType;
|
||||
@ -203,10 +203,10 @@ template<typename MatrixType_, unsigned int UpLo> class SelfAdjointView
|
||||
*/
|
||||
template<bool Cond>
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline typename internal::conditional<Cond,ConjugateReturnType,ConstSelfAdjointView>::type
|
||||
inline std::conditional_t<Cond,ConjugateReturnType,ConstSelfAdjointView>
|
||||
conjugateIf() const
|
||||
{
|
||||
typedef typename internal::conditional<Cond,ConjugateReturnType,ConstSelfAdjointView>::type ReturnType;
|
||||
typedef std::conditional_t<Cond,ConjugateReturnType,ConstSelfAdjointView> ReturnType;
|
||||
return ReturnType(m_matrix.template conjugateIf<Cond>());
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ template<typename MatrixType_, unsigned int UpLo> class SelfAdjointView
|
||||
/** \sa MatrixBase::transpose() */
|
||||
template<class Dummy=int>
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline TransposeReturnType transpose(typename internal::enable_if<Eigen::internal::is_lvalue<MatrixType>::value, Dummy*>::type = nullptr)
|
||||
inline TransposeReturnType transpose(std::enable_if_t<Eigen::internal::is_lvalue<MatrixType>::value, Dummy*> = nullptr)
|
||||
{
|
||||
typename MatrixType::TransposeReturnType tmp(m_matrix);
|
||||
return TransposeReturnType(tmp);
|
||||
|
@ -89,7 +89,7 @@ struct triangular_solver_selector<Lhs,Rhs,Side,Mode,NoUnrolling,Dynamic>
|
||||
|
||||
static EIGEN_DEVICE_FUNC void run(const Lhs& lhs, Rhs& rhs)
|
||||
{
|
||||
typename internal::add_const_on_value_type<ActualLhsType>::type actualLhs = LhsProductTraits::extract(lhs);
|
||||
add_const_on_value_type_t<ActualLhsType> actualLhs = LhsProductTraits::extract(lhs);
|
||||
|
||||
const Index size = lhs.rows();
|
||||
const Index othersize = Side==OnTheLeft? rhs.cols() : rhs.rows();
|
||||
@ -176,11 +176,11 @@ EIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType,Mode,Dense>::solveInPlace(c
|
||||
return;
|
||||
|
||||
enum { copy = (internal::traits<OtherDerived>::Flags & RowMajorBit) && OtherDerived::IsVectorAtCompileTime && OtherDerived::SizeAtCompileTime!=1};
|
||||
typedef typename internal::conditional<copy,
|
||||
typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::type OtherCopy;
|
||||
typedef std::conditional_t<copy,
|
||||
typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&> OtherCopy;
|
||||
OtherCopy otherCopy(other);
|
||||
|
||||
internal::triangular_solver_selector<MatrixType, typename internal::remove_reference<OtherCopy>::type,
|
||||
internal::triangular_solver_selector<MatrixType, std::remove_reference_t<OtherCopy>,
|
||||
Side, Mode>::run(derived().nestedExpression(), otherCopy);
|
||||
|
||||
if (copy)
|
||||
@ -208,7 +208,7 @@ struct traits<triangular_solve_retval<Side, TriangularType, Rhs> >
|
||||
template<int Side, typename TriangularType, typename Rhs> struct triangular_solve_retval
|
||||
: public ReturnByValue<triangular_solve_retval<Side, TriangularType, Rhs> >
|
||||
{
|
||||
typedef typename remove_all<typename Rhs::Nested>::type RhsNestedCleaned;
|
||||
typedef remove_all_t<typename Rhs::Nested> RhsNestedCleaned;
|
||||
typedef ReturnByValue<triangular_solve_retval> Base;
|
||||
|
||||
triangular_solve_retval(const TriangularType& tri, const Rhs& rhs)
|
||||
|
@ -30,7 +30,7 @@ struct solve_assertion<Transpose<Derived> >
|
||||
template<bool Transpose_, typename Rhs>
|
||||
static void run(const type& transpose, const Rhs& b)
|
||||
{
|
||||
internal::solve_assertion<typename internal::remove_all<Derived>::type>::template run<true>(transpose.nestedExpression(), b);
|
||||
internal::solve_assertion<internal::remove_all_t<Derived>>::template run<true>(transpose.nestedExpression(), b);
|
||||
}
|
||||
};
|
||||
|
||||
@ -42,7 +42,7 @@ struct solve_assertion<CwiseUnaryOp<Eigen::internal::scalar_conjugate_op<Scalar>
|
||||
template<bool Transpose_, typename Rhs>
|
||||
static void run(const type& adjoint, const Rhs& b)
|
||||
{
|
||||
internal::solve_assertion<typename internal::remove_all<Transpose<Derived> >::type>::template run<true>(adjoint.nestedExpression(), b);
|
||||
internal::solve_assertion<internal::remove_all_t<Transpose<Derived> >>::template run<true>(adjoint.nestedExpression(), b);
|
||||
}
|
||||
};
|
||||
} // end namespace internal
|
||||
@ -107,12 +107,12 @@ class SolverBase : public EigenBase<Derived>
|
||||
inline const Solve<Derived, Rhs>
|
||||
solve(const MatrixBase<Rhs>& b) const
|
||||
{
|
||||
internal::solve_assertion<typename internal::remove_all<Derived>::type>::template run<false>(derived(), b);
|
||||
internal::solve_assertion<internal::remove_all_t<Derived>>::template run<false>(derived(), b);
|
||||
return Solve<Derived, Rhs>(derived(), b.derived());
|
||||
}
|
||||
|
||||
/** \internal the return type of transpose() */
|
||||
typedef typename internal::add_const<Transpose<const Derived> >::type ConstTransposeReturnType;
|
||||
typedef std::add_const_t<Transpose<const Derived> > ConstTransposeReturnType;
|
||||
/** \returns an expression of the transposed of the factored matrix.
|
||||
*
|
||||
* A typical usage is to solve for the transposed problem A^T x = b:
|
||||
@ -126,10 +126,10 @@ class SolverBase : public EigenBase<Derived>
|
||||
}
|
||||
|
||||
/** \internal the return type of adjoint() */
|
||||
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||
CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, ConstTransposeReturnType>,
|
||||
ConstTransposeReturnType
|
||||
>::type AdjointReturnType;
|
||||
typedef std::conditional_t<NumTraits<Scalar>::IsComplex,
|
||||
CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, ConstTransposeReturnType>,
|
||||
ConstTransposeReturnType
|
||||
> AdjointReturnType;
|
||||
/** \returns an expression of the adjoint of the factored matrix
|
||||
*
|
||||
* A typical usage is to solve for the adjoint problem A' x = b:
|
||||
|
@ -59,7 +59,7 @@ void stable_norm_impl_inner_step(const VectorType &vec, RealScalar& ssq, RealSca
|
||||
const Index blockSize = 4096;
|
||||
|
||||
typedef typename internal::nested_eval<VectorType,2>::type VectorTypeCopy;
|
||||
typedef typename internal::remove_all<VectorTypeCopy>::type VectorTypeCopyClean;
|
||||
typedef internal::remove_all_t<VectorTypeCopy> VectorTypeCopyClean;
|
||||
const VectorTypeCopy copy(vec);
|
||||
|
||||
enum {
|
||||
@ -68,8 +68,8 @@ void stable_norm_impl_inner_step(const VectorType &vec, RealScalar& ssq, RealSca
|
||||
) && (blockSize*sizeof(Scalar)*2<EIGEN_STACK_ALLOCATION_LIMIT)
|
||||
&& (EIGEN_MAX_STATIC_ALIGN_BYTES>0) // if we cannot allocate on the stack, then let's not bother about this optimization
|
||||
};
|
||||
typedef typename internal::conditional<CanAlign, Ref<const Matrix<Scalar,Dynamic,1,0,blockSize,1>, internal::evaluator<VectorTypeCopyClean>::Alignment>,
|
||||
typename VectorTypeCopyClean::ConstSegmentReturnType>::type SegmentWrapper;
|
||||
typedef std::conditional_t<CanAlign, Ref<const Matrix<Scalar,Dynamic,1,0,blockSize,1>, internal::evaluator<VectorTypeCopyClean>::Alignment>,
|
||||
typename VectorTypeCopyClean::ConstSegmentReturnType> SegmentWrapper;
|
||||
Index n = vec.size();
|
||||
|
||||
Index bi = internal::first_default_aligned(copy);
|
||||
@ -81,7 +81,7 @@ void stable_norm_impl_inner_step(const VectorType &vec, RealScalar& ssq, RealSca
|
||||
|
||||
template<typename VectorType>
|
||||
typename VectorType::RealScalar
|
||||
stable_norm_impl(const VectorType &vec, typename enable_if<VectorType::IsVectorAtCompileTime>::type* = 0 )
|
||||
stable_norm_impl(const VectorType &vec, std::enable_if_t<VectorType::IsVectorAtCompileTime>* = 0 )
|
||||
{
|
||||
using std::sqrt;
|
||||
using std::abs;
|
||||
@ -103,7 +103,7 @@ stable_norm_impl(const VectorType &vec, typename enable_if<VectorType::IsVectorA
|
||||
|
||||
template<typename MatrixType>
|
||||
typename MatrixType::RealScalar
|
||||
stable_norm_impl(const MatrixType &mat, typename enable_if<!MatrixType::IsVectorAtCompileTime>::type* = 0 )
|
||||
stable_norm_impl(const MatrixType &mat, std::enable_if_t<!MatrixType::IsVectorAtCompileTime>* = 0 )
|
||||
{
|
||||
using std::sqrt;
|
||||
|
||||
|
@ -27,7 +27,7 @@ protected:
|
||||
typedef typename traits::XprType XprType;
|
||||
typedef indexed_based_stl_iterator_base<typename traits::non_const_iterator> non_const_iterator;
|
||||
typedef indexed_based_stl_iterator_base<typename traits::const_iterator> const_iterator;
|
||||
typedef typename internal::conditional<internal::is_const<XprType>::value,non_const_iterator,const_iterator>::type other_iterator;
|
||||
typedef std::conditional_t<internal::is_const<XprType>::value,non_const_iterator,const_iterator> other_iterator;
|
||||
// NOTE: in C++03 we cannot declare friend classes through typedefs because we need to write friend class:
|
||||
friend class indexed_based_stl_iterator_base<typename traits::const_iterator>;
|
||||
friend class indexed_based_stl_iterator_base<typename traits::non_const_iterator>;
|
||||
@ -106,7 +106,7 @@ protected:
|
||||
typedef typename traits::XprType XprType;
|
||||
typedef indexed_based_stl_reverse_iterator_base<typename traits::non_const_iterator> non_const_iterator;
|
||||
typedef indexed_based_stl_reverse_iterator_base<typename traits::const_iterator> const_iterator;
|
||||
typedef typename internal::conditional<internal::is_const<XprType>::value,non_const_iterator,const_iterator>::type other_iterator;
|
||||
typedef std::conditional_t<internal::is_const<XprType>::value,non_const_iterator,const_iterator> other_iterator;
|
||||
// NOTE: in C++03 we cannot declare friend classes through typedefs because we need to write friend class:
|
||||
friend class indexed_based_stl_reverse_iterator_base<typename traits::const_iterator>;
|
||||
friend class indexed_based_stl_reverse_iterator_base<typename traits::non_const_iterator>;
|
||||
@ -181,18 +181,18 @@ template<typename XprType>
|
||||
class pointer_based_stl_iterator
|
||||
{
|
||||
enum { is_lvalue = internal::is_lvalue<XprType>::value };
|
||||
typedef pointer_based_stl_iterator<typename internal::remove_const<XprType>::type> non_const_iterator;
|
||||
typedef pointer_based_stl_iterator<typename internal::add_const<XprType>::type> const_iterator;
|
||||
typedef typename internal::conditional<internal::is_const<XprType>::value,non_const_iterator,const_iterator>::type other_iterator;
|
||||
typedef pointer_based_stl_iterator<std::remove_const_t<XprType>> non_const_iterator;
|
||||
typedef pointer_based_stl_iterator<std::add_const_t<XprType>> const_iterator;
|
||||
typedef std::conditional_t<internal::is_const<XprType>::value,non_const_iterator,const_iterator> other_iterator;
|
||||
// NOTE: in C++03 we cannot declare friend classes through typedefs because we need to write friend class:
|
||||
friend class pointer_based_stl_iterator<typename internal::add_const<XprType>::type>;
|
||||
friend class pointer_based_stl_iterator<typename internal::remove_const<XprType>::type>;
|
||||
friend class pointer_based_stl_iterator<std::add_const_t<XprType>>;
|
||||
friend class pointer_based_stl_iterator<std::remove_const_t<XprType>>;
|
||||
public:
|
||||
typedef Index difference_type;
|
||||
typedef typename XprType::Scalar value_type;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
typedef typename internal::conditional<bool(is_lvalue), value_type*, const value_type*>::type pointer;
|
||||
typedef typename internal::conditional<bool(is_lvalue), value_type&, const value_type&>::type reference;
|
||||
typedef std::conditional_t<bool(is_lvalue), value_type*, const value_type*> pointer;
|
||||
typedef std::conditional_t<bool(is_lvalue), value_type&, const value_type&> reference;
|
||||
|
||||
|
||||
pointer_based_stl_iterator() EIGEN_NO_THROW : m_ptr(0) {}
|
||||
@ -262,8 +262,8 @@ template<typename XprType_>
|
||||
struct indexed_based_stl_iterator_traits<generic_randaccess_stl_iterator<XprType_> >
|
||||
{
|
||||
typedef XprType_ XprType;
|
||||
typedef generic_randaccess_stl_iterator<typename internal::remove_const<XprType>::type> non_const_iterator;
|
||||
typedef generic_randaccess_stl_iterator<typename internal::add_const<XprType>::type> const_iterator;
|
||||
typedef generic_randaccess_stl_iterator<std::remove_const_t<XprType>> non_const_iterator;
|
||||
typedef generic_randaccess_stl_iterator<std::add_const_t<XprType>> const_iterator;
|
||||
};
|
||||
|
||||
template<typename XprType>
|
||||
@ -285,13 +285,13 @@ protected:
|
||||
|
||||
// TODO currently const Transpose/Reshape expressions never returns const references,
|
||||
// so lets return by value too.
|
||||
//typedef typename internal::conditional<bool(has_direct_access), const value_type&, const value_type>::type read_only_ref_t;
|
||||
//typedef std::conditional_t<bool(has_direct_access), const value_type&, const value_type> read_only_ref_t;
|
||||
typedef const value_type read_only_ref_t;
|
||||
|
||||
public:
|
||||
|
||||
typedef typename internal::conditional<bool(is_lvalue), value_type *, const value_type *>::type pointer;
|
||||
typedef typename internal::conditional<bool(is_lvalue), value_type&, read_only_ref_t>::type reference;
|
||||
typedef std::conditional_t<bool(is_lvalue), value_type *, const value_type *> pointer;
|
||||
typedef std::conditional_t<bool(is_lvalue), value_type&, read_only_ref_t> reference;
|
||||
|
||||
generic_randaccess_stl_iterator() : Base() {}
|
||||
generic_randaccess_stl_iterator(XprType& xpr, Index index) : Base(xpr,index) {}
|
||||
@ -307,8 +307,8 @@ template<typename XprType_, DirectionType Direction>
|
||||
struct indexed_based_stl_iterator_traits<subvector_stl_iterator<XprType_,Direction> >
|
||||
{
|
||||
typedef XprType_ XprType;
|
||||
typedef subvector_stl_iterator<typename internal::remove_const<XprType>::type, Direction> non_const_iterator;
|
||||
typedef subvector_stl_iterator<typename internal::add_const<XprType>::type, Direction> const_iterator;
|
||||
typedef subvector_stl_iterator<std::remove_const_t<XprType>, Direction> non_const_iterator;
|
||||
typedef subvector_stl_iterator<std::add_const_t<XprType>, Direction> const_iterator;
|
||||
};
|
||||
|
||||
template<typename XprType, DirectionType Direction>
|
||||
@ -322,12 +322,12 @@ protected:
|
||||
using Base::m_index;
|
||||
using Base::mp_xpr;
|
||||
|
||||
typedef typename internal::conditional<Direction==Vertical,typename XprType::ColXpr,typename XprType::RowXpr>::type SubVectorType;
|
||||
typedef typename internal::conditional<Direction==Vertical,typename XprType::ConstColXpr,typename XprType::ConstRowXpr>::type ConstSubVectorType;
|
||||
typedef std::conditional_t<Direction==Vertical,typename XprType::ColXpr,typename XprType::RowXpr> SubVectorType;
|
||||
typedef std::conditional_t<Direction==Vertical,typename XprType::ConstColXpr,typename XprType::ConstRowXpr> ConstSubVectorType;
|
||||
|
||||
|
||||
public:
|
||||
typedef typename internal::conditional<bool(is_lvalue), SubVectorType, ConstSubVectorType>::type reference;
|
||||
typedef std::conditional_t<bool(is_lvalue), SubVectorType, ConstSubVectorType> reference;
|
||||
typedef typename reference::PlainObject value_type;
|
||||
|
||||
private:
|
||||
@ -355,8 +355,8 @@ template<typename XprType_, DirectionType Direction>
|
||||
struct indexed_based_stl_iterator_traits<subvector_stl_reverse_iterator<XprType_,Direction> >
|
||||
{
|
||||
typedef XprType_ XprType;
|
||||
typedef subvector_stl_reverse_iterator<typename internal::remove_const<XprType>::type, Direction> non_const_iterator;
|
||||
typedef subvector_stl_reverse_iterator<typename internal::add_const<XprType>::type, Direction> const_iterator;
|
||||
typedef subvector_stl_reverse_iterator<std::remove_const_t<XprType>, Direction> non_const_iterator;
|
||||
typedef subvector_stl_reverse_iterator<std::add_const_t<XprType>, Direction> const_iterator;
|
||||
};
|
||||
|
||||
template<typename XprType, DirectionType Direction>
|
||||
@ -370,12 +370,12 @@ protected:
|
||||
using Base::m_index;
|
||||
using Base::mp_xpr;
|
||||
|
||||
typedef typename internal::conditional<Direction==Vertical,typename XprType::ColXpr,typename XprType::RowXpr>::type SubVectorType;
|
||||
typedef typename internal::conditional<Direction==Vertical,typename XprType::ConstColXpr,typename XprType::ConstRowXpr>::type ConstSubVectorType;
|
||||
typedef std::conditional_t<Direction==Vertical,typename XprType::ColXpr,typename XprType::RowXpr> SubVectorType;
|
||||
typedef std::conditional_t<Direction==Vertical,typename XprType::ConstColXpr,typename XprType::ConstRowXpr> ConstSubVectorType;
|
||||
|
||||
|
||||
public:
|
||||
typedef typename internal::conditional<bool(is_lvalue), SubVectorType, ConstSubVectorType>::type reference;
|
||||
typedef std::conditional_t<bool(is_lvalue), SubVectorType, ConstSubVectorType> reference;
|
||||
typedef typename reference::PlainObject value_type;
|
||||
|
||||
private:
|
||||
|
@ -20,7 +20,7 @@ template<typename MatrixType>
|
||||
struct traits<Transpose<MatrixType> > : public traits<MatrixType>
|
||||
{
|
||||
typedef typename ref_selector<MatrixType>::type MatrixTypeNested;
|
||||
typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNestedPlain;
|
||||
typedef std::remove_reference_t<MatrixTypeNested> MatrixTypeNestedPlain;
|
||||
enum {
|
||||
RowsAtCompileTime = MatrixType::ColsAtCompileTime,
|
||||
ColsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||
@ -60,7 +60,7 @@ template<typename MatrixType> class Transpose
|
||||
|
||||
typedef typename TransposeImpl<MatrixType,typename internal::traits<MatrixType>::StorageKind>::Base Base;
|
||||
EIGEN_GENERIC_PUBLIC_INTERFACE(Transpose)
|
||||
typedef typename internal::remove_all<MatrixType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<MatrixType> NestedExpression;
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
explicit EIGEN_STRONG_INLINE Transpose(MatrixType& matrix) : m_matrix(matrix) {}
|
||||
@ -74,12 +74,12 @@ template<typename MatrixType> class Transpose
|
||||
|
||||
/** \returns the nested expression */
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
const typename internal::remove_all<MatrixTypeNested>::type&
|
||||
const internal::remove_all_t<MatrixTypeNested>&
|
||||
nestedExpression() const { return m_matrix; }
|
||||
|
||||
/** \returns the nested expression */
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
typename internal::remove_reference<MatrixTypeNested>::type&
|
||||
std::remove_reference_t<MatrixTypeNested>&
|
||||
nestedExpression() { return m_matrix; }
|
||||
|
||||
/** \internal */
|
||||
@ -132,11 +132,11 @@ template<typename MatrixType> class TransposeImpl<MatrixType,Dense>
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
Index outerStride() const { return derived().nestedExpression().outerStride(); }
|
||||
|
||||
typedef typename internal::conditional<
|
||||
internal::is_lvalue<MatrixType>::value,
|
||||
Scalar,
|
||||
const Scalar
|
||||
>::type ScalarWithConstIfNotLvalue;
|
||||
typedef std::conditional_t<
|
||||
internal::is_lvalue<MatrixType>::value,
|
||||
Scalar,
|
||||
const Scalar
|
||||
> ScalarWithConstIfNotLvalue;
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
ScalarWithConstIfNotLvalue* data() { return derived().nestedExpression().data(); }
|
||||
|
@ -172,8 +172,8 @@ template<typename MatrixType, unsigned int Mode_>
|
||||
struct traits<TriangularView<MatrixType, Mode_> > : traits<MatrixType>
|
||||
{
|
||||
typedef typename ref_selector<MatrixType>::non_const_type MatrixTypeNested;
|
||||
typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNestedNonRef;
|
||||
typedef typename remove_all<MatrixTypeNested>::type MatrixTypeNestedCleaned;
|
||||
typedef std::remove_reference_t<MatrixTypeNested> MatrixTypeNestedNonRef;
|
||||
typedef remove_all_t<MatrixTypeNested> MatrixTypeNestedCleaned;
|
||||
typedef typename MatrixType::PlainObject FullMatrixType;
|
||||
typedef MatrixType ExpressionType;
|
||||
enum {
|
||||
@ -199,8 +199,8 @@ template<typename MatrixType_, unsigned int Mode_> class TriangularView
|
||||
typedef typename internal::traits<TriangularView>::MatrixTypeNested MatrixTypeNested;
|
||||
typedef typename internal::traits<TriangularView>::MatrixTypeNestedNonRef MatrixTypeNestedNonRef;
|
||||
|
||||
typedef typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type MatrixConjugateReturnType;
|
||||
typedef TriangularView<typename internal::add_const<MatrixType>::type, Mode_> ConstTriangularView;
|
||||
typedef internal::remove_all_t<typename MatrixType::ConjugateReturnType> MatrixConjugateReturnType;
|
||||
typedef TriangularView<std::add_const_t<MatrixType>, Mode_> ConstTriangularView;
|
||||
|
||||
public:
|
||||
|
||||
@ -249,10 +249,10 @@ template<typename MatrixType_, unsigned int Mode_> class TriangularView
|
||||
*/
|
||||
template<bool Cond>
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type
|
||||
inline std::conditional_t<Cond,ConjugateReturnType,ConstTriangularView>
|
||||
conjugateIf() const
|
||||
{
|
||||
typedef typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type ReturnType;
|
||||
typedef std::conditional_t<Cond,ConjugateReturnType,ConstTriangularView> ReturnType;
|
||||
return ReturnType(m_matrix.template conjugateIf<Cond>());
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ template<typename MatrixType_, unsigned int Mode_> class TriangularView
|
||||
/** \sa MatrixBase::transpose() */
|
||||
template<class Dummy=int>
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline TransposeReturnType transpose(typename internal::enable_if<Eigen::internal::is_lvalue<MatrixType>::value, Dummy*>::type = nullptr)
|
||||
inline TransposeReturnType transpose(std::enable_if_t<Eigen::internal::is_lvalue<MatrixType>::value, Dummy*> = nullptr)
|
||||
{
|
||||
typename MatrixType::TransposeReturnType tmp(m_matrix);
|
||||
return TransposeReturnType(tmp);
|
||||
@ -731,10 +731,10 @@ struct evaluator_traits<TriangularView<MatrixType,Mode> >
|
||||
|
||||
template<typename MatrixType, unsigned int Mode>
|
||||
struct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>
|
||||
: evaluator<typename internal::remove_all<MatrixType>::type>
|
||||
: evaluator<internal::remove_all_t<MatrixType>>
|
||||
{
|
||||
typedef TriangularView<MatrixType,Mode> XprType;
|
||||
typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;
|
||||
typedef evaluator<internal::remove_all_t<MatrixType>> Base;
|
||||
EIGEN_DEVICE_FUNC
|
||||
unary_evaluator(const XprType &xpr) : Base(xpr.nestedExpression()) {}
|
||||
};
|
||||
|
@ -193,7 +193,7 @@ template<typename ExpressionType, int Direction> class VectorwiseOp
|
||||
typedef typename ExpressionType::RealScalar RealScalar;
|
||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||
typedef typename internal::ref_selector<ExpressionType>::non_const_type ExpressionTypeNested;
|
||||
typedef typename internal::remove_all<ExpressionTypeNested>::type ExpressionTypeNestedCleaned;
|
||||
typedef internal::remove_all_t<ExpressionTypeNested> ExpressionTypeNestedCleaned;
|
||||
|
||||
template<template<typename OutScalar,typename InputScalar> class Functor,
|
||||
typename ReturnScalar=Scalar> struct ReturnType
|
||||
|
@ -122,8 +122,8 @@ public:
|
||||
explicit visitor_evaluator(const XprType &xpr) : m_evaluator(xpr), m_xpr(xpr) { }
|
||||
|
||||
typedef typename XprType::Scalar Scalar;
|
||||
typedef typename internal::remove_const<typename XprType::CoeffReturnType>::type CoeffReturnType;
|
||||
typedef typename internal::remove_const<typename XprType::PacketReturnType>::type PacketReturnType;
|
||||
typedef std::remove_const_t<typename XprType::CoeffReturnType> CoeffReturnType;
|
||||
typedef std::remove_const_t<typename XprType::PacketReturnType> PacketReturnType;
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT { return m_xpr.rows(); }
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT { return m_xpr.cols(); }
|
||||
|
@ -2573,7 +2573,7 @@ template<int N, typename EnableIf = void>
|
||||
struct plogical_shift_left_impl;
|
||||
|
||||
template<int N>
|
||||
struct plogical_shift_left_impl<N, typename enable_if<(N < 32) && (N >= 0)>::type> {
|
||||
struct plogical_shift_left_impl<N, std::enable_if_t<(N < 32) && (N >= 0)>> {
|
||||
static EIGEN_STRONG_INLINE Packet2l run(const Packet2l& a) {
|
||||
static const unsigned n = static_cast<unsigned>(N);
|
||||
const Packet4ui shift = {n, n, n, n};
|
||||
@ -2587,7 +2587,7 @@ struct plogical_shift_left_impl<N, typename enable_if<(N < 32) && (N >= 0)>::typ
|
||||
};
|
||||
|
||||
template<int N>
|
||||
struct plogical_shift_left_impl<N, typename enable_if<(N >= 32)>::type> {
|
||||
struct plogical_shift_left_impl<N, std::enable_if_t<(N >= 32)>> {
|
||||
static EIGEN_STRONG_INLINE Packet2l run(const Packet2l& a) {
|
||||
static const unsigned m = static_cast<unsigned>(N - 32);
|
||||
const Packet4ui shift = {m, m, m, m};
|
||||
@ -2605,7 +2605,7 @@ template<int N, typename EnableIf = void>
|
||||
struct plogical_shift_right_impl;
|
||||
|
||||
template<int N>
|
||||
struct plogical_shift_right_impl<N, typename enable_if<(N < 32) && (N >= 0)>::type> {
|
||||
struct plogical_shift_right_impl<N, std::enable_if_t<(N < 32) && (N >= 0)>> {
|
||||
static EIGEN_STRONG_INLINE Packet2l run(const Packet2l& a) {
|
||||
static const unsigned n = static_cast<unsigned>(N);
|
||||
const Packet4ui shift = {n, n, n, n};
|
||||
@ -2619,7 +2619,7 @@ struct plogical_shift_right_impl<N, typename enable_if<(N < 32) && (N >= 0)>::ty
|
||||
};
|
||||
|
||||
template<int N>
|
||||
struct plogical_shift_right_impl<N, typename enable_if<(N >= 32)>::type> {
|
||||
struct plogical_shift_right_impl<N, std::enable_if_t<(N >= 32)>> {
|
||||
static EIGEN_STRONG_INLINE Packet2l run(const Packet2l& a) {
|
||||
static const unsigned m = static_cast<unsigned>(N - 32);
|
||||
const Packet4ui shift = {m, m, m, m};
|
||||
|
@ -31,22 +31,22 @@ class TupleImpl<N, T1, Ts...> {
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
|
||||
|
||||
// Default constructor, enable if all types are default-constructible.
|
||||
template<typename U1 = T1, typename EnableIf = typename std::enable_if<
|
||||
template<typename U1 = T1, typename EnableIf = std::enable_if_t<
|
||||
std::is_default_constructible<U1>::value
|
||||
&& reduce_all<std::is_default_constructible<Ts>::value...>::value
|
||||
>::type>
|
||||
>>
|
||||
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC
|
||||
TupleImpl() : head_{}, tail_{} {}
|
||||
|
||||
// Element constructor.
|
||||
template<typename U1, typename... Us,
|
||||
// Only enable if...
|
||||
typename EnableIf = typename std::enable_if<
|
||||
typename EnableIf = std::enable_if_t<
|
||||
// the number of input arguments match, and ...
|
||||
sizeof...(Us) == sizeof...(Ts) && (
|
||||
// this does not look like a copy/move constructor.
|
||||
N > 1 || std::is_convertible<U1, T1>::value)
|
||||
>::type>
|
||||
>>
|
||||
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC
|
||||
TupleImpl(U1&& arg1, Us&&... args)
|
||||
: head_(std::forward<U1>(arg1)), tail_(std::forward<Us>(args)...) {}
|
||||
@ -253,9 +253,9 @@ get(TupleImpl<sizeof...(Types), Types...>& tuple) {
|
||||
* \return concatenated tuple.
|
||||
*/
|
||||
template<typename... Tuples,
|
||||
typename EnableIf = typename std::enable_if<
|
||||
typename EnableIf = std::enable_if_t<
|
||||
internal::reduce_all<
|
||||
is_tuple<typename std::decay<Tuples>::type>::value...>::value>::type>
|
||||
is_tuple<typename std::decay<Tuples>::type>::value...>::value>>
|
||||
EIGEN_CONSTEXPR EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
typename tuple_cat_impl<sizeof...(Tuples), typename std::decay<Tuples>::type...>::ReturnType
|
||||
tuple_cat(Tuples&&... tuples) {
|
||||
|
@ -356,7 +356,7 @@ struct RhsPanelHelper {
|
||||
private:
|
||||
static const int remaining_registers = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS - registers_taken;
|
||||
public:
|
||||
typedef typename conditional<remaining_registers>=4, RhsPacketx4, RhsPacket>::type type;
|
||||
typedef std::conditional_t<remaining_registers>=4, RhsPacketx4, RhsPacket> type;
|
||||
};
|
||||
|
||||
template <typename Packet>
|
||||
@ -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 std::conditional_t<Vectorizable,LhsPacket_,LhsScalar> LhsPacket;
|
||||
typedef std::conditional_t<Vectorizable,RhsPacket_,RhsScalar> RhsPacket;
|
||||
typedef std::conditional_t<Vectorizable,ResPacket_,ResScalar> ResPacket;
|
||||
typedef LhsPacket LhsPacket4Packing;
|
||||
|
||||
typedef QuadPacket<RhsPacket> RhsPacketx4;
|
||||
@ -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 std::conditional_t<Vectorizable,LhsPacket_,LhsScalar> LhsPacket;
|
||||
typedef std::conditional_t<Vectorizable,RhsPacket_,RhsScalar> RhsPacket;
|
||||
typedef std::conditional_t<Vectorizable,ResPacket_,ResScalar> ResPacket;
|
||||
typedef LhsPacket LhsPacket4Packing;
|
||||
|
||||
typedef QuadPacket<RhsPacket> RhsPacketx4;
|
||||
@ -614,7 +614,7 @@ public:
|
||||
|
||||
EIGEN_STRONG_INLINE void loadRhsQuad(const RhsScalar* b, RhsPacket& dest) const
|
||||
{
|
||||
loadRhsQuad_impl(b,dest, typename conditional<RhsPacketSize==16,true_type,false_type>::type());
|
||||
loadRhsQuad_impl(b,dest, std::conditional_t<RhsPacketSize==16,true_type,false_type>());
|
||||
}
|
||||
|
||||
EIGEN_STRONG_INLINE void loadRhsQuad_impl(const RhsScalar* b, RhsPacket& dest, const true_type&) const
|
||||
@ -645,7 +645,7 @@ public:
|
||||
template <typename LhsPacketType, typename RhsPacketType, typename AccPacketType, typename LaneIdType>
|
||||
EIGEN_STRONG_INLINE void madd(const LhsPacketType& a, const RhsPacketType& b, AccPacketType& c, RhsPacketType& tmp, const LaneIdType&) const
|
||||
{
|
||||
madd_impl(a, b, c, tmp, typename conditional<Vectorizable,true_type,false_type>::type());
|
||||
madd_impl(a, b, c, tmp, std::conditional_t<Vectorizable,true_type,false_type>());
|
||||
}
|
||||
|
||||
template <typename LhsPacketType, typename RhsPacketType, typename AccPacketType>
|
||||
@ -703,7 +703,7 @@ DoublePacket<Packet> padd(const DoublePacket<Packet> &a, const DoublePacket<Pack
|
||||
template<typename Packet>
|
||||
const DoublePacket<Packet>&
|
||||
predux_half_dowto4(const DoublePacket<Packet> &a,
|
||||
typename enable_if<unpacket_traits<Packet>::size<=8>::type* = 0)
|
||||
std::enable_if_t<unpacket_traits<Packet>::size<=8>* = 0)
|
||||
{
|
||||
return a;
|
||||
}
|
||||
@ -711,7 +711,7 @@ predux_half_dowto4(const DoublePacket<Packet> &a,
|
||||
template<typename Packet>
|
||||
DoublePacket<typename unpacket_traits<Packet>::half>
|
||||
predux_half_dowto4(const DoublePacket<Packet> &a,
|
||||
typename enable_if<unpacket_traits<Packet>::size==16>::type* = 0)
|
||||
std::enable_if_t<unpacket_traits<Packet>::size==16>* = 0)
|
||||
{
|
||||
// yes, that's pretty hackish :(
|
||||
DoublePacket<typename unpacket_traits<Packet>::half> res;
|
||||
@ -725,7 +725,7 @@ predux_half_dowto4(const DoublePacket<Packet> &a,
|
||||
// same here, "quad" actually means "8" in terms of real coefficients
|
||||
template<typename Scalar, typename RealPacket>
|
||||
void loadQuadToDoublePacket(const Scalar* b, DoublePacket<RealPacket>& dest,
|
||||
typename enable_if<unpacket_traits<RealPacket>::size<=8>::type* = 0)
|
||||
std::enable_if_t<unpacket_traits<RealPacket>::size<=8>* = 0)
|
||||
{
|
||||
dest.first = pset1<RealPacket>(numext::real(*b));
|
||||
dest.second = pset1<RealPacket>(numext::imag(*b));
|
||||
@ -733,7 +733,7 @@ void loadQuadToDoublePacket(const Scalar* b, DoublePacket<RealPacket>& dest,
|
||||
|
||||
template<typename Scalar, typename RealPacket>
|
||||
void loadQuadToDoublePacket(const Scalar* b, DoublePacket<RealPacket>& dest,
|
||||
typename enable_if<unpacket_traits<RealPacket>::size==16>::type* = 0)
|
||||
std::enable_if_t<unpacket_traits<RealPacket>::size==16>* = 0)
|
||||
{
|
||||
// yes, that's pretty hackish too :(
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
@ -791,11 +791,11 @@ public:
|
||||
|
||||
typedef DoublePacket<RealPacket> DoublePacketType;
|
||||
|
||||
typedef typename conditional<Vectorizable,ScalarPacket,Scalar>::type LhsPacket4Packing;
|
||||
typedef typename conditional<Vectorizable,RealPacket, Scalar>::type LhsPacket;
|
||||
typedef typename conditional<Vectorizable,DoublePacketType,Scalar>::type RhsPacket;
|
||||
typedef typename conditional<Vectorizable,ScalarPacket,Scalar>::type ResPacket;
|
||||
typedef typename conditional<Vectorizable,DoublePacketType,Scalar>::type AccPacket;
|
||||
typedef std::conditional_t<Vectorizable,ScalarPacket,Scalar> LhsPacket4Packing;
|
||||
typedef std::conditional_t<Vectorizable,RealPacket, Scalar> LhsPacket;
|
||||
typedef std::conditional_t<Vectorizable,DoublePacketType,Scalar> RhsPacket;
|
||||
typedef std::conditional_t<Vectorizable,ScalarPacket,Scalar> ResPacket;
|
||||
typedef std::conditional_t<Vectorizable,DoublePacketType,Scalar> AccPacket;
|
||||
|
||||
// this actually holds 8 packets!
|
||||
typedef QuadPacket<RhsPacket> RhsPacketx4;
|
||||
@ -868,7 +868,7 @@ public:
|
||||
|
||||
template<typename LhsPacketType, typename RhsPacketType, typename ResPacketType, typename TmpType, typename LaneIdType>
|
||||
EIGEN_STRONG_INLINE
|
||||
typename enable_if<!is_same<RhsPacketType,RhsPacketx4>::value>::type
|
||||
std::enable_if_t<!is_same<RhsPacketType,RhsPacketx4>::value>
|
||||
madd(const LhsPacketType& a, const RhsPacketType& b, DoublePacket<ResPacketType>& c, TmpType& /*tmp*/, const LaneIdType&) const
|
||||
{
|
||||
c.first = padd(pmul(a,b.first), c.first);
|
||||
@ -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 std::conditional_t<Vectorizable,LhsPacket_,LhsScalar> LhsPacket;
|
||||
typedef std::conditional_t<Vectorizable,RhsPacket_,RhsScalar> RhsPacket;
|
||||
typedef std::conditional_t<Vectorizable,ResPacket_,ResScalar> ResPacket;
|
||||
typedef LhsPacket LhsPacket4Packing;
|
||||
typedef QuadPacket<RhsPacket> RhsPacketx4;
|
||||
typedef ResPacket AccPacket;
|
||||
@ -1011,7 +1011,7 @@ public:
|
||||
template <typename LhsPacketType, typename RhsPacketType, typename AccPacketType, typename LaneIdType>
|
||||
EIGEN_STRONG_INLINE void madd(const LhsPacketType& a, const RhsPacketType& b, AccPacketType& c, RhsPacketType& tmp, const LaneIdType&) const
|
||||
{
|
||||
madd_impl(a, b, c, tmp, typename conditional<Vectorizable,true_type,false_type>::type());
|
||||
madd_impl(a, b, c, tmp, std::conditional_t<Vectorizable,true_type,false_type>());
|
||||
}
|
||||
|
||||
template <typename LhsPacketType, typename RhsPacketType, typename AccPacketType>
|
||||
@ -1976,10 +1976,10 @@ void gebp_kernel<LhsScalar,RhsScalar,Index,DataMapper,mr,nr,ConjugateLhs,Conjuga
|
||||
if(SwappedTraits::LhsProgress==8)
|
||||
{
|
||||
// Special case where we have to first reduce the accumulation register C0
|
||||
typedef typename conditional<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SResPacket>::half,SResPacket>::type SResPacketHalf;
|
||||
typedef typename conditional<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SLhsPacket>::half,SLhsPacket>::type SLhsPacketHalf;
|
||||
typedef typename conditional<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SRhsPacket>::half,SRhsPacket>::type SRhsPacketHalf;
|
||||
typedef typename conditional<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SAccPacket>::half,SAccPacket>::type SAccPacketHalf;
|
||||
typedef std::conditional_t<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SResPacket>::half,SResPacket> SResPacketHalf;
|
||||
typedef std::conditional_t<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SLhsPacket>::half,SLhsPacket> SLhsPacketHalf;
|
||||
typedef std::conditional_t<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SRhsPacket>::half,SRhsPacket> SRhsPacketHalf;
|
||||
typedef std::conditional_t<SwappedTraits::LhsProgress>=8,typename unpacket_traits<SAccPacket>::half,SAccPacket> SAccPacketHalf;
|
||||
|
||||
SResPacketHalf R = res.template gatherPacket<SResPacketHalf>(i, j2);
|
||||
SResPacketHalf alphav = pset1<SResPacketHalf>(alpha);
|
||||
|
@ -277,16 +277,16 @@ class level3_blocking
|
||||
template<int StorageOrder, typename LhsScalar_, typename RhsScalar_, int MaxRows, int MaxCols, int MaxDepth, int KcFactor>
|
||||
class gemm_blocking_space<StorageOrder,LhsScalar_,RhsScalar_,MaxRows, MaxCols, MaxDepth, KcFactor, true /* == FiniteAtCompileTime */>
|
||||
: public level3_blocking<
|
||||
typename conditional<StorageOrder==RowMajor,RhsScalar_,LhsScalar_>::type,
|
||||
typename conditional<StorageOrder==RowMajor,LhsScalar_,RhsScalar_>::type>
|
||||
std::conditional_t<StorageOrder==RowMajor,RhsScalar_,LhsScalar_>,
|
||||
std::conditional_t<StorageOrder==RowMajor,LhsScalar_,RhsScalar_>>
|
||||
{
|
||||
enum {
|
||||
Transpose = StorageOrder==RowMajor,
|
||||
ActualRows = Transpose ? MaxCols : MaxRows,
|
||||
ActualCols = Transpose ? MaxRows : MaxCols
|
||||
};
|
||||
typedef typename conditional<Transpose,RhsScalar_,LhsScalar_>::type LhsScalar;
|
||||
typedef typename conditional<Transpose,LhsScalar_,RhsScalar_>::type RhsScalar;
|
||||
typedef std::conditional_t<Transpose,RhsScalar_,LhsScalar_> LhsScalar;
|
||||
typedef std::conditional_t<Transpose,LhsScalar_,RhsScalar_> RhsScalar;
|
||||
typedef gebp_traits<LhsScalar,RhsScalar> Traits;
|
||||
enum {
|
||||
SizeA = ActualRows * MaxDepth,
|
||||
@ -328,14 +328,14 @@ class gemm_blocking_space<StorageOrder,LhsScalar_,RhsScalar_,MaxRows, MaxCols, M
|
||||
template<int StorageOrder, typename LhsScalar_, typename RhsScalar_, int MaxRows, int MaxCols, int MaxDepth, int KcFactor>
|
||||
class gemm_blocking_space<StorageOrder,LhsScalar_,RhsScalar_,MaxRows, MaxCols, MaxDepth, KcFactor, false>
|
||||
: public level3_blocking<
|
||||
typename conditional<StorageOrder==RowMajor,RhsScalar_,LhsScalar_>::type,
|
||||
typename conditional<StorageOrder==RowMajor,LhsScalar_,RhsScalar_>::type>
|
||||
std::conditional_t<StorageOrder==RowMajor,RhsScalar_,LhsScalar_>,
|
||||
std::conditional_t<StorageOrder==RowMajor,LhsScalar_,RhsScalar_>>
|
||||
{
|
||||
enum {
|
||||
Transpose = StorageOrder==RowMajor
|
||||
};
|
||||
typedef typename conditional<Transpose,RhsScalar_,LhsScalar_>::type LhsScalar;
|
||||
typedef typename conditional<Transpose,LhsScalar_,RhsScalar_>::type RhsScalar;
|
||||
typedef std::conditional_t<Transpose,RhsScalar_,LhsScalar_> LhsScalar;
|
||||
typedef std::conditional_t<Transpose,LhsScalar_,RhsScalar_> RhsScalar;
|
||||
typedef gebp_traits<LhsScalar,RhsScalar> Traits;
|
||||
|
||||
Index m_sizeA;
|
||||
@ -415,11 +415,11 @@ struct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,GemmProduct>
|
||||
|
||||
typedef internal::blas_traits<Lhs> LhsBlasTraits;
|
||||
typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;
|
||||
typedef typename internal::remove_all<ActualLhsType>::type ActualLhsTypeCleaned;
|
||||
typedef internal::remove_all_t<ActualLhsType> ActualLhsTypeCleaned;
|
||||
|
||||
typedef internal::blas_traits<Rhs> RhsBlasTraits;
|
||||
typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;
|
||||
typedef typename internal::remove_all<ActualRhsType>::type ActualRhsTypeCleaned;
|
||||
typedef internal::remove_all_t<ActualRhsType> ActualRhsTypeCleaned;
|
||||
|
||||
enum {
|
||||
MaxDepthAtCompileTime = min_size_prefer_fixed(Lhs::MaxColsAtCompileTime, Rhs::MaxRowsAtCompileTime)
|
||||
@ -485,8 +485,8 @@ struct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,GemmProduct>
|
||||
::scaleAndAddTo(dst_vec, a_lhs.row(0), a_rhs, alpha);
|
||||
}
|
||||
|
||||
typename internal::add_const_on_value_type<ActualLhsType>::type lhs = LhsBlasTraits::extract(a_lhs);
|
||||
typename internal::add_const_on_value_type<ActualRhsType>::type rhs = RhsBlasTraits::extract(a_rhs);
|
||||
add_const_on_value_type_t<ActualLhsType> lhs = LhsBlasTraits::extract(a_lhs);
|
||||
add_const_on_value_type_t<ActualRhsType> rhs = RhsBlasTraits::extract(a_rhs);
|
||||
|
||||
Scalar actualAlpha = combine_scalar_factors(alpha, a_lhs, a_rhs);
|
||||
|
||||
|
@ -210,17 +210,17 @@ struct general_product_to_triangular_selector<MatrixType,ProductType,UpLo,true>
|
||||
{
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
|
||||
typedef typename internal::remove_all<typename ProductType::LhsNested>::type Lhs;
|
||||
typedef internal::remove_all_t<typename ProductType::LhsNested> Lhs;
|
||||
typedef internal::blas_traits<Lhs> LhsBlasTraits;
|
||||
typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhs;
|
||||
typedef typename internal::remove_all<ActualLhs>::type ActualLhs_;
|
||||
typename internal::add_const_on_value_type<ActualLhs>::type actualLhs = LhsBlasTraits::extract(prod.lhs());
|
||||
typedef internal::remove_all_t<ActualLhs> ActualLhs_;
|
||||
internal::add_const_on_value_type_t<ActualLhs> actualLhs = LhsBlasTraits::extract(prod.lhs());
|
||||
|
||||
typedef typename internal::remove_all<typename ProductType::RhsNested>::type Rhs;
|
||||
typedef internal::remove_all_t<typename ProductType::RhsNested> Rhs;
|
||||
typedef internal::blas_traits<Rhs> RhsBlasTraits;
|
||||
typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhs;
|
||||
typedef typename internal::remove_all<ActualRhs>::type ActualRhs_;
|
||||
typename internal::add_const_on_value_type<ActualRhs>::type actualRhs = RhsBlasTraits::extract(prod.rhs());
|
||||
typedef internal::remove_all_t<ActualRhs> ActualRhs_;
|
||||
internal::add_const_on_value_type_t<ActualRhs> actualRhs = RhsBlasTraits::extract(prod.rhs());
|
||||
|
||||
Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(prod.lhs().derived()) * RhsBlasTraits::extractScalarFactor(prod.rhs().derived());
|
||||
|
||||
@ -256,17 +256,17 @@ struct general_product_to_triangular_selector<MatrixType,ProductType,UpLo,false>
|
||||
{
|
||||
static void run(MatrixType& mat, const ProductType& prod, const typename MatrixType::Scalar& alpha, bool beta)
|
||||
{
|
||||
typedef typename internal::remove_all<typename ProductType::LhsNested>::type Lhs;
|
||||
typedef internal::remove_all_t<typename ProductType::LhsNested> Lhs;
|
||||
typedef internal::blas_traits<Lhs> LhsBlasTraits;
|
||||
typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhs;
|
||||
typedef typename internal::remove_all<ActualLhs>::type ActualLhs_;
|
||||
typename internal::add_const_on_value_type<ActualLhs>::type actualLhs = LhsBlasTraits::extract(prod.lhs());
|
||||
typedef internal::remove_all_t<ActualLhs> ActualLhs_;
|
||||
internal::add_const_on_value_type_t<ActualLhs> actualLhs = LhsBlasTraits::extract(prod.lhs());
|
||||
|
||||
typedef typename internal::remove_all<typename ProductType::RhsNested>::type Rhs;
|
||||
typedef internal::remove_all_t<typename ProductType::RhsNested> Rhs;
|
||||
typedef internal::blas_traits<Rhs> RhsBlasTraits;
|
||||
typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhs;
|
||||
typedef typename internal::remove_all<ActualRhs>::type ActualRhs_;
|
||||
typename internal::add_const_on_value_type<ActualRhs>::type actualRhs = RhsBlasTraits::extract(prod.rhs());
|
||||
typedef internal::remove_all_t<ActualRhs> ActualRhs_;
|
||||
internal::add_const_on_value_type_t<ActualRhs> actualRhs = RhsBlasTraits::extract(prod.rhs());
|
||||
|
||||
typename ProductType::Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(prod.lhs().derived()) * RhsBlasTraits::extractScalarFactor(prod.rhs().derived());
|
||||
|
||||
|
@ -58,9 +58,9 @@ public:
|
||||
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 std::conditional_t<Vectorizable,LhsPacket_,LhsScalar> LhsPacket;
|
||||
typedef std::conditional_t<Vectorizable,RhsPacket_,RhsScalar> RhsPacket;
|
||||
typedef std::conditional_t<Vectorizable,ResPacket_,ResScalar> ResPacket;
|
||||
};
|
||||
|
||||
|
||||
|
@ -511,8 +511,8 @@ struct selfadjoint_product_impl<Lhs,LhsMode,false,Rhs,RhsMode,false>
|
||||
{
|
||||
eigen_assert(dst.rows()==a_lhs.rows() && dst.cols()==a_rhs.cols());
|
||||
|
||||
typename internal::add_const_on_value_type<ActualLhsType>::type lhs = LhsBlasTraits::extract(a_lhs);
|
||||
typename internal::add_const_on_value_type<ActualRhsType>::type rhs = RhsBlasTraits::extract(a_rhs);
|
||||
add_const_on_value_type_t<ActualLhsType> lhs = LhsBlasTraits::extract(a_lhs);
|
||||
add_const_on_value_type_t<ActualRhsType> rhs = RhsBlasTraits::extract(a_rhs);
|
||||
|
||||
Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(a_lhs)
|
||||
* RhsBlasTraits::extractScalarFactor(a_rhs);
|
||||
|
@ -169,11 +169,11 @@ struct selfadjoint_product_impl<Lhs,LhsMode,false,Rhs,0,true>
|
||||
|
||||
typedef internal::blas_traits<Lhs> LhsBlasTraits;
|
||||
typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;
|
||||
typedef typename internal::remove_all<ActualLhsType>::type ActualLhsTypeCleaned;
|
||||
typedef internal::remove_all_t<ActualLhsType> ActualLhsTypeCleaned;
|
||||
|
||||
typedef internal::blas_traits<Rhs> RhsBlasTraits;
|
||||
typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;
|
||||
typedef typename internal::remove_all<ActualRhsType>::type ActualRhsTypeCleaned;
|
||||
typedef internal::remove_all_t<ActualRhsType> ActualRhsTypeCleaned;
|
||||
|
||||
enum { LhsUpLo = LhsMode&(Upper|Lower) };
|
||||
|
||||
@ -187,8 +187,8 @@ struct selfadjoint_product_impl<Lhs,LhsMode,false,Rhs,0,true>
|
||||
|
||||
eigen_assert(dest.rows()==a_lhs.rows() && dest.cols()==a_rhs.cols());
|
||||
|
||||
typename internal::add_const_on_value_type<ActualLhsType>::type lhs = LhsBlasTraits::extract(a_lhs);
|
||||
typename internal::add_const_on_value_type<ActualRhsType>::type rhs = RhsBlasTraits::extract(a_rhs);
|
||||
add_const_on_value_type_t<ActualLhsType> lhs = LhsBlasTraits::extract(a_lhs);
|
||||
add_const_on_value_type_t<ActualRhsType> rhs = RhsBlasTraits::extract(a_rhs);
|
||||
|
||||
Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(a_lhs)
|
||||
* RhsBlasTraits::extractScalarFactor(a_rhs);
|
||||
|
@ -28,7 +28,7 @@ struct selfadjoint_rank1_update<Scalar,Index,ColMajor,UpLo,ConjLhs,ConjRhs>
|
||||
{
|
||||
internal::conj_if<ConjRhs> cj;
|
||||
typedef Map<const Matrix<Scalar,Dynamic,1> > OtherMap;
|
||||
typedef typename internal::conditional<ConjLhs,typename OtherMap::ConjugateReturnType,const OtherMap&>::type ConjLhsType;
|
||||
typedef std::conditional_t<ConjLhs,typename OtherMap::ConjugateReturnType,const OtherMap&> ConjLhsType;
|
||||
for (Index i=0; i<size; ++i)
|
||||
{
|
||||
Map<Matrix<Scalar,Dynamic,1> >(mat+stride*i+(UpLo==Lower ? i : 0), (UpLo==Lower ? size-i : (i+1)))
|
||||
@ -57,8 +57,8 @@ 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_;
|
||||
typename internal::add_const_on_value_type<ActualOtherType>::type actualOther = OtherBlasTraits::extract(other.derived());
|
||||
typedef internal::remove_all_t<ActualOtherType> ActualOtherType_;
|
||||
internal::add_const_on_value_type_t<ActualOtherType> actualOther = OtherBlasTraits::extract(other.derived());
|
||||
|
||||
Scalar actualAlpha = alpha * OtherBlasTraits::extractScalarFactor(other.derived());
|
||||
|
||||
@ -89,8 +89,8 @@ 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_;
|
||||
typename internal::add_const_on_value_type<ActualOtherType>::type actualOther = OtherBlasTraits::extract(other.derived());
|
||||
typedef internal::remove_all_t<ActualOtherType> ActualOtherType_;
|
||||
internal::add_const_on_value_type_t<ActualOtherType> actualOther = OtherBlasTraits::extract(other.derived());
|
||||
|
||||
Scalar actualAlpha = alpha * OtherBlasTraits::extractScalarFactor(other.derived());
|
||||
|
||||
|
@ -52,9 +52,8 @@ struct selfadjoint_rank2_update_selector<Scalar,Index,UType,VType,Upper>
|
||||
}
|
||||
};
|
||||
|
||||
template<bool Cond, typename T> struct conj_expr_if
|
||||
: conditional<!Cond, const T&,
|
||||
CwiseUnaryOp<scalar_conjugate_op<typename traits<T>::Scalar>,T> > {};
|
||||
template<bool Cond, typename T>
|
||||
using conj_expr_if = std::conditional<!Cond, const T&, CwiseUnaryOp<scalar_conjugate_op<typename traits<T>::Scalar>,T>>;
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
@ -65,13 +64,13 @@ 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_;
|
||||
typename internal::add_const_on_value_type<ActualUType>::type actualU = UBlasTraits::extract(u.derived());
|
||||
typedef internal::remove_all_t<ActualUType> ActualUType_;
|
||||
internal::add_const_on_value_type_t<ActualUType> actualU = UBlasTraits::extract(u.derived());
|
||||
|
||||
typedef internal::blas_traits<DerivedV> VBlasTraits;
|
||||
typedef typename VBlasTraits::DirectLinearAccessType ActualVType;
|
||||
typedef typename internal::remove_all<ActualVType>::type ActualVType_;
|
||||
typename internal::add_const_on_value_type<ActualVType>::type actualV = VBlasTraits::extract(v.derived());
|
||||
typedef internal::remove_all_t<ActualVType> ActualVType_;
|
||||
internal::add_const_on_value_type_t<ActualVType> actualV = VBlasTraits::extract(v.derived());
|
||||
|
||||
// If MatrixType is row major, then we use the routine for lower triangular in the upper triangular case and
|
||||
// vice versa, and take the complex conjugate of all coefficients and vector entries.
|
||||
@ -82,8 +81,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 internal::remove_all_t<typename internal::conj_expr_if<int(IsRowMajor) ^ int(UBlasTraits::NeedToConjugate), ActualUType_>::type> UType;
|
||||
typedef internal::remove_all_t<typename internal::conj_expr_if<int(IsRowMajor) ^ int(VBlasTraits::NeedToConjugate), ActualVType_>::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);
|
||||
|
@ -414,13 +414,13 @@ struct triangular_product_impl<Mode,LhsIsTriangular,Lhs,false,Rhs,false>
|
||||
|
||||
typedef internal::blas_traits<Lhs> LhsBlasTraits;
|
||||
typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;
|
||||
typedef typename internal::remove_all<ActualLhsType>::type ActualLhsTypeCleaned;
|
||||
typedef internal::remove_all_t<ActualLhsType> ActualLhsTypeCleaned;
|
||||
typedef internal::blas_traits<Rhs> RhsBlasTraits;
|
||||
typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;
|
||||
typedef typename internal::remove_all<ActualRhsType>::type ActualRhsTypeCleaned;
|
||||
|
||||
typename internal::add_const_on_value_type<ActualLhsType>::type lhs = LhsBlasTraits::extract(a_lhs);
|
||||
typename internal::add_const_on_value_type<ActualRhsType>::type rhs = RhsBlasTraits::extract(a_rhs);
|
||||
typedef internal::remove_all_t<ActualRhsType> ActualRhsTypeCleaned;
|
||||
|
||||
internal::add_const_on_value_type_t<ActualLhsType> lhs = LhsBlasTraits::extract(a_lhs);
|
||||
internal::add_const_on_value_type_t<ActualRhsType> rhs = RhsBlasTraits::extract(a_rhs);
|
||||
|
||||
LhsScalar lhs_alpha = LhsBlasTraits::extractScalarFactor(a_lhs);
|
||||
RhsScalar rhs_alpha = RhsBlasTraits::extractScalarFactor(a_rhs);
|
||||
|
@ -219,8 +219,8 @@ template<int Mode> struct trmv_selector<Mode,ColMajor>
|
||||
|
||||
typedef Map<Matrix<ResScalar,Dynamic,1>, plain_enum_min(AlignedMax,internal::packet_traits<ResScalar>::size)> MappedDest;
|
||||
|
||||
typename internal::add_const_on_value_type<ActualLhsType>::type actualLhs = LhsBlasTraits::extract(lhs);
|
||||
typename internal::add_const_on_value_type<ActualRhsType>::type actualRhs = RhsBlasTraits::extract(rhs);
|
||||
add_const_on_value_type_t<ActualLhsType> actualLhs = LhsBlasTraits::extract(lhs);
|
||||
add_const_on_value_type_t<ActualRhsType> actualRhs = RhsBlasTraits::extract(rhs);
|
||||
|
||||
LhsScalar lhs_alpha = LhsBlasTraits::extractScalarFactor(lhs);
|
||||
RhsScalar rhs_alpha = RhsBlasTraits::extractScalarFactor(rhs);
|
||||
@ -298,10 +298,10 @@ template<int Mode> struct trmv_selector<Mode,RowMajor>
|
||||
typedef typename LhsBlasTraits::DirectLinearAccessType ActualLhsType;
|
||||
typedef internal::blas_traits<Rhs> RhsBlasTraits;
|
||||
typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType;
|
||||
typedef typename internal::remove_all<ActualRhsType>::type ActualRhsTypeCleaned;
|
||||
typedef internal::remove_all_t<ActualRhsType> ActualRhsTypeCleaned;
|
||||
|
||||
typename add_const<ActualLhsType>::type actualLhs = LhsBlasTraits::extract(lhs);
|
||||
typename add_const<ActualRhsType>::type actualRhs = RhsBlasTraits::extract(rhs);
|
||||
std::add_const_t<ActualLhsType> actualLhs = LhsBlasTraits::extract(lhs);
|
||||
std::add_const_t<ActualRhsType> actualRhs = RhsBlasTraits::extract(rhs);
|
||||
|
||||
LhsScalar lhs_alpha = LhsBlasTraits::extractScalarFactor(lhs);
|
||||
RhsScalar rhs_alpha = RhsBlasTraits::extractScalarFactor(rhs);
|
||||
|
@ -43,11 +43,10 @@ struct triangular_solve_vector<LhsScalar, RhsScalar, Index, OnTheLeft, Mode, Con
|
||||
typedef const_blas_data_mapper<LhsScalar,Index,RowMajor> LhsMapper;
|
||||
typedef const_blas_data_mapper<RhsScalar,Index,ColMajor> RhsMapper;
|
||||
|
||||
typename internal::conditional<
|
||||
Conjugate,
|
||||
const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>,LhsMap>,
|
||||
const LhsMap&>
|
||||
::type cjLhs(lhs);
|
||||
std::conditional_t<
|
||||
Conjugate,
|
||||
const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>,LhsMap>,
|
||||
const LhsMap&> cjLhs(lhs);
|
||||
static const Index PanelWidth = EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH;
|
||||
for(Index pi=IsLower ? 0 : size;
|
||||
IsLower ? pi<size : pi>0;
|
||||
@ -99,10 +98,10 @@ struct triangular_solve_vector<LhsScalar, RhsScalar, Index, OnTheLeft, Mode, Con
|
||||
const LhsMap lhs(_lhs,size,size,OuterStride<>(lhsStride));
|
||||
typedef const_blas_data_mapper<LhsScalar,Index,ColMajor> LhsMapper;
|
||||
typedef const_blas_data_mapper<RhsScalar,Index,ColMajor> RhsMapper;
|
||||
typename internal::conditional<Conjugate,
|
||||
const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>,LhsMap>,
|
||||
const LhsMap&
|
||||
>::type cjLhs(lhs);
|
||||
std::conditional_t<Conjugate,
|
||||
const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>,LhsMap>,
|
||||
const LhsMap&
|
||||
> cjLhs(lhs);
|
||||
static const Index PanelWidth = EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH;
|
||||
|
||||
for(Index pi=IsLower ? 0 : size;
|
||||
|
@ -428,10 +428,10 @@ template<typename XprType> struct blas_traits
|
||||
) ? 1 : 0,
|
||||
HasScalarFactor = false
|
||||
};
|
||||
typedef typename conditional<bool(HasUsableDirectAccess),
|
||||
typedef std::conditional_t<bool(HasUsableDirectAccess),
|
||||
ExtractType,
|
||||
typename ExtractType_::PlainObject
|
||||
>::type DirectLinearAccessType;
|
||||
> 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); }
|
||||
};
|
||||
@ -514,10 +514,10 @@ struct blas_traits<Transpose<NestedXpr> >
|
||||
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 typename conditional<bool(Base::HasUsableDirectAccess),
|
||||
typedef std::conditional_t<bool(Base::HasUsableDirectAccess),
|
||||
ExtractType,
|
||||
typename ExtractType::PlainObject
|
||||
>::type DirectLinearAccessType;
|
||||
> DirectLinearAccessType;
|
||||
enum {
|
||||
IsTransposed = Base::IsTransposed ? 0 : 1
|
||||
};
|
||||
|
@ -106,7 +106,7 @@ template<int Value = Dynamic> class OuterStride;
|
||||
template<typename MatrixType, int MapOptions=Unaligned, typename StrideType = Stride<0,0> > class Map;
|
||||
template<typename Derived> class RefBase;
|
||||
template<typename PlainObjectType, int Options = 0,
|
||||
typename StrideType = typename internal::conditional<PlainObjectType::IsVectorAtCompileTime,InnerStride<1>,OuterStride<> >::type > class Ref;
|
||||
typename StrideType = typename std::conditional_t<PlainObjectType::IsVectorAtCompileTime,InnerStride<1>,OuterStride<> > > class Ref;
|
||||
template<typename ViewOp, typename MatrixType, typename StrideType = Stride<0,0>> class CwiseUnaryView;
|
||||
|
||||
template<typename Derived> class TriangularBase;
|
||||
|
@ -99,7 +99,7 @@ template<> struct get_compile_time_incr<SingleRange> {
|
||||
|
||||
// Turn a single index into something that looks like an array (i.e., that exposes a .size(), and operator[](int) methods)
|
||||
template<typename T, int XprSize>
|
||||
struct IndexedViewCompatibleType<T,XprSize,typename internal::enable_if<internal::is_integral<T>::value>::type> {
|
||||
struct IndexedViewCompatibleType<T,XprSize,std::enable_if_t<internal::is_integral<T>::value>> {
|
||||
// Here we could simply use Array, but maybe it's less work for the compiler to use
|
||||
// a simpler wrapper as SingleRange
|
||||
//typedef Eigen::Array<Index,1,1> type;
|
||||
@ -107,13 +107,13 @@ struct IndexedViewCompatibleType<T,XprSize,typename internal::enable_if<internal
|
||||
};
|
||||
|
||||
template<typename T, int XprSize>
|
||||
struct IndexedViewCompatibleType<T, XprSize, typename enable_if<symbolic::is_symbolic<T>::value>::type> {
|
||||
struct IndexedViewCompatibleType<T, XprSize, std::enable_if_t<symbolic::is_symbolic<T>::value>> {
|
||||
typedef SingleRange type;
|
||||
};
|
||||
|
||||
|
||||
template<typename T>
|
||||
typename enable_if<symbolic::is_symbolic<T>::value,SingleRange>::type
|
||||
std::enable_if_t<symbolic::is_symbolic<T>::value,SingleRange>
|
||||
makeIndexedViewCompatible(const T& id, Index size, SpecializedType) {
|
||||
return eval_expr_given_size(id,size);
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ template<typename T> EIGEN_DEVICE_FUNC Index get_runtime_value(const T &x) { ret
|
||||
template<typename T, int DynamicKey=Dynamic, typename EnableIf=void> struct cleanup_index_type { typedef T type; };
|
||||
|
||||
// Convert any integral type (e.g., short, int, unsigned int, etc.) to Eigen::Index
|
||||
template<typename T, int DynamicKey> struct cleanup_index_type<T,DynamicKey,typename internal::enable_if<internal::is_integral<T>::value>::type> { typedef Index type; };
|
||||
template<typename T, int DynamicKey> struct cleanup_index_type<T,DynamicKey,std::enable_if_t<internal::is_integral<T>::value>> { typedef Index type; };
|
||||
|
||||
// If VariableAndFixedInt does not match DynamicKey, then we turn it to a pure compile-time value:
|
||||
template<int N, int DynamicKey> struct cleanup_index_type<VariableAndFixedInt<N>, DynamicKey> { typedef FixedInt<N> type; };
|
||||
|
@ -90,24 +90,6 @@ struct bool_constant<true> : true_type {};
|
||||
template<>
|
||||
struct bool_constant<false> : false_type {};
|
||||
|
||||
template<bool Condition, typename Then, typename Else>
|
||||
struct conditional { typedef Then type; };
|
||||
|
||||
template<typename Then, typename Else>
|
||||
struct conditional <false, Then, Else> { typedef Else type; };
|
||||
|
||||
template<typename T> struct remove_reference { typedef T type; };
|
||||
template<typename T> struct remove_reference<T&> { typedef T type; };
|
||||
|
||||
template<typename T> struct remove_pointer { typedef T type; };
|
||||
template<typename T> struct remove_pointer<T*> { typedef T type; };
|
||||
template<typename T> struct remove_pointer<T*const> { typedef T type; };
|
||||
|
||||
template <class T> struct remove_const { typedef T type; };
|
||||
template <class T> struct remove_const<const T> { typedef T type; };
|
||||
template <class T> struct remove_const<const T[]> { typedef T type[]; };
|
||||
template <class T, unsigned int Size> struct remove_const<const T[Size]> { typedef T type[Size]; };
|
||||
|
||||
template<typename T> struct remove_all { typedef T type; };
|
||||
template<typename T> struct remove_all<const T> { typedef typename remove_all<T>::type type; };
|
||||
template<typename T> struct remove_all<T const&> { typedef typename remove_all<T>::type type; };
|
||||
@ -115,6 +97,9 @@ template<typename T> struct remove_all<T&> { typedef typename remove_all<
|
||||
template<typename T> struct remove_all<T const*> { typedef typename remove_all<T>::type type; };
|
||||
template<typename T> struct remove_all<T*> { typedef typename remove_all<T>::type type; };
|
||||
|
||||
template<typename T>
|
||||
using remove_all_t = typename remove_all<T>::type;
|
||||
|
||||
template<typename T> struct is_arithmetic { enum { value = false }; };
|
||||
template<> struct is_arithmetic<float> { enum { value = true }; };
|
||||
template<> struct is_arithmetic<double> { enum { value = true }; };
|
||||
@ -134,7 +119,7 @@ template<typename T, typename U> struct is_same { enum { value = 0 }; };
|
||||
template<typename T> struct is_same<T,T> { enum { value = 1 }; };
|
||||
|
||||
template< class T >
|
||||
struct is_void : is_same<void, typename remove_const<T>::type> {};
|
||||
struct is_void : is_same<void, std::remove_const_t<T>> {};
|
||||
|
||||
template<> struct is_arithmetic<signed long long> { enum { value = true }; };
|
||||
template<> struct is_arithmetic<unsigned long long> { enum { value = true }; };
|
||||
@ -142,9 +127,6 @@ using std::is_integral;
|
||||
|
||||
using std::make_unsigned;
|
||||
|
||||
template <typename T> struct add_const { typedef const T type; };
|
||||
template <typename T> struct add_const<T&> { typedef T& type; };
|
||||
|
||||
template <typename T> struct is_const { enum { value = 0 }; };
|
||||
template <typename T> struct is_const<T const> { enum { value = 1 }; };
|
||||
|
||||
@ -154,16 +136,11 @@ template<typename T> struct add_const_on_value_type<T*> { typedef T const
|
||||
template<typename T> struct add_const_on_value_type<T* const> { typedef T const* const type; };
|
||||
template<typename T> struct add_const_on_value_type<T const* const> { typedef T const* const type; };
|
||||
|
||||
template<typename T>
|
||||
using add_const_on_value_type_t = typename add_const_on_value_type<T>::type;
|
||||
|
||||
using std::is_convertible;
|
||||
|
||||
/** \internal Allows to enable/disable an overload
|
||||
* according to a compile time condition.
|
||||
*/
|
||||
template<bool Condition, typename T=void> struct enable_if;
|
||||
|
||||
template<typename T> struct enable_if<true,T>
|
||||
{ typedef T type; };
|
||||
|
||||
/** \internal
|
||||
* A base class do disable default copy ctor and copy assignment operator.
|
||||
*/
|
||||
@ -194,7 +171,7 @@ template<typename T, typename EnableIf = void> struct array_size {
|
||||
enum { value = Dynamic };
|
||||
};
|
||||
|
||||
template<typename T> struct array_size<T,typename internal::enable_if<((T::SizeAtCompileTime&0)==0)>::type> {
|
||||
template<typename T> struct array_size<T, std::enable_if_t<((T::SizeAtCompileTime&0)==0)>> {
|
||||
enum { value = T::SizeAtCompileTime };
|
||||
};
|
||||
|
||||
@ -256,24 +233,24 @@ template<typename T> struct result_of;
|
||||
template<typename F, typename... ArgTypes>
|
||||
struct result_of<F(ArgTypes...)> {
|
||||
typedef typename std::invoke_result<F, ArgTypes...>::type type1;
|
||||
typedef typename remove_all<type1>::type type;
|
||||
typedef remove_all_t<type1> type;
|
||||
};
|
||||
|
||||
template<typename F, typename... ArgTypes>
|
||||
struct invoke_result {
|
||||
typedef typename std::invoke_result<F, ArgTypes...>::type type1;
|
||||
typedef typename remove_all<type1>::type type;
|
||||
typedef remove_all_t<type1> type;
|
||||
};
|
||||
#else
|
||||
template<typename T> struct result_of {
|
||||
typedef typename std::result_of<T>::type type1;
|
||||
typedef typename remove_all<type1>::type type;
|
||||
typedef remove_all_t<type1> type;
|
||||
};
|
||||
|
||||
template<typename F, typename... ArgTypes>
|
||||
struct invoke_result {
|
||||
typedef typename result_of<F(ArgTypes...)>::type type1;
|
||||
typedef typename remove_all<type1>::type type;
|
||||
typedef remove_all_t<type1> type;
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -305,7 +282,7 @@ template<typename T> const T* return_ptr();
|
||||
template <typename T, typename IndexType=Index>
|
||||
struct has_nullary_operator
|
||||
{
|
||||
template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()())>0)>::type * = 0);
|
||||
template <typename C> static meta_yes testFunctor(C const *,std::enable_if_t<(sizeof(return_ptr<C>()->operator()())>0)> * = 0);
|
||||
static meta_no testFunctor(...);
|
||||
|
||||
enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
|
||||
@ -314,7 +291,7 @@ struct has_nullary_operator
|
||||
template <typename T, typename IndexType=Index>
|
||||
struct has_unary_operator
|
||||
{
|
||||
template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()(IndexType(0)))>0)>::type * = 0);
|
||||
template <typename C> static meta_yes testFunctor(C const *,std::enable_if_t<(sizeof(return_ptr<C>()->operator()(IndexType(0)))>0)> * = 0);
|
||||
static meta_no testFunctor(...);
|
||||
|
||||
enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
|
||||
@ -323,7 +300,7 @@ struct has_unary_operator
|
||||
template <typename T, typename IndexType=Index>
|
||||
struct has_binary_operator
|
||||
{
|
||||
template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()(IndexType(0),IndexType(0)))>0)>::type * = 0);
|
||||
template <typename C> static meta_yes testFunctor(C const *,std::enable_if_t<(sizeof(return_ptr<C>()->operator()(IndexType(0),IndexType(0)))>0)> * = 0);
|
||||
static meta_no testFunctor(...);
|
||||
|
||||
enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
|
||||
@ -381,7 +358,7 @@ template<typename T, typename U> struct scalar_product_traits
|
||||
// FIXME quick workaround around current limitation of result_of
|
||||
// template<typename Scalar, typename ArgType0, typename ArgType1>
|
||||
// struct result_of<scalar_product_op<Scalar>(ArgType0,ArgType1)> {
|
||||
// typedef typename scalar_product_traits<typename remove_all<ArgType0>::type, typename remove_all<ArgType1>::type>::ReturnType type;
|
||||
// typedef typename scalar_product_traits<remove_all_t<ArgType0>, remove_all_t<ArgType1>>::ReturnType type;
|
||||
// };
|
||||
|
||||
/** \internal Obtains a POD type suitable to use as storage for an object of a size
|
||||
|
@ -28,9 +28,9 @@ class Serializer;
|
||||
|
||||
// Specialization for POD types.
|
||||
template<typename T>
|
||||
class Serializer<T, typename std::enable_if<
|
||||
class Serializer<T, typename std::enable_if_t<
|
||||
std::is_trivial<T>::value
|
||||
&& std::is_standard_layout<T>::value>::type > {
|
||||
&& std::is_standard_layout<T>::value>> {
|
||||
public:
|
||||
|
||||
/**
|
||||
|
@ -113,7 +113,7 @@ class no_assignment_operator
|
||||
template<typename I1, typename I2>
|
||||
struct promote_index_type
|
||||
{
|
||||
typedef typename conditional<(sizeof(I1)<sizeof(I2)), I2, I1>::type type;
|
||||
typedef std::conditional_t<(sizeof(I1)<sizeof(I2)), I2, I1> type;
|
||||
};
|
||||
|
||||
/** \internal If the template parameter Value is Dynamic, this class is just a wrapper around a T variable that
|
||||
@ -409,28 +409,28 @@ template<typename T> struct plain_matrix_type_row_major
|
||||
template <typename T>
|
||||
struct ref_selector
|
||||
{
|
||||
typedef typename conditional<
|
||||
typedef std::conditional_t<
|
||||
bool(traits<T>::Flags & NestByRefBit),
|
||||
T const&,
|
||||
const T
|
||||
>::type type;
|
||||
> type;
|
||||
|
||||
typedef typename conditional<
|
||||
typedef std::conditional_t<
|
||||
bool(traits<T>::Flags & NestByRefBit),
|
||||
T &,
|
||||
T
|
||||
>::type non_const_type;
|
||||
> non_const_type;
|
||||
};
|
||||
|
||||
/** \internal Adds the const qualifier on the value-type of T2 if and only if T1 is a const type */
|
||||
template<typename T1, typename T2>
|
||||
struct transfer_constness
|
||||
{
|
||||
typedef typename conditional<
|
||||
typedef std::conditional_t<
|
||||
bool(internal::is_const<T1>::value),
|
||||
typename internal::add_const_on_value_type<T2>::type,
|
||||
add_const_on_value_type_t<T2>,
|
||||
T2
|
||||
>::type type;
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
@ -463,7 +463,7 @@ template<typename T, int n, typename PlainObject = typename plain_object_eval<T>
|
||||
Evaluate = (int(evaluator<T>::Flags) & EvalBeforeNestingBit) || (int(CostEval) < int(CostNoEval))
|
||||
};
|
||||
|
||||
typedef typename conditional<Evaluate, PlainObject, typename ref_selector<T>::type>::type type;
|
||||
typedef std::conditional_t<Evaluate, PlainObject, typename ref_selector<T>::type> type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
@ -503,10 +503,10 @@ 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 remove_all_t<CastType> CastType_;
|
||||
typedef typename CastType_::Scalar NewScalarType;
|
||||
typedef typename conditional<is_same<CurrentScalarType,NewScalarType>::value,
|
||||
const XprType&,CastType>::type type;
|
||||
typedef std::conditional_t<is_same<CurrentScalarType,NewScalarType>::value,
|
||||
const XprType&,CastType> type;
|
||||
};
|
||||
|
||||
template <typename A, typename B> struct promote_storage_type;
|
||||
@ -597,11 +597,11 @@ struct plain_row_type
|
||||
typedef Array<Scalar, 1, ExpressionType::ColsAtCompileTime,
|
||||
int(ExpressionType::PlainObject::Options) | int(RowMajor), 1, ExpressionType::MaxColsAtCompileTime> ArrayRowType;
|
||||
|
||||
typedef typename conditional<
|
||||
typedef std::conditional_t<
|
||||
is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value,
|
||||
MatrixRowType,
|
||||
ArrayRowType
|
||||
>::type type;
|
||||
> type;
|
||||
};
|
||||
|
||||
template<typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>
|
||||
@ -612,11 +612,11 @@ struct plain_col_type
|
||||
typedef Array<Scalar, ExpressionType::RowsAtCompileTime, 1,
|
||||
ExpressionType::PlainObject::Options & ~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1> ArrayColType;
|
||||
|
||||
typedef typename conditional<
|
||||
typedef std::conditional_t<
|
||||
is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value,
|
||||
MatrixColType,
|
||||
ArrayColType
|
||||
>::type type;
|
||||
> type;
|
||||
};
|
||||
|
||||
template<typename ExpressionType, typename Scalar = typename ExpressionType::Scalar>
|
||||
@ -629,11 +629,11 @@ struct plain_diag_type
|
||||
typedef Matrix<Scalar, diag_size, 1, ExpressionType::PlainObject::Options & ~RowMajor, max_diag_size, 1> MatrixDiagType;
|
||||
typedef Array<Scalar, diag_size, 1, ExpressionType::PlainObject::Options & ~RowMajor, max_diag_size, 1> ArrayDiagType;
|
||||
|
||||
typedef typename conditional<
|
||||
typedef std::conditional_t<
|
||||
is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value,
|
||||
MatrixDiagType,
|
||||
ArrayDiagType
|
||||
>::type type;
|
||||
> type;
|
||||
};
|
||||
|
||||
template<typename Expr,typename Scalar = typename Expr::Scalar>
|
||||
@ -647,7 +647,7 @@ struct plain_constant_type
|
||||
typedef Matrix<Scalar, traits<Expr>::RowsAtCompileTime, traits<Expr>::ColsAtCompileTime,
|
||||
Options, traits<Expr>::MaxRowsAtCompileTime,traits<Expr>::MaxColsAtCompileTime> matrix_type;
|
||||
|
||||
typedef CwiseNullaryOp<scalar_constant_op<Scalar>, const typename conditional<is_same< typename traits<Expr>::XprKind, MatrixXpr >::value, matrix_type, array_type>::type > type;
|
||||
typedef CwiseNullaryOp<scalar_constant_op<Scalar>, const std::conditional_t<is_same< typename traits<Expr>::XprKind, MatrixXpr >::value, matrix_type, array_type> > type;
|
||||
};
|
||||
|
||||
template<typename ExpressionType>
|
||||
@ -687,14 +687,14 @@ struct possibly_same_dense {
|
||||
|
||||
template<typename T1, typename T2>
|
||||
EIGEN_DEVICE_FUNC
|
||||
bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if<possibly_same_dense<T1,T2>::value>::type * = 0)
|
||||
bool is_same_dense(const T1 &mat1, const T2 &mat2, std::enable_if_t<possibly_same_dense<T1,T2>::value> * = 0)
|
||||
{
|
||||
return (mat1.data()==mat2.data()) && (mat1.innerStride()==mat2.innerStride()) && (mat1.outerStride()==mat2.outerStride());
|
||||
}
|
||||
|
||||
template<typename T1, typename T2>
|
||||
EIGEN_DEVICE_FUNC
|
||||
bool is_same_dense(const T1 &, const T2 &, typename enable_if<!possibly_same_dense<T1,T2>::value>::type * = 0)
|
||||
bool is_same_dense(const T1 &, const T2 &, std::enable_if_t<!possibly_same_dense<T1,T2>::value> * = 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -716,9 +716,9 @@ struct scalar_div_cost<std::complex<T>, Vectorized> {
|
||||
|
||||
|
||||
template<bool Vectorized>
|
||||
struct scalar_div_cost<signed long,Vectorized,typename conditional<sizeof(long)==8,void,false_type>::type> { enum { value = 24 }; };
|
||||
struct scalar_div_cost<signed long,Vectorized, std::conditional_t<sizeof(long)==8,void,false_type>> { enum { value = 24 }; };
|
||||
template<bool Vectorized>
|
||||
struct scalar_div_cost<unsigned long,Vectorized,typename conditional<sizeof(long)==8,void,false_type>::type> { enum { value = 21 }; };
|
||||
struct scalar_div_cost<unsigned long,Vectorized, std::conditional_t<sizeof(long)==8,void,false_type>> { enum { value = 21 }; };
|
||||
|
||||
|
||||
#ifdef EIGEN_DEBUG_ASSIGN
|
||||
@ -807,12 +807,12 @@ struct ScalarBinaryOpTraits<T,T,BinaryOp>
|
||||
};
|
||||
|
||||
template <typename T, typename BinaryOp>
|
||||
struct ScalarBinaryOpTraits<T, typename NumTraits<typename internal::enable_if<NumTraits<T>::IsComplex,T>::type>::Real, BinaryOp>
|
||||
struct ScalarBinaryOpTraits<T, typename NumTraits<std::enable_if_t<NumTraits<T>::IsComplex,T>>::Real, BinaryOp>
|
||||
{
|
||||
typedef T ReturnType;
|
||||
};
|
||||
template <typename T, typename BinaryOp>
|
||||
struct ScalarBinaryOpTraits<typename NumTraits<typename internal::enable_if<NumTraits<T>::IsComplex,T>::type>::Real, T, BinaryOp>
|
||||
struct ScalarBinaryOpTraits<typename NumTraits<std::enable_if_t<NumTraits<T>::IsComplex,T>>::Real, T, BinaryOp>
|
||||
{
|
||||
typedef T ReturnType;
|
||||
};
|
||||
|
@ -84,7 +84,7 @@ template<typename MatrixType_> class HessenbergDecomposition
|
||||
typedef Matrix<Scalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> CoeffVectorType;
|
||||
|
||||
/** \brief Return type of matrixQ() */
|
||||
typedef HouseholderSequence<MatrixType,typename internal::remove_all<typename CoeffVectorType::ConjugateReturnType>::type> HouseholderSequenceType;
|
||||
typedef HouseholderSequence<MatrixType,internal::remove_all_t<typename CoeffVectorType::ConjugateReturnType>> HouseholderSequenceType;
|
||||
|
||||
typedef internal::HessenbergDecompositionMatrixHReturnType<MatrixType> MatrixHReturnType;
|
||||
|
||||
|
@ -85,21 +85,21 @@ template<typename MatrixType_> class Tridiagonalization
|
||||
typedef Matrix<Scalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> CoeffVectorType;
|
||||
typedef typename internal::plain_col_type<MatrixType, RealScalar>::type DiagonalType;
|
||||
typedef Matrix<RealScalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> SubDiagonalType;
|
||||
typedef typename internal::remove_all<typename MatrixType::RealReturnType>::type MatrixTypeRealView;
|
||||
typedef internal::remove_all_t<typename MatrixType::RealReturnType> MatrixTypeRealView;
|
||||
typedef internal::TridiagonalizationMatrixTReturnType<MatrixTypeRealView> MatrixTReturnType;
|
||||
|
||||
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||
typename internal::add_const_on_value_type<typename Diagonal<const MatrixType>::RealReturnType>::type,
|
||||
typedef std::conditional_t<NumTraits<Scalar>::IsComplex,
|
||||
internal::add_const_on_value_type_t<typename Diagonal<const MatrixType>::RealReturnType>,
|
||||
const Diagonal<const MatrixType>
|
||||
>::type DiagonalReturnType;
|
||||
> DiagonalReturnType;
|
||||
|
||||
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||
typename internal::add_const_on_value_type<typename Diagonal<const MatrixType, -1>::RealReturnType>::type,
|
||||
typedef std::conditional_t<NumTraits<Scalar>::IsComplex,
|
||||
internal::add_const_on_value_type_t<typename Diagonal<const MatrixType, -1>::RealReturnType>,
|
||||
const Diagonal<const MatrixType, -1>
|
||||
>::type SubDiagonalReturnType;
|
||||
> SubDiagonalReturnType;
|
||||
|
||||
/** \brief Return type of matrixQ() */
|
||||
typedef HouseholderSequence<MatrixType,typename internal::remove_all<typename CoeffVectorType::ConjugateReturnType>::type> HouseholderSequenceType;
|
||||
typedef HouseholderSequence<MatrixType,internal::remove_all_t<typename CoeffVectorType::ConjugateReturnType>> HouseholderSequenceType;
|
||||
|
||||
/** \brief Default constructor.
|
||||
*
|
||||
|
@ -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 std::remove_reference_t<MatrixTypeNested> MatrixTypeNested_;
|
||||
enum {
|
||||
RowsPlusOne = (MatrixType::RowsAtCompileTime != Dynamic) ?
|
||||
int(MatrixType::RowsAtCompileTime) + 1 : Dynamic,
|
||||
@ -227,7 +227,7 @@ template<typename Scalar, int Dim, int Mode,int Options>
|
||||
struct take_matrix_for_product<Transform<Scalar, Dim, Mode, Options> >
|
||||
{
|
||||
typedef Transform<Scalar, Dim, Mode, Options> TransformType;
|
||||
typedef typename internal::add_const<typename TransformType::ConstAffinePart>::type type;
|
||||
typedef std::add_const_t<typename TransformType::ConstAffinePart> type;
|
||||
EIGEN_DEVICE_FUNC static type run (const TransformType& x) { return x.affine(); }
|
||||
};
|
||||
|
||||
@ -243,8 +243,8 @@ template<typename MatrixType,typename Lhs>
|
||||
struct traits<homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> >
|
||||
{
|
||||
typedef typename take_matrix_for_product<Lhs>::type LhsMatrixType;
|
||||
typedef typename remove_all<MatrixType>::type MatrixTypeCleaned;
|
||||
typedef typename remove_all<LhsMatrixType>::type LhsMatrixTypeCleaned;
|
||||
typedef remove_all_t<MatrixType> MatrixTypeCleaned;
|
||||
typedef remove_all_t<LhsMatrixType> LhsMatrixTypeCleaned;
|
||||
typedef typename make_proper_matrix_type<
|
||||
typename traits<MatrixTypeCleaned>::Scalar,
|
||||
LhsMatrixTypeCleaned::RowsAtCompileTime,
|
||||
@ -259,8 +259,8 @@ struct homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs>
|
||||
: public ReturnByValue<homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> >
|
||||
{
|
||||
typedef typename traits<homogeneous_left_product_impl>::LhsMatrixType LhsMatrixType;
|
||||
typedef typename remove_all<LhsMatrixType>::type LhsMatrixTypeCleaned;
|
||||
typedef typename remove_all<typename LhsMatrixTypeCleaned::Nested>::type LhsMatrixTypeNested;
|
||||
typedef remove_all_t<LhsMatrixType> LhsMatrixTypeCleaned;
|
||||
typedef remove_all_t<typename LhsMatrixTypeCleaned::Nested> LhsMatrixTypeNested;
|
||||
EIGEN_DEVICE_FUNC homogeneous_left_product_impl(const Lhs& lhs, const MatrixType& rhs)
|
||||
: m_lhs(take_matrix_for_product<Lhs>::run(lhs)),
|
||||
m_rhs(rhs)
|
||||
@ -301,7 +301,7 @@ template<typename MatrixType,typename Rhs>
|
||||
struct homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs>
|
||||
: public ReturnByValue<homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs> >
|
||||
{
|
||||
typedef typename remove_all<typename Rhs::Nested>::type RhsNested;
|
||||
typedef remove_all_t<typename Rhs::Nested> RhsNested;
|
||||
EIGEN_DEVICE_FUNC homogeneous_right_product_impl(const MatrixType& lhs, const Rhs& rhs)
|
||||
: m_lhs(lhs), m_rhs(rhs)
|
||||
{}
|
||||
@ -404,7 +404,7 @@ struct homogeneous_right_product_refactoring_helper
|
||||
Rows = Lhs::RowsAtCompileTime
|
||||
};
|
||||
typedef typename Rhs::template ConstNRowsBlockXpr<Dim>::Type LinearBlockConst;
|
||||
typedef typename remove_const<LinearBlockConst>::type LinearBlock;
|
||||
typedef std::remove_const_t<LinearBlockConst> LinearBlock;
|
||||
typedef typename Rhs::ConstRowXpr ConstantColumn;
|
||||
typedef Replicate<const ConstantColumn,Rows,1> ConstantBlock;
|
||||
typedef Product<Lhs,LinearBlock,LazyProduct> LinearProduct;
|
||||
@ -457,7 +457,7 @@ struct homogeneous_left_product_refactoring_helper
|
||||
Cols = Rhs::ColsAtCompileTime
|
||||
};
|
||||
typedef typename Lhs::template ConstNColsBlockXpr<Dim>::Type LinearBlockConst;
|
||||
typedef typename remove_const<LinearBlockConst>::type LinearBlock;
|
||||
typedef std::remove_const_t<LinearBlockConst> LinearBlock;
|
||||
typedef typename Lhs::ConstColXpr ConstantColumn;
|
||||
typedef Replicate<const ConstantColumn,1,Cols> ConstantBlock;
|
||||
typedef Product<LinearBlock,Rhs,LazyProduct> LinearProduct;
|
||||
|
@ -93,8 +93,8 @@ MatrixBase<Derived>::cross3(const MatrixBase<OtherDerived>& other) const
|
||||
OtherDerivedNested rhs(other.derived());
|
||||
|
||||
return internal::cross3_impl<Architecture::Target,
|
||||
typename internal::remove_all<DerivedNested>::type,
|
||||
typename internal::remove_all<OtherDerivedNested>::type>::run(lhs,rhs);
|
||||
internal::remove_all_t<DerivedNested>,
|
||||
internal::remove_all_t<OtherDerivedNested>>::run(lhs,rhs);
|
||||
}
|
||||
|
||||
/** \geometry_module \ingroup Geometry_Module
|
||||
|
@ -46,8 +46,8 @@ class QuaternionBase : public RotationBase<Derived, 3>
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef typename internal::traits<Derived>::Coefficients Coefficients;
|
||||
typedef typename Coefficients::CoeffReturnType CoeffReturnType;
|
||||
typedef typename internal::conditional<bool(internal::traits<Derived>::Flags&LvalueBit),
|
||||
Scalar&, CoeffReturnType>::type NonConstCoeffReturnType;
|
||||
typedef std::conditional_t<bool(internal::traits<Derived>::Flags&LvalueBit),
|
||||
Scalar&, CoeffReturnType> NonConstCoeffReturnType;
|
||||
|
||||
|
||||
enum {
|
||||
@ -200,14 +200,14 @@ class QuaternionBase : public RotationBase<Derived, 3>
|
||||
|
||||
template<typename NewScalarType>
|
||||
EIGEN_DEVICE_FUNC inline
|
||||
typename internal::enable_if<internal::is_same<Scalar,NewScalarType>::value,const Derived&>::type cast() const
|
||||
std::enable_if_t<internal::is_same<Scalar,NewScalarType>::value,const Derived&> cast() const
|
||||
{
|
||||
return derived();
|
||||
}
|
||||
|
||||
template<typename NewScalarType>
|
||||
EIGEN_DEVICE_FUNC inline
|
||||
typename internal::enable_if<!internal::is_same<Scalar,NewScalarType>::value,Quaternion<NewScalarType> >::type cast() const
|
||||
std::enable_if_t<!internal::is_same<Scalar,NewScalarType>::value,Quaternion<NewScalarType> > cast() const
|
||||
{
|
||||
return Quaternion<NewScalarType>(coeffs().template cast<NewScalarType>());
|
||||
}
|
||||
|
@ -229,13 +229,13 @@ public:
|
||||
/** type of read reference to the linear part of the transformation */
|
||||
typedef const Block<ConstMatrixType,Dim,Dim,int(Mode)==(AffineCompact) && (int(Options)&RowMajor)==0> ConstLinearPart;
|
||||
/** type of read/write reference to the affine part of the transformation */
|
||||
typedef typename internal::conditional<int(Mode)==int(AffineCompact),
|
||||
typedef std::conditional_t<int(Mode)==int(AffineCompact),
|
||||
MatrixType&,
|
||||
Block<MatrixType,Dim,HDim> >::type AffinePart;
|
||||
Block<MatrixType,Dim,HDim> > AffinePart;
|
||||
/** type of read reference to the affine part of the transformation */
|
||||
typedef typename internal::conditional<int(Mode)==int(AffineCompact),
|
||||
typedef std::conditional_t<int(Mode)==int(AffineCompact),
|
||||
const MatrixType&,
|
||||
const Block<const MatrixType,Dim,HDim> >::type ConstAffinePart;
|
||||
const Block<const MatrixType,Dim,HDim> > ConstAffinePart;
|
||||
/** type of a vector */
|
||||
typedef Matrix<Scalar,Dim,1> VectorType;
|
||||
/** type of a read/write reference to the translation part of the rotation */
|
||||
@ -600,7 +600,7 @@ public:
|
||||
template<typename Derived>
|
||||
EIGEN_DEVICE_FUNC inline Transform operator*(const RotationBase<Derived,Dim>& r) const;
|
||||
|
||||
typedef typename internal::conditional<int(Mode)==Isometry,ConstLinearPart,const LinearMatrixType>::type RotationReturnType;
|
||||
typedef std::conditional_t<int(Mode)==Isometry,ConstLinearPart,const LinearMatrixType> RotationReturnType;
|
||||
EIGEN_DEVICE_FUNC RotationReturnType rotation() const;
|
||||
|
||||
template<typename RotationMatrixType, typename ScalingMatrixType>
|
||||
|
@ -133,7 +133,7 @@ public:
|
||||
|
||||
/** Applies translation to vector */
|
||||
template<typename Derived>
|
||||
inline typename internal::enable_if<Derived::IsVectorAtCompileTime,VectorType>::type
|
||||
inline std::enable_if_t<Derived::IsVectorAtCompileTime,VectorType>
|
||||
operator* (const MatrixBase<Derived>& vec) const
|
||||
{ return m_coeffs + vec.derived(); }
|
||||
|
||||
|
@ -133,34 +133,34 @@ template<typename VectorsType, typename CoeffsType, int Side> class HouseholderS
|
||||
typedef typename internal::traits<HouseholderSequence>::Scalar Scalar;
|
||||
|
||||
typedef HouseholderSequence<
|
||||
typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||
typename internal::remove_all<typename VectorsType::ConjugateReturnType>::type,
|
||||
VectorsType>::type,
|
||||
typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||
typename internal::remove_all<typename CoeffsType::ConjugateReturnType>::type,
|
||||
CoeffsType>::type,
|
||||
std::conditional_t<NumTraits<Scalar>::IsComplex,
|
||||
internal::remove_all_t<typename VectorsType::ConjugateReturnType>,
|
||||
VectorsType>,
|
||||
std::conditional_t<NumTraits<Scalar>::IsComplex,
|
||||
internal::remove_all_t<typename CoeffsType::ConjugateReturnType>,
|
||||
CoeffsType>,
|
||||
Side
|
||||
> ConjugateReturnType;
|
||||
|
||||
typedef HouseholderSequence<
|
||||
VectorsType,
|
||||
typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||
typename internal::remove_all<typename CoeffsType::ConjugateReturnType>::type,
|
||||
CoeffsType>::type,
|
||||
std::conditional_t<NumTraits<Scalar>::IsComplex,
|
||||
internal::remove_all_t<typename CoeffsType::ConjugateReturnType>,
|
||||
CoeffsType>,
|
||||
Side
|
||||
> AdjointReturnType;
|
||||
|
||||
typedef HouseholderSequence<
|
||||
typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||
typename internal::remove_all<typename VectorsType::ConjugateReturnType>::type,
|
||||
VectorsType>::type,
|
||||
std::conditional_t<NumTraits<Scalar>::IsComplex,
|
||||
internal::remove_all_t<typename VectorsType::ConjugateReturnType>,
|
||||
VectorsType>,
|
||||
CoeffsType,
|
||||
Side
|
||||
> TransposeReturnType;
|
||||
|
||||
typedef HouseholderSequence<
|
||||
typename internal::add_const<VectorsType>::type,
|
||||
typename internal::add_const<CoeffsType>::type,
|
||||
std::add_const_t<VectorsType>,
|
||||
std::add_const_t<CoeffsType>,
|
||||
Side
|
||||
> ConstHouseholderSequence;
|
||||
|
||||
@ -257,10 +257,10 @@ template<typename VectorsType, typename CoeffsType, int Side> class HouseholderS
|
||||
*/
|
||||
template<bool Cond>
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline typename internal::conditional<Cond,ConjugateReturnType,ConstHouseholderSequence>::type
|
||||
inline std::conditional_t<Cond,ConjugateReturnType,ConstHouseholderSequence>
|
||||
conjugateIf() const
|
||||
{
|
||||
typedef typename internal::conditional<Cond,ConjugateReturnType,ConstHouseholderSequence>::type ReturnType;
|
||||
typedef std::conditional_t<Cond,ConjugateReturnType,ConstHouseholderSequence> ReturnType;
|
||||
return ReturnType(m_vectors.template conjugateIf<Cond>(), m_coeffs.template conjugateIf<Cond>());
|
||||
}
|
||||
|
||||
@ -384,12 +384,12 @@ template<typename VectorsType, typename CoeffsType, int Side> class HouseholderS
|
||||
Index bs = end-k;
|
||||
Index start = k + m_shift;
|
||||
|
||||
typedef Block<typename internal::remove_all<VectorsType>::type,Dynamic,Dynamic> SubVectorsType;
|
||||
typedef Block<internal::remove_all_t<VectorsType>,Dynamic,Dynamic> SubVectorsType;
|
||||
SubVectorsType sub_vecs1(m_vectors.const_cast_derived(), Side==OnTheRight ? k : start,
|
||||
Side==OnTheRight ? start : k,
|
||||
Side==OnTheRight ? bs : m_vectors.rows()-start,
|
||||
Side==OnTheRight ? m_vectors.cols()-start : bs);
|
||||
typename internal::conditional<Side==OnTheRight, Transpose<SubVectorsType>, SubVectorsType&>::type sub_vecs(sub_vecs1);
|
||||
std::conditional_t<Side==OnTheRight, Transpose<SubVectorsType>, SubVectorsType&> sub_vecs(sub_vecs1);
|
||||
|
||||
Index dstStart = dst.rows()-rows()+m_shift+k;
|
||||
Index dstRows = rows()-m_shift-k;
|
||||
|
@ -207,12 +207,12 @@ public:
|
||||
&& (!MatrixType::IsRowMajor)
|
||||
&& (!NumTraits<Scalar>::IsComplex)
|
||||
};
|
||||
typedef typename internal::conditional<TransposeInput,Transpose<const ActualMatrixType>, ActualMatrixType const&>::type RowMajorWrapper;
|
||||
typedef std::conditional_t<TransposeInput,Transpose<const ActualMatrixType>, ActualMatrixType const&> RowMajorWrapper;
|
||||
EIGEN_STATIC_ASSERT(internal::check_implication(MatrixWrapper::MatrixFree,UpLo==(Lower|Upper)),MATRIX_FREE_CONJUGATE_GRADIENT_IS_COMPATIBLE_WITH_UPPER_UNION_LOWER_MODE_ONLY);
|
||||
typedef typename internal::conditional<UpLo==(Lower|Upper),
|
||||
RowMajorWrapper,
|
||||
typename MatrixWrapper::template ConstSelfAdjointViewReturnType<UpLo>::Type
|
||||
>::type SelfAdjointWrapper;
|
||||
typedef std::conditional_t<UpLo==(Lower|Upper),
|
||||
RowMajorWrapper,
|
||||
typename MatrixWrapper::template ConstSelfAdjointViewReturnType<UpLo>::Type
|
||||
> SelfAdjointWrapper;
|
||||
|
||||
m_iterations = Base::maxIterations();
|
||||
m_error = Base::m_tolerance;
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
template<typename MatrixType>
|
||||
struct is_ref_compatible
|
||||
{
|
||||
enum { value = is_ref_compatible_impl<typename remove_all<MatrixType>::type>::value };
|
||||
enum { value = is_ref_compatible_impl<remove_all_t<MatrixType>>::value };
|
||||
};
|
||||
|
||||
template<typename MatrixType, bool MatrixFree = !internal::is_ref_compatible<MatrixType>::value>
|
||||
@ -369,7 +369,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename Rhs, typename DestDerived>
|
||||
typename internal::enable_if<Rhs::ColsAtCompileTime!=1 && DestDerived::ColsAtCompileTime!=1>::type
|
||||
std::enable_if_t<Rhs::ColsAtCompileTime!=1 && DestDerived::ColsAtCompileTime!=1>
|
||||
_solve_with_guess_impl(const Rhs& b, MatrixBase<DestDerived> &aDest) const
|
||||
{
|
||||
eigen_assert(rows()==b.rows());
|
||||
@ -394,7 +394,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename Rhs, typename DestDerived>
|
||||
typename internal::enable_if<Rhs::ColsAtCompileTime==1 || DestDerived::ColsAtCompileTime==1>::type
|
||||
std::enable_if_t<Rhs::ColsAtCompileTime==1 || DestDerived::ColsAtCompileTime==1>
|
||||
_solve_with_guess_impl(const Rhs& b, MatrixBase<DestDerived> &dest) const
|
||||
{
|
||||
derived()._solve_vector_with_guess_impl(b,dest.derived());
|
||||
|
@ -163,7 +163,7 @@ template<typename Scalar>
|
||||
EIGEN_DEVICE_FUNC
|
||||
void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r)
|
||||
{
|
||||
makeGivens(p, q, r, typename internal::conditional<NumTraits<Scalar>::IsComplex, internal::true_type, internal::false_type>::type());
|
||||
makeGivens(p, q, r, std::conditional_t<NumTraits<Scalar>::IsComplex, internal::true_type, internal::false_type>());
|
||||
}
|
||||
|
||||
|
||||
|
@ -111,7 +111,7 @@ inline typename internal::traits<Derived>::Scalar MatrixBase<Derived>::determina
|
||||
{
|
||||
eigen_assert(rows() == cols());
|
||||
typedef typename internal::nested_eval<Derived,Base::RowsAtCompileTime>::type Nested;
|
||||
return internal::determinant_impl<typename internal::remove_all<Nested>::type>::run(derived());
|
||||
return internal::determinant_impl<internal::remove_all_t<Nested>>::run(derived());
|
||||
}
|
||||
|
||||
} // end namespace Eigen
|
||||
|
@ -317,7 +317,7 @@ struct Assignment<DstXprType, Inverse<XprType>, internal::assign_op<typename Dst
|
||||
&& "Aliasing problem detected in inverse(), you need to do inverse().eval() here.");
|
||||
|
||||
typedef typename internal::nested_eval<XprType,XprType::ColsAtCompileTime>::type ActualXprType;
|
||||
typedef typename internal::remove_all<ActualXprType>::type ActualXprTypeCleanded;
|
||||
typedef internal::remove_all_t<ActualXprType> ActualXprTypeCleanded;
|
||||
|
||||
ActualXprType actual_xpr(src.nestedExpression());
|
||||
|
||||
@ -387,11 +387,11 @@ inline void MatrixBase<Derived>::computeInverseAndDetWithCheck(
|
||||
eigen_assert(rows() == cols());
|
||||
// for 2x2, it's worth giving a chance to avoid evaluating.
|
||||
// for larger sizes, evaluating has negligible cost and limits code size.
|
||||
typedef typename internal::conditional<
|
||||
typedef std::conditional_t<
|
||||
RowsAtCompileTime == 2,
|
||||
typename internal::remove_all<typename internal::nested_eval<Derived, 2>::type>::type,
|
||||
internal::remove_all_t<typename internal::nested_eval<Derived, 2>::type>,
|
||||
PlainObject
|
||||
>::type MatrixType;
|
||||
> MatrixType;
|
||||
internal::compute_inverse_and_det_with_check<MatrixType, ResultType>::run
|
||||
(derived(), absDeterminantThreshold, inverse, determinant, invertible);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ struct compute_inverse_size4<Architecture::Target, float, MatrixType, ResultType
|
||||
ResultAlignment = traits<ResultType>::Alignment,
|
||||
StorageOrdersMatch = (MatrixType::Flags & RowMajorBit) == (ResultType::Flags & RowMajorBit)
|
||||
};
|
||||
typedef typename conditional<(MatrixType::Flags & LinearAccessBit), MatrixType const &, typename MatrixType::PlainObject>::type ActualMatrixType;
|
||||
typedef std::conditional_t<(MatrixType::Flags & LinearAccessBit), MatrixType const &, typename MatrixType::PlainObject> ActualMatrixType;
|
||||
|
||||
static void run(const MatrixType &mat, ResultType &result)
|
||||
{
|
||||
@ -175,9 +175,9 @@ struct compute_inverse_size4<Architecture::Target, double, MatrixType, ResultTyp
|
||||
ResultAlignment = traits<ResultType>::Alignment,
|
||||
StorageOrdersMatch = (MatrixType::Flags & RowMajorBit) == (ResultType::Flags & RowMajorBit)
|
||||
};
|
||||
typedef typename conditional<(MatrixType::Flags & LinearAccessBit),
|
||||
MatrixType const &,
|
||||
typename MatrixType::PlainObject>::type
|
||||
typedef std::conditional_t<(MatrixType::Flags & LinearAccessBit),
|
||||
MatrixType const &,
|
||||
typename MatrixType::PlainObject>
|
||||
ActualMatrixType;
|
||||
|
||||
static void run(const MatrixType &mat, ResultType &result)
|
||||
|
@ -69,7 +69,7 @@ template<typename MatrixType_> class ColPivHouseholderQR
|
||||
typedef typename internal::plain_row_type<MatrixType, Index>::type IntRowVectorType;
|
||||
typedef typename internal::plain_row_type<MatrixType>::type RowVectorType;
|
||||
typedef typename internal::plain_row_type<MatrixType, RealScalar>::type RealRowVectorType;
|
||||
typedef HouseholderSequence<MatrixType,typename internal::remove_all<typename HCoeffsType::ConjugateReturnType>::type> HouseholderSequenceType;
|
||||
typedef HouseholderSequence<MatrixType,internal::remove_all_t<typename HCoeffsType::ConjugateReturnType>> HouseholderSequenceType;
|
||||
typedef typename MatrixType::PlainObject PlainObject;
|
||||
|
||||
private:
|
||||
|
@ -73,8 +73,8 @@ template <typename MatrixType_> class CompleteOrthogonalDecomposition
|
||||
typedef typename internal::plain_row_type<MatrixType, RealScalar>::type
|
||||
RealRowVectorType;
|
||||
typedef HouseholderSequence<
|
||||
MatrixType, typename internal::remove_all<
|
||||
typename HCoeffsType::ConjugateReturnType>::type>
|
||||
MatrixType, internal::remove_all_t<
|
||||
typename HCoeffsType::ConjugateReturnType>>
|
||||
HouseholderSequenceType;
|
||||
typedef typename MatrixType::PlainObject PlainObject;
|
||||
|
||||
|
@ -72,7 +72,7 @@ template<typename MatrixType_> class HouseholderQR
|
||||
typedef Matrix<Scalar, RowsAtCompileTime, RowsAtCompileTime, (MatrixType::Flags&RowMajorBit) ? RowMajor : ColMajor, MaxRowsAtCompileTime, MaxRowsAtCompileTime> MatrixQType;
|
||||
typedef typename internal::plain_diag_type<MatrixType>::type HCoeffsType;
|
||||
typedef typename internal::plain_row_type<MatrixType>::type RowVectorType;
|
||||
typedef HouseholderSequence<MatrixType,typename internal::remove_all<typename HCoeffsType::ConjugateReturnType>::type> HouseholderSequenceType;
|
||||
typedef HouseholderSequence<MatrixType,internal::remove_all_t<typename HCoeffsType::ConjugateReturnType>> HouseholderSequenceType;
|
||||
|
||||
/**
|
||||
* \brief Default Constructor.
|
||||
|
@ -39,10 +39,10 @@ template<typename MatrixType_> class UpperBidiagonalization
|
||||
typedef Matrix<Scalar, ColsAtCompileTimeMinusOne, 1> SuperDiagVectorType;
|
||||
typedef HouseholderSequence<
|
||||
const MatrixType,
|
||||
const typename internal::remove_all<typename Diagonal<const MatrixType,0>::ConjugateReturnType>::type
|
||||
const internal::remove_all_t<typename Diagonal<const MatrixType,0>::ConjugateReturnType>
|
||||
> HouseholderUSequenceType;
|
||||
typedef HouseholderSequence<
|
||||
const typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type,
|
||||
const internal::remove_all_t<typename MatrixType::ConjugateReturnType>,
|
||||
Diagonal<const MatrixType,1>,
|
||||
OnTheRight
|
||||
> HouseholderVSequenceType;
|
||||
|
@ -19,9 +19,9 @@ namespace internal {
|
||||
template<typename Lhs, typename Rhs, typename ResultType>
|
||||
static void conservative_sparse_sparse_product_impl(const Lhs& lhs, const Rhs& rhs, ResultType& res, bool sortedInsertion = false)
|
||||
{
|
||||
typedef typename remove_all<Lhs>::type::Scalar LhsScalar;
|
||||
typedef typename remove_all<Rhs>::type::Scalar RhsScalar;
|
||||
typedef typename remove_all<ResultType>::type::Scalar ResScalar;
|
||||
typedef typename remove_all_t<Lhs>::Scalar LhsScalar;
|
||||
typedef typename remove_all_t<Rhs>::Scalar RhsScalar;
|
||||
typedef typename remove_all_t<ResultType>::Scalar ResScalar;
|
||||
|
||||
// make sure to call innerSize/outerSize since we fake the storage order.
|
||||
Index rows = lhs.innerSize();
|
||||
@ -140,7 +140,7 @@ struct conservative_sparse_sparse_product_selector;
|
||||
template<typename Lhs, typename Rhs, typename ResultType>
|
||||
struct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,ColMajor,ColMajor>
|
||||
{
|
||||
typedef typename remove_all<Lhs>::type LhsCleaned;
|
||||
typedef remove_all_t<Lhs> LhsCleaned;
|
||||
typedef typename LhsCleaned::Scalar Scalar;
|
||||
|
||||
static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
|
||||
@ -214,7 +214,7 @@ struct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,RowMajor,R
|
||||
template<typename Lhs, typename Rhs, typename ResultType>
|
||||
struct conservative_sparse_sparse_product_selector<Lhs,Rhs,ResultType,ColMajor,ColMajor,RowMajor>
|
||||
{
|
||||
typedef typename traits<typename remove_all<Lhs>::type>::Scalar Scalar;
|
||||
typedef typename traits<remove_all_t<Lhs>>::Scalar Scalar;
|
||||
|
||||
static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
|
||||
{
|
||||
@ -276,8 +276,8 @@ namespace internal {
|
||||
template<typename Lhs, typename Rhs, typename ResultType>
|
||||
static void sparse_sparse_to_dense_product_impl(const Lhs& lhs, const Rhs& rhs, ResultType& res)
|
||||
{
|
||||
typedef typename remove_all<Lhs>::type::Scalar LhsScalar;
|
||||
typedef typename remove_all<Rhs>::type::Scalar RhsScalar;
|
||||
typedef typename remove_all_t<Lhs>::Scalar LhsScalar;
|
||||
typedef typename remove_all_t<Rhs>::Scalar RhsScalar;
|
||||
Index cols = rhs.outerSize();
|
||||
eigen_assert(lhs.outerSize() == rhs.innerSize());
|
||||
|
||||
|
@ -174,7 +174,7 @@ struct assignment_from_dense_op_sparse
|
||||
// Specialization for dense1 = sparse + dense2; -> dense1 = dense2; dense1 += sparse;
|
||||
template<typename Lhs, typename Rhs, typename Scalar>
|
||||
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
typename internal::enable_if<internal::is_same<typename internal::evaluator_traits<Rhs>::Shape,DenseShape>::value>::type
|
||||
std::enable_if_t<internal::is_same<typename internal::evaluator_traits<Rhs>::Shape,DenseShape>::value>
|
||||
run(DstXprType &dst, const CwiseBinaryOp<internal::scalar_sum_op<Scalar,Scalar>, const Lhs, const Rhs> &src,
|
||||
const internal::assign_op<typename DstXprType::Scalar,Scalar>& /*func*/)
|
||||
{
|
||||
@ -190,7 +190,7 @@ struct assignment_from_dense_op_sparse
|
||||
// Specialization for dense1 = sparse - dense2; -> dense1 = -dense2; dense1 += sparse;
|
||||
template<typename Lhs, typename Rhs, typename Scalar>
|
||||
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
typename internal::enable_if<internal::is_same<typename internal::evaluator_traits<Rhs>::Shape,DenseShape>::value>::type
|
||||
std::enable_if_t<internal::is_same<typename internal::evaluator_traits<Rhs>::Shape,DenseShape>::value>
|
||||
run(DstXprType &dst, const CwiseBinaryOp<internal::scalar_difference_op<Scalar,Scalar>, const Lhs, const Rhs> &src,
|
||||
const internal::assign_op<typename DstXprType::Scalar,Scalar>& /*func*/)
|
||||
{
|
||||
@ -208,8 +208,8 @@ struct assignment_from_dense_op_sparse
|
||||
template< typename DstXprType, typename Lhs, typename Rhs, typename Scalar> \
|
||||
struct Assignment<DstXprType, CwiseBinaryOp<internal::BINOP<Scalar,Scalar>, const Lhs, const Rhs>, internal::ASSIGN_OP<typename DstXprType::Scalar,Scalar>, \
|
||||
Sparse2Dense, \
|
||||
typename internal::enable_if< internal::is_same<typename internal::evaluator_traits<Lhs>::Shape,DenseShape>::value \
|
||||
|| internal::is_same<typename internal::evaluator_traits<Rhs>::Shape,DenseShape>::value>::type> \
|
||||
std::enable_if_t< internal::is_same<typename internal::evaluator_traits<Lhs>::Shape,DenseShape>::value \
|
||||
|| internal::is_same<typename internal::evaluator_traits<Rhs>::Shape,DenseShape>::value>> \
|
||||
: assignment_from_dense_op_sparse<DstXprType, internal::ASSIGN_OP<typename DstXprType::Scalar,typename Lhs::Scalar>, internal::ASSIGN_OP2<typename DstXprType::Scalar,typename Rhs::Scalar> > \
|
||||
{}
|
||||
|
||||
|
@ -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 internal::remove_all_t<typename XprType::Nested> 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 internal::remove_all_t<typename SparseMatrixType::Nested> MatrixTypeNested_;
|
||||
typedef Block<SparseMatrixType, BlockRows, BlockCols, true> BlockType;
|
||||
typedef SparseCompressedBase<Block<SparseMatrixType,BlockRows,BlockCols,true> > Base;
|
||||
using Base::convert_index;
|
||||
@ -121,7 +121,7 @@ public:
|
||||
template<typename OtherDerived>
|
||||
inline BlockType& operator=(const SparseMatrixBase<OtherDerived>& other)
|
||||
{
|
||||
typedef typename internal::remove_all<typename SparseMatrixType::Nested>::type NestedMatrixType_;
|
||||
typedef internal::remove_all_t<typename SparseMatrixType::Nested> 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 internal::remove_all_t<typename XprType::Nested> MatrixTypeNested_;
|
||||
|
||||
/** Column or Row constructor
|
||||
*/
|
||||
@ -436,7 +436,7 @@ struct unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBa
|
||||
Flags = XprType::Flags
|
||||
};
|
||||
|
||||
typedef typename internal::conditional<OuterVector,OuterVectorInnerIterator,InnerVectorInnerIterator>::type InnerIterator;
|
||||
typedef std::conditional_t<OuterVector,OuterVectorInnerIterator,InnerVectorInnerIterator> InnerIterator;
|
||||
|
||||
explicit unary_evaluator(const XprType& op)
|
||||
: m_argImpl(op.nestedExpression()), m_block(op)
|
||||
|
@ -28,9 +28,9 @@ struct sparse_time_dense_product_impl;
|
||||
template<typename SparseLhsType, typename DenseRhsType, typename DenseResType>
|
||||
struct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, typename DenseResType::Scalar, RowMajor, true>
|
||||
{
|
||||
typedef typename internal::remove_all<SparseLhsType>::type Lhs;
|
||||
typedef typename internal::remove_all<DenseRhsType>::type Rhs;
|
||||
typedef typename internal::remove_all<DenseResType>::type Res;
|
||||
typedef internal::remove_all_t<SparseLhsType> Lhs;
|
||||
typedef internal::remove_all_t<DenseRhsType> Rhs;
|
||||
typedef internal::remove_all_t<DenseResType> Res;
|
||||
typedef typename evaluator<Lhs>::InnerIterator LhsInnerIterator;
|
||||
typedef evaluator<Lhs> LhsEval;
|
||||
static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const typename Res::Scalar& alpha)
|
||||
@ -95,9 +95,9 @@ struct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, t
|
||||
template<typename SparseLhsType, typename DenseRhsType, typename DenseResType, typename AlphaType>
|
||||
struct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, AlphaType, ColMajor, true>
|
||||
{
|
||||
typedef typename internal::remove_all<SparseLhsType>::type Lhs;
|
||||
typedef typename internal::remove_all<DenseRhsType>::type Rhs;
|
||||
typedef typename internal::remove_all<DenseResType>::type Res;
|
||||
typedef internal::remove_all_t<SparseLhsType> Lhs;
|
||||
typedef internal::remove_all_t<DenseRhsType> Rhs;
|
||||
typedef internal::remove_all_t<DenseResType> Res;
|
||||
typedef evaluator<Lhs> LhsEval;
|
||||
typedef typename LhsEval::InnerIterator LhsInnerIterator;
|
||||
static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const AlphaType& alpha)
|
||||
@ -119,9 +119,9 @@ struct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, A
|
||||
template<typename SparseLhsType, typename DenseRhsType, typename DenseResType>
|
||||
struct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, typename DenseResType::Scalar, RowMajor, false>
|
||||
{
|
||||
typedef typename internal::remove_all<SparseLhsType>::type Lhs;
|
||||
typedef typename internal::remove_all<DenseRhsType>::type Rhs;
|
||||
typedef typename internal::remove_all<DenseResType>::type Res;
|
||||
typedef internal::remove_all_t<SparseLhsType> Lhs;
|
||||
typedef internal::remove_all_t<DenseRhsType> Rhs;
|
||||
typedef internal::remove_all_t<DenseResType> Res;
|
||||
typedef evaluator<Lhs> LhsEval;
|
||||
typedef typename LhsEval::InnerIterator LhsInnerIterator;
|
||||
static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const typename Res::Scalar& alpha)
|
||||
@ -159,9 +159,9 @@ struct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, t
|
||||
template<typename SparseLhsType, typename DenseRhsType, typename DenseResType>
|
||||
struct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, typename DenseResType::Scalar, ColMajor, false>
|
||||
{
|
||||
typedef typename internal::remove_all<SparseLhsType>::type Lhs;
|
||||
typedef typename internal::remove_all<DenseRhsType>::type Rhs;
|
||||
typedef typename internal::remove_all<DenseResType>::type Res;
|
||||
typedef internal::remove_all_t<SparseLhsType> Lhs;
|
||||
typedef internal::remove_all_t<DenseRhsType> Rhs;
|
||||
typedef internal::remove_all_t<DenseResType> Res;
|
||||
typedef typename evaluator<Lhs>::InnerIterator LhsInnerIterator;
|
||||
static void run(const SparseLhsType& lhs, const DenseRhsType& rhs, DenseResType& res, const typename Res::Scalar& alpha)
|
||||
{
|
||||
@ -236,16 +236,16 @@ template<typename LhsT, typename RhsT, bool NeedToTranspose>
|
||||
struct sparse_dense_outer_product_evaluator
|
||||
{
|
||||
protected:
|
||||
typedef typename conditional<NeedToTranspose,RhsT,LhsT>::type Lhs1;
|
||||
typedef typename conditional<NeedToTranspose,LhsT,RhsT>::type ActualRhs;
|
||||
typedef std::conditional_t<NeedToTranspose,RhsT,LhsT> Lhs1;
|
||||
typedef std::conditional_t<NeedToTranspose,LhsT,RhsT> ActualRhs;
|
||||
typedef Product<LhsT,RhsT,DefaultProduct> ProdXprType;
|
||||
|
||||
// if the actual left-hand side is a dense vector,
|
||||
// then build a sparse-view so that we can seamlessly iterate over it.
|
||||
typedef typename conditional<is_same<typename internal::traits<Lhs1>::StorageKind,Sparse>::value,
|
||||
Lhs1, SparseView<Lhs1> >::type ActualLhs;
|
||||
typedef typename conditional<is_same<typename internal::traits<Lhs1>::StorageKind,Sparse>::value,
|
||||
Lhs1 const&, SparseView<Lhs1> >::type LhsArg;
|
||||
typedef std::conditional_t<is_same<typename internal::traits<Lhs1>::StorageKind,Sparse>::value,
|
||||
Lhs1, SparseView<Lhs1> > ActualLhs;
|
||||
typedef std::conditional_t<is_same<typename internal::traits<Lhs1>::StorageKind,Sparse>::value,
|
||||
Lhs1 const&, SparseView<Lhs1> > LhsArg;
|
||||
|
||||
typedef evaluator<ActualLhs> LhsEval;
|
||||
typedef evaluator<ActualRhs> RhsEval;
|
||||
|
@ -19,9 +19,9 @@ template<typename OtherDerived>
|
||||
bool SparseMatrixBase<Derived>::isApprox(const SparseMatrixBase<OtherDerived>& other, const RealScalar &prec) const
|
||||
{
|
||||
const typename internal::nested_eval<Derived,2,PlainObject>::type actualA(derived());
|
||||
typename internal::conditional<bool(IsRowMajor)==bool(OtherDerived::IsRowMajor),
|
||||
std::conditional_t<bool(IsRowMajor)==bool(OtherDerived::IsRowMajor),
|
||||
const typename internal::nested_eval<OtherDerived,2,PlainObject>::type,
|
||||
const PlainObject>::type actualB(other.derived());
|
||||
const PlainObject> actualB(other.derived());
|
||||
|
||||
return (actualA - actualB).squaredNorm() <= prec * prec * numext::mini(actualA.squaredNorm(), actualB.squaredNorm());
|
||||
}
|
||||
|
@ -60,12 +60,12 @@ class SparseMapBase<Derived,ReadOnlyAccessors>
|
||||
using Base::operator=;
|
||||
protected:
|
||||
|
||||
typedef typename internal::conditional<
|
||||
bool(internal::is_lvalue<Derived>::value),
|
||||
Scalar *, const Scalar *>::type ScalarPointer;
|
||||
typedef typename internal::conditional<
|
||||
bool(internal::is_lvalue<Derived>::value),
|
||||
StorageIndex *, const StorageIndex *>::type IndexPointer;
|
||||
typedef std::conditional_t<
|
||||
bool(internal::is_lvalue<Derived>::value),
|
||||
Scalar *, const Scalar *> ScalarPointer;
|
||||
typedef std::conditional_t<
|
||||
bool(internal::is_lvalue<Derived>::value),
|
||||
StorageIndex *, const StorageIndex *> IndexPointer;
|
||||
|
||||
Index m_outerSize;
|
||||
Index m_innerSize;
|
||||
|
@ -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 std::remove_reference_t<MatrixTypeNested> MatrixTypeNested_;
|
||||
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Dense StorageKind;
|
||||
@ -1179,7 +1179,7 @@ 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::remove_all_t<OtherCopy> OtherCopy_;
|
||||
typedef internal::evaluator<OtherCopy_> OtherCopyEval;
|
||||
OtherCopy otherCopy(other.derived());
|
||||
OtherCopyEval otherCopyEval(otherCopy);
|
||||
|
@ -110,12 +110,12 @@ template<typename Derived> class SparseMatrixBase
|
||||
};
|
||||
|
||||
/** \internal the return type of MatrixBase::adjoint() */
|
||||
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||
typedef std::conditional_t<NumTraits<Scalar>::IsComplex,
|
||||
CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Eigen::Transpose<const Derived> >,
|
||||
Transpose<const Derived>
|
||||
>::type AdjointReturnType;
|
||||
> AdjointReturnType;
|
||||
typedef Transpose<Derived> TransposeReturnType;
|
||||
typedef typename internal::add_const<Transpose<const Derived> >::type ConstTransposeReturnType;
|
||||
typedef std::add_const_t<Transpose<const Derived> > ConstTransposeReturnType;
|
||||
|
||||
// FIXME storage order do not match evaluator storage order
|
||||
typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor, StorageIndex> PlainObject;
|
||||
@ -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 std::conditional_t<HasDirectAccess_, const Scalar&, Scalar> CoeffReturnType;
|
||||
|
||||
/** \internal Represents a matrix with all coefficients equal to one another*/
|
||||
typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,Matrix<Scalar,Dynamic,Dynamic> > ConstantReturnType;
|
||||
@ -220,7 +220,7 @@ template<typename Derived> class SparseMatrixBase
|
||||
friend std::ostream & operator << (std::ostream & s, const SparseMatrixBase& m)
|
||||
{
|
||||
typedef typename Derived::Nested Nested;
|
||||
typedef typename internal::remove_all<Nested>::type NestedCleaned;
|
||||
typedef internal::remove_all_t<Nested> NestedCleaned;
|
||||
|
||||
if (Flags&RowMajorBit)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ template<typename ExpressionType, int Side, bool Transposed>
|
||||
struct permutation_matrix_product<ExpressionType, Side, Transposed, SparseShape>
|
||||
{
|
||||
typedef typename nested_eval<ExpressionType, 1>::type MatrixType;
|
||||
typedef typename remove_all<MatrixType>::type MatrixTypeCleaned;
|
||||
typedef remove_all_t<MatrixType> MatrixTypeCleaned;
|
||||
|
||||
typedef typename MatrixTypeCleaned::Scalar Scalar;
|
||||
typedef typename MatrixTypeCleaned::StorageIndex StorageIndex;
|
||||
@ -32,9 +32,9 @@ struct permutation_matrix_product<ExpressionType, Side, Transposed, SparseShape>
|
||||
MoveOuter = SrcStorageOrder==RowMajor ? Side==OnTheLeft : Side==OnTheRight
|
||||
};
|
||||
|
||||
typedef typename internal::conditional<MoveOuter,
|
||||
typedef std::conditional_t<MoveOuter,
|
||||
SparseMatrix<Scalar,SrcStorageOrder,StorageIndex>,
|
||||
SparseMatrix<Scalar,int(SrcStorageOrder)==RowMajor?ColMajor:RowMajor,StorageIndex> >::type ReturnType;
|
||||
SparseMatrix<Scalar,int(SrcStorageOrder)==RowMajor?ColMajor:RowMajor,StorageIndex> > ReturnType;
|
||||
|
||||
template<typename Dest,typename PermutationType>
|
||||
static inline void run(Dest& dst, const PermutationType& perm, const ExpressionType& xpr)
|
||||
|
@ -47,19 +47,19 @@ struct generic_product_impl<Lhs, Rhs, SparseShape, SparseShape, ProductType>
|
||||
|
||||
// dense += sparse * sparse
|
||||
template<typename Dest,typename ActualLhs>
|
||||
static void addTo(Dest& dst, const ActualLhs& lhs, const Rhs& rhs, typename enable_if<is_same<typename evaluator_traits<Dest>::Shape,DenseShape>::value,int*>::type* = 0)
|
||||
static void addTo(Dest& dst, const ActualLhs& lhs, const Rhs& rhs, std::enable_if_t<is_same<typename evaluator_traits<Dest>::Shape,DenseShape>::value,int*>* = 0)
|
||||
{
|
||||
typedef typename nested_eval<ActualLhs,Dynamic>::type LhsNested;
|
||||
typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;
|
||||
LhsNested lhsNested(lhs);
|
||||
RhsNested rhsNested(rhs);
|
||||
internal::sparse_sparse_to_dense_product_selector<typename remove_all<LhsNested>::type,
|
||||
typename remove_all<RhsNested>::type, Dest>::run(lhsNested,rhsNested,dst);
|
||||
internal::sparse_sparse_to_dense_product_selector<remove_all_t<LhsNested>,
|
||||
remove_all_t<RhsNested>, Dest>::run(lhsNested,rhsNested,dst);
|
||||
}
|
||||
|
||||
// dense -= sparse * sparse
|
||||
template<typename Dest>
|
||||
static void subTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, typename enable_if<is_same<typename evaluator_traits<Dest>::Shape,DenseShape>::value,int*>::type* = 0)
|
||||
static void subTo(Dest& dst, const Lhs& lhs, const Rhs& rhs, std::enable_if_t<is_same<typename evaluator_traits<Dest>::Shape,DenseShape>::value,int*>* = 0)
|
||||
{
|
||||
addTo(dst, -lhs, rhs);
|
||||
}
|
||||
@ -74,8 +74,8 @@ protected:
|
||||
typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;
|
||||
LhsNested lhsNested(lhs);
|
||||
RhsNested rhsNested(rhs);
|
||||
internal::conservative_sparse_sparse_product_selector<typename remove_all<LhsNested>::type,
|
||||
typename remove_all<RhsNested>::type, Dest>::run(lhsNested,rhsNested,dst);
|
||||
internal::conservative_sparse_sparse_product_selector<remove_all_t<LhsNested>,
|
||||
remove_all_t<RhsNested>, Dest>::run(lhsNested,rhsNested,dst);
|
||||
}
|
||||
|
||||
// dense = sparse * sparse
|
||||
@ -155,8 +155,8 @@ struct unary_evaluator<SparseView<Product<Lhs, Rhs, Options> >, IteratorBased>
|
||||
LhsNested lhsNested(xpr.nestedExpression().lhs());
|
||||
RhsNested rhsNested(xpr.nestedExpression().rhs());
|
||||
|
||||
internal::sparse_sparse_product_with_pruning_selector<typename remove_all<LhsNested>::type,
|
||||
typename remove_all<RhsNested>::type, PlainObject>::run(lhsNested,rhsNested,m_result,
|
||||
internal::sparse_sparse_product_with_pruning_selector<remove_all_t<LhsNested>,
|
||||
remove_all_t<RhsNested>, PlainObject>::run(lhsNested,rhsNested,m_result,
|
||||
abs(xpr.reference())*xpr.epsilon());
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ struct traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options_, StrideT
|
||||
StorageOrderMatch = PlainObjectType::IsVectorAtCompileTime || Derived::IsVectorAtCompileTime || ((PlainObjectType::Flags&RowMajorBit)==(Derived::Flags&RowMajorBit)),
|
||||
MatchAtCompileTime = (Derived::Flags&CompressedAccessBit) && StorageOrderMatch
|
||||
};
|
||||
typedef typename internal::conditional<MatchAtCompileTime,internal::true_type,internal::false_type>::type type;
|
||||
typedef std::conditional_t<MatchAtCompileTime,internal::true_type,internal::false_type> type;
|
||||
};
|
||||
|
||||
};
|
||||
@ -65,7 +65,7 @@ struct traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options_, StrideT
|
||||
enum {
|
||||
MatchAtCompileTime = (Derived::Flags&CompressedAccessBit) && Derived::IsVectorAtCompileTime
|
||||
};
|
||||
typedef typename internal::conditional<MatchAtCompileTime,internal::true_type,internal::false_type>::type type;
|
||||
typedef std::conditional_t<MatchAtCompileTime,internal::true_type,internal::false_type> type;
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -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 internal::remove_all_t<MatrixTypeNested> MatrixTypeNested_;
|
||||
|
||||
explicit inline SparseSelfAdjointView(MatrixType& matrix) : m_matrix(matrix)
|
||||
{
|
||||
@ -71,7 +71,7 @@ template<typename MatrixType, unsigned int Mode_> class SparseSelfAdjointView
|
||||
|
||||
/** \internal \returns a reference to the nested matrix */
|
||||
const MatrixTypeNested_& matrix() const { return m_matrix; }
|
||||
typename internal::remove_reference<MatrixTypeNested>::type& matrix() { return m_matrix; }
|
||||
std::remove_reference_t<MatrixTypeNested>& 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.
|
||||
*
|
||||
@ -278,7 +278,7 @@ inline void sparse_selfadjoint_time_dense_product(const SparseLhsType& lhs, cons
|
||||
EIGEN_ONLY_USED_FOR_DEBUG(alpha);
|
||||
|
||||
typedef typename internal::nested_eval<SparseLhsType,DenseRhsType::MaxColsAtCompileTime>::type SparseLhsTypeNested;
|
||||
typedef typename internal::remove_all<SparseLhsTypeNested>::type SparseLhsTypeNestedCleaned;
|
||||
typedef internal::remove_all_t<SparseLhsTypeNested> SparseLhsTypeNestedCleaned;
|
||||
typedef evaluator<SparseLhsTypeNestedCleaned> LhsEval;
|
||||
typedef typename LhsEval::InnerIterator LhsIterator;
|
||||
typedef typename SparseLhsType::Scalar LhsScalar;
|
||||
@ -604,7 +604,7 @@ class SparseSymmetricPermutationProduct
|
||||
public:
|
||||
typedef Matrix<StorageIndex,Dynamic,1> VectorI;
|
||||
typedef typename MatrixType::Nested MatrixTypeNested;
|
||||
typedef typename internal::remove_all<MatrixTypeNested>::type NestedExpression;
|
||||
typedef internal::remove_all_t<MatrixTypeNested> NestedExpression;
|
||||
|
||||
SparseSymmetricPermutationProduct(const MatrixType& mat, const Perm& perm)
|
||||
: m_matrix(mat), m_perm(perm)
|
||||
|
@ -21,7 +21,7 @@ namespace internal {
|
||||
* The rhs is decomposed into small vertical panels which are solved through dense temporaries.
|
||||
*/
|
||||
template<typename Decomposition, typename Rhs, typename Dest>
|
||||
typename enable_if<Rhs::ColsAtCompileTime!=1 && Dest::ColsAtCompileTime!=1>::type
|
||||
std::enable_if_t<Rhs::ColsAtCompileTime!=1 && Dest::ColsAtCompileTime!=1>
|
||||
solve_sparse_through_dense_panels(const Decomposition &dec, const Rhs& rhs, Dest &dest)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT((Dest::Flags&RowMajorBit)==0,THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);
|
||||
@ -45,7 +45,7 @@ solve_sparse_through_dense_panels(const Decomposition &dec, const Rhs& rhs, Dest
|
||||
|
||||
// Overload for vector as rhs
|
||||
template<typename Decomposition, typename Rhs, typename Dest>
|
||||
typename enable_if<Rhs::ColsAtCompileTime==1 || Dest::ColsAtCompileTime==1>::type
|
||||
std::enable_if_t<Rhs::ColsAtCompileTime==1 || Dest::ColsAtCompileTime==1>
|
||||
solve_sparse_through_dense_panels(const Decomposition &dec, const Rhs& rhs, Dest &dest)
|
||||
{
|
||||
typedef typename Dest::Scalar DestScalar;
|
||||
|
@ -23,9 +23,9 @@ static void sparse_sparse_product_with_pruning_impl(const Lhs& lhs, const Rhs& r
|
||||
{
|
||||
// return sparse_sparse_product_with_pruning_impl2(lhs,rhs,res);
|
||||
|
||||
typedef typename remove_all<Rhs>::type::Scalar RhsScalar;
|
||||
typedef typename remove_all<ResultType>::type::Scalar ResScalar;
|
||||
typedef typename remove_all<Lhs>::type::StorageIndex StorageIndex;
|
||||
typedef typename remove_all_t<Rhs>::Scalar RhsScalar;
|
||||
typedef typename remove_all_t<ResultType>::Scalar ResScalar;
|
||||
typedef typename remove_all_t<Lhs>::StorageIndex StorageIndex;
|
||||
|
||||
// make sure to call innerSize/outerSize since we fake the storage order.
|
||||
Index rows = lhs.innerSize();
|
||||
@ -92,7 +92,7 @@ struct sparse_sparse_product_with_pruning_selector<Lhs,Rhs,ResultType,ColMajor,C
|
||||
|
||||
static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance)
|
||||
{
|
||||
typename remove_all<ResultType>::type _res(res.rows(), res.cols());
|
||||
remove_all_t<ResultType> _res(res.rows(), res.cols());
|
||||
internal::sparse_sparse_product_with_pruning_impl<Lhs,Rhs,ResultType>(lhs, rhs, _res, tolerance);
|
||||
res.swap(_res);
|
||||
}
|
||||
@ -119,7 +119,7 @@ struct sparse_sparse_product_with_pruning_selector<Lhs,Rhs,ResultType,RowMajor,R
|
||||
static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance)
|
||||
{
|
||||
// let's transpose the product to get a column x column product
|
||||
typename remove_all<ResultType>::type _res(res.rows(), res.cols());
|
||||
remove_all_t<ResultType> _res(res.rows(), res.cols());
|
||||
internal::sparse_sparse_product_with_pruning_impl<Rhs,Lhs,ResultType>(rhs, lhs, _res, tolerance);
|
||||
res.swap(_res);
|
||||
}
|
||||
|
@ -46,8 +46,8 @@ template<typename MatrixType, unsigned int Mode> class TriangularViewImpl<Matrix
|
||||
EIGEN_SPARSE_PUBLIC_INTERFACE(TriangularViewType)
|
||||
|
||||
typedef typename MatrixType::Nested MatrixTypeNested;
|
||||
typedef typename internal::remove_reference<MatrixTypeNested>::type MatrixTypeNestedNonRef;
|
||||
typedef typename internal::remove_all<MatrixTypeNested>::type MatrixTypeNestedCleaned;
|
||||
typedef std::remove_reference_t<MatrixTypeNested> MatrixTypeNestedNonRef;
|
||||
typedef internal::remove_all_t<MatrixTypeNested> MatrixTypeNestedCleaned;
|
||||
|
||||
template<typename RhsType, typename DstType>
|
||||
EIGEN_DEVICE_FUNC
|
||||
|
@ -47,11 +47,11 @@ template<typename MatrixType>
|
||||
class SparseView : public SparseMatrixBase<SparseView<MatrixType> >
|
||||
{
|
||||
typedef typename MatrixType::Nested MatrixTypeNested;
|
||||
typedef typename internal::remove_all<MatrixTypeNested>::type MatrixTypeNested_;
|
||||
typedef internal::remove_all_t<MatrixTypeNested> MatrixTypeNested_;
|
||||
typedef SparseMatrixBase<SparseView > Base;
|
||||
public:
|
||||
EIGEN_SPARSE_PUBLIC_INTERFACE(SparseView)
|
||||
typedef typename internal::remove_all<MatrixType>::type NestedExpression;
|
||||
typedef internal::remove_all_t<MatrixType> NestedExpression;
|
||||
|
||||
explicit SparseView(const MatrixType& mat, const Scalar& reference = Scalar(0),
|
||||
const RealScalar &epsilon = NumTraits<Scalar>::dummy_precision())
|
||||
@ -64,7 +64,7 @@ public:
|
||||
inline Index outerSize() const { return m_matrix.outerSize(); }
|
||||
|
||||
/** \returns the nested expression */
|
||||
const typename internal::remove_all<MatrixTypeNested>::type&
|
||||
const internal::remove_all_t<MatrixTypeNested>&
|
||||
nestedExpression() const { return m_matrix; }
|
||||
|
||||
Scalar reference() const { return m_reference; }
|
||||
|
@ -184,11 +184,11 @@ void TriangularViewImpl<ExpressionType,Mode,Sparse>::solveInPlace(MatrixBase<Oth
|
||||
|
||||
enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };
|
||||
|
||||
typedef typename internal::conditional<copy,
|
||||
typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::type OtherCopy;
|
||||
typedef std::conditional_t<copy,
|
||||
typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&> OtherCopy;
|
||||
OtherCopy otherCopy(other.derived());
|
||||
|
||||
internal::sparse_solve_triangular_selector<ExpressionType, typename internal::remove_reference<OtherCopy>::type, Mode>::run(derived().nestedExpression(), otherCopy);
|
||||
internal::sparse_solve_triangular_selector<ExpressionType, std::remove_reference_t<OtherCopy>, Mode>::run(derived().nestedExpression(), otherCopy);
|
||||
|
||||
if (copy)
|
||||
other = otherCopy;
|
||||
@ -301,8 +301,8 @@ void TriangularViewImpl<ExpressionType,Mode,Sparse>::solveInPlace(SparseMatrixBa
|
||||
|
||||
// enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };
|
||||
|
||||
// typedef typename internal::conditional<copy,
|
||||
// typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::type OtherCopy;
|
||||
// typedef std::conditional_t<copy,
|
||||
// typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&> OtherCopy;
|
||||
// OtherCopy otherCopy(other.derived());
|
||||
|
||||
internal::sparse_solve_triangular_sparse_selector<ExpressionType, OtherDerived, Mode>::run(derived().nestedExpression(), other.derived());
|
||||
|
@ -323,7 +323,7 @@ void SparseQR<MatrixType,OrderingType>::analyzePattern(const MatrixType& mat)
|
||||
{
|
||||
eigen_assert(mat.isCompressed() && "SparseQR requires a sparse matrix in compressed mode. Call .makeCompressed() before passing it to SparseQR");
|
||||
// Copy to a column major matrix if the input is rowmajor
|
||||
typename internal::conditional<MatrixType::IsRowMajor,QRMatrixType,const MatrixType&>::type matCpy(mat);
|
||||
std::conditional_t<MatrixType::IsRowMajor,QRMatrixType,const MatrixType&> matCpy(mat);
|
||||
// Compute the column fill reducing ordering
|
||||
OrderingType ord;
|
||||
ord(matCpy, m_perm_c);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user