10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H
13 #include "./InternalHeaderCheck.h"
23 template<
typename T>
struct MakePointer {
25 typedef const T* ConstType;
29 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T* constCast(
const T* data) {
30 return const_cast<T*
>(data);
39 template<
typename T,
typename device>
struct StorageMemory: MakePointer <T> {};
42 template<
typename A,
typename B>
struct Pointer_type_promotion {
43 static const bool val=
false;
45 template<
typename A>
struct Pointer_type_promotion<A, A> {
46 static const bool val =
true;
48 template<
typename A,
typename B>
struct TypeConversion {
54 template<
typename PlainObjectType,
int Options_ = Unaligned,
template <
class>
class MakePointer_ = MakePointer>
class TensorMap;
55 template<
typename Scalar_,
int NumIndices_,
int Options_ = 0,
typename IndexType = DenseIndex>
class Tensor;
56 template<
typename Scalar_,
typename Dimensions,
int Options_ = 0,
typename IndexType = DenseIndex>
class TensorFixedSize;
57 template<
typename PlainObjectType>
class TensorRef;
58 template<
typename Derived,
int AccessLevel>
class TensorBase;
60 template<
typename NullaryOp,
typename PlainObjectType>
class TensorCwiseNullaryOp;
61 template<
typename UnaryOp,
typename XprType>
class TensorCwiseUnaryOp;
62 template<
typename BinaryOp,
typename LeftXprType,
typename RightXprType>
class TensorCwiseBinaryOp;
63 template<
typename TernaryOp,
typename Arg1XprType,
typename Arg2XprType,
typename Arg3XprType>
class TensorCwiseTernaryOp;
64 template<
typename IfXprType,
typename ThenXprType,
typename ElseXprType>
class TensorSelectOp;
65 template<
typename Op,
typename Dims,
typename XprType,
template <
class>
class MakePointer_ = MakePointer >
class TensorReductionOp;
66 template<
typename XprType>
class TensorIndexPairOp;
67 template<
typename ReduceOp,
typename Dims,
typename XprType>
class TensorPairReducerOp;
69 template<
typename Dimensions,
typename LeftXprType,
typename RightXprType,
typename OutputKernelType>
class TensorContractionOp;
71 template<
typename Dimensions,
typename InputXprType,
typename KernelXprType>
class TensorConvolutionOp;
72 template<
typename FFT,
typename XprType,
int FFTDataType,
int FFTDirection>
class TensorFFTOp;
73 template<
typename PatchDim,
typename XprType>
class TensorPatchOp;
74 template<DenseIndex Rows, DenseIndex Cols,
typename XprType>
class TensorImagePatchOp;
75 template<DenseIndex Planes, DenseIndex Rows, DenseIndex Cols,
typename XprType>
class TensorVolumePatchOp;
76 template<
typename Broadcast,
typename XprType>
class TensorBroadcastingOp;
77 template<DenseIndex DimId,
typename XprType>
class TensorChippingOp;
78 template<
typename NewDimensions,
typename XprType>
class TensorReshapingOp;
79 template<
typename XprType>
class TensorLayoutSwapOp;
80 template<
typename StartIndices,
typename Sizes,
typename XprType>
class TensorSlicingOp;
81 template<
typename ReverseDimensions,
typename XprType>
class TensorReverseOp;
82 template<
typename PaddingDimensions,
typename XprType>
class TensorPaddingOp;
83 template<
typename Shuffle,
typename XprType>
class TensorShufflingOp;
84 template<
typename Str
ides,
typename XprType>
class TensorStridingOp;
85 template<
typename StartIndices,
typename StopIndices,
typename Str
ides,
typename XprType>
class TensorStridingSlicingOp;
86 template<
typename Str
ides,
typename XprType>
class TensorInflationOp;
88 template<
typename LeftXprType,
typename RightXprType>
class TensorAssignOp;
89 template<
typename Op,
typename XprType>
class TensorScanOp;
90 template<
typename Dims,
typename XprType>
class TensorTraceOp;
93 template<
typename CustomBinaryFunc,
typename LhsXprType,
typename RhsXprType>
class TensorCustomBinaryOp;
95 template<
typename XprType,
template <
class>
class MakePointer_ = MakePointer>
class TensorEvalToOp;
96 template<
typename XprType>
class TensorForcedEvalOp;
98 template<
typename ExpressionType,
typename DeviceType>
class TensorDevice;
99 template<
typename ExpressionType,
typename DeviceType,
typename DoneCallback>
class TensorAsyncDevice;
102 struct NoOpOutputKernel;
104 struct DefaultDevice;
105 struct ThreadPoolDevice;
109 #ifdef EIGEN_USE_SYCL
111 template <
typename T>
struct MakeSYCLPointer {
112 typedef Eigen::TensorSycl::internal::RangeAccess<cl::sycl::access::mode::read_write, T> Type;
115 template <
typename T>
116 EIGEN_STRONG_INLINE
const Eigen::TensorSycl::internal::RangeAccess<cl::sycl::access::mode::read_write, T>&
117 constCast(
const Eigen::TensorSycl::internal::RangeAccess<cl::sycl::access::mode::read_write, T>& data) {
121 template <
typename T>
122 struct StorageMemory<T, SyclDevice> : MakeSYCLPointer<T> {};
123 template <
typename T>
124 struct StorageMemory<T, const SyclDevice> : StorageMemory<T, SyclDevice> {};
126 namespace TensorSycl {
128 template <
typename Evaluator,
typename Op>
class GenericNondeterministicReducer;
148 template <
typename Device,
typename Expression>
149 struct IsVectorizable {
150 static const bool value = TensorEvaluator<Expression, Device>::PacketAccess;
153 template <
typename Expression>
154 struct IsVectorizable<GpuDevice, Expression> {
155 static const bool value = TensorEvaluator<Expression, GpuDevice>::PacketAccess &&
156 TensorEvaluator<Expression, GpuDevice>::IsAligned;
160 enum TiledEvaluation {
165 template <
typename Device,
typename Expression>
170 static constexpr
bool BlockAccess =
171 TensorEvaluator<Expression, Device>::BlockAccess &&
172 TensorEvaluator<Expression, Device>::PreferBlockAccess;
174 static const TiledEvaluation value =
175 BlockAccess ? TiledEvaluation::On : TiledEvaluation::Off;
178 template <
typename Expression,
typename Device,
179 bool Vectorizable = IsVectorizable<Device, Expression>::value,
180 TiledEvaluation Tiling = IsTileable<Device, Expression>::value>
183 template <
typename Expression,
typename Device,
typename DoneCallback,
184 bool Vectorizable = IsVectorizable<Device, Expression>::value,
185 TiledEvaluation Tiling = IsTileable<Device, Expression>::value>
186 class TensorAsyncExecutor;
Pseudo expression providing an operator = that will evaluate its argument asynchronously on the speci...
Definition: TensorDevice.h:85
The tensor base class.
Definition: TensorForwardDeclarations.h:58
Tensor concatenation class.
Definition: TensorConcatenation.h:63
Tensor conversion class. This class makes it possible to vectorize type casting operations when the n...
Definition: TensorConversion.h:179
Tensor custom class.
Definition: TensorCustomOp.h:222
Tensor custom class.
Definition: TensorCustomOp.h:56
Pseudo expression providing an operator = that will evaluate its argument on the specified computing ...
Definition: TensorDevice.h:29
Tensor generator class.
Definition: TensorGenerator.h:57
The tensor executor class.
Namespace containing all symbols from the Eigen library.
A cost model used to limit the number of threads used for evaluating tensor expression.
Definition: TensorEvaluator.h:31