![]() |
Eigen-unsupported
3.3.3
|
00001 // This file is part of Eigen, a lightweight C++ template library 00002 // for linear algebra. 00003 // 00004 // Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com> 00005 // 00006 // This Source Code Form is subject to the terms of the Mozilla 00007 // Public License v. 2.0. If a copy of the MPL was not distributed 00008 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 00009 00010 #ifndef EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H 00011 #define EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H 00012 00013 namespace Eigen { 00014 00015 // MakePointer class is used as a container of the adress space of the pointer 00016 // on the host and on the device. From the host side it generates the T* pointer 00017 // and when EIGEN_USE_SYCL is used it construct a buffer with a map_allocator to 00018 // T* m_data on the host. It is always called on the device. 00019 // Specialisation of MakePointer class for creating the sycl buffer with 00020 // map_allocator. 00021 template<typename T> struct MakePointer { 00022 typedef T* Type; 00023 }; 00024 00025 template<typename PlainObjectType, int Options_ = Unaligned, template <class> class MakePointer_ = MakePointer> class TensorMap; 00026 template<typename Scalar_, int NumIndices_, int Options_ = 0, typename IndexType = DenseIndex> class Tensor; 00027 template<typename Scalar_, typename Dimensions, int Options_ = 0, typename IndexType = DenseIndex> class TensorFixedSize; 00028 template<typename PlainObjectType> class TensorRef; 00029 template<typename Derived, int AccessLevel> class TensorBase; 00030 00031 template<typename NullaryOp, typename PlainObjectType> class TensorCwiseNullaryOp; 00032 template<typename UnaryOp, typename XprType> class TensorCwiseUnaryOp; 00033 template<typename BinaryOp, typename LeftXprType, typename RightXprType> class TensorCwiseBinaryOp; 00034 template<typename TernaryOp, typename Arg1XprType, typename Arg2XprType, typename Arg3XprType> class TensorCwiseTernaryOp; 00035 template<typename IfXprType, typename ThenXprType, typename ElseXprType> class TensorSelectOp; 00036 template<typename Op, typename Dims, typename XprType, template <class> class MakePointer_ = MakePointer > class TensorReductionOp; 00037 template<typename XprType> class TensorIndexTupleOp; 00038 template<typename ReduceOp, typename Dims, typename XprType> class TensorTupleReducerOp; 00039 template<typename Axis, typename LeftXprType, typename RightXprType> class TensorConcatenationOp; 00040 template<typename Dimensions, typename LeftXprType, typename RightXprType> class TensorContractionOp; 00041 template<typename TargetType, typename XprType> class TensorConversionOp; 00042 template<typename Dimensions, typename InputXprType, typename KernelXprType> class TensorConvolutionOp; 00043 template<typename FFT, typename XprType, int FFTDataType, int FFTDirection> class TensorFFTOp; 00044 template<typename PatchDim, typename XprType> class TensorPatchOp; 00045 template<DenseIndex Rows, DenseIndex Cols, typename XprType> class TensorImagePatchOp; 00046 template<DenseIndex Planes, DenseIndex Rows, DenseIndex Cols, typename XprType> class TensorVolumePatchOp; 00047 template<typename Broadcast, typename XprType> class TensorBroadcastingOp; 00048 template<DenseIndex DimId, typename XprType> class TensorChippingOp; 00049 template<typename NewDimensions, typename XprType> class TensorReshapingOp; 00050 template<typename XprType> class TensorLayoutSwapOp; 00051 template<typename StartIndices, typename Sizes, typename XprType> class TensorSlicingOp; 00052 template<typename ReverseDimensions, typename XprType> class TensorReverseOp; 00053 template<typename PaddingDimensions, typename XprType> class TensorPaddingOp; 00054 template<typename Shuffle, typename XprType> class TensorShufflingOp; 00055 template<typename Strides, typename XprType> class TensorStridingOp; 00056 template<typename StartIndices, typename StopIndices, typename Strides, typename XprType> class TensorStridingSlicingOp; 00057 template<typename Strides, typename XprType> class TensorInflationOp; 00058 template<typename Generator, typename XprType> class TensorGeneratorOp; 00059 template<typename LeftXprType, typename RightXprType> class TensorAssignOp; 00060 template<typename Op, typename XprType> class TensorScanOp; 00061 00062 template<typename CustomUnaryFunc, typename XprType> class TensorCustomUnaryOp; 00063 template<typename CustomBinaryFunc, typename LhsXprType, typename RhsXprType> class TensorCustomBinaryOp; 00064 00065 template<typename XprType, template <class> class MakePointer_ = MakePointer> class TensorEvalToOp; 00066 template<typename XprType, template <class> class MakePointer_ = MakePointer> class TensorForcedEvalOp; 00067 00068 template<typename ExpressionType, typename DeviceType> class TensorDevice; 00069 template<typename Derived, typename Device> struct TensorEvaluator; 00070 00071 struct DefaultDevice; 00072 struct ThreadPoolDevice; 00073 struct GpuDevice; 00074 struct SyclDevice; 00075 00076 enum FFTResultType { 00077 RealPart = 0, 00078 ImagPart = 1, 00079 BothParts = 2 00080 }; 00081 00082 enum FFTDirection { 00083 FFT_FORWARD = 0, 00084 FFT_REVERSE = 1 00085 }; 00086 00087 00088 namespace internal { 00089 00090 template <typename Device, typename Expression> 00091 struct IsVectorizable { 00092 static const bool value = TensorEvaluator<Expression, Device>::PacketAccess; 00093 }; 00094 00095 template <typename Expression> 00096 struct IsVectorizable<GpuDevice, Expression> { 00097 static const bool value = TensorEvaluator<Expression, GpuDevice>::PacketAccess && 00098 TensorEvaluator<Expression, GpuDevice>::IsAligned; 00099 }; 00100 00101 template <typename Expression, typename Device, 00102 bool Vectorizable = IsVectorizable<Device, Expression>::value> 00103 class TensorExecutor; 00104 00105 } // end namespace internal 00106 00107 } // end namespace Eigen 00108 00109 #endif // EIGEN_CXX11_TENSOR_TENSOR_FORWARD_DECLARATIONS_H