Replace Eigen type metaprogramming with corresponding std types and make use of alias templates

This commit is contained in:
Erik Schultheis
2022-03-16 16:43:40 +00:00
committed by Antonio Sánchez
parent 514f90c9ff
commit 421cbf0866
191 changed files with 1147 additions and 1221 deletions

View File

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