ARM Compute Library
17.04
|
Basic implementation of a CL memory LUT allocator. More...
#include <CLLutAllocator.h>
Public Member Functions | |
CLLutAllocator () | |
Default constructor. More... | |
~CLLutAllocator ()=default | |
Default destructor. More... | |
CLLutAllocator (const CLLutAllocator &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers). More... | |
const CLLutAllocator & | operator= (const CLLutAllocator &)=delete |
Prevent instances of this class from being copy assigned (As this class contains pointers). More... | |
uint8_t * | data () |
Interface to be implemented by the child class to return the pointer to the mapped data. More... | |
const cl::Buffer & | cl_data () const |
Interface to be implemented by the child class to return the pointer to the CL data. More... | |
uint8_t * | map (cl::CommandQueue &q, bool blocking) |
Enqueue a map operation of the allocated buffer on the given queue. More... | |
void | unmap (cl::CommandQueue &q, uint8_t *mapping) |
Enqueue an unmap operation of the allocated buffer on the given queue. More... | |
Public Member Functions inherited from ILutAllocator | |
ILutAllocator () | |
Default constructor. More... | |
virtual | ~ILutAllocator ()=default |
Default virtual destructor. More... | |
ILutAllocator (ILutAllocator &&)=default | |
Allow instances of this class to be move constructed. More... | |
ILutAllocator & | operator= (ILutAllocator &&)=default |
Allow instances of this class to be moved. More... | |
void | init (size_t num_elements, DataType data_type) |
Allocate an LUT of the requested number of elements and data_type. More... | |
size_t | num_elements () const |
Returns the total number of elements in the LUT. More... | |
DataType | type () const |
Returns the type of the LUT. More... | |
size_t | size () const |
Returns the total size in bytes of the LUT. More... | |
Basic implementation of a CL memory LUT allocator.
Definition at line 36 of file CLLutAllocator.h.
CLLutAllocator | ( | ) |
Default constructor.
|
default |
Default destructor.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers).
const cl::Buffer& cl_data | ( | ) | const |
Interface to be implemented by the child class to return the pointer to the CL data.
uint8_t* data | ( | ) |
Interface to be implemented by the child class to return the pointer to the mapped data.
uint8_t* map | ( | cl::CommandQueue & | q, |
bool | blocking | ||
) |
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. |
|
delete |
Prevent instances of this class from being copy assigned (As this class contains pointers).
void unmap | ( | cl::CommandQueue & | q, |
uint8_t * | mapping | ||
) |
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. |
[in] | mapping | The cpu mapping to unmap. |