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

The definition is in Assign file. More...

#include <assign.hpp>

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

Public Types

using OutType = typename LHS::OutType
 
using Type = typename LHS::Type
 
using LHSExpr = LHS
 
using RHSExpr = RHS
 
template<typename TmpLHS , typename TmpRHS >
using ExprExchange = Assign< TmpLHS, TmpRHS, Cols, Rows, LfType, LVL >
 

Public Member Functions

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

Public Attributes

LHS lhs
 
RHS rhs
 
bool subexpr_execution_reseter
 

Static Public Attributes

static constexpr bool has_out = true
 
static constexpr size_t Level = LVL
 
static constexpr size_t LeafType = Type::LeafType
 
static constexpr size_t RThread = RHS::RThread
 
static constexpr size_t CThread = RHS::CThread
 
static constexpr size_t ND_Category = expr_category::Binary
 
static constexpr bool SubExpressionEvaluationNeeded
 
static constexpr size_t Operation_type = RHS::Operation_type
 

Detailed Description

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

The definition is in Assign file.

Assign is used to allocate the result of the right hand side expression (RHS) to the left hand side expression LHS.

LHS is always a leaf node. It can be used for PointOP, NeighbourOP, and GlobalNeighbourOP. template parameters:

Template Parameters
LHSis the output leafNode
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 44 of file assign.hpp.

Member Typedef Documentation

◆ ExprExchange

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

Definition at line 61 of file assign.hpp.

◆ LHSExpr

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

Definition at line 48 of file assign.hpp.

◆ OutType

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

Definition at line 46 of file assign.hpp.

◆ RHSExpr

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

Definition at line 49 of file assign.hpp.

◆ Type

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::Assign< LHS, RHS, Cols, Rows, LfType, LVL >::Type = typename LHS::Type

Definition at line 47 of file assign.hpp.

Constructor & Destructor Documentation

◆ Assign()

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

Definition at line 66 of file assign.hpp.

Member Function Documentation

◆ reset()

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

◆ sub_expression_evaluation()

template<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::Assign< LHS, RHS, Cols, Rows, LfType, LVL >::sub_expression_evaluation ( const DeviceT &  dev) -> decltype( execute_expr<false, false, ExprExchange<LHS, RHS>, LC, LR, LCT, LRT>( lhs.template sub_expression_evaluation<false, LC, LR, LCT, LRT>(dev), rhs.template sub_expression_evaluation<false, 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 96 of file assign.hpp.

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

Member Data Documentation

◆ CThread

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

Definition at line 53 of file assign.hpp.

◆ has_out

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

Definition at line 45 of file assign.hpp.

◆ LeafType

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

Definition at line 51 of file assign.hpp.

◆ Level

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

Definition at line 50 of file assign.hpp.

◆ lhs

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

◆ ND_Category

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

Definition at line 54 of file assign.hpp.

◆ Operation_type

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

Definition at line 59 of file assign.hpp.

◆ rhs

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

◆ RThread

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

Definition at line 52 of file assign.hpp.

◆ subexpr_execution_reseter

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

◆ SubExpressionEvaluationNeeded

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

Definition at line 55 of file assign.hpp.


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