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
@@ -30,7 +30,7 @@ struct traits<TensorInflationOp<Strides, XprType> > : public traits<XprType>
|
||||
typedef typename XprTraits::StorageKind StorageKind;
|
||||
typedef typename XprTraits::Index Index;
|
||||
typedef typename XprType::Nested Nested;
|
||||
typedef typename remove_reference<Nested>::type Nested_;
|
||||
typedef std::remove_reference_t<Nested> Nested_;
|
||||
static const int NumDimensions = XprTraits::NumDimensions;
|
||||
static const int Layout = XprTraits::Layout;
|
||||
typedef typename XprTraits::PointerType PointerType;
|
||||
@@ -68,7 +68,7 @@ class TensorInflationOp : public TensorBase<TensorInflationOp<Strides, XprType>,
|
||||
const Strides& strides() const { return m_strides; }
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
const typename internal::remove_all<typename XprType::Nested>::type&
|
||||
const internal::remove_all_t<typename XprType::Nested>&
|
||||
expression() const { return m_xpr; }
|
||||
|
||||
protected:
|
||||
@@ -91,12 +91,12 @@ struct TensorEvaluator<const TensorInflationOp<Strides, ArgType>, Device>
|
||||
typedef StorageMemory<CoeffReturnType, Device> Storage;
|
||||
typedef typename Storage::Type EvaluatorPointerType;
|
||||
|
||||
static constexpr int Layout = TensorEvaluator<ArgType, Device>::Layout;
|
||||
enum {
|
||||
IsAligned = /*TensorEvaluator<ArgType, Device>::IsAligned*/ false,
|
||||
PacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess,
|
||||
BlockAccess = false,
|
||||
PreferBlockAccess = false,
|
||||
Layout = TensorEvaluator<ArgType, Device>::Layout,
|
||||
CoordAccess = false, // to be implemented
|
||||
RawAccess = false
|
||||
};
|
||||
@@ -204,7 +204,7 @@ struct TensorEvaluator<const TensorInflationOp<Strides, ArgType>, Device>
|
||||
EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)
|
||||
eigen_assert(index+PacketSize-1 < dimensions().TotalSize());
|
||||
|
||||
EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize];
|
||||
EIGEN_ALIGN_MAX std::remove_const_t<CoeffReturnType> values[PacketSize];
|
||||
EIGEN_UNROLL_LOOP
|
||||
for (int i = 0; i < PacketSize; ++i) {
|
||||
values[i] = coeff(index+i);
|
||||
|
||||
Reference in New Issue
Block a user