24 #ifndef VISIONCPP_INCLUDE_FRAMEWORK_EVALUATOR_EVAL_EXPRESSION_EVAL_EXPR_STN_NO_FILT_HPP_
25 #define VISIONCPP_INCLUDE_FRAMEWORK_EVALUATOR_EVAL_EXPRESSION_EVAL_EXPR_STN_NO_FILT_HPP_
31 template <
typename C_OP,
size_t Halo_T,
size_t Halo_L,
size_t Halo_B,
32 size_t Halo_R,
typename RHS,
size_t Cols,
size_t Rows,
size_t LfType,
33 size_t LVL,
typename Loc,
typename... Params>
38 template <
bool IsRoot,
size_t Halo_Top,
size_t Halo_Left,
size_t Halo_Butt,
39 size_t Halo_Right,
size_t Offset,
size_t Index,
size_t LC,
46 constexpr
size_t OutOffset =
OutputLocation<IsRoot, Offset + Index - 1>::ID;
47 constexpr
bool isLocal =
49 tools::tuple::get<OutOffset>(t))>::Type>::scope ==
scope::Local;
52 EvalExpr<RHS, Loc, Params...>::template eval_neighbour<
53 false, Halo_Top + Halo_T, Halo_Left + Halo_L, Halo_Butt + Halo_B,
54 Halo_Right + Halo_R, Offset, Index - 1, LC + Halo_L + Halo_R,
55 LR + Halo_T + Halo_B>(cOffset, t)
59 nested_acc, LC + Halo_L + Halo_R, LR + Halo_T + Halo_B);
60 for (
int i = 0; i < LC; i += cOffset.cLRng) {
61 if (get_compare<isLocal, LC, Cols>(cOffset.l_c, i, cOffset.g_c)) {
62 for (
int j = 0; j < LR; j += cOffset.rLRng) {
63 if (get_compare<isLocal, LR, Rows>(cOffset.l_r, j, cOffset.g_r)) {
64 neighbour.set_offset(cOffset.l_c + Halo_L + i,
65 cOffset.l_r + Halo_T + j);
66 *(tools::tuple::get<OutOffset>(t).get_pointer() +
68 id_val<isLocal>(cOffset.l_r, cOffset.g_r) + j,
69 id_val<isLocal>(LC, Cols),
70 id_val<isLocal>(LR, Rows))) =
72 LfType, decltype(tools::tuple::get<OutOffset>(t))>::Type>(
73 typename C_OP::OP()(neighbour));
81 return tools::tuple::get<OutOffset>(t);
static size_t calculate_index(size_t c, size_t r, size_t cols, size_t rows)
function calculate_index
static constexpr ScopeType Local
visioncpp::internal::EvalExpr< StnNoFilt< C_OP, Halo_T, Halo_L, Halo_B, Halo_R, RHS, Cols, Rows, LfType, LVL >, Loc, Params... >::eval_neighbour static auto eval_neighbour(Loc &cOffset, const tools::tuple::Tuple< Params... > &t) -> decltype(tools::tuple::get< OutputLocation< IsRoot, Offset+Index - 1 >::ID >(t))
evaluate function when the internal::ops_category is NeighbourOP.
eval_global_neighbour function:
LocalNeighbour is used to provide local access for each element of the local memory based on the Coor...
This class is used to determine the ElementType of accessor template parameters.
This is used to find whether a node should use a global memory output or a local memory output is cre...
The definition is in StnNoFilt file.
This struct is used to trait the value type inside the accessor.