TensorForwardDeclarations.h
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H
12 
13 namespace Eigen {
14 
15 template<typename Scalar_, int NumIndices_, int Options_ = 0, typename IndexType = DenseIndex> class Tensor;
16 template<typename Scalar_, typename Dimensions, int Options_ = 0, typename IndexType = DenseIndex> class TensorFixedSize;
17 template<typename PlainObjectType, int Options_ = Unaligned> class TensorMap;
18 template<typename PlainObjectType> class TensorRef;
19 template<typename Derived, int AccessLevel = internal::accessors_level<Derived>::value> class TensorBase;
20 
21 template<typename NullaryOp, typename PlainObjectType> class TensorCwiseNullaryOp;
22 template<typename UnaryOp, typename XprType> class TensorCwiseUnaryOp;
23 template<typename BinaryOp, typename LeftXprType, typename RightXprType> class TensorCwiseBinaryOp;
24 template<typename IfXprType, typename ThenXprType, typename ElseXprType> class TensorSelectOp;
25 template<typename Op, typename Dims, typename XprType> class TensorReductionOp;
26 template<typename XprType> class TensorIndexTupleOp;
27 template<typename ReduceOp, typename Dims, typename XprType> class TensorTupleReducerOp;
28 template<typename Axis, typename LeftXprType, typename RightXprType> class TensorConcatenationOp;
29 template<typename Dimensions, typename LeftXprType, typename RightXprType> class TensorContractionOp;
30 template<typename TargetType, typename XprType> class TensorConversionOp;
31 template<typename Dimensions, typename InputXprType, typename KernelXprType> class TensorConvolutionOp;
32 template<typename FFT, typename XprType, int FFTDataType, int FFTDirection> class TensorFFTOp;
33 template<typename PatchDim, typename XprType> class TensorPatchOp;
34 template<DenseIndex Rows, DenseIndex Cols, typename XprType> class TensorImagePatchOp;
35 template<DenseIndex Planes, DenseIndex Rows, DenseIndex Cols, typename XprType> class TensorVolumePatchOp;
36 template<typename Broadcast, typename XprType> class TensorBroadcastingOp;
37 template<DenseIndex DimId, typename XprType> class TensorChippingOp;
38 template<typename NewDimensions, typename XprType> class TensorReshapingOp;
39 template<typename XprType> class TensorLayoutSwapOp;
40 template<typename StartIndices, typename Sizes, typename XprType> class TensorSlicingOp;
41 template<typename ReverseDimensions, typename XprType> class TensorReverseOp;
42 template<typename PaddingDimensions, typename XprType> class TensorPaddingOp;
43 template<typename Shuffle, typename XprType> class TensorShufflingOp;
44 template<typename Strides, typename XprType> class TensorStridingOp;
45 template<typename Strides, typename XprType> class TensorInflationOp;
46 template<typename Generator, typename XprType> class TensorGeneratorOp;
47 template<typename LeftXprType, typename RightXprType> class TensorAssignOp;
48 
49 template<typename CustomUnaryFunc, typename XprType> class TensorCustomUnaryOp;
50 template<typename CustomBinaryFunc, typename LhsXprType, typename RhsXprType> class TensorCustomBinaryOp;
51 
52 template<typename XprType> class TensorEvalToOp;
53 template<typename XprType> class TensorForcedEvalOp;
54 
55 template<typename ExpressionType, typename DeviceType> class TensorDevice;
56 template<typename Derived, typename Device> struct TensorEvaluator;
57 
58 struct DefaultDevice;
59 struct ThreadPoolDevice;
60 struct GpuDevice;
61 
62 enum FFTResultType {
63  RealPart = 0,
64  ImagPart = 1,
65  BothParts = 2
66 };
67 
68 enum FFTDirection {
69  FFT_FORWARD = 0,
70  FFT_REVERSE = 1
71 };
72 
73 
74 namespace internal {
75 
76 template <typename Device, typename Expression>
77 struct IsVectorizable {
78  static const bool value = TensorEvaluator<Expression, Device>::PacketAccess;
79 };
80 
81 template <typename Expression>
82 struct IsVectorizable<GpuDevice, Expression> {
83  static const bool value = TensorEvaluator<Expression, GpuDevice>::PacketAccess &&
84  TensorEvaluator<Expression, GpuDevice>::IsAligned;
85 };
86 
87 template <typename Expression, typename Device,
88  bool Vectorizable = IsVectorizable<Device, Expression>::value>
89 class TensorExecutor;
90 
91 } // end namespace internal
92 
93 } // end namespace Eigen
94 
95 #endif // EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H
Tensor custom class.
Definition: TensorCustomOp.h:53
Tensor custom class.
Definition: TensorCustomOp.h:203
Namespace containing all symbols from the Eigen library.
Definition: CXX11Meta.h:13
The tensor evaluator classes.
Definition: TensorEvaluator.h:28
Pseudo expression providing an operator = that will evaluate its argument on the specified computing ...
Definition: TensorDevice.h:27
A tensor expression mapping an existing array of data.
Definition: TensorForwardDeclarations.h:17
Tensor conversion class. This class makes it possible to vectorize type casting operations when the n...
Definition: TensorConversion.h:122
The tensor base class.
Definition: TensorForwardDeclarations.h:19
The tensor executor class.
A reference to a tensor expression The expression will be evaluated lazily (as much as possible)...
Definition: TensorForwardDeclarations.h:18
Tensor concatenation class.
Definition: TensorConcatenation.h:59