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

The definition is in RBiOP file. More...

#include <resizable_binary.hpp>

Collaboration diagram for visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >:

Public Types

using OutType = typename BI_OP::OutType
 
using OPType = BI_OP
 
using RHSExpr = RHS
 
using LHSExpr = LHS
 
using Type = typename visioncpp::internal::OutputMemory< OutType, LfType, Cols, Rows, LVL >::Type
 
template<typename TmpLHS , typename TmpRHS >
using ExprExchange = RBiOP< BI_OP, TmpLHS, TmpRHS, Cols, Rows, LfType, LVL >
 

Public Member Functions

 RBiOP (LHS lhsArg, 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< Binary_Conds, ForcedToExec, ExprExchange< LHS, RHS >, LC, LR, LCT, LRT >(lhs.template sub_expression_evaluation< Binary_Conds, LC, LR, LRT, LCT >(dev), rhs.template sub_expression_evaluation< Binary_Conds, LC, LR, LRT, LCT >(dev), dev))
 sub_expression_evaluation More...
 

Public Attributes

LHS lhs
 
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::Binary
 
static constexpr size_t LeafType = Type::LeafType
 
static constexpr bool Binary_Conds
 
static constexpr bool SubExpressionEvaluationNeeded
 
static constexpr size_t Operation_type
 

Detailed Description

template<typename BI_OP, typename LHS, typename RHS, size_t Cols, size_t Rows, size_t LfType, size_t LVL>
struct visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >

The definition is in RBiOP file.

RBiOP is used to apply Binary Operation on left-hand side(LHS) and right-hand side(RHS) operands.

template parameters:

Template Parameters
LHSis the left-hand- side expression
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 90 of file resizable_binary.hpp.

Member Typedef Documentation

◆ ExprExchange

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
template<typename TmpLHS , typename TmpRHS >
using visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::ExprExchange = RBiOP<BI_OP, TmpLHS, TmpRHS, Cols, Rows, LfType, LVL>

Definition at line 117 of file resizable_binary.hpp.

◆ LHSExpr

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::LHSExpr = LHS

Definition at line 96 of file resizable_binary.hpp.

◆ OPType

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::OPType = BI_OP

Definition at line 94 of file resizable_binary.hpp.

◆ OutType

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::OutType = typename BI_OP::OutType

Definition at line 93 of file resizable_binary.hpp.

◆ RHSExpr

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::RHSExpr = RHS

Definition at line 95 of file resizable_binary.hpp.

◆ Type

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::Type = typename visioncpp::internal::OutputMemory<OutType, LfType, Cols, Rows, LVL>::Type

Definition at line 97 of file resizable_binary.hpp.

Constructor & Destructor Documentation

◆ RBiOP()

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::RBiOP ( LHS  lhsArg,
RHS  rhsArg 
)
inline

Definition at line 122 of file resizable_binary.hpp.

Member Function Documentation

◆ reset()

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

◆ sub_expression_evaluation()

template<typename BI_OP , typename LHS , 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::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::sub_expression_evaluation ( const DeviceT &  dev) -> decltype(execute_expr<Binary_Conds, ForcedToExec, ExprExchange<LHS, RHS>, LC, LR, LCT, LRT>( lhs.template sub_expression_evaluation<Binary_Conds, LC, LR, LRT, LCT>(dev), rhs.template sub_expression_evaluation<Binary_Conds, LC, LR, LRT, LCT>(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 function parameters:
Parameters
dev: the selected device for executing the expression
Returns
LeafNode

Definition at line 152 of file resizable_binary.hpp.

References visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::lhs, and visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::rhs.

Member Data Documentation

◆ Binary_Conds

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr bool visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::Binary_Conds
staticconstexpr
Initial value:
=
(LHS::LeafType != memory_type::Const &&
((RThread != LHS::RThread) || (CThread != LHS::CThread))) ||
(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 104 of file resizable_binary.hpp.

◆ CThread

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::CThread = Cols
staticconstexpr

Definition at line 101 of file resizable_binary.hpp.

◆ has_out

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

Definition at line 92 of file resizable_binary.hpp.

◆ LeafType

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::LeafType = Type::LeafType
staticconstexpr

Definition at line 103 of file resizable_binary.hpp.

◆ Level

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::Level = LVL
staticconstexpr

Definition at line 99 of file resizable_binary.hpp.

◆ lhs

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
LHS visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::lhs

◆ ND_Category

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::ND_Category = internal::expr_category::Binary
staticconstexpr

Definition at line 102 of file resizable_binary.hpp.

◆ Operation_type

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::Operation_type
staticconstexpr
Initial value:
=
internal::OpTP<(LHS::Operation_type == RHS::Operation_type),
LHS::Operation_type, RHS::Operation_type>::Operation_type
static constexpr size_t Operation_type

Definition at line 112 of file resizable_binary.hpp.

◆ rhs

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
RHS visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::rhs

◆ RThread

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::RThread = Rows
staticconstexpr

Definition at line 100 of file resizable_binary.hpp.

◆ subexpr_execution_reseter

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
bool visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::subexpr_execution_reseter

◆ SubExpressionEvaluationNeeded

template<typename BI_OP , typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr bool visioncpp::internal::RBiOP< BI_OP, LHS, RHS, Cols, Rows, LfType, LVL >::SubExpressionEvaluationNeeded
staticconstexpr
Initial value:
=
Binary_Conds || LHS::SubExpressionEvaluationNeeded ||
RHS::SubExpressionEvaluationNeeded
static constexpr bool Binary_Conds

Definition at line 109 of file resizable_binary.hpp.


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