Compute Library
18.05
|
Basic implementation of a GLES memory tensor allocator. More...
#include <GCTensorAllocator.h>
Public Member Functions | |
GCTensorAllocator (GCTensor *owner=nullptr) | |
Default constructor. More... | |
GCTensorAllocator (const GCTensorAllocator &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
GCTensorAllocator & | operator= (const GCTensorAllocator &)=delete |
Prevent instances of this class from being copy assigned (As this class contains pointers) More... | |
GCTensorAllocator (GCTensorAllocator &&)=default | |
Allow instances of this class to be moved. More... | |
GCTensorAllocator & | operator= (GCTensorAllocator &&)=default |
Allow instances of this class to be moved. More... | |
~GCTensorAllocator () | |
Default destructor. More... | |
uint8_t * | data () |
Interface to be implemented by the child class to return the pointer to the mapped data. More... | |
GLuint | get_gl_ssbo_name () const |
Get the OpenGL ES buffer object name. More... | |
uint8_t * | map (bool blocking) |
Enqueue a map operation of the allocated buffer on the given queue. More... | |
void | unmap () |
Enqueue an unmap operation of the allocated buffer on the given queue. More... | |
void | allocate () override |
Allocate size specified by TensorInfo of GLES memory. More... | |
void | free () override |
Free allocated GLES memory. More... | |
void | set_associated_memory_group (GCMemoryGroup *associated_memory_group) |
Associates the tensor with a memory group. More... | |
Public Member Functions inherited from ITensorAllocator | |
ITensorAllocator () | |
Default constructor. More... | |
ITensorAllocator (const ITensorAllocator &)=default | |
Allow instances of this class to be copy constructed. More... | |
ITensorAllocator & | operator= (const ITensorAllocator &)=default |
Allow instances of this class to be copied. More... | |
ITensorAllocator (ITensorAllocator &&)=default | |
Allow instances of this class to be move constructed. More... | |
ITensorAllocator & | operator= (ITensorAllocator &&)=default |
Allow instances of this class to be moved. More... | |
virtual | ~ITensorAllocator ()=default |
Default virtual destructor. More... | |
void | init (const TensorInfo &input) |
Initialize a tensor based on the passed TensorInfo. More... | |
TensorInfo & | info () |
Return a reference to the tensor's metadata. More... | |
const TensorInfo & | info () const |
Return a constant reference to the tensor's metadata. More... | |
Basic implementation of a GLES memory tensor allocator.
Definition at line 56 of file GCTensorAllocator.h.
GCTensorAllocator | ( | GCTensor * | owner = nullptr | ) |
Default constructor.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
~GCTensorAllocator | ( | ) |
Default destructor.
|
overridevirtual |
Allocate size specified by TensorInfo of GLES memory.
Implements ITensorAllocator.
uint8_t* data | ( | ) |
Interface to be implemented by the child class to return the pointer to the mapped data.
|
overridevirtual |
Free allocated GLES memory.
Implements ITensorAllocator.
GLuint get_gl_ssbo_name | ( | ) | const |
Get the OpenGL ES buffer object name.
uint8_t* map | ( | bool | blocking | ) |
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. |
|
delete |
Prevent instances of this class from being copy assigned (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
void set_associated_memory_group | ( | GCMemoryGroup * | associated_memory_group | ) |
Associates the tensor with a memory group.
[in] | associated_memory_group | Memory group to associate the tensor with |
void unmap | ( | ) |
Enqueue an unmap operation of the allocated buffer on the given queue.