// 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/. /***************************************************************** * TensorSyclPlaceHolderExpr.h * * \brief: * This is the specialisation of the placeholder expression based on the * operation type * *****************************************************************/ #ifndef UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_PLACEHOLDER_EXPR_HPP #define UNSUPPORTED_EIGEN_CXX11_SRC_TENSOR_TENSORSYCL_PLACEHOLDER_EXPR_HPP namespace Eigen { namespace TensorSycl { namespace internal { /// \struct PlaceHolder /// \brief PlaceHolder is used to replace the \ref TensorMap in the expression /// tree. /// PlaceHolder contains the order of the leaf node in the expression tree. template struct PlaceHolder { static constexpr size_t I = N; typedef Scalar Type; }; /// \sttruct PlaceHolderExpression /// \brief it is used to create the PlaceHolder expression. The PlaceHolder /// expression is a copy of expression type in which the TensorMap of the has /// been replaced with PlaceHolder. template struct PlaceHolderExpression; template struct CalculateIndex; template struct CalculateIndex{ typedef typename PlaceHolderExpression::Type ArgType; typedef utility::tuple::Tuple ArgsTuple; }; template struct CalculateIndex{ static const size_t Arg2LeafCount = LeafCount::Count; typedef typename PlaceHolderExpression::Type Arg1Type; typedef typename PlaceHolderExpression::Type Arg2Type; typedef utility::tuple::Tuple ArgsTuple; }; template struct CalculateIndex { static const size_t Arg3LeafCount = LeafCount::Count; static const size_t Arg2LeafCount = LeafCount::Count; typedef typename PlaceHolderExpression::Type Arg1Type; typedef typename PlaceHolderExpression::Type Arg2Type; typedef typename PlaceHolderExpression::Type Arg3Type; typedef utility::tuple::Tuple ArgsTuple; }; template class Category , class OP, class TPL> struct CategoryHelper; template class Category , class OP, class ...T > struct CategoryHelper > { typedef Category Type; }; template class Category , class ...T > struct CategoryHelper > { typedef Category Type; }; /// specialisation of the \ref PlaceHolderExpression when the node is /// TensorCwiseNullaryOp, TensorCwiseUnaryOp, TensorBroadcastingOp, TensorCwiseBinaryOp, TensorCwiseTernaryOp #define OPEXPRCATEGORY(CVQual)\ template