21.02
|
GLES buffer memory region implementation. More...
#include <GCMemoryRegion.h>
Public Member Functions | |
GCBufferMemoryRegion (size_t size) | |
Constructor. More... | |
~GCBufferMemoryRegion () | |
Destructor. More... | |
void * | ptr () final |
Host/SVM pointer accessor. More... | |
void * | map (bool blocking) final |
Enqueue a map operation of the allocated buffer on the given queue. More... | |
void | unmap () final |
Enqueue an unmap operation of the allocated buffer on the given queue. More... | |
std::unique_ptr< IMemoryRegion > | extract_subregion (size_t offset, size_t size) final |
Extract a sub-region from the memory. More... | |
Public Member Functions inherited from IGCMemoryRegion | |
IGCMemoryRegion (size_t size) | |
Constructor. More... | |
virtual | ~IGCMemoryRegion ()=default |
Default Destructor. More... | |
IGCMemoryRegion (const IGCMemoryRegion &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
IGCMemoryRegion (IGCMemoryRegion &&)=default | |
Default move constructor. More... | |
IGCMemoryRegion & | operator= (const IGCMemoryRegion &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
IGCMemoryRegion & | operator= (IGCMemoryRegion &&)=default |
Default move assignment operator. More... | |
const GLuint & | gc_ssbo_name () 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... | |
Public Member Functions inherited from IMemoryRegion | |
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... | |
GLES buffer memory region implementation.
Definition at line 90 of file GCMemoryRegion.h.
GCBufferMemoryRegion | ( | size_t | size | ) |
Constructor.
[in] | size | Region size |
Definition at line 50 of file GCMemoryRegion.cpp.
References ARM_COMPUTE_GL_CHECK, glBindBuffer(), glBufferData(), and glGenBuffers().
~GCBufferMemoryRegion | ( | ) |
Destructor.
Definition at line 59 of file GCMemoryRegion.cpp.
References ARM_COMPUTE_GL_CHECK, and glDeleteBuffers().
|
finalvirtual |
Extract a sub-region from the memory.
[in] | offset | Offset to the region |
[in] | size | Size of the region |
Implements IMemoryRegion.
Definition at line 91 of file GCMemoryRegion.cpp.
References ARM_COMPUTE_UNUSED.
|
finalvirtual |
Enqueue a map operation of the allocated buffer on the given queue.
[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 IGCMemoryRegion.
Definition at line 69 of file GCMemoryRegion.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_GL_CHECK, ARM_COMPUTE_UNUSED, glBindBuffer(), glMapBufferRange(), and IMemoryRegion::size().
|
finalvirtual |
Host/SVM pointer accessor.
Implements IGCMemoryRegion.
Definition at line 64 of file GCMemoryRegion.cpp.
|
finalvirtual |
Enqueue an unmap operation of the allocated buffer on the given queue.
Implements IGCMemoryRegion.
Definition at line 81 of file GCMemoryRegion.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_GL_CHECK, glBindBuffer(), and glUnmapBuffer().