// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Mehdi Goli Codeplay Software Ltd. // Ralph Potter Codeplay Software Ltd. // Luke Iwanski Codeplay Software Ltd. // Contact: // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. /***************************************************************** * TensorSyclLeafCount.h * * \brief: * The leaf count used the pre-order expression tree traverse in order to name * count the number of leaf nodes in the expression * *****************************************************************/ #ifndef UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_LEAF_COUNT_HPP #define UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_LEAF_COUNT_HPP namespace Eigen { namespace TensorSycl { namespace internal { /// \brief LeafCount used to counting terminal nodes. The total number of /// leaf nodes is used by MakePlaceHolderExprHelper to find the order /// of the leaf node in a expression tree at compile time. template struct LeafCount; template struct CategoryCount; template<> struct CategoryCount<> { static const size_t Count =0; }; template struct CategoryCount{ static const size_t Count = LeafCount::Count + CategoryCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is const TensorMap template class MakePointer_> struct LeafCount > { static const size_t Count =1; }; /// specialisation of the \ref LeafCount struct when the node type is TensorMap template class MakePointer_> struct LeafCount > :LeafCount >{}; // const TensorCwiseUnaryOp, const TensorCwiseNullaryOp, const TensorCwiseBinaryOp, const TensorCwiseTernaryOp, and Const TensorBroadcastingOp template