24 #ifndef VISIONCPP_INCLUDE_FRAMEWORK_MEMORY_MEM_VISION_HPP_
25 #define VISIONCPP_INCLUDE_FRAMEWORK_MEMORY_MEM_VISION_HPP_
50 template <
bool MapAllocator,
size_t ScalarType,
size_t MemoryType,
51 typename Sclr,
size_t Col,
size_t Row,
typename ElementTp,
52 size_t Elements,
size_t Sc,
size_t LVL>
55 static constexpr
size_t Rows = Row;
56 static constexpr
size_t Cols = Col;
63 static constexpr
size_t scope = Sc;
68 template <cl::sycl::access::mode acMd>
73 template <cl::sycl::access::mode acMd>
79 static constexpr
size_t Level = LVL;
83 std::shared_ptr<HostAccessor<cl::sycl::access::mode::read>>
hostAcc;
92 create_sycl_buffer<LeafType, ElementType, Scalar>(
99 create_sycl_buffer<LeafType, ElementType, Scalar>(
121 template <
bool ForcedToExec,
size_t LC,
size_t LR,
size_t LCT,
size_t LRT,
134 template <cl::sycl::access::mode accMode>
143 buffer_update<LeafType, Rows, Cols, ElementType, Scalar>(
syclData, dt);
152 syclData.get()->set_final_data(ptr);
163 hostAcc = std::make_shared<HostAccessor<cl::sycl::access::mode::read>>(
static constexpr ScopeType Host_Buffer
the definition is in LeafNode.
this is used to determine the dimension of the memory based on the memory type template parameters:
This struct is used to create a sycl accessor type based on access mode; dimension and memory type.
SyclMem is used to create VisionMemory data storage.
Definition of VisionMemory.
std::shared_ptr< HostAccessor< cl::sycl::access::mode::read > > hostAcc
static constexpr size_t Rows
static constexpr size_t LeafType
typename SyclAccessor< LeafType, Dim, acMd, ElementType, Scalar, scope >::Accessor Accessor
void unlock()
The unlock function for destroying the host accessor.
void lock()
lock function is used to access the sycl buffer on the host using a host pointer.
static constexpr size_t Dim
static constexpr size_t get_size()
static constexpr bool HasMapAllocator
void set_output(std::shared_ptr< Scalar > &ptr)
set_output function is used to destroy the sycl buffer and manually allocated the data to the provide...
static constexpr size_t Channels
static constexpr size_t Level
static constexpr bool SubExpressionEvaluationNeeded
Accessor< accMode > get_device_accessor(cl::sycl::handler &cgh)
This function is used to get the device access on the memory.
internal::LeafNode< Type, Level > sub_expression_evaluation(const DeviceT &)
sub_expression_evaluation
static constexpr size_t Cols
static constexpr size_t MemoryCategory
std::shared_ptr< syclBuffer > syclData
void reset_input(Scalar *dt)
reset_input is used to manually reset the input value of an input sycl buffer.
static constexpr size_t used_memory()
static constexpr size_t scope
typename SyclMem< HasMapAllocator, LeafType, Dim, ElementType >::Type syclBuffer
typename SyclAccessor< LeafType, Dim, acMd, ElementType, Scalar, scope::Host_Buffer >::Accessor HostAccessor
VisionMemory(syclBuffer dt)
buffer copy is lightweight no need to pass by ref