24 #ifndef VISIONCPP_INCLUDE_FRAMEWORK_EVALUATOR_LOAD_PATTERN_SQUARE_PATTERN_HPP_
25 #define VISIONCPP_INCLUDE_FRAMEWORK_EVALUATOR_LOAD_PATTERN_SQUARE_PATTERN_HPP_
33 template <
size_t N,
size_t Rows,
size_t Cols,
size_t Sc,
size_t LVL,
34 typename Loc,
typename... Params>
37 template <
size_t Halo_Top,
size_t Halo_Left,
size_t Halo_Butt,
38 size_t Halo_Right,
size_t Offset,
size_t LC,
size_t LR>
49 template <
size_t Memory_Type,
size_t N,
size_t Rows,
size_t Cols,
size_t LVL,
50 typename Loc,
typename... Params>
54 template <
size_t Halo_Top,
size_t Halo_Left,
size_t Halo_Butt,
55 size_t Halo_Right,
size_t Offset,
size_t LC,
size_t LR>
62 template <
size_t Memory_Type,
size_t N,
size_t Rows,
size_t Cols,
size_t LVL,
63 size_t Sc,
typename Loc,
typename... Params>
66 template <
size_t Halo_Top,
size_t Halo_Left,
size_t Halo_Butt,
67 size_t Halo_Right,
size_t Index,
size_t LC,
size_t LR>
70 static_assert(Cols > 0 && LC > 0,
"Cols must be greater than 0");
71 static_assert(Rows > 0 && LR > 0,
"Rows must be greater than 0");
73 for (
int i = 0; i < LC; i += cOffset.cLRng) {
74 if ((cOffset.l_c + i < LC)) {
75 size_t val_c = get_global_range<Halo_Left, Cols>(cOffset.g_c + i);
76 for (
size_t j = 0; j < LR; j += cOffset.rLRng) {
77 size_t val_r = get_global_range<Halo_Top, Rows>(cOffset.g_r + j);
78 if ((cOffset.l_r + j < LR)) {
79 tools::tuple::get<Index>(t)
80 .get_pointer()[(cOffset.l_c + i) + (LC * (cOffset.l_r + j))] =
82 Memory_Type, decltype(tools::tuple::get<Index>(t))>::Type>(
83 *(tools::tuple::get<N>(t).get_pointer() +
96 template <
size_t Halo_Top,
size_t Halo_Left,
size_t Halo_Butt,
97 size_t Halo_Right,
size_t Offset,
size_t LC,
size_t LR,
typename Expr,
98 typename Loc,
typename... Params>
101 Fill<Expr, Loc, Params...>::template fill_neighbour<
102 Halo_Top, Halo_Left, Halo_Butt, Halo_Right, Offset, LC, LR>(cOffset, t);
static size_t calculate_index(size_t c, size_t r, size_t cols, size_t rows)
function calculate_index
static void fill_local_neighbour(Loc &cOffset, const internal::tools::tuple::Tuple< Params... > &t)
template deduction for Fill struct.
static constexpr size_t Const
static constexpr ScopeType Constant
static void fill_neighbour(Loc &cOffset, const tools::tuple::Tuple< Params... > &t)
static void fill_neighbour(Loc &cOffset, const tools::tuple::Tuple< Params... > &t)
static void fill_neighbour(Loc &cOffset, const tools::tuple::Tuple< Params... > &t)
The Fill is used to load a rectangle neighbour area from global memory to local memory.
the definition is in LeafNode.
This class is used to determine the ElementType of accessor template parameters.
PlaceHolder is used to replace the Vision Memory in the LeafNode containing sycl buffer.