23 #ifndef VISIONCPP_INCLUDE_FRAMEWORK_EXPR_CONVERTOR_LOCAL_OUTPUT_HPP_
24 #define VISIONCPP_INCLUDE_FRAMEWORK_EXPR_CONVERTOR_LOCAL_OUTPUT_HPP_
31 template <
size_t IsRoot,
size_t LeafType,
size_t LC,
size_t LR,
41 template <
size_t LeafType,
size_t LC,
size_t LR,
typename OutType>
43 using Accessor = cl::sycl::accessor<OutType, MemDimension<LeafType>::Dim,
44 cl::sycl::access::mode::read_write,
45 cl::sycl::access::target::local>;
65 template <
bool Po
intOp,
size_t IsRoot,
size_t LC,
size_t LR,
typename Expr>
73 cl::sycl::handler &cgh) {
82 template <
size_t IsRoot,
bool in,
size_t LC,
size_t LR,
size_t Width,
83 size_t Height,
size_t element_category,
size_t LVL,
typename Sclr>
85 false, IsRoot, LC, LR,
100 template <
size_t IsRoot,
bool in,
size_t LC,
size_t LR,
size_t element_category,
101 size_t Memory_Type,
typename Scalar,
size_t Width,
size_t Height,
102 typename ElementTp,
size_t Elements,
size_t LVL>
104 false, IsRoot, LC, LR,
106 Height, ElementTp, Elements, scope::
Constant, LVL>,
118 template <
size_t IsRoot,
size_t LC,
size_t LR,
size_t LVL,
typename RHS>
122 using Accessor = cl::sycl::accessor<
typename RHS::ElementType, RHS::Dim,
123 cl::sycl::access::mode::read_write,
124 cl::sycl::access::target::local>;
126 return Accessor(get_range<RHS::Dim>(LR, LC), cgh);
133 template <
size_t IsRoot,
size_t LC,
size_t LR,
typename OP,
typename RHSExpr,
134 size_t Cols,
size_t Rows,
size_t LeafType,
size_t LVL>
136 RUnOP<OP, RHSExpr, Cols, Rows, LeafType, LVL>> {
144 typename OP::OutType>::
getTuple(cgh))) {
155 template <
size_t IsRoot,
size_t LC,
size_t LR,
typename OP,
typename LHSExpr,
156 typename RHSExpr,
size_t Cols,
size_t Rows,
size_t LeafType,
159 RBiOP<OP, LHSExpr, RHSExpr, Cols, Rows, LeafType, LVL>> {
160 static constexpr
size_t lhs =
163 static constexpr
size_t rhs =
166 static constexpr
bool res = lhs < rhs;
179 typename OP::OutType>::
getTuple(cgh))) {
191 template <
size_t IsRoot,
size_t LC,
size_t LR,
typename OP,
size_t Halo_T,
192 size_t Halo_L,
size_t Halo_B,
size_t Halo_R,
typename LHSExpr,
193 typename RHSExpr,
size_t Cols,
size_t Rows,
size_t LeafType,
196 StnFilt<OP, Halo_T, Halo_L, Halo_B, Halo_R, LHSExpr, RHSExpr,
197 Cols, Rows, LeafType, LVL>> {
198 static constexpr
size_t Halo_COL = Halo_L + Halo_R;
199 static constexpr
size_t Halo_ROW = Halo_T + Halo_B;
209 LocalOutput<
false,
false, LC + Halo_COL, LR + Halo_ROW,
213 typename OP::OutType>::
getTuple(cgh))) {
216 auto LHSTuple =
LocalOutput<
false,
false, LC + Halo_COL, LR + Halo_ROW,
229 template <
size_t IsRoot,
size_t LC,
size_t LR,
typename OP,
size_t Halo_T,
230 size_t Halo_L,
size_t Halo_B,
size_t Halo_R,
typename RHSExpr,
231 size_t Cols,
size_t Rows,
size_t LeafType,
size_t LVL>
233 StnNoFilt<OP, Halo_T, Halo_L, Halo_B, Halo_R, RHSExpr, Cols,
234 Rows, LeafType, LVL>> {
235 static constexpr
size_t Halo_COL = Halo_L + Halo_R;
236 static constexpr
size_t Halo_ROW = Halo_T + Halo_B;
245 LocalOutput<
false,
false, LC + Halo_COL, LR + Halo_ROW,
248 typename OP::OutType>::
getTuple(cgh))) {
251 auto RHSTuple =
LocalOutput<
false,
false, LC + Halo_COL, LR + Halo_ROW,
261 template <
size_t IsRoot,
size_t LC,
size_t LR,
typename OP,
typename RHSExpr,
262 size_t Cols,
size_t Rows,
size_t LeafType,
size_t LVL>
264 RDCN<OP, RHSExpr, Cols, Rows, LeafType, LVL>> {
268 static constexpr
size_t LC_Ratio = RHSExpr::Type::Cols / Cols;
269 static constexpr
size_t LR_Ratio = RHSExpr::Type::Rows / Rows;
277 typename OP::OutType>::
getTuple(cgh))) {
288 template <
size_t IsRoot,
size_t LC,
size_t LR,
typename LHSExpr,
289 typename RHSExpr,
size_t Cols,
size_t Rows,
size_t OffsetColIn,
290 size_t OffsetRowIn,
size_t OffsetColOut,
size_t OffsetRowOut,
291 size_t LeafType,
size_t LVL>
293 false, IsRoot, LC, LR,
294 ParallelCopy<LHSExpr, RHSExpr, Cols, Rows, OffsetColIn, OffsetRowIn,
295 OffsetColOut, OffsetRowOut, LeafType, LVL>> {
305 template <
size_t IsRoot,
size_t LC,
size_t LR,
typename LHSExpr,
306 typename RHSExpr,
size_t Cols,
size_t Rows,
size_t LeafType,
309 Assign<LHSExpr, RHSExpr, Cols, Rows, LeafType, LVL>> {
322 template <
size_t LC,
size_t LR,
typename Expr>
325 true, LC, LR, Expr>::getTuple(cgh)) {
327 LC, LR, Expr>::getTuple(cgh);
constexpr static size_t NeighbourOP
cl::sycl::range< Dim > get_range(size_t r, size_t c)
function get_range
auto create_local_accessors(cl::sycl::handler &cgh) -> decltype(LocalOutput< Expr::Operation_type !=ops_category::NeighbourOP, true, LC, LR, Expr >::getTuple(cgh))
create_local_accessors is a deduction function for creating local accessor.
static constexpr size_t Const
static constexpr ScopeType Constant
static constexpr ScopeType Global
The definition is in Assign file.
the definition is in LeafNode.
static auto getTuple(cl::sycl::handler &cgh) -> decltype(LocalOutput< false, IsRoot, LC, LR, RHSExpr >::getTuple(cgh))
cl::sycl::accessor< typename RHS::ElementType, RHS::Dim, cl::sycl::access::mode::read_write, cl::sycl::access::target::local > Accessor
static tools::tuple::Tuple< Accessor > getTuple(cl::sycl::handler &cgh)
visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, ParallelCopy< LHSExpr, RHSExpr, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LeafType, LVL > >::getTuple static auto getTuple(cl::sycl::handler &cgh) -> decltype(LocalOutput< false, false, LC, LR, RHSExpr >::getTuple(cgh))
visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, RBiOP< OP, LHSExpr, RHSExpr, Cols, Rows, LeafType, LVL > >::getTuple static auto getTuple(cl::sycl::handler &cgh) -> decltype(tools::tuple::append(tools::tuple::append(LocalOutput< false, false, LC, LR, LHSExpr >::getTuple(cgh), LocalOutput< false, false, LC, LR, RHSExpr >::getTuple(cgh)), OutputAccessor< IsRoot, LeafType, Out_LC, Out_LR, typename OP::OutType >::getTuple(cgh)))
visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, RBiOP< OP, LHSExpr, RHSExpr, Cols, Rows, LeafType, LVL > >::Type typename tools::StaticIf< res, LHSExpr, RHSExpr >::Type Type
static auto getTuple(cl::sycl::handler &cgh) -> decltype(tools::tuple::append(LocalOutput< false, false, LC, LR, RHSExpr >::getTuple(cgh), OutputAccessor< IsRoot, LeafType, Out_LC, Out_LR, typename OP::OutType >::getTuple(cgh)))
static auto getTuple(cl::sycl::handler &cgh) -> decltype(tools::tuple::append(LocalOutput< false, false, LC, LR, RHSExpr >::getTuple(cgh), OutputAccessor< IsRoot, LeafType, Out_LC, Out_LR, typename OP::OutType >::getTuple(cgh)))
visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, StnFilt< OP, Halo_T, Halo_L, Halo_B, Halo_R, LHSExpr, RHSExpr, Cols, Rows, LeafType, LVL > >::getTuple static auto getTuple(cl::sycl::handler &cgh) -> decltype(tools::tuple::append(tools::tuple::append(LocalOutput< false, false, LC+Halo_COL, LR+Halo_ROW, LHSExpr >::getTuple(cgh), LocalOutput< false, false, LC, LR, RHSExpr >::getTuple(cgh)), OutputAccessor< IsRoot, LeafType, Out_LC, Out_LR, typename OP::OutType >::getTuple(cgh)))
visioncpp::internal::LocalOutput< false, IsRoot, LC, LR, StnNoFilt< OP, Halo_T, Halo_L, Halo_B, Halo_R, RHSExpr, Cols, Rows, LeafType, LVL > >::getTuple static auto getTuple(cl::sycl::handler &cgh) -> decltype(tools::tuple::append(LocalOutput< false, false, LC+Halo_COL, LR+Halo_ROW, RHSExpr >::getTuple(cgh), OutputAccessor< IsRoot, LeafType, Out_LC, Out_LR, typename OP::OutType >::getTuple(cgh)))
LocalOutput:Local output is used for neighbour operation in order to create a local memory for the ou...
static constexpr size_t Out_LC
static decltype(tools::tuple::make_tuple()) getTuple(cl::sycl::handler &cgh)
getTuple function is used to create and wrap local memory into a tuple
static constexpr size_t Out_LR
this is used to determine the dimension of the memory based on the memory type template parameters:
static tools::tuple::Tuple< Accessor > getTuple(cl::sycl::handler &cgh)
cl::sycl::accessor< OutType, MemDimension< LeafType >::Dim, cl::sycl::access::mode::read_write, cl::sycl::access::target::local > Accessor
OutputAccessor struct is used to generate an accessor when the node is not root.
static auto getTuple(cl::sycl::handler &cgh) -> decltype(tools::tuple::make_tuple())
The definition is in ParallelCopy file.
The definition is in RBiOP file.
The definition is in RDCN file.
The definition is in RUnOP file.
The definition is in StnFilt file.
The definition is in StnNoFilt file.
Definition of VisionMemory.