diff options
author | 2016-11-04 18:18:19 +0000 | |
---|---|---|
committer | 2016-11-04 18:18:19 +0000 | |
commit | 0ebe3808ca8b2c96d9d77024ba8d4d0bdfb7e23c (patch) | |
tree | 1358b27b6a27cb89b3665016ec651f6081babfef /unsupported/Eigen/CXX11/src/Tensor/TensorSyclLeafCount.h | |
parent | 0585b2965d06cc2c57be35844bd2d0d56e6334ac (diff) |
Removed the sycl include from Eigen/Core and moved it to Unsupported/Eigen/CXX11/Tensor; added TensorReduction for sycl (full reduction and partial reduction); added TensorReduction test case for sycl (full reduction and partial reduction); fixed the tile size on TensorSyclRun.h based on the device max work group size;
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorSyclLeafCount.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorSyclLeafCount.h | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorSyclLeafCount.h b/unsupported/Eigen/CXX11/src/Tensor/TensorSyclLeafCount.h index 8d520d2da..25d1fac9b 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorSyclLeafCount.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorSyclLeafCount.h @@ -43,8 +43,7 @@ struct CategoryCount<Arg,Args...>{ static const size_t Count = LeafCount<Arg>::Count + CategoryCount<Args...>::Count; }; -/// specialisation of the \ref LeafCount struct when the node type is const -/// TensorMap +/// specialisation of the \ref LeafCount struct when the node type is const TensorMap template <typename PlainObjectType, int Options_, template <class> class MakePointer_> struct LeafCount<const TensorMap<PlainObjectType, Options_, MakePointer_> > { static const size_t Count =1; @@ -61,18 +60,15 @@ struct LeafCount<const CategoryExpr<OP, RHSExpr...> >: CategoryCount<RHSExpr...> template <template <class, class...> class CategoryExpr, typename OP, typename... RHSExpr> struct LeafCount<CategoryExpr<OP, RHSExpr...> > :LeafCount<const CategoryExpr<OP, RHSExpr...> >{}; -/// specialisation of the \ref LeafCount struct when the node type is -/// const TensorSelectOp is an exception +/// specialisation of the \ref LeafCount struct when the node type is const TensorSelectOp is an exception template <typename IfExpr, typename ThenExpr, typename ElseExpr> struct LeafCount<const TensorSelectOp<IfExpr, ThenExpr, ElseExpr> > : CategoryCount<IfExpr, ThenExpr, ElseExpr> {}; -/// specialisation of the \ref LeafCount struct when the node type is -/// TensorSelectOp +/// specialisation of the \ref LeafCount struct when the node type is TensorSelectOp template <typename IfExpr, typename ThenExpr, typename ElseExpr> struct LeafCount<TensorSelectOp<IfExpr, ThenExpr, ElseExpr> >: LeafCount<const TensorSelectOp<IfExpr, ThenExpr, ElseExpr> > {}; -/// specialisation of the \ref LeafCount struct when the node type is const -/// TensorAssignOp +/// specialisation of the \ref LeafCount struct when the node type is const TensorAssignOp template <typename LHSExpr, typename RHSExpr> struct LeafCount<const TensorAssignOp<LHSExpr, RHSExpr> >: CategoryCount<LHSExpr,RHSExpr> {}; @@ -81,31 +77,38 @@ struct LeafCount<const TensorAssignOp<LHSExpr, RHSExpr> >: CategoryCount<LHSExpr template <typename LHSExpr, typename RHSExpr> struct LeafCount<TensorAssignOp<LHSExpr, RHSExpr> > :LeafCount<const TensorAssignOp<LHSExpr, RHSExpr> >{}; -/// specialisation of the \ref LeafCount struct when the node type is const -/// TensorForcedEvalOp +/// specialisation of the \ref LeafCount struct when the node type is const TensorForcedEvalOp template <typename Expr> struct LeafCount<const TensorForcedEvalOp<Expr> > { static const size_t Count =1; }; -/// specialisation of the \ref LeafCount struct when the node type is -/// TensorForcedEvalOp +/// specialisation of the \ref LeafCount struct when the node type is TensorForcedEvalOp template <typename Expr> struct LeafCount<TensorForcedEvalOp<Expr> >: LeafCount<const TensorForcedEvalOp<Expr> > {}; -/// specialisation of the \ref LeafCount struct when the node type is const -/// TensorEvalToOp +/// specialisation of the \ref LeafCount struct when the node type is const TensorEvalToOp template <typename Expr> struct LeafCount<const TensorEvalToOp<Expr> > { static const size_t Count = 1 + CategoryCount<Expr>::Count; }; -/// specialisation of the \ref LeafCount struct when the node type is -/// TensorEvalToOp +/// specialisation of the \ref LeafCount struct when the node type is const TensorReductionOp +template <typename OP, typename Dim, typename Expr> +struct LeafCount<const TensorReductionOp<OP, Dim, Expr> > { + static const size_t Count =1; +}; + +/// specialisation of the \ref LeafCount struct when the node type is TensorReductionOp +template <typename OP, typename Dim, typename Expr> +struct LeafCount<TensorReductionOp<OP, Dim, Expr> >: LeafCount<const TensorReductionOp<OP, Dim, Expr> >{}; + +/// specialisation of the \ref LeafCount struct when the node type is TensorEvalToOp template <typename Expr> struct LeafCount<TensorEvalToOp<Expr> >: LeafCount<const TensorEvalToOp<Expr> >{}; -} -} -} // namespace Eigen + +} /// namespace TensorSycl +} /// namespace internal +} /// namespace Eigen #endif // UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_LEAF_COUNT_HPP |