VisionCpp  0.0.1
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL > Struct Template Reference

The definition is in RDCN file. More...

#include <reduction.hpp>

Collaboration diagram for visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >:

Public Types

using RHSExpr = RHS
 
using OutType = typename DownSmplOP::OutType
 
using OPType = DownSmplOP
 
using Type = typename OutputMemory< OutType, LfType, Cols, Rows, LVL >::Type
 
template<typename TmpRHS >
using ExprExchange = RDCN< DownSmplOP, TmpRHS, Cols, Rows, LfType, LVL >
 

Public Member Functions

 RDCN (RHS rhsArg)
 
void reset (bool reset)
 
template<bool ForcedToExec, size_t LC, size_t LR, size_t LCT, size_t LRT, typename DeviceT >
auto sub_expression_evaluation (const DeviceT &dev) -> decltype(execute_expr< DownSmplOP::Operation_type==ops_category::GlobalNeighbourOP, ForcedToExec, ExprExchange< RHS >, LC, LR, LCT, LRT >(rhs.template sub_expression_evaluation< DownSmplOP::Operation_type==ops_category::GlobalNeighbourOP, LC, LR, LCT, LRT >(dev), dev))
 sub_expression_evaluation More...
 

Public Attributes

RHS rhs
 
bool subexpr_execution_reseter
 

Static Public Attributes

static constexpr size_t LC_Ratio
 
static constexpr size_t LR_Ratio
 
static constexpr bool has_out = false
 
static constexpr size_t Level = LVL
 
static constexpr size_t RThread = Rows * LR_Ratio
 
static constexpr size_t CThread = Cols * LC_Ratio
 
static constexpr size_t ND_Category = expr_category::Unary
 
static constexpr size_t LeafType = Type::LeafType
 
static constexpr bool SubExpressionEvaluationNeeded
 
static constexpr size_t Operation_type = DownSmplOP::Operation_type
 

Detailed Description

template<typename DownSmplOP, typename RHS, size_t Cols, size_t Rows, size_t LfType, size_t LVL>
struct visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >

The definition is in RDCN file.

RDCN is used to shrink the size of an input.

It can be used both for NeighbourOP and GlobalNeighbourOP.

Template Parameters
DownSmplOPdownsampling function to shrink an input
LHSis the input
RHSis the filter2d node
Colsdetermines the column size of the output
Rowsdetermines the row size of the output
LfTypedetermines the type of the leafNode {Buffer2D, Buffer1D, Host, Image}
LVLthe level of the node in the expression tree

Definition at line 42 of file reduction.hpp.

Member Typedef Documentation

◆ ExprExchange

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
template<typename TmpRHS >
using visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::ExprExchange = RDCN<DownSmplOP, TmpRHS, Cols, Rows, LfType, LVL>

Definition at line 69 of file reduction.hpp.

◆ OPType

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::OPType = DownSmplOP

Definition at line 55 of file reduction.hpp.

◆ OutType

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::OutType = typename DownSmplOP::OutType

Definition at line 54 of file reduction.hpp.

◆ RHSExpr

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::RHSExpr = RHS

Definition at line 52 of file reduction.hpp.

◆ Type

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::Type = typename OutputMemory<OutType, LfType, Cols, Rows, LVL>::Type

Definition at line 56 of file reduction.hpp.

Constructor & Destructor Documentation

◆ RDCN()

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::RDCN ( RHS  rhsArg)
inline

Definition at line 73 of file reduction.hpp.

Member Function Documentation

◆ reset()

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
void visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::reset ( bool  reset)
inline

◆ sub_expression_evaluation()

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
template<bool ForcedToExec, size_t LC, size_t LR, size_t LCT, size_t LRT, typename DeviceT >
auto visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::sub_expression_evaluation ( const DeviceT &  dev) -> decltype(execute_expr< DownSmplOP::Operation_type == ops_category::GlobalNeighbourOP, ForcedToExec, ExprExchange<RHS>, LC, LR, LCT, LRT>( rhs.template sub_expression_evaluation< DownSmplOP::Operation_type == ops_category::GlobalNeighbourOP, LC, LR, LCT, LRT>(dev), dev))
inline

sub_expression_evaluation

This function is used to break the expression tree whenever necessary. The decision for breaking the tree will be determined based on the static parameter called SubExpressionEvaluationNeeded. When this is set to true, the sub_expression_evaluation is called recursively from the root of the tree. Each node based on their parent decision will decide to launch a kernel for itself. Also, they decide for each of their children whether or not to launch a kernel separately. template parameters:

Template Parameters
ForcedToExec: a boolean value representing the decision made by the parent of this node for launching a kernel.
LCis the column size of local memory required by Filter2D and DownSmplOP
LRis the row size of local memory required by Filter2D and DownSmplOP
LCTis the column size of workgroup
LRTis the row size of workgroup
DeviceTtype representing the device function parameters:
Parameters
dev: the selected device for executing the expression
Returns
LeafNode

Definition at line 102 of file reduction.hpp.

References visioncpp::internal::execute_expr(), visioncpp::internal::ops_category::GlobalNeighbourOP, and visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::rhs.

Here is the call graph for this function:

Member Data Documentation

◆ CThread

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::CThread = Cols * LC_Ratio
staticconstexpr

Definition at line 59 of file reduction.hpp.

◆ has_out

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr bool visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::has_out = false
staticconstexpr

Definition at line 53 of file reduction.hpp.

◆ LC_Ratio

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::LC_Ratio
staticconstexpr
Initial value:
=
tools::IfConst<DownSmplOP::Operation_type ==
1, RHS::CThread / Cols>::Value

Definition at line 44 of file reduction.hpp.

◆ LeafType

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::LeafType = Type::LeafType
staticconstexpr

Definition at line 61 of file reduction.hpp.

◆ Level

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::Level = LVL
staticconstexpr

Definition at line 57 of file reduction.hpp.

◆ LR_Ratio

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::LR_Ratio
staticconstexpr
Initial value:
=
tools::IfConst<DownSmplOP::Operation_type ==
1, RHS::RThread / Rows>::Value

Definition at line 48 of file reduction.hpp.

◆ ND_Category

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::ND_Category = expr_category::Unary
staticconstexpr

Definition at line 60 of file reduction.hpp.

◆ Operation_type

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::Operation_type = DownSmplOP::Operation_type
staticconstexpr

Definition at line 67 of file reduction.hpp.

◆ rhs

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
RHS visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::rhs

◆ RThread

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::RThread = Rows * LR_Ratio
staticconstexpr

Definition at line 58 of file reduction.hpp.

◆ subexpr_execution_reseter

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
bool visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::subexpr_execution_reseter

◆ SubExpressionEvaluationNeeded

template<typename DownSmplOP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr bool visioncpp::internal::RDCN< DownSmplOP, RHS, Cols, Rows, LfType, LVL >::SubExpressionEvaluationNeeded
staticconstexpr
Initial value:
=
DownSmplOP::Operation_type == ops_category::GlobalNeighbourOP ||
RHS::SubExpressionEvaluationNeeded

Definition at line 62 of file reduction.hpp.


The documentation for this struct was generated from the following file: