mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 19:59:05 +08:00
Replace all using declarations with typedefs in Tensor ops
This commit is contained in:
parent
64abdf1d7e
commit
1b0373ae10
@ -152,11 +152,11 @@ struct TensorBlockCopyOp {
|
|||||||
const Scalar* src_base = &src_data[src_index];
|
const Scalar* src_base = &src_data[src_index];
|
||||||
Scalar* dst_base = &dst_data[dst_index];
|
Scalar* dst_base = &dst_data[dst_index];
|
||||||
|
|
||||||
using Src = const Eigen::Array<Scalar, Dynamic, 1>;
|
typedef const Eigen::Array<Scalar, Dynamic, 1> Src;
|
||||||
using Dst = Eigen::Array<Scalar, Dynamic, 1>;
|
typedef Eigen::Array<Scalar, Dynamic, 1> Dst;
|
||||||
|
|
||||||
using SrcMap = Eigen::Map<Src, 0, InnerStride<>>;
|
typedef Eigen::Map<Src, 0, InnerStride<>> SrcMap;
|
||||||
using DstMap = Eigen::Map<Dst, 0, InnerStride<>>;
|
typedef Eigen::Map<Dst, 0, InnerStride<>> DstMap;
|
||||||
|
|
||||||
const SrcMap src(src_base, num_coeff_to_copy, InnerStride<>(src_stride));
|
const SrcMap src(src_base, num_coeff_to_copy, InnerStride<>(src_stride));
|
||||||
DstMap dst(dst_base, num_coeff_to_copy, InnerStride<>(dst_stride));
|
DstMap dst(dst_base, num_coeff_to_copy, InnerStride<>(dst_stride));
|
||||||
@ -401,13 +401,13 @@ struct TensorBlockCwiseBinaryOp {
|
|||||||
const StorageIndex left_stride, const LeftScalar* left_data,
|
const StorageIndex left_stride, const LeftScalar* left_data,
|
||||||
const StorageIndex right_index, const StorageIndex right_stride,
|
const StorageIndex right_index, const StorageIndex right_stride,
|
||||||
const RightScalar* right_data) {
|
const RightScalar* right_data) {
|
||||||
using Lhs = const Eigen::Array<LeftScalar, Dynamic, 1>;
|
typedef const Eigen::Array<LeftScalar, Dynamic, 1> Lhs;
|
||||||
using Rhs = const Eigen::Array<RightScalar, Dynamic, 1>;
|
typedef const Eigen::Array<RightScalar, Dynamic, 1> Rhs;
|
||||||
using Out = Eigen::Array<OutputScalar, Dynamic, 1>;
|
typedef Eigen::Array<OutputScalar, Dynamic, 1> Out;
|
||||||
|
|
||||||
using LhsMap = Eigen::Map<Lhs, 0, InnerStride<>>;
|
typedef Eigen::Map<Lhs, 0, InnerStride<>> LhsMap;
|
||||||
using RhsMap = Eigen::Map<Rhs, 0, InnerStride<>>;
|
typedef Eigen::Map<Rhs, 0, InnerStride<>> RhsMap;
|
||||||
using OutMap = Eigen::Map<Out, 0, InnerStride<>>;
|
typedef Eigen::Map<Out, 0, InnerStride<>> OutMap;
|
||||||
|
|
||||||
const LeftScalar* lhs_base = &left_data[left_index];
|
const LeftScalar* lhs_base = &left_data[left_index];
|
||||||
const RightScalar* rhs_base = &right_data[right_index];
|
const RightScalar* rhs_base = &right_data[right_index];
|
||||||
|
@ -115,16 +115,21 @@ struct TensorEvaluator<const TensorBroadcastingOp<Broadcast, ArgType>, Device>
|
|||||||
RawAccess = false
|
RawAccess = false
|
||||||
};
|
};
|
||||||
|
|
||||||
using ScalarNoConst = typename internal::remove_const<Scalar>::type;
|
typedef typename internal::remove_const<Scalar>::type ScalarNoConst;
|
||||||
|
|
||||||
// Block based access to the XprType (input) tensor.
|
// Block based access to the XprType (input) tensor.
|
||||||
using TensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>;
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>
|
||||||
using TensorBlockReader = internal::TensorBlockReader<ScalarNoConst, Index, NumDims, Layout>;
|
TensorBlock;
|
||||||
|
typedef internal::TensorBlockReader<ScalarNoConst, Index, NumDims, Layout>
|
||||||
|
TensorBlockReader;
|
||||||
|
|
||||||
// We do block based broadcasting using a trick with 2x tensor rank and 0
|
// We do block based broadcasting using a trick with 2x tensor rank and 0
|
||||||
// strides. See block method implementation for details.
|
// strides. See block method implementation for details.
|
||||||
using BroadcastDimensions = DSizes<Index, 2 * NumDims>;
|
typedef DSizes<Index, 2 * NumDims> BroadcastDimensions;
|
||||||
using BroadcastTensorBlock = internal::TensorBlock<ScalarNoConst, Index, 2 * NumDims, Layout>;
|
typedef internal::TensorBlock<ScalarNoConst, Index, 2 * NumDims, Layout>
|
||||||
using BroadcastTensorBlockReader = internal::TensorBlockReader<ScalarNoConst, Index, 2 * NumDims, Layout>;
|
BroadcastTensorBlock;
|
||||||
|
typedef internal::TensorBlockReader<ScalarNoConst, Index, 2 * NumDims, Layout>
|
||||||
|
BroadcastTensorBlockReader;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op,
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op,
|
||||||
const Device& device)
|
const Device& device)
|
||||||
|
@ -152,10 +152,12 @@ struct TensorEvaluator<const TensorChippingOp<DimId, ArgType>, Device>
|
|||||||
RawAccess = false
|
RawAccess = false
|
||||||
};
|
};
|
||||||
|
|
||||||
using ScalarNoConst = typename internal::remove_const<Scalar>::type;
|
typedef typename internal::remove_const<Scalar>::type ScalarNoConst;
|
||||||
|
|
||||||
using InputTensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumInputDims, Layout>;
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumInputDims, Layout>
|
||||||
using OutputTensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>;
|
InputTensorBlock;
|
||||||
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>
|
||||||
|
OutputTensorBlock;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
||||||
: m_impl(op.expression(), device), m_dim(op.dim()), m_device(device), m_offset(op.offset())
|
: m_impl(op.expression(), device), m_dim(op.dim()), m_device(device), m_offset(op.offset())
|
||||||
@ -426,10 +428,12 @@ struct TensorEvaluator<TensorChippingOp<DimId, ArgType>, Device>
|
|||||||
RawAccess = false
|
RawAccess = false
|
||||||
};
|
};
|
||||||
|
|
||||||
using ScalarNoConst = typename internal::remove_const<Scalar>::type;
|
typedef typename internal::remove_const<Scalar>::type ScalarNoConst;
|
||||||
|
|
||||||
using InputTensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumInputDims, Layout>;
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumInputDims, Layout>
|
||||||
using OutputTensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>;
|
InputTensorBlock;
|
||||||
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>
|
||||||
|
OutputTensorBlock;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
||||||
: Base(op, device)
|
: Base(op, device)
|
||||||
|
@ -36,7 +36,7 @@ template <typename Expression, typename Device, bool Vectorizable,
|
|||||||
bool Tileable>
|
bool Tileable>
|
||||||
class TensorExecutor {
|
class TensorExecutor {
|
||||||
public:
|
public:
|
||||||
using StorageIndex = typename Expression::Index;
|
typedef typename Expression::Index StorageIndex;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
static EIGEN_STRONG_INLINE void run(const Expression& expr,
|
static EIGEN_STRONG_INLINE void run(const Expression& expr,
|
||||||
@ -60,7 +60,7 @@ template <typename Expression>
|
|||||||
class TensorExecutor<Expression, DefaultDevice, /*Vectorizable*/ true,
|
class TensorExecutor<Expression, DefaultDevice, /*Vectorizable*/ true,
|
||||||
/*Tileable*/ false> {
|
/*Tileable*/ false> {
|
||||||
public:
|
public:
|
||||||
using StorageIndex = typename Expression::Index;
|
typedef typename Expression::Index StorageIndex;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
static EIGEN_STRONG_INLINE void run(const Expression& expr,
|
static EIGEN_STRONG_INLINE void run(const Expression& expr,
|
||||||
@ -102,21 +102,22 @@ template <typename Expression, bool Vectorizable>
|
|||||||
class TensorExecutor<Expression, DefaultDevice, Vectorizable,
|
class TensorExecutor<Expression, DefaultDevice, Vectorizable,
|
||||||
/*Tileable*/ true> {
|
/*Tileable*/ true> {
|
||||||
public:
|
public:
|
||||||
using Scalar = typename traits<Expression>::Scalar;
|
typedef typename traits<Expression>::Scalar Scalar;
|
||||||
using ScalarNoConst = typename remove_const<Scalar>::type;
|
typedef typename remove_const<Scalar>::type ScalarNoConst;
|
||||||
|
|
||||||
using Evaluator = TensorEvaluator<Expression, DefaultDevice>;
|
typedef TensorEvaluator<Expression, DefaultDevice> Evaluator;
|
||||||
using StorageIndex = typename traits<Expression>::Index;
|
typedef typename traits<Expression>::Index StorageIndex;
|
||||||
|
|
||||||
static const int NumDims = traits<Expression>::NumDimensions;
|
static const int NumDims = traits<Expression>::NumDimensions;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
static EIGEN_STRONG_INLINE void run(const Expression& expr,
|
static EIGEN_STRONG_INLINE void run(const Expression& expr,
|
||||||
const DefaultDevice& device = DefaultDevice()) {
|
const DefaultDevice& device = DefaultDevice()) {
|
||||||
using TensorBlock =
|
typedef TensorBlock<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout>
|
||||||
TensorBlock<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout>;
|
TensorBlock;
|
||||||
using TensorBlockMapper = TensorBlockMapper<ScalarNoConst, StorageIndex,
|
typedef TensorBlockMapper<ScalarNoConst, StorageIndex, NumDims,
|
||||||
NumDims, Evaluator::Layout>;
|
Evaluator::Layout>
|
||||||
|
TensorBlockMapper;
|
||||||
|
|
||||||
Evaluator evaluator(expr, device);
|
Evaluator evaluator(expr, device);
|
||||||
Index total_size = array_prod(evaluator.dimensions());
|
Index total_size = array_prod(evaluator.dimensions());
|
||||||
@ -221,7 +222,7 @@ struct EvalRange<Evaluator, StorageIndex, /*Vectorizable*/ true> {
|
|||||||
template <typename Expression, bool Vectorizable, bool Tileable>
|
template <typename Expression, bool Vectorizable, bool Tileable>
|
||||||
class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable, Tileable> {
|
class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable, Tileable> {
|
||||||
public:
|
public:
|
||||||
using StorageIndex = typename Expression::Index;
|
typedef typename Expression::Index StorageIndex;
|
||||||
|
|
||||||
static EIGEN_STRONG_INLINE void run(const Expression& expr,
|
static EIGEN_STRONG_INLINE void run(const Expression& expr,
|
||||||
const ThreadPoolDevice& device) {
|
const ThreadPoolDevice& device) {
|
||||||
@ -249,20 +250,21 @@ class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable, Tileable> {
|
|||||||
template <typename Expression, bool Vectorizable>
|
template <typename Expression, bool Vectorizable>
|
||||||
class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable, /*Tileable*/ true> {
|
class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable, /*Tileable*/ true> {
|
||||||
public:
|
public:
|
||||||
using Scalar = typename traits<Expression>::Scalar;
|
typedef typename traits<Expression>::Scalar Scalar;
|
||||||
using ScalarNoConst = typename remove_const<Scalar>::type;
|
typedef typename remove_const<Scalar>::type ScalarNoConst;
|
||||||
|
|
||||||
using Evaluator = TensorEvaluator<Expression, ThreadPoolDevice>;
|
typedef TensorEvaluator<Expression, ThreadPoolDevice> Evaluator;
|
||||||
using StorageIndex = typename traits<Expression>::Index;
|
typedef typename traits<Expression>::Index StorageIndex;
|
||||||
|
|
||||||
static const int NumDims = traits<Expression>::NumDimensions;
|
static const int NumDims = traits<Expression>::NumDimensions;
|
||||||
|
|
||||||
static EIGEN_STRONG_INLINE void run(const Expression& expr,
|
static EIGEN_STRONG_INLINE void run(const Expression& expr,
|
||||||
const ThreadPoolDevice& device) {
|
const ThreadPoolDevice& device) {
|
||||||
using TensorBlock =
|
typedef TensorBlock<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout>
|
||||||
TensorBlock<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout>;
|
TensorBlock;
|
||||||
using TensorBlockMapper =
|
typedef TensorBlockMapper<ScalarNoConst, StorageIndex, NumDims,
|
||||||
TensorBlockMapper<ScalarNoConst, StorageIndex, NumDims, Evaluator::Layout>;
|
Evaluator::Layout>
|
||||||
|
TensorBlockMapper;
|
||||||
|
|
||||||
Evaluator evaluator(expr, device);
|
Evaluator evaluator(expr, device);
|
||||||
StorageIndex total_size = array_prod(evaluator.dimensions());
|
StorageIndex total_size = array_prod(evaluator.dimensions());
|
||||||
|
@ -252,7 +252,8 @@ struct TensorEvaluator<const TensorImagePatchOp<Rows, Cols, ArgType>, Device>
|
|||||||
RawAccess = false
|
RawAccess = false
|
||||||
};
|
};
|
||||||
|
|
||||||
using OutputTensorBlock = internal::TensorBlock<Scalar, Index, NumDims, Layout>;
|
typedef internal::TensorBlock<Scalar, Index, NumDims, Layout>
|
||||||
|
OutputTensorBlock;
|
||||||
|
|
||||||
#ifdef __SYCL_DEVICE_ONLY__
|
#ifdef __SYCL_DEVICE_ONLY__
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator( const XprType op, const Device& device)
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator( const XprType op, const Device& device)
|
||||||
@ -557,8 +558,8 @@ struct TensorEvaluator<const TensorImagePatchOp<Rows, Cols, ArgType>, Device>
|
|||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void block(
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void block(
|
||||||
OutputTensorBlock* output_block) const {
|
OutputTensorBlock* output_block) const {
|
||||||
using ImagePatchCopyOp = internal::ImagePatchCopyOp<Self, PacketAccess>;
|
typedef internal::ImagePatchCopyOp<Self, PacketAccess> ImagePatchCopyOp;
|
||||||
using ImagePatchPaddingOp = internal::ImagePatchPaddingOp<Self>;
|
typedef internal::ImagePatchPaddingOp<Self> ImagePatchPaddingOp;
|
||||||
|
|
||||||
// Calculate loop limits and various input/output dim sizes.
|
// Calculate loop limits and various input/output dim sizes.
|
||||||
const DSizes<Index, NumDims>& block_sizes = output_block->block_sizes();
|
const DSizes<Index, NumDims>& block_sizes = output_block->block_sizes();
|
||||||
|
@ -123,11 +123,15 @@ struct TensorEvaluator<const TensorReshapingOp<NewDimensions, ArgType>, Device>
|
|||||||
RawAccess = TensorEvaluator<ArgType, Device>::RawAccess
|
RawAccess = TensorEvaluator<ArgType, Device>::RawAccess
|
||||||
};
|
};
|
||||||
|
|
||||||
using ScalarNoConst = typename internal::remove_const<Scalar>::type;
|
typedef typename internal::remove_const<Scalar>::type ScalarNoConst;
|
||||||
|
|
||||||
using InputTensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumInputDims, Layout>;
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumInputDims, Layout>
|
||||||
using OutputTensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumOutputDims, Layout>;
|
InputTensorBlock;
|
||||||
using OutputTensorBlockReader = internal::TensorBlockReader<ScalarNoConst, Index, NumOutputDims, Layout>;
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumOutputDims, Layout>
|
||||||
|
OutputTensorBlock;
|
||||||
|
typedef internal::TensorBlockReader<ScalarNoConst, Index, NumOutputDims,
|
||||||
|
Layout>
|
||||||
|
OutputTensorBlockReader;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
||||||
: m_impl(op.expression(), device), m_dimensions(op.dimensions())
|
: m_impl(op.expression(), device), m_dimensions(op.dimensions())
|
||||||
@ -512,9 +516,10 @@ struct TensorEvaluator<const TensorSlicingOp<StartIndices, Sizes, ArgType>, Devi
|
|||||||
RawAccess = false
|
RawAccess = false
|
||||||
};
|
};
|
||||||
|
|
||||||
using ScalarNoConst = typename internal::remove_const<Scalar>::type;
|
typedef typename internal::remove_const<Scalar>::type ScalarNoConst;
|
||||||
|
|
||||||
using TensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>;
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>
|
||||||
|
TensorBlock;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
||||||
: m_impl(op.expression(), device), m_device(device), m_dimensions(op.sizes()), m_offsets(op.startIndices())
|
: m_impl(op.expression(), device), m_device(device), m_dimensions(op.sizes()), m_offsets(op.startIndices())
|
||||||
@ -787,9 +792,10 @@ struct TensorEvaluator<TensorSlicingOp<StartIndices, Sizes, ArgType>, Device>
|
|||||||
RawAccess = (NumDims == 1) & TensorEvaluator<ArgType, Device>::RawAccess
|
RawAccess = (NumDims == 1) & TensorEvaluator<ArgType, Device>::RawAccess
|
||||||
};
|
};
|
||||||
|
|
||||||
using ScalarNoConst = typename internal::remove_const<Scalar>::type;
|
typedef typename internal::remove_const<Scalar>::type ScalarNoConst;
|
||||||
|
|
||||||
using TensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>;
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>
|
||||||
|
TensorBlock;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
||||||
: Base(op, device)
|
: Base(op, device)
|
||||||
|
@ -483,10 +483,12 @@ struct TensorEvaluator<const TensorReductionOp<Op, Dims, ArgType, MakePointer_>,
|
|||||||
RawAccess = false
|
RawAccess = false
|
||||||
};
|
};
|
||||||
|
|
||||||
using ScalarNoConst = typename internal::remove_const<Scalar>::type;
|
typedef typename internal::remove_const<Scalar>::type ScalarNoConst;
|
||||||
|
|
||||||
using OutputTensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumOutputDims, Layout>;
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumOutputDims, Layout>
|
||||||
using InputTensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumInputDims, Layout>;
|
OutputTensorBlock;
|
||||||
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumInputDims, Layout>
|
||||||
|
InputTensorBlock;
|
||||||
|
|
||||||
static const bool ReducingInnerMostDims = internal::are_inner_most_dims<Dims, NumInputDims, Layout>::value;
|
static const bool ReducingInnerMostDims = internal::are_inner_most_dims<Dims, NumInputDims, Layout>::value;
|
||||||
static const bool PreservingInnerMostDims = internal::preserve_inner_most_dims<Dims, NumInputDims, Layout>::value;
|
static const bool PreservingInnerMostDims = internal::preserve_inner_most_dims<Dims, NumInputDims, Layout>::value;
|
||||||
@ -901,9 +903,9 @@ struct TensorEvaluator<const TensorReductionOp<Op, Dims, ArgType, MakePointer_>,
|
|||||||
new (&reducers[i]) BlockReducer(m_reducer);
|
new (&reducers[i]) BlockReducer(m_reducer);
|
||||||
}
|
}
|
||||||
|
|
||||||
using TensorSliceBlockMapper =
|
typedef internal::TensorSliceBlockMapper<ScalarNoConst, Index,
|
||||||
internal::TensorSliceBlockMapper<ScalarNoConst, Index, NumInputDims,
|
NumInputDims, Layout>
|
||||||
Layout>;
|
TensorSliceBlockMapper;
|
||||||
|
|
||||||
// TODO(andydavis) Consider removing 'input_block_stride_order' if we
|
// TODO(andydavis) Consider removing 'input_block_stride_order' if we
|
||||||
// find that scattered reads are not worth supporting in
|
// find that scattered reads are not worth supporting in
|
||||||
|
@ -119,10 +119,12 @@ struct TensorEvaluator<const TensorShufflingOp<Shuffle, ArgType>, Device>
|
|||||||
RawAccess = false
|
RawAccess = false
|
||||||
};
|
};
|
||||||
|
|
||||||
using ScalarNoConst = typename internal::remove_const<Scalar>::type;
|
typedef typename internal::remove_const<Scalar>::type ScalarNoConst;
|
||||||
|
|
||||||
using TensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>;
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>
|
||||||
using TensorBlockReader = internal::TensorBlockReader<ScalarNoConst, Index, NumDims, Layout>;
|
TensorBlock;
|
||||||
|
typedef internal::TensorBlockReader<ScalarNoConst, Index, NumDims, Layout>
|
||||||
|
TensorBlockReader;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op,
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op,
|
||||||
const Device& device)
|
const Device& device)
|
||||||
@ -417,10 +419,12 @@ struct TensorEvaluator<TensorShufflingOp<Shuffle, ArgType>, Device>
|
|||||||
RawAccess = false
|
RawAccess = false
|
||||||
};
|
};
|
||||||
|
|
||||||
using ScalarNoConst = typename internal::remove_const<Scalar>::type;
|
typedef typename internal::remove_const<Scalar>::type ScalarNoConst;
|
||||||
|
|
||||||
using TensorBlock = internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>;
|
typedef internal::TensorBlock<ScalarNoConst, Index, NumDims, Layout>
|
||||||
using TensorBlockWriter = internal::TensorBlockWriter<ScalarNoConst, Index, NumDims, Layout>;
|
TensorBlock;
|
||||||
|
typedef internal::TensorBlockWriter<ScalarNoConst, Index, NumDims, Layout>
|
||||||
|
TensorBlockWriter;
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
||||||
: Base(op, device)
|
: Base(op, device)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user