Basic implementation of the OpenCL lut interface.
More...
#include <CLLut.h>
|
| CLLut () |
| Constructor. More...
|
|
| CLLut (size_t num_elements, DataType data_type) |
| Constructor: initializes a LUT which can contain num_values values of data_type type. More...
|
|
ILutAllocator * | allocator () |
| Return a pointer to the lut's allocator. More...
|
|
void | map (bool blocking=true) |
| Enqueue a map operation of the allocated buffer. More...
|
|
void | unmap () |
| Enqueue an unmap operation of the allocated and mapped buffer. More...
|
|
size_t | num_elements () const override |
| Returns the total number of elements in the LUT. More...
|
|
uint32_t | index_offset () const override |
| Indicates the offset that needs to be applied to the raw index before performing a lookup in the LUT. More...
|
|
size_t | size_in_bytes () const override |
| Returns the total size in bytes of the LUT. More...
|
|
DataType | type () const override |
| Returns the type of the LUT. More...
|
|
const cl::Buffer & | cl_buffer () const override |
| Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the lut's data. More...
|
|
void | clear () override |
| Clears the LUT by setting every element to zero. More...
|
|
| ICLLut () |
|
| ICLLut (const ICLLut &)=delete |
|
ICLLut & | operator= (const ICLLut &)=delete |
|
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...
|
|
Basic implementation of the OpenCL lut interface.
Definition at line 40 of file CLLut.h.
Constructor: initializes a LUT which can contain num_values values of data_type type.
- Parameters
-
[in] | num_elements | Number of elements of the LUT. |
[in] | data_type | Data type of each element. |
Return a pointer to the lut's allocator.
- Returns
- A pointer to the lut's allocator
const cl::Buffer& cl_buffer |
( |
| ) |
const |
|
overridevirtual |
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.
Implements ICLLut.
Clears the LUT by setting every element to zero.
Implements ILut.
uint32_t index_offset |
( |
| ) |
const |
|
overridevirtual |
Indicates the offset that needs to be applied to the raw index before performing a lookup in the LUT.
- Returns
- The normalization offset.
Implements ILut.
void map |
( |
bool |
blocking = true | ) |
|
Enqueue a map operation of the allocated buffer.
- Parameters
-
[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. |
size_t num_elements |
( |
| ) |
const |
|
overridevirtual |
Returns the total number of elements in the LUT.
- Returns
- Total number of elements.
Implements ILut.
size_t size_in_bytes |
( |
| ) |
const |
|
overridevirtual |
Returns the total size in bytes of the LUT.
- Returns
- Total size of the LUT in bytes.
Implements ILut.
Returns the type of the LUT.
- Returns
- The type of the LUT.
Implements ILut.
Enqueue an unmap operation of the allocated and mapped buffer.
- 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.
The documentation for this class was generated from the following file: