Interface for OpenCL LUT.
More...
#include <ICLLut.h>
|
| 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...
|
|
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...
|
|
Interface for OpenCL LUT.
Definition at line 40 of file ICLLut.h.
uint8_t* buffer |
( |
| ) |
const |
|
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().
- Returns
- Pointer to the start of the lut.
Implements ILut.
virtual const cl::Buffer& cl_buffer |
( |
| ) |
const |
|
pure virtual |
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the lut's data.
- Returns
- A reference to an 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.
- Parameters
-
[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.
- Note
- This method simply enqueues the unmap operation, it is the caller's responsibility to flush the queue and make sure the unmap is finished before the memory is accessed by the device.
- Parameters
-
[in,out] | q | The CL command queue to use for the mapping operation. |
The documentation for this class was generated from the following file: