template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr, size_t Col, size_t Row, typename ElementTp, size_t Elements, size_t Sc, size_t LVL>
struct visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >
Definition of VisionMemory.
VisionMemory is the memory container of visioncpp.
It has been defined general enough that can be used for not only sycl buffer and image, but also for host backend such as openmp. template parameters:
- Template Parameters
-
MapAllocator | a boolean value representing whether or not the buffer has map allocator |
ScalarType | represent whether the element of the memory is Basic or Struct. |
MemoryType | represent the type of the memory.(e.g. Buffer2D, Buffer1D, Image, Host) |
Sclr | represent the type of each channel of the elements of the memory |
Col | represents the column size of the memory |
Row | represents the Row size of the memory |
ElementTp | represents the types of each element inside the memory |
Elements | represents the number of channels for each element |
Sc | represents the memory target on the device (global memory or constant memory)- Default is global |
Definition at line 53 of file mem_vision.hpp.
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<cl::sycl::access::mode acMd>
using visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::Accessor = typename SyclAccessor<LeafType, Dim, acMd, ElementType, Scalar, scope>::Accessor |
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<cl::sycl::access::mode acMd>
using visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::HostAccessor = typename SyclAccessor<LeafType, Dim, acMd, ElementType, Scalar, scope::Host_Buffer>::Accessor |
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
Definition at line 91 of file mem_vision.hpp.
References visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::Cols, visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::Rows, and visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::syclData.
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
Definition at line 98 of file mem_vision.hpp.
References visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::Cols, visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::Rows, and visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::syclData.
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<cl::sycl::access::mode accMode>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
lock function is used to access the sycl buffer on the host using a host pointer.
Because the host accessor is blocking we are creating it dynamically so by calling the lock function. It is the responsibility of a user to call unlock function in order to destroy the accessor once his work is finished. This is useful when we are dealing with video and we want to display each frame of the video at the end of each iteration.
- Returns
- void
Definition at line 162 of file mem_vision.hpp.
References visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::hostAcc, and visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::syclData.
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool ForcedToExec, size_t LC, size_t LR, size_t LCT, size_t LRT, typename DeviceT >
internal::LeafNode<Type, Level> visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::sub_expression_evaluation |
( |
const DeviceT & |
| ) |
|
|
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. |
LC | is the column size of local memory required by Filter2D and DownSmplOP |
LR | is the row size of local memory required by Filter2D and DownSmplOP |
LCT | is the column size of workgroup |
LRT | is the row size of workgroup function parameters: |
- Returns
- LeafNode
Definition at line 123 of file mem_vision.hpp.
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
Definition at line 85 of file mem_vision.hpp.
References visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::Channels, visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::Cols, and visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::Rows.
Referenced by visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::get_size().
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
Definition at line 56 of file mem_vision.hpp.
Referenced by visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::used_memory(), and visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::VisionMemory().
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
constexpr bool visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::HasMapAllocator = MapAllocator |
|
staticconstexpr |
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
Definition at line 83 of file mem_vision.hpp.
Referenced by visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::lock(), and visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::unlock().
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
constexpr size_t visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::MemoryCategory = ScalarType |
|
staticconstexpr |
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
Definition at line 55 of file mem_vision.hpp.
Referenced by visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::used_memory(), and visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::VisionMemory().
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
constexpr bool visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::SubExpressionEvaluationNeeded = false |
|
staticconstexpr |
template<bool MapAllocator, size_t ScalarType, size_t MemoryType, typename Sclr , size_t Col, size_t Row, typename ElementTp , size_t Elements, size_t Sc, size_t LVL>
Definition at line 82 of file mem_vision.hpp.
Referenced by visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::get_device_accessor(), visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::lock(), visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::reset_input(), visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::set_output(), and visioncpp::internal::VisionMemory< MapAllocator, ScalarType, MemoryType, Sclr, Col, Row, ElementTp, Elements, Sc, LVL >::VisionMemory().