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

The definition is in RUnOP file. More...

#include <resizable_unary.hpp>

Collaboration diagram for visioncpp::internal::RUnOP< UN_OP, RHS, Cols, Rows, LfType, LVL >:

Public Types

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

Public Member Functions

 RUnOP (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< Unary_Conds, ForcedToExec, ExprExchange< RHS >, LC, LR, LCT, LRT >(rhs.template sub_expression_evaluation< Unary_Conds, LC, LR, LCT, LRT >(dev), dev))
 sub_expression_evaluation More...
 

Public Attributes

RHS rhs
 
bool subexpr_execution_reseter
 

Static Public Attributes

static constexpr bool has_out = false
 
static constexpr size_t Level = LVL
 
static constexpr size_t RThread = Rows
 
static constexpr size_t CThread = Cols
 
static constexpr size_t ND_Category = internal::expr_category::Unary
 
static constexpr size_t LeafType = Type::LeafType
 
static constexpr bool Unary_Conds
 
static constexpr bool SubExpressionEvaluationNeeded
 
static constexpr size_t Operation_type = RHS::Operation_type
 

Detailed Description

template<typename UN_OP, typename RHS, size_t Cols, size_t Rows, size_t LfType, size_t LVL>
struct visioncpp::internal::RUnOP< UN_OP, RHS, Cols, Rows, LfType, LVL >

The definition is in RUnOP file.

RUnOP is used to apply a unary operation on the right hand side(RHS) operand.

template parameters:

Template Parameters
RHSis the right hand side expression
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 41 of file resizable_unary.hpp.

Member Typedef Documentation

◆ ExprExchange

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

Definition at line 61 of file resizable_unary.hpp.

◆ OPType

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

Definition at line 45 of file resizable_unary.hpp.

◆ OutType

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

Definition at line 44 of file resizable_unary.hpp.

◆ RHSExpr

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

Definition at line 46 of file resizable_unary.hpp.

◆ Type

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

Definition at line 47 of file resizable_unary.hpp.

Constructor & Destructor Documentation

◆ RUnOP()

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

Definition at line 65 of file resizable_unary.hpp.

Member Function Documentation

◆ reset()

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

◆ sub_expression_evaluation()

template<typename UN_OP , 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::RUnOP< UN_OP, RHS, Cols, Rows, LfType, LVL >::sub_expression_evaluation ( const DeviceT &  dev) -> decltype(execute_expr<Unary_Conds, ForcedToExec, ExprExchange<RHS>, LC, LR, LCT, LRT>( rhs.template sub_expression_evaluation<Unary_Conds, 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 the local memory required by Filter2D and DownSmplOP
LRis the row size of the 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 95 of file resizable_unary.hpp.

References visioncpp::internal::RUnOP< UN_OP, RHS, Cols, Rows, LfType, LVL >::rhs.

Member Data Documentation

◆ CThread

template<typename UN_OP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RUnOP< UN_OP, RHS, Cols, Rows, LfType, LVL >::CThread = Cols
staticconstexpr

Definition at line 50 of file resizable_unary.hpp.

◆ has_out

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

Definition at line 43 of file resizable_unary.hpp.

◆ LeafType

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

Definition at line 52 of file resizable_unary.hpp.

◆ Level

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

Definition at line 48 of file resizable_unary.hpp.

◆ ND_Category

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

Definition at line 51 of file resizable_unary.hpp.

◆ Operation_type

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

Definition at line 58 of file resizable_unary.hpp.

◆ rhs

template<typename UN_OP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
RHS visioncpp::internal::RUnOP< UN_OP, RHS, Cols, Rows, LfType, LVL >::rhs

◆ RThread

template<typename UN_OP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RUnOP< UN_OP, RHS, Cols, Rows, LfType, LVL >::RThread = Rows
staticconstexpr

Definition at line 49 of file resizable_unary.hpp.

◆ subexpr_execution_reseter

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

◆ SubExpressionEvaluationNeeded

template<typename UN_OP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr bool visioncpp::internal::RUnOP< UN_OP, RHS, Cols, Rows, LfType, LVL >::SubExpressionEvaluationNeeded
staticconstexpr
Initial value:
=
Unary_Conds || RHS::SubExpressionEvaluationNeeded
static constexpr bool Unary_Conds

Definition at line 56 of file resizable_unary.hpp.

◆ Unary_Conds

template<typename UN_OP , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr bool visioncpp::internal::RUnOP< UN_OP, RHS, Cols, Rows, LfType, LVL >::Unary_Conds
staticconstexpr
Initial value:
=
(RHS::LeafType != memory_type::Const &&
((RThread != RHS::RThread) || (CThread != RHS::CThread)))
static constexpr size_t Const
static constexpr size_t CThread
static constexpr size_t RThread

Definition at line 53 of file resizable_unary.hpp.


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