mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Replace Eigen type metaprogramming with corresponding std types and make use of alias templates
This commit is contained in:
committed by
Antonio Sánchez
parent
514f90c9ff
commit
421cbf0866
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user