Compute Library
18.05
|
OpenCL coarse-grain SVM memory region implementation. More...
#include <CLMemoryRegion.h>
Public Member Functions | |
CLCoarseSVMMemoryRegion (cl::Context ctx, cl_mem_flags flags, size_t size, size_t alignment) | |
Constructor. More... | |
void * | map (cl::CommandQueue &q, bool blocking) override |
Enqueue a map operation of the allocated buffer on the given queue. More... | |
void | unmap (cl::CommandQueue &q) override |
Enqueue an unmap operation of the allocated buffer on the given queue. More... | |
Public Member Functions inherited from ICLMemoryRegion | |
ICLMemoryRegion (cl::Context ctx, 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... | |
void * | buffer () const override |
Returns the pointer to the allocated data. More... | |
void ** | handle () override |
Handle of internal memory. More... | |
Public Member Functions inherited from IMemoryRegion | |
IMemoryRegion (size_t size) | |
Default constructor. More... | |
virtual | ~IMemoryRegion ()=default |
Virtual Destructor. More... | |
size_t | size () |
Memory region size accessor. More... | |
void | set_size (size_t size) |
Sets size of region. More... | |
OpenCL coarse-grain SVM memory region implementation.
Definition at line 143 of file CLMemoryRegion.h.
CLCoarseSVMMemoryRegion | ( | cl::Context | ctx, |
cl_mem_flags | flags, | ||
size_t | size, | ||
size_t | alignment | ||
) |
Constructor.
[in] | ctx | OpenCL context |
[in] | flags | Memory flags |
[in] | size | Region size |
[in] | alignment | Alignment |
|
overridevirtual |
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.
|
overridevirtual |
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.