23.11
|
OpenCL fine-grain SVM memory region implementation. More...
#include <CLMemoryRegion.h>
Public Member Functions | |
CLFineSVMMemoryRegion (cl_mem_flags flags, size_t size, size_t alignment) | |
Constructor. More... | |
void * | map (cl::CommandQueue &q, bool blocking) final |
Enqueue a map operation of the allocated buffer on the given queue. More... | |
void | unmap (cl::CommandQueue &q) final |
Enqueue an unmap operation of the allocated buffer on the given queue. More... | |
![]() | |
ICLMemoryRegion (size_t size) | |
Constructor. More... | |
virtual | ~ICLMemoryRegion ()=default |
Default Destructor. More... | |
ICLMemoryRegion (const ICLMemoryRegion &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICLMemoryRegion (ICLMemoryRegion &&)=default | |
Default move constructor. More... | |
ICLMemoryRegion & | operator= (const ICLMemoryRegion &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICLMemoryRegion & | operator= (ICLMemoryRegion &&)=default |
Default move assignment operator. More... | |
const cl::Buffer & | cl_data () const |
Returns the underlying CL buffer. More... | |
void * | buffer () override |
Returns the pointer to the allocated data. More... | |
const void * | buffer () const override |
Returns the pointer to the allocated data. More... | |
std::unique_ptr< IMemoryRegion > | extract_subregion (size_t offset, size_t size) override |
Extract a sub-region from the memory. More... | |
![]() | |
IMemoryRegion (size_t size) | |
Default constructor. More... | |
virtual | ~IMemoryRegion ()=default |
Virtual Destructor. More... | |
size_t | size () const |
Memory region size accessor. More... | |
void | set_size (size_t size) |
Sets size of region. More... | |
OpenCL fine-grain SVM memory region implementation.
Definition at line 163 of file CLMemoryRegion.h.
CLFineSVMMemoryRegion | ( | cl_mem_flags | flags, |
size_t | size, | ||
size_t | alignment | ||
) |
Constructor.
[in] | flags | Memory flags |
[in] | size | Region size |
[in] | alignment | Alignment |
Definition at line 155 of file CLMemoryRegion.cpp.
|
finalvirtual |
Enqueue a map operation of the allocated buffer on the given queue.
[in,out] | q | The CL command queue to use for the mapping operation. |
[in] | blocking | If true, then the mapping will be ready to use by the time this method returns, else it is the caller's responsibility to flush the queue and wait for the mapping operation to have completed before using the returned mapping pointer. |
Implements ICLMemoryRegion.
Definition at line 160 of file CLMemoryRegion.cpp.
References clFinish().
|
finalvirtual |
Enqueue an unmap operation of the allocated buffer on the given queue.
[in,out] | q | The CL command queue to use for the mapping operation. |
Implements ICLMemoryRegion.
Definition at line 170 of file CLMemoryRegion.cpp.
References ARM_COMPUTE_UNUSED.