23.08
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_RUNTIME_CL_CL_MEMORY_REGION_H
25 #define ARM_COMPUTE_RUNTIME_CL_CL_MEMORY_REGION_H
57 const cl::Buffer &
cl_data()
const;
62 virtual void *
ptr() = 0;
72 virtual void *
map(cl::CommandQueue &q,
bool blocking) = 0;
80 virtual void unmap(cl::CommandQueue &q) = 0;
84 const void *
buffer()
const override;
112 void *
map(cl::CommandQueue &q,
bool blocking)
final;
113 void unmap(cl::CommandQueue &q)
final;
139 void *ptr()
override;
158 void *
map(cl::CommandQueue &q,
bool blocking)
final;
159 void unmap(cl::CommandQueue &q)
final;
175 void *
map(cl::CommandQueue &q,
bool blocking)
final;
176 void unmap(cl::CommandQueue &q)
final;
size_t size() const
Memory region size accessor.
void unmap(cl::CommandQueue &q) final
Enqueue an unmap operation of the allocated buffer on the given queue.
void unmap(cl::CommandQueue &q) final
Enqueue an unmap operation of the allocated buffer on the given queue.
const cl::Buffer & cl_data() const
Returns the underlying CL buffer.
virtual void * ptr()=0
Host/SVM pointer accessor.
CLBufferMemoryRegion(cl_mem_flags flags, size_t size)
Constructor.
virtual void unmap(cl::CommandQueue &q)=0
Enqueue an unmap operation of the allocated buffer on the given queue.
OpenCL coarse-grain SVM memory region implementation.
void * map(cl::CommandQueue &q, bool blocking) final
Enqueue a map operation of the allocated buffer on the given queue.
void unmap(cl::CommandQueue &q) final
Enqueue an unmap operation of the allocated buffer on the given queue.
void * map(cl::CommandQueue &q, bool blocking) final
Enqueue a map operation of the allocated buffer on the given queue.
OpenCL memory region interface.
OpenCL fine-grain SVM memory region implementation.
virtual ~CLBufferMemoryRegion() override
ICLMemoryRegion(size_t size)
Constructor.
virtual ~ICLMemoryRegion()=default
Default Destructor.
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
Wrapper to configure the Khronos OpenCL C++ header.
CLCoarseSVMMemoryRegion(cl_mem_flags flags, size_t size, size_t alignment)
Constructor.
OpenCL SVM memory region interface.
ICLMemoryRegion & operator=(const ICLMemoryRegion &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
void * map(cl::CommandQueue &q, bool blocking) final
Enqueue a map operation of the allocated buffer on the given queue.
Copyright (c) 2017-2023 Arm Limited.
std::unique_ptr< IMemoryRegion > extract_subregion(size_t offset, size_t size) override
Extract a sub-region from the memory.
CLFineSVMMemoryRegion(cl_mem_flags flags, size_t size, size_t alignment)
Constructor.
void * buffer() override
Returns the pointer to the allocated data.
virtual void * map(cl::CommandQueue &q, bool blocking)=0
Enqueue a map operation of the allocated buffer on the given queue.
OpenCL buffer memory region implementation.
void * ptr() final
Host/SVM pointer accessor.