24 #ifndef VISIONCPP_INCLUDE_FRAMEWORK_EVALUATOR_EVAL_ASSIGN_EVAL_ASSIGN_HPP_
25 #define VISIONCPP_INCLUDE_FRAMEWORK_EVALUATOR_EVAL_ASSIGN_EVAL_ASSIGN_HPP_
32 template <
size_t OutputIndex,
size_t Offset,
size_t LC,
size_t LR,
typename LHS,
33 typename RHS,
size_t Cols,
size_t Rows,
size_t LfType,
size_t LVL,
34 typename Loc,
typename... Params>
38 static inline void eval(Loc &cOffset,
40 EvalExpr<RHS, Loc, Params...>::template eval_global_neighbour<
41 true, Offset, OutputIndex, LC, LR>(cOffset, t);
47 template <
size_t OutputIndex,
size_t Offset,
size_t LC,
size_t LR,
typename LHS,
48 typename RHS,
size_t Cols,
size_t Rows,
size_t LfType,
size_t LVL,
49 typename Loc,
typename... Params>
53 static inline void eval(Loc &cOffset,
55 EvalExpr<RHS, Loc, Params...>::template eval_neighbour<
56 true, 0, 0, 0, 0, Offset, OutputIndex, LC, LR>(cOffset, t);
62 template <
size_t Output_Index,
size_t Offset,
size_t LC,
size_t LR,
63 typename LHS,
typename RHS,
size_t Cols,
size_t Rows,
size_t LfType,
64 size_t LVL,
typename Loc,
typename... Params>
69 static inline void eval(Loc &cOffset,
71 using RHS_Eval_Expr =
EvalExpr<RHS, Loc, Params...>;
72 using LHS_Eval_Expr =
EvalExpr<LHS, Loc, Params...>;
76 decltype(tools::tuple::get<0>(t))>::Type;
77 for (
int i = 0; i < LC; i += cOffset.cLRng)
78 if (cOffset.g_c + i < Expr::Type::Cols)
79 for (
int j = 0; j < LR; j += cOffset.rLRng)
80 if (cOffset.g_r + j < Expr::Type::Rows) {
81 cOffset.pointOp_gc = cOffset.g_c + i;
82 cOffset.pointOp_gr = cOffset.g_r + j;
83 *(LHS_Eval_Expr::get_accessor(t).get_pointer() +
85 Expr::Type::Cols, Expr::Type::Rows)) =
86 tools::convert<ElementType>(
87 RHS_Eval_Expr::eval_point(cOffset, t));
constexpr static size_t NeighbourOP
constexpr static size_t GlobalNeighbourOP
constexpr static size_t PointOP
static size_t calculate_index(size_t c, size_t r, size_t cols, size_t rows)
function calculate_index
The definition is in Assign file.
eval_global_neighbour function:
visioncpp::internal::Evaluator< internal::ops_category::GlobalNeighbourOP, OutputIndex, Offset, LC, LR, internal::Assign< LHS, RHS, Cols, Rows, LfType, LVL >, Loc, Params... >::eval static void eval(Loc &cOffset, const tools::tuple::Tuple< Params... > &t)
visioncpp::internal::Evaluator< internal::ops_category::NeighbourOP, OutputIndex, Offset, LC, LR, internal::Assign< LHS, RHS, Cols, Rows, LfType, LVL >, Loc, Params... >::eval static void eval(Loc &cOffset, const tools::tuple::Tuple< Params... > &t)
visioncpp::internal::Evaluator< internal::ops_category::PointOP, Output_Index, Offset, LC, LR, internal::Assign< LHS, RHS, Cols, Rows, LfType, LVL >, Loc, Params... >::eval static void eval(Loc &cOffset, const tools::tuple::Tuple< Params... > &t)
the root of the expression tree.
This class is used to determine the ElementType of accessor template parameters.