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

The definition is in ParallelCopy file. More...

#include <parallel_copy.hpp>

Collaboration diagram for visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >:

Public Types

using OutType = typename LHS::OutType
 
using Type = typename LHS::Type
 
using RHSExpr = RHS
 
using LHSExpr = LHS
 
template<typename TmpLHS , typename TmpRHS >
using ExprExchange = internal::ParallelCopy< TmpLHS, TmpRHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >
 

Public Member Functions

 ParallelCopy (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 >
LHS sub_expression_evaluation (const DeviceT &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 RThread
 
static constexpr size_t CThread
 
static constexpr size_t ND_Category = expr_category::Binary
 
static constexpr size_t LeafType = Type::LeafType
 
static constexpr size_t Operation_type
 
static constexpr bool SubExpressionEvaluationNeeded
 

Detailed Description

template<typename LHS, typename RHS, size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
struct visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >

The definition is in ParallelCopy file.

parallel copy is used to allocate the partial result of the right- hand side expression (RHS) to the (partial block of) left hand side expression 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
OffsetColInstarting column offset for RHS result
OffsetRowInstarting Row offset for RHS result
OffsetColOutstarting column offset for LHS node
OffsetRowOutstarting Row offset for LHS node
LfTypedetermines the type of the leafNode {Buffer2D, Buffer1D, Host, Image}
LVLthe level of the node in the expression tree

Definition at line 51 of file parallel_copy.hpp.

Member Typedef Documentation

◆ ExprExchange

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
template<typename TmpLHS , typename TmpRHS >
using visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::ExprExchange = internal::ParallelCopy<TmpLHS, TmpRHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL>

Definition at line 67 of file parallel_copy.hpp.

◆ LHSExpr

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
using visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::LHSExpr = LHS

Definition at line 65 of file parallel_copy.hpp.

◆ OutType

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
using visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::OutType = typename LHS::OutType

Definition at line 53 of file parallel_copy.hpp.

◆ RHSExpr

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
using visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::RHSExpr = RHS

Definition at line 64 of file parallel_copy.hpp.

◆ Type

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
using visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::Type = typename LHS::Type

Definition at line 54 of file parallel_copy.hpp.

Constructor & Destructor Documentation

◆ ParallelCopy()

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::ParallelCopy ( LHS  lhsArg,
RHS  rhsArg 
)
inline

Definition at line 88 of file parallel_copy.hpp.

Member Function Documentation

◆ reset()

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
void visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::reset ( bool  reset)
inline

◆ sub_expression_evaluation()

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
template<bool ForcedToExec, size_t LC, size_t LR, size_t LCT, size_t LRT, typename DeviceT >
LHS visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::sub_expression_evaluation ( const DeviceT &  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 119 of file parallel_copy.hpp.

References visioncpp::internal::tools::tuple::get(), visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::Level, visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::lhs, and visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::rhs.

Here is the call graph for this function:

Member Data Documentation

◆ CThread

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::CThread
staticconstexpr
Initial value:
=
internal::tools::IfConst<internal::tools::IfNode<RHS>::Is_LeafNode, Cols,
RHS::CThread>::Value

Definition at line 59 of file parallel_copy.hpp.

◆ has_out

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
constexpr bool visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::has_out = true
staticconstexpr

Definition at line 52 of file parallel_copy.hpp.

◆ LeafType

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::LeafType = Type::LeafType
staticconstexpr

Definition at line 63 of file parallel_copy.hpp.

◆ Level

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::Level = LVL
staticconstexpr

◆ lhs

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
LHS visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::lhs

◆ ND_Category

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::ND_Category = expr_category::Binary
staticconstexpr

Definition at line 62 of file parallel_copy.hpp.

◆ Operation_type

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::Operation_type
staticconstexpr
Initial value:
=
RHS::Operation_type

Definition at line 78 of file parallel_copy.hpp.

◆ rhs

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
RHS visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::rhs

◆ RThread

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::RThread
staticconstexpr
Initial value:
=
internal::tools::IfConst<internal::tools::IfNode<RHS>::Is_LeafNode, Rows,
RHS::RThread>::Value

Definition at line 56 of file parallel_copy.hpp.

◆ subexpr_execution_reseter

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
bool visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::subexpr_execution_reseter

◆ SubExpressionEvaluationNeeded

template<typename LHS , typename RHS , size_t Cols, size_t Rows, size_t OffsetColIn, size_t OffsetRowIn, size_t OffsetColOut, size_t OffsetRowOut, size_t LfType, size_t LVL>
constexpr bool visioncpp::internal::ParallelCopy< LHS, RHS, Cols, Rows, OffsetColIn, OffsetRowIn, OffsetColOut, OffsetRowOut, LfType, LVL >::SubExpressionEvaluationNeeded
staticconstexpr
Initial value:
=
(Cols != RHS::Type::Cols || Rows != RHS::Type::Rows ||
OffsetColIn != 0 || OffsetRowIn != 0)) ||
RHS::SubExpressionEvaluationNeeded
static constexpr size_t Operation_type

Definition at line 80 of file parallel_copy.hpp.


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