22 #ifndef UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_CONVERT_TO_DEVICE_EXPRESSION_HPP 23 #define UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_CONVERT_TO_DEVICE_EXPRESSION_HPP 26 namespace TensorSycl {
34 template <
typename Expr>
37 template<
template<
class...>
class NonOpCategory,
bool IsConst,
typename... Args>
39 typedef typename GetType<IsConst, NonOpCategory<typename ConvertToDeviceExpression<Args>::Type...> >::Type Type;
43 template<
template<
class,
template <
class>
class >
class NonOpCategory, bool IsConst, typename Args>
45 typedef typename GetType<IsConst, NonOpCategory<typename ConvertToDeviceExpression<Args>::Type, MakeGlobalPointer> >::Type Type;
50 #define TENSORMAPCONVERT(CVQual)\ 51 template <typename Scalar_, int Options_, int Options2_, int NumIndices_, typename IndexType_, template <class> class MakePointer_>\ 52 struct ConvertToDeviceExpression<CVQual TensorMap<Tensor<Scalar_, NumIndices_, Options_, IndexType_>, Options2_, MakePointer_> > {\ 53 typedef CVQual TensorMap<Tensor<Scalar_, NumIndices_, Options_, IndexType_>, Options2_, MakeGlobalPointer> Type;\ 56 TENSORMAPCONVERT(
const)
58 #undef TENSORMAPCONVERT 62 #define CATEGORYCONVERT(CVQual)\ 63 template <template<class, class...> class Category, typename OP, typename... subExprs>\ 64 struct ConvertToDeviceExpression<CVQual Category<OP, subExprs...> > {\ 65 typedef CVQual Category<OP, typename ConvertToDeviceExpression<subExprs>::Type... > Type;\ 67 CATEGORYCONVERT(
const)
69 #undef CATEGORYCONVERT 74 #define SELECTOPCONVERT(CVQual, Res)\ 75 template <typename IfExpr, typename ThenExpr, typename ElseExpr>\ 76 struct ConvertToDeviceExpression<CVQual TensorSelectOp<IfExpr, ThenExpr, ElseExpr> >\ 77 : NonOpConversion<TensorSelectOp, Res, IfExpr, ThenExpr, ElseExpr> {}; 78 SELECTOPCONVERT(
const,
true)
79 SELECTOPCONVERT(,
false)
80 #undef SELECTOPCONVERT 84 #define ASSIGNCONVERT(CVQual, Res)\ 85 template <typename LHSExpr, typename RHSExpr>\ 86 struct ConvertToDeviceExpression<CVQual TensorAssignOp<LHSExpr, RHSExpr> >\ 87 : NonOpConversion<TensorAssignOp, Res, LHSExpr, RHSExpr>{}; 89 ASSIGNCONVERT(
const,
true)
90 ASSIGNCONVERT(,
false)
95 #define KERNELBROKERCONVERT(CVQual, Res, ExprNode)\ 96 template <typename Expr>\ 97 struct ConvertToDeviceExpression<CVQual ExprNode<Expr> > \ 98 : DeviceConvertor<ExprNode, Res, Expr>{}; 104 #undef KERNELBROKERCONVERT 107 #define KERNELBROKERCONVERTREDUCTION(CVQual)\ 108 template <typename OP, typename Dim, typename subExpr, template <class> class MakePointer_>\ 109 struct ConvertToDeviceExpression<CVQual TensorReductionOp<OP, Dim, subExpr, MakePointer_> > {\ 110 typedef CVQual TensorReductionOp<OP, Dim, typename ConvertToDeviceExpression<subExpr>::Type, MakeGlobalPointer> Type;\ 113 KERNELBROKERCONVERTREDUCTION(
const)
114 KERNELBROKERCONVERTREDUCTION()
115 #undef KERNELBROKERCONVERTREDUCTION 121 #endif // UNSUPPORTED_EIGEN_CXX1 Definition: TensorForcedEval.h:69
Definition: TensorEvalTo.h:65
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
Definition: BandTriangularSolver.h:13
Definition: TensorSyclConvertToDeviceExpression.h:44
Definition: TensorSyclConvertToDeviceExpression.h:38
This struct is used to convert the MakePointer in the host expression to the MakeGlobalPointer for th...
Definition: TensorSyclConvertToDeviceExpression.h:35