Compute Library
18.03
|
Interface for OpenCL LUT. More...
#include <ICLLut.h>
Public Member Functions | |
ICLLut () | |
ICLLut (const ICLLut &)=delete | |
ICLLut & | operator= (const ICLLut &)=delete |
virtual const cl::Buffer & | cl_buffer () const =0 |
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the lut's data. More... | |
void | map (cl::CommandQueue &q, bool blocking=true) |
Enqueue a map operation of the allocated buffer on the given queue. More... | |
void | unmap (cl::CommandQueue &q) |
Enqueue an unmap operation of the allocated and mapped buffer on the given queue. More... | |
uint8_t * | buffer () const override |
Returns a pointer to the start of the LUT. More... | |
Public Member Functions inherited from ILut | |
virtual | ~ILut ()=default |
Default virtual destructor. More... | |
virtual size_t | num_elements () const =0 |
Returns the total number of elements in the LUT. More... | |
virtual uint32_t | index_offset () const =0 |
Indicates the offset that needs to be applied to the raw index before performing a lookup in the LUT. More... | |
virtual size_t | size_in_bytes () const =0 |
Returns the total size in bytes of the LUT. More... | |
virtual DataType | type () const =0 |
Returns the type of the LUT. More... | |
virtual void | clear ()=0 |
Clears the LUT by setting every element to zero. More... | |
ICLLut | ( | ) |
|
overridevirtual |
Returns a pointer to the start of the LUT.
Other elements of the LUT can be accessed using buffer()[idx] for 0 <= idx < num_elements().
Implements ILut.
Referenced by CLLutAccessor< T >::operator[]().
|
pure virtual |
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the lut's data.
Implemented in CLLut.
void map | ( | cl::CommandQueue & | q, |
bool | blocking = true |
||
) |
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. |
void unmap | ( | cl::CommandQueue & | q | ) |
Enqueue an unmap operation of the allocated and mapped buffer on the given queue.
[in,out] | q | The CL command queue to use for the mapping operation. |