22 #ifndef UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_LEAF_COUNT_HPP 23 #define UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_LEAF_COUNT_HPP 26 namespace TensorSycl {
31 template <
typename Expr>
34 template<
typename... Args>
struct CategoryCount;
36 template<>
struct CategoryCount<>
38 static const size_t Count =0;
41 template<
typename Arg,
typename... Args>
42 struct CategoryCount<Arg,Args...>{
43 static const size_t Count = LeafCount<Arg>::Count + CategoryCount<Args...>::Count;
47 template <
typename PlainObjectType,
int Options_,
template <
class>
class MakePointer_>
48 struct LeafCount<const TensorMap<PlainObjectType, Options_, MakePointer_> > {
49 static const size_t Count =1;
53 template <
typename PlainObjectType,
int Options_,
template <
class>
class MakePointer_>
54 struct LeafCount<TensorMap<PlainObjectType, Options_, MakePointer_> > :LeafCount<const TensorMap<PlainObjectType, Options_, MakePointer_> >{};
57 template <
template <
class,
class...>
class CategoryExpr,
typename OP,
typename... RHSExpr>
58 struct LeafCount<const CategoryExpr<OP, RHSExpr...> >: CategoryCount<RHSExpr...> {};
60 template <
template <
class,
class...>
class CategoryExpr,
typename OP,
typename... RHSExpr>
61 struct LeafCount<CategoryExpr<OP, RHSExpr...> > :LeafCount<const CategoryExpr<OP, RHSExpr...> >{};
64 template <
typename IfExpr,
typename ThenExpr,
typename ElseExpr>
65 struct LeafCount<const TensorSelectOp<IfExpr, ThenExpr, ElseExpr> > : CategoryCount<IfExpr, ThenExpr, ElseExpr> {};
67 template <
typename IfExpr,
typename ThenExpr,
typename ElseExpr>
68 struct LeafCount<TensorSelectOp<IfExpr, ThenExpr, ElseExpr> >: LeafCount<const TensorSelectOp<IfExpr, ThenExpr, ElseExpr> > {};
72 template <
typename LHSExpr,
typename RHSExpr>
73 struct LeafCount<const TensorAssignOp<LHSExpr, RHSExpr> >: CategoryCount<LHSExpr,RHSExpr> {};
77 template <
typename LHSExpr,
typename RHSExpr>
78 struct LeafCount<TensorAssignOp<LHSExpr, RHSExpr> > :LeafCount<const TensorAssignOp<LHSExpr, RHSExpr> >{};
81 template <
typename Expr>
82 struct LeafCount<const TensorForcedEvalOp<Expr> > {
83 static const size_t Count =1;
87 template <
typename Expr>
88 struct LeafCount<TensorForcedEvalOp<Expr> >: LeafCount<const TensorForcedEvalOp<Expr> > {};
91 template <
typename Expr>
92 struct LeafCount<const TensorEvalToOp<Expr> > {
93 static const size_t Count = 1 + CategoryCount<Expr>::Count;
97 template <
typename OP,
typename Dim,
typename Expr>
98 struct LeafCount<const TensorReductionOp<OP, Dim, Expr> > {
99 static const size_t Count =1;
103 template <
typename OP,
typename Dim,
typename Expr>
104 struct LeafCount<TensorReductionOp<OP, Dim, Expr> >: LeafCount<const TensorReductionOp<OP, Dim, Expr> >{};
107 template <
typename Expr>
108 struct LeafCount<TensorEvalToOp<Expr> >: LeafCount<const TensorEvalToOp<Expr> >{};
114 #endif // UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_LEAF_COUNT_HPP Namespace containing all symbols from the Eigen library.
Definition: AdolcForward:45