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

The definition is in StnFilt file. More...

#include <stencil_with_filter.hpp>

Collaboration diagram for visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >:

Public Types

using OutType = typename Conv_OP::OutType
 
using OPType = Conv_OP
 
using LHSExpr = LHS
 
using RHSExpr = RHS
 
using Type = typename visioncpp::internal::OutputMemory< OutType, LfType, Cols, Rows, LVL >::Type
 
template<typename TmpLHS , typename TmpRHS >
using ExprExchange = internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, TmpLHS, TmpRHS, Cols, Rows, LfType, LVL >
 

Public Member Functions

 StnFilt (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< Stencil_Conds, ForcedToExec, ExprExchange< LHS, RHS >, LC, LR, LCT, LRT >(lhs.template sub_expression_evaluation< Stencil_Conds, LC, LR, LRT, LCT >(dev), rhs.template sub_expression_evaluation< Stencil_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 LeafType = Type::LeafType
 
static constexpr size_t Operation_type = Conv_OP::Operation_type
 
static constexpr size_t Halo_Top = Halo_T
 
static constexpr size_t Halo_Butt = Halo_B
 
static constexpr size_t Halo_Left = Halo_L
 
static constexpr size_t Halo_Right = Halo_R
 
static constexpr size_t RThread = Rows
 
static constexpr size_t CThread = Cols
 
static constexpr size_t ND_Category = internal::expr_category::Binary
 
static constexpr bool Stencil_Conds
 
static constexpr bool SubExpressionEvaluationNeeded
 

Detailed Description

template<typename Conv_OP, size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS, typename RHS, size_t Cols, size_t Rows, size_t LfType, size_t LVL>
struct visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >

The definition is in StnFilt file.

stencil with filter is used to construct a general convolutional operation for a custom filter.

It can be used for NeighbourOP

Template Parameters
FilterOPconvolution functor with no filter parameter
Halo_TThe top side size of Halo
Halo_L:.The left side size of Halo
Halo_BThe bottom side size of Halo
Halo_RThe right side size of Halo
LHSis the input node
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 49 of file stencil_with_filter.hpp.

Member Typedef Documentation

◆ ExprExchange

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
template<typename TmpLHS , typename TmpRHS >
using visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::ExprExchange = internal::StnFilt<Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, TmpLHS, TmpRHS, Cols, Rows, LfType, LVL>

Definition at line 75 of file stencil_with_filter.hpp.

◆ LHSExpr

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::LHSExpr = LHS

Definition at line 54 of file stencil_with_filter.hpp.

◆ OPType

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::OPType = Conv_OP

Definition at line 53 of file stencil_with_filter.hpp.

◆ OutType

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::OutType = typename Conv_OP::OutType

Definition at line 52 of file stencil_with_filter.hpp.

◆ RHSExpr

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::RHSExpr = RHS

Definition at line 55 of file stencil_with_filter.hpp.

◆ Type

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
using visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::Type = typename visioncpp::internal::OutputMemory<OutType, LfType, Cols, Rows, LVL>::Type

Definition at line 56 of file stencil_with_filter.hpp.

Constructor & Destructor Documentation

◆ StnFilt()

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::StnFilt ( LHS  lhsArg,
RHS  rhsArg 
)
inline

Definition at line 82 of file stencil_with_filter.hpp.

Member Function Documentation

◆ reset()

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
void visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::reset ( bool  reset)
inline

◆ sub_expression_evaluation()

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, 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::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::sub_expression_evaluation ( const DeviceT &  dev) -> decltype(execute_expr<Stencil_Conds, ForcedToExec, ExprExchange<LHS, RHS>, LC, LR, LCT, LRT>( lhs.template sub_expression_evaluation<Stencil_Conds, LC, LR, LRT, LCT>(dev), rhs.template sub_expression_evaluation<Stencil_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
DeviceTtype representing the device function parameters:
Parameters
dev: the selected device for executing the expression
Returns
LeafNode

Definition at line 114 of file stencil_with_filter.hpp.

References visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::lhs, and visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::rhs.

Member Data Documentation

◆ CThread

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::CThread = Cols
staticconstexpr

Definition at line 66 of file stencil_with_filter.hpp.

◆ Halo_Butt

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::Halo_Butt = Halo_B
staticconstexpr

Definition at line 62 of file stencil_with_filter.hpp.

◆ Halo_Left

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::Halo_Left = Halo_L
staticconstexpr

Definition at line 63 of file stencil_with_filter.hpp.

◆ Halo_Right

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::Halo_Right = Halo_R
staticconstexpr

Definition at line 64 of file stencil_with_filter.hpp.

◆ Halo_Top

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::Halo_Top = Halo_T
staticconstexpr

Definition at line 61 of file stencil_with_filter.hpp.

◆ has_out

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr bool visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::has_out = false
staticconstexpr

Definition at line 51 of file stencil_with_filter.hpp.

◆ LeafType

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::LeafType = Type::LeafType
staticconstexpr

Definition at line 59 of file stencil_with_filter.hpp.

◆ Level

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::Level = LVL
staticconstexpr

Definition at line 58 of file stencil_with_filter.hpp.

◆ lhs

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
LHS visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::lhs

◆ ND_Category

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::ND_Category = internal::expr_category::Binary
staticconstexpr

Definition at line 67 of file stencil_with_filter.hpp.

◆ Operation_type

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::Operation_type = Conv_OP::Operation_type
staticconstexpr

Definition at line 60 of file stencil_with_filter.hpp.

◆ rhs

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
RHS visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::rhs

◆ RThread

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr size_t visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::RThread = Rows
staticconstexpr

Definition at line 65 of file stencil_with_filter.hpp.

◆ Stencil_Conds

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr bool visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::Stencil_Conds
staticconstexpr
Initial value:
=
((RThread != LHS::RThread) || (CThread != LHS::CThread))
static constexpr size_t CThread
static constexpr size_t RThread

Definition at line 68 of file stencil_with_filter.hpp.

◆ subexpr_execution_reseter

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
bool visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::subexpr_execution_reseter

◆ SubExpressionEvaluationNeeded

template<typename Conv_OP , size_t Halo_T, size_t Halo_L, size_t Halo_B, size_t Halo_R, typename LHS , typename RHS , size_t Cols, size_t Rows, size_t LfType, size_t LVL>
constexpr bool visioncpp::internal::StnFilt< Conv_OP, Halo_T, Halo_L, Halo_B, Halo_R, LHS, RHS, Cols, Rows, LfType, LVL >::SubExpressionEvaluationNeeded
staticconstexpr
Initial value:
=
Stencil_Conds || LHS::SubExpressionEvaluationNeeded ||
RHS::SubExpressionEvaluationNeeded
static constexpr bool Stencil_Conds

Definition at line 70 of file stencil_with_filter.hpp.


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