VisionCpp  0.0.1
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT > Struct Template Reference

the definition is in VirtualMemory More...

#include <mem_virtual.hpp>

Collaboration diagram for visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >:

Public Types

using Type = typename Node::Type
 
using Scalar = typename Type::Scalar
 
using ElementType = typename Type::ElementType
 
template<cl::sycl::access::mode acMd>
using Accessor = typename Type::template Accessor< acMd >
 
using syclBuffer = Node
 

Public Member Functions

 VirtualMemory (Node nd)
 
template<bool ForcedToExec, size_t LC1, size_t LR1, size_t LRT1, size_t LCT1, typename DeviceT >
internal::LeafNode< Type, Levelsub_expression_evaluation (const DeviceT &dev)
 sub_expression_evaluation More...
 

Public Attributes

Node subTree
 

Static Public Attributes

static constexpr bool policyType = PlcType
 
static constexpr size_t Rows = Type::Rows
 
static constexpr size_t Cols = Type::Cols
 
static constexpr size_t Channels = Type::Channels
 
static constexpr size_t LeafType = Type::LeafType
 
static constexpr bool SubExpressionEvaluationNeeded = true
 
static constexpr size_t Level = Node::Level
 

Detailed Description

template<bool PlcType, typename Node, size_t LC, size_t LR, size_t LCT, size_t LRT>
struct visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >

the definition is in VirtualMemory

VirtualMemory struct is nothing but a future LeafNode representing the result of the subexpression passed to it to be executed.

It is used by the user to schedule any arbitrary subexpression to be executed in a separate kernel. This will allow a user to manually break the expression tree at compile time. template parameters

Template Parameters
PlcTyperepresent the policyType for executing the subexpression
Nodethe subexpression tree needed to be executed template parameters:
LCis the column size of local memory
LRis the row size of local memory
LCTis the column size of workgroup
LRTis the row size of workgroup

Definition at line 48 of file mem_virtual.hpp.

Member Typedef Documentation

◆ Accessor

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
template<cl::sycl::access::mode acMd>
using visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::Accessor = typename Type::template Accessor<acMd>

Definition at line 54 of file mem_virtual.hpp.

◆ ElementType

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
using visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::ElementType = typename Type::ElementType

Definition at line 52 of file mem_virtual.hpp.

◆ Scalar

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
using visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::Scalar = typename Type::Scalar

Definition at line 51 of file mem_virtual.hpp.

◆ syclBuffer

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
using visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::syclBuffer = Node

Definition at line 62 of file mem_virtual.hpp.

◆ Type

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
using visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::Type = typename Node::Type

Definition at line 50 of file mem_virtual.hpp.

Constructor & Destructor Documentation

◆ VirtualMemory()

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::VirtualMemory ( Node  nd)
inline

Definition at line 63 of file mem_virtual.hpp.

Member Function Documentation

◆ sub_expression_evaluation()

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
template<bool ForcedToExec, size_t LC1, size_t LR1, size_t LRT1, size_t LCT1, typename DeviceT >
internal::LeafNode<Type, Level> visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::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 86 of file mem_virtual.hpp.

References visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::Level, and visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::subTree.

Member Data Documentation

◆ Channels

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
constexpr size_t visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::Channels = Type::Channels
staticconstexpr

Definition at line 57 of file mem_virtual.hpp.

◆ Cols

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
constexpr size_t visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::Cols = Type::Cols
staticconstexpr

Definition at line 56 of file mem_virtual.hpp.

◆ LeafType

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
constexpr size_t visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::LeafType = Type::LeafType
staticconstexpr

Definition at line 58 of file mem_virtual.hpp.

◆ Level

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
constexpr size_t visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::Level = Node::Level
staticconstexpr

◆ policyType

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
constexpr bool visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::policyType = PlcType
staticconstexpr

Definition at line 49 of file mem_virtual.hpp.

◆ Rows

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
constexpr size_t visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::Rows = Type::Rows
staticconstexpr

Definition at line 55 of file mem_virtual.hpp.

◆ SubExpressionEvaluationNeeded

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
constexpr bool visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::SubExpressionEvaluationNeeded = true
staticconstexpr

Definition at line 59 of file mem_virtual.hpp.

◆ subTree

template<bool PlcType, typename Node , size_t LC, size_t LR, size_t LCT, size_t LRT>
Node visioncpp::internal::VirtualMemory< PlcType, Node, LC, LR, LCT, LRT >::subTree

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