VisionCpp  0.0.1
place_holder_leaf_node.hpp
Go to the documentation of this file.
1 // This file is part of VisionCpp, a lightweight C++ template library
2 // for computer vision and image processing.
3 //
4 // Copyright (C) 2016 Codeplay Software Limited. All Rights Reserved.
5 //
6 // Contact: visioncpp@codeplay.com
7 //
8 // Licensed under the Apache License, Version 2.0 (the "License");
9 // you may not use this file except in compliance with the License.
10 // You may obtain a copy of the License at
11 //
12 // http://www.apache.org/licenses/LICENSE-2.0
13 //
14 // Unless required by applicable law or agreed to in writing, software
15 // distributed under the License is distributed on an "AS IS" BASIS,
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 // See the License for the specific language governing permissions and
18 // limitations under the License.
19 
20 /// \file place_holder_leaf_node.hpp
21 /// \brief This file contains different specialisations leafNodes for different
22 /// types of memory.
23 
24 #ifndef VISIONCPP_INCLUDE_FRAMEWORK_EXPR_CONVERTOR_PLACE_HOLDER_LEAF_NODE_HPP_
25 #define VISIONCPP_INCLUDE_FRAMEWORK_EXPR_CONVERTOR_PLACE_HOLDER_LEAF_NODE_HPP_
26 
27 namespace visioncpp {
28 namespace internal {
29 /// The specialisation of LeafNode for the PlaceHolder. It is used to store the
30 /// information of visionMemory.
31 /// template parameters:
32 /// \param Memory_Type : determines the type of the memory {Buffer2D, Buffer1D,
33 /// Host, Image}
34 /// \param N: is the position of the leafNode in the expression tree
35 /// \param C is the column size of the visionMemory
36 /// \param R is the row size of the visionMemory
37 /// \param LVL represents the level of the node in the expression tree.
38 template <size_t Memory_Type, size_t N, size_t C, size_t R, size_t LVL,
39  size_t Sc>
40 struct LeafNode<PlaceHolder<Memory_Type, N, C, R, Sc>, LVL> {
41  static constexpr bool PointOp = true;
42  static constexpr size_t LeafType = Memory_Type;
44  using Type = typename RHSExpr::Type;
45  using OutType = typename RHSExpr::OutType;
46  static constexpr size_t RThread = Type::Rows;
47  static constexpr size_t CThread = Type::Cols;
48  static constexpr size_t ND_Category = internal::expr_category::Unary;
49  static constexpr size_t Level = N;
50  static constexpr bool SubExpressionEvaluationNeeded = false;
54  template <bool ForcedToExec, size_t LC, size_t LR, size_t LCT, size_t LRT,
55  typename DeviceT>
57 };
58 } // internal
59 } // visioncpp
60 #endif // VISIONCPP_INCLUDE_FRAMEWORK_EXPR_CONVERTOR_PLACE_HOLDER_LEAF_NODE_HPP_
VisionCpp namespace.
Definition: sycl/device.hpp:24
the definition is in LeafNode.
Definition: leaf_node.hpp:38
static constexpr size_t Operation_type
Definition: leaf_node.hpp:54
static constexpr size_t Level
Definition: leaf_node.hpp:43
static constexpr bool SubExpressionEvaluationNeeded
Definition: leaf_node.hpp:52
static constexpr size_t ND_Category
Definition: leaf_node.hpp:50
static constexpr size_t CThread
Definition: leaf_node.hpp:48
static constexpr size_t LeafType
Definition: leaf_node.hpp:46
static constexpr size_t RThread
Definition: leaf_node.hpp:47
PlaceHolder is used to replace the Vision Memory in the LeafNode containing sycl buffer.