21.02
|
Basic implementation of the LUT interface. More...
#include <Lut.h>
Public Member Functions | |
Lut () | |
Constructor. More... | |
Lut (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... | |
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... | |
uint8_t * | buffer () const override |
Returns a pointer to the start of the LUT. More... | |
void | clear () override |
Clears the LUT by setting every element to zero. More... | |
Public Member Functions inherited from ILut | |
virtual | ~ILut ()=default |
Default virtual destructor. More... | |
Constructor: initializes a LUT which can contain num_values values of data_type type.
[in] | num_elements | Number of elements of the LUT. |
[in] | data_type | Data type of each element. |
Definition at line 35 of file Lut.cpp.
References ILutAllocator::init().
ILutAllocator * allocator | ( | ) |
|
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.
Definition at line 61 of file Lut.cpp.
References LutAllocator::data().
Referenced by Lut::clear().
|
overridevirtual |
Clears the LUT by setting every element to zero.
Implements ILut.
Definition at line 66 of file Lut.cpp.
References ARM_COMPUTE_ERROR_ON, Lut::buffer(), and Lut::size_in_bytes().
|
overridevirtual |
Indicates the offset that needs to be applied to the raw index before performing a lookup in the LUT.
Implements ILut.
Definition at line 46 of file Lut.cpp.
References Lut::num_elements(), arm_compute::S16, and ILutAllocator::type().
|
overridevirtual |
Returns the total number of elements in the LUT.
Implements ILut.
Definition at line 41 of file Lut.cpp.
References ILutAllocator::num_elements().
Referenced by Lut::index_offset().
|
overridevirtual |
Returns the total size in bytes of the LUT.
Implements ILut.
Definition at line 51 of file Lut.cpp.
References ILutAllocator::size().
Referenced by Lut::clear().
|
overridevirtual |
Returns the type of the LUT.
Implements ILut.
Definition at line 56 of file Lut.cpp.
References ILutAllocator::type().