40 _allocator.
init(num_elements, data_type);
55 return _allocator.
size();
60 return _allocator.
type();
71 uint8_t *data = _allocator.
map(q,
true );
73 _allocator.
unmap(q, data);
91 uint8_t *CLLut::do_map(cl::CommandQueue &q,
bool blocking)
93 return _allocator.
map(q, blocking);
96 void CLLut::do_unmap(cl::CommandQueue &q)
size_t size_in_bytes() const override
Returns the total size in bytes of the LUT.
void map(cl::CommandQueue &q, bool blocking=true)
Enqueue a map operation of the allocated buffer on the given queue.
size_t num_elements() const override
Returns the total number of elements in the LUT.
size_t num_elements() const
Returns the total number of elements in the LUT.
static CLScheduler & get()
Access the scheduler singleton.
DataType type() const override
Returns the type of the LUT.
void unmap()
Enqueue an unmap operation of the allocated and mapped buffer.
void clear() override
Clears the LUT by setting every element to zero.
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...
Basic interface to allocate LUTs'.
const cl::Buffer & cl_data() const
Interface to be implemented by the child class to return the pointer to the CL data.
Copyright (c) 2017-2021 Arm Limited.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
ILutAllocator * allocator()
Return a pointer to the lut's allocator.
uint8_t * buffer() const override
Returns a pointer to the start of the LUT.
void init(size_t num_elements, DataType data_type)
Allocate an LUT of the requested number of elements and data_type.
cl::CommandQueue & queue()
Accessor for the associated CL command queue.
1 channel, 1 S16 per channel
const cl::Buffer & cl_buffer() const override
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing ...
uint8_t * map(cl::CommandQueue &q, bool blocking)
Enqueue a map operation of the allocated buffer on the given queue.
size_t size() const
Returns the total size in bytes of the LUT.
DataType
Available data types.
void unmap(cl::CommandQueue &q, uint8_t *mapping)
Enqueue an unmap operation of the allocated buffer on the given queue.
void unmap(cl::CommandQueue &q)
Enqueue an unmap operation of the allocated and mapped buffer on the given queue. ...
DataType type() const
Returns the type of the LUT.
void map(bool blocking=true)
Enqueue a map operation of the allocated buffer.