21.02
|
GLES memory region interface. More...
#include <GCMemoryRegion.h>
Public Member Functions | |
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... | |
virtual void * | ptr ()=0 |
Host/SVM pointer accessor. More... | |
virtual void * | map (bool blocking)=0 |
Enqueue a map operation of the allocated buffer on the given queue. More... | |
virtual void | unmap ()=0 |
Enqueue an unmap operation of the allocated buffer on the given queue. 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... | |
virtual std::unique_ptr< IMemoryRegion > | extract_subregion (size_t offset, size_t size)=0 |
Extract a sub-region from the memory. More... | |
size_t | size () const |
Memory region size accessor. More... | |
void | set_size (size_t size) |
Sets size of region. More... | |
GLES memory region interface.
Definition at line 35 of file GCMemoryRegion.h.
IGCMemoryRegion | ( | size_t | size | ) |
Constructor.
[in] | size | Region size |
Definition at line 30 of file GCMemoryRegion.cpp.
|
virtualdefault |
Default Destructor.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
|
overridevirtual |
Returns the pointer to the allocated data.
Implements IMemoryRegion.
Definition at line 40 of file GCMemoryRegion.cpp.
|
overridevirtual |
Returns the pointer to the allocated data.
Implements IMemoryRegion.
Definition at line 45 of file GCMemoryRegion.cpp.
const GLuint & gc_ssbo_name | ( | ) | const |
Returns the underlying CL buffer.
Definition at line 35 of file GCMemoryRegion.cpp.
Referenced by GCTensorAllocator::get_gl_ssbo_name(), and GCTensorAllocator::set_associated_memory_group().
|
pure virtual |
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. |
Implemented in GCBufferMemoryRegion.
Referenced by GCTensorAllocator::map().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move assignment operator.
|
pure virtual |
|
pure virtual |
Enqueue an unmap operation of the allocated buffer on the given queue.
Implemented in GCBufferMemoryRegion.
Referenced by GCTensorAllocator::unmap().