32 #ifndef UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_EXTRACT_ACCESSOR_HPP 33 #define UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_EXTRACT_ACCESSOR_HPP 36 namespace TensorSycl {
42 template <
typename Evaluator>
46 template<
typename Arg>
static inline auto getTuple(cl::sycl::handler& cgh, Arg
eval)
51 template<
typename Arg1,
typename Arg2>
static inline auto getTuple(cl::sycl::handler& cgh, Arg1 eval1, Arg2 eval2)
55 template<
typename Arg1,
typename Arg2,
typename Arg3>
static inline auto getTuple(cl::sycl::handler& cgh, Arg1 eval1 , Arg2 eval2 , Arg3 eval3)
59 template< cl::sycl::access::mode AcM,
typename Arg>
static inline auto getAccessor(cl::sycl::handler& cgh, Arg
eval)
68 template <
template<
class,
class>
class UnaryCategory,
typename OP,
typename RHSExpr,
typename Dev>
77 template <
template<
class,
class>
class UnaryCategory,
typename OP,
typename RHSExpr,
typename Dev>
79 :
ExtractAccessor<TensorEvaluator<const UnaryCategory<OP, RHSExpr>, Dev> > {};
82 template <
template<
class,
class,
class>
class BinaryCategory,
typename OP,
typename LHSExpr,
typename RHSExpr,
typename Dev>
90 template <
template<
class,
class,
class>
class BinaryCategory,
typename OP,
typename LHSExpr,
typename RHSExpr,
typename Dev>
92 :
ExtractAccessor<TensorEvaluator<const BinaryCategory<OP, LHSExpr, RHSExpr>, Dev> >{};
96 template <
template<
class,
class,
class,
class>
class TernaryCategory,
typename OP,
typename Arg1Expr,
typename Arg2Expr,
typename Arg3Expr,
typename Dev>
105 template <
template<
class,
class,
class,
class>
class TernaryCategory,
typename OP,
typename Arg1Expr,
typename Arg2Expr,
typename Arg3Expr,
typename Dev>
107 :
ExtractAccessor<TensorEvaluator<const TernaryCategory<OP, Arg1Expr, Arg2Expr, Arg3Expr>, Dev> >{};
111 template <
typename IfExpr,
typename ThenExpr,
typename ElseExpr,
typename Dev>
121 template <
typename IfExpr,
typename ThenExpr,
typename ElseExpr,
typename Dev>
123 :
ExtractAccessor<TensorEvaluator<const TensorSelectOp<IfExpr, ThenExpr, ElseExpr>, Dev> >{};
126 template <
typename LHSExpr,
typename RHSExpr,
typename Dev>
135 template <
typename LHSExpr,
typename RHSExpr,
typename Dev>
137 :
ExtractAccessor<TensorEvaluator<const TensorAssignOp<LHSExpr, RHSExpr>, Dev> >{};
140 #define TENSORMAPEXPR(CVQual, ACCType)\ 141 template <typename PlainObjectType, int Options_, typename Dev>\ 142 struct ExtractAccessor<TensorEvaluator<CVQual TensorMap<PlainObjectType, Options_>, Dev> > {\ 143 static inline auto getTuple(cl::sycl::handler& cgh,const TensorEvaluator<CVQual TensorMap<PlainObjectType, Options_>, Dev> eval)\ 144 -> decltype(AccessorConstructor::template getAccessor<ACCType>(cgh, eval)){\ 145 return AccessorConstructor::template getAccessor<ACCType>(cgh, eval);\ 153 template <
typename Expr,
typename Dev>
156 -> decltype(AccessorConstructor::template getAccessor<cl::sycl::access::mode::read>(cgh,
eval)){
157 return AccessorConstructor::template getAccessor<cl::sycl::access::mode::read>(cgh,
eval);
162 template <
typename Expr,
typename Dev>
164 :
ExtractAccessor<TensorEvaluator<const TensorForcedEvalOp<Expr>, Dev> >{};
167 template <
typename Expr,
typename Dev>
176 template <
typename Expr,
typename Dev>
178 :
ExtractAccessor<TensorEvaluator<const TensorEvalToOp<Expr>, Dev> >{};
181 template <
typename OP,
typename Dim,
typename Expr,
typename Dev>
184 -> decltype(AccessorConstructor::template getAccessor<cl::sycl::access::mode::read>(cgh,
eval)){
185 return AccessorConstructor::template getAccessor<cl::sycl::access::mode::read>(cgh,
eval);
190 template <
typename OP,
typename Dim,
typename Expr,
typename Dev>
192 :
ExtractAccessor<TensorEvaluator<const TensorReductionOp<OP, Dim, Expr>, Dev> >{};
195 template <
typename Evaluator>
204 #endif // UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_EXTRACT_ACCESSOR_HPP
static auto getTuple(cl::sycl::handler &cgh, Arg eval) -> decltype(ExtractAccessor< Arg >::getTuple(cgh, eval))
static GaussianFactorGraph read(const string &name)
static auto getTuple(cl::sycl::handler &cgh, Arg1 eval1, Arg2 eval2) -> decltype(utility::tuple::append(ExtractAccessor< Arg1 >::getTuple(cgh, eval1), ExtractAccessor< Arg2 >::getTuple(cgh, eval2)))
static auto getAccessor(cl::sycl::handler &cgh, Arg eval) -> decltype(utility::tuple::make_tuple(eval.device().template get_sycl_accessor< AcM, typename Eigen::internal::remove_all< typename Arg::CoeffReturnType >::type >(eval.dimensions().TotalSize(), cgh, eval.data())))
Namespace containing all symbols from the Eigen library.
Tuple< Args..., T > append(Tuple< Args... > t, T a)
the deduction function for append_base that automatically generate the IndexRange ...
A cost model used to limit the number of threads used for evaluating tensor expression.
auto createTupleOfAccessors(cl::sycl::handler &cgh, const Evaluator &expr) -> decltype(ExtractAccessor< Evaluator >::getTuple(cgh, expr))
template deduction for ExtractAccessor
Tuple< Args... > make_tuple(Args...args)
Creates a tuple object, deducing the target type from the types of arguments.
static auto getTuple(cl::sycl::handler &cgh, Arg1 eval1, Arg2 eval2, Arg3 eval3) -> decltype(utility::tuple::append(ExtractAccessor< Arg1 >::getTuple(cgh, eval1), utility::tuple::append(ExtractAccessor< Arg2 >::getTuple(cgh, eval2), ExtractAccessor< Arg3 >::getTuple(cgh, eval3))))
internal::nested_eval< T, 1 >::type eval(const T &xpr)