// 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_TENSORYSYCL_LEAF_COUNT_HPP #define UNSUPPORTED_EIGEN_CXX11_SRC_TENSORYSYCL_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; /// 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> { static const size_t Count = 1; }; /// specialisation of the \ref LeafCount struct when the node type is const /// TensorCwiseNullaryOp template struct LeafCount> { static const size_t Count = LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is /// TensorCwiseNullaryOp template struct LeafCount> { static const size_t Count = LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is const /// TensorBroadcastingOp template struct LeafCount> { static const size_t Count = LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is /// TensorCwiseNullaryOp template struct LeafCount> { static const size_t Count = LeafCount::Count; }; // TensorCwiseUnaryOp template struct LeafCount> { static const size_t Count = LeafCount::Count; }; // TensorCwiseUnaryOp template struct LeafCount> { static const size_t Count = LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is const /// TensorCwiseBinaryOp template struct LeafCount> { static const size_t Count = LeafCount::Count + LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is /// TensorCwiseBinaryOp template struct LeafCount> { static const size_t Count = LeafCount::Count + LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is /// TensorCwiseTernaryOp template struct LeafCount> { static const size_t Count = LeafCount::Count + LeafCount::Count + LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is const /// TensorCwiseTernaryOp template struct LeafCount> { static const size_t Count = LeafCount::Count + LeafCount::Count + LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is /// TensorCwiseSelectOp template struct LeafCount> { static const size_t Count = LeafCount::Count + LeafCount::Count + LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is const /// TensorCwiseSelectOp template struct LeafCount> { static const size_t Count = LeafCount::Count + LeafCount::Count + LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is /// TensorAssignOp template struct LeafCount> { static const size_t Count = LeafCount::Count + LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is const /// TensorAssignOp template struct LeafCount> { static const size_t Count = LeafCount::Count + LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is const /// TensorForcedEvalOp template struct LeafCount> { static const size_t Count = 1; }; /// specialisation of the \ref LeafCount struct when the node type is /// TensorForcedEvalOp template struct LeafCount> { static const size_t Count = 1; }; /// specialisation of the \ref LeafCount struct when the node type is const /// TensorEvalToOp template struct LeafCount> { static const size_t Count = 1 + LeafCount::Count; }; /// specialisation of the \ref LeafCount struct when the node type is /// TensorEvalToOp template struct LeafCount> { static const size_t Count = 1 + LeafCount::Count; }; } } } // namespace Eigen #endif // UNSUPPORTED_EIGEN_CXX11_SRC_TENSORYSYCL_LEAF_COUNT_HPP