27 #ifndef VISIONCPP_INCLUDE_FRAMEWORK_EXPR_TREE_COMPLEX_OPS_PYRAMID_WITH_AUTO_MEM_SEP_HPP_
28 #define VISIONCPP_INCLUDE_FRAMEWORK_EXPR_TREE_COMPLEX_OPS_PYRAMID_WITH_AUTO_MEM_SEP_HPP_
66 template <
bool SatisfyingConds,
typename SepFltrColOP,
typename SepFltrRowOP,
67 typename DownSmplOP,
size_t Cols,
size_t Rows,
size_t LeafType,
68 size_t OffsetCol,
size_t OffsetRow,
size_t LVL,
size_t LC,
size_t LR,
69 size_t LCT,
size_t LRT,
size_t Depth,
size_t CurrentDepth,
70 typename LHS,
typename RHS,
typename SepFilterCol,
71 typename SepFilterRow,
typename PyramidMem,
typename DeviceT>
84 SepFilterRow &spFltrRow, PyramidMem &mem,
87 typename SepFilterCol::OutType>,
88 SepFilterCol::Type::Rows / 2, SepFilterCol::Type::Cols / 2,
89 SepFilterCol::Type::Rows / 2, SepFilterCol::Type::Cols / 2,
90 RHS, SepFilterCol, Cols, Rows, LeafType, 1 + RHS::Level>(
94 typename SepFilterRow::OutType>,
95 SepFilterRow::Type::Rows / 2, SepFilterRow::Type::Cols / 2,
96 SepFilterRow::Type::Rows / 2, SepFilterRow::Type::Cols / 2,
97 decltype(a), SepFilterRow, Cols, Rows, LeafType,
98 1 + decltype(a)::Level>(a, spFltrRow);
101 decltype(b), Cols / 2, Rows / 2, LeafType, 1 + decltype(b)::Level>(
104 tools::tuple::get<CurrentDepth>(mem))>::Type;
105 auto d =
Assign<RHSType, decltype(c), Cols / 2, Rows / 2, LeafType, LVL>(
106 tools::tuple::get<CurrentDepth>(mem), c);
108 fuse<LC, LR, LCT, LRT>(d, dev);
111 (Depth == (CurrentDepth + 1)), SepFltrColOP, SepFltrRowOP, DownSmplOP,
112 Cols / 2, Rows / 2, LeafType, OffsetCol, OffsetRow + Rows / 2,
113 RHSType::Level + 1, LC, LR, LCT, LRT, Depth, CurrentDepth + 1, LHS,
114 RHSType, SepFilterCol, SepFilterRow,
115 PyramidMem, DeviceT>
::sub_execute(tools::tuple::get<CurrentDepth>(mem),
116 spFltrCol, spFltrRow, mem, dev);
123 template <
typename SepFltrColOP,
typename SepFltrRowOP,
typename DownSmplOP,
124 size_t Cols,
size_t Rows,
size_t LeafType,
size_t OffsetCol,
125 size_t OffsetRow,
size_t LVL,
size_t LC,
size_t LR,
size_t LRT,
126 size_t LCT,
size_t Depth,
size_t CurrentDepth,
typename LHS,
127 typename RHS,
typename SepFilterCol,
typename SepFilterRow,
128 typename PyramidMem,
typename DeviceT>
130 Cols, Rows, LeafType, OffsetCol, OffsetRow, LVL,
131 LC, LR, LCT, LRT, Depth, CurrentDepth, LHS, RHS,
132 SepFilterCol, SepFilterRow, PyramidMem, DeviceT> {
133 static void sub_execute(RHS &, SepFilterCol &, SepFilterRow &, PyramidMem &,
155 template <
typename SepFltrColOP,
typename SepFltrRowOP,
typename DownSmplOP,
156 typename RHS,
typename SepFilterCol,
typename SepFilterRow,
157 size_t Cols,
size_t Rows,
size_t LfType,
size_t LVL,
size_t Dp>
165 static constexpr
size_t Level = LVL;
200 RHS, SepFilterCol, SepFilterRow, Cols,
201 Rows, LfType, LVL, Dp>;
229 template <
bool ForcedToExec,
size_t LC,
size_t LR,
size_t LCT,
size_t LRT,
232 const DeviceT &dev) {
235 rhs.template sub_expression_evaluation<false, LC, LR, LCT, LRT>(dev);
238 Depth == 0,
typename SepFltrColOP::OP,
typename SepFltrRowOP::OP,
239 typename DownSmplOP::OP, Cols, Rows,
LeafType, Cols, 0, 1 + LVL, LC, LR,
240 LCT, LRT,
Depth, 0,
LHSExpr, decltype(eval_sub), SepFilterCol,
250 template <
typename COP_C,
typename COP_R,
typename ROP,
size_t Depth,
251 typename RHS,
typename SepFilterCol,
typename SepFilterRow,
253 auto pyramid_down(RHS rhs, SepFilterCol spFltrCol, SepFilterRow spFltrRow)
256 typename SepFilterCol::OutType>,
258 typename SepFilterRow::OutType>,
260 SepFilterRow, RHS::Type::Cols, RHS::Type::Rows, RHS::Type::LeafType,
261 1 + RHS::Level, Depth> {
264 typename SepFilterCol::OutType>,
266 typename SepFilterRow::OutType>,
268 SepFilterRow, RHS::Type::Cols, RHS::Type::Rows, RHS::Type::LeafType,
269 1 + RHS::Level, Depth>(rhs, spFltrCol, spFltrRow);
static constexpr size_t Unary
constexpr static size_t GlobalNeighbourOP
CreatePyramidTupleType< false, Cols, Rows, LHS::Type::LeafType, Depth, 0, LHS >::Type create_pyramid_memory()
create_pyramid_memory template deduction function for CreatePyramidTuple struct.
auto pyramid_down(RHS rhs, Fltr2D fltr2D) -> internal::PyramidAutomemGen< internal::LocalBinaryOp< Fltr2DOP, typename RHS::OutType, typename Fltr2D::OutType >, internal::LocalUnaryOp< DownSmplOP, typename RHS::OutType >, RHS, Fltr2D, RHS::Type::Cols, RHS::Type::Rows, RHS::Type::LeafType, 1+internal::tools::StaticIf<(RHS::Level > Fltr2D::Level), RHS, Fltr2D >::Type::Level, Depth >
pyramid_auto_generate
The definition is in Assign file.
CreatePyramidTupleType: This file is used to create each output element type for each downsampling ou...
the definition is in LeafNode.
This class is used to encapsulate the local binary functor and the types of each operand in this func...
This class is used to encapsulate the local unary functor and the types of each operand in this funct...
OutputMemory is used to deduce the output type of each node in the expression tree by using certain p...
PyramidAutomemSep is used to construct a pyramid node in the expression tree with two separable Filte...
PyramidLeafNode< PyramidType, N > get()
method get
static constexpr size_t Level
LeafNode< Type, LVL > LHSExpr
typename OutputMemory< OutType, LfType, Cols+Cols/2, Rows, LVL >::Type Type
PyramidAutomemSep(RHS rhsArg, SepFilterCol fltrCol, SepFilterRow fltrRow)
static constexpr size_t ND_Category
static constexpr size_t RThread
bool subexpr_execution_reseter
static constexpr size_t CThread
PyramidLeafNode< PyramidType, 0 > sub_expression_evaluation(const DeviceT &dev)
sub_expression_evaluation
typename DownSmplOP::OutType OutType
typename CreatePyramidTupleType< false, Cols/2, Rows/2, LeafType, Depth, 0, LHSExpr >::Type PyramidMem
static constexpr size_t Operation_type
static constexpr size_t LeafType
static constexpr bool SubExpressionEvaluationNeeded
static constexpr size_t Depth
static constexpr bool has_out
visioncpp::internal::PyramidExecuteAutoMemSep< true, SepFltrColOP, SepFltrRowOP, DownSmplOP, Cols, Rows, LeafType, OffsetCol, OffsetRow, LVL, LC, LR, LCT, LRT, Depth, CurrentDepth, LHS, RHS, SepFilterCol, SepFilterRow, PyramidMem, DeviceT >::sub_execute static void sub_execute(RHS &, SepFilterCol &, SepFilterRow &, PyramidMem &, const DeviceT &)
here we execute the pyramid; automatically construct the output tuple based on the depth of the pyram...
static void sub_execute(RHS &rhs, SepFilterCol &spFltrCol, SepFilterRow &spFltrRow, PyramidMem &mem, const DeviceT &dev)
function sub_execute
The definition is in RDCN file.
The definition is in StnFilt file.