23.11
|
Interface for OpenCL Array. More...
#include <ICLArray.h>
Public Member Functions | |
ICLArray (size_t max_num_values) | |
Constructor. More... | |
ICLArray (const ICLArray &)=delete | |
Prevent instances of this class from being copy constructed. More... | |
ICLArray & | operator= (const ICLArray &)=delete |
Prevent instances of this class from being copied. More... | |
ICLArray (ICLArray &&)=default | |
Allow instances of this class to be move constructed. More... | |
ICLArray & | operator= (ICLArray &&)=default |
Allow instances of this class to be moved. More... | |
virtual | ~ICLArray ()=default |
Default virtual destructor. More... | |
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 array'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... | |
T * | buffer () const override |
Pointer to the first element of the array. More... | |
![]() | |
IArray () | |
Default constructor. More... | |
IArray (size_t max_num_values) | |
Constructor: initializes an array which can contain up to max_num_points values. More... | |
size_t | max_num_values () const |
Maximum number of values which can be stored in this array. More... | |
virtual | ~IArray ()=default |
Default virtual destructor. More... | |
size_t | num_values () const |
Number of values currently stored in the array. More... | |
bool | push_back (const T &val) |
Append the passed argument to the end of the array if there is room. More... | |
void | clear () |
Clear all the points from the array. More... | |
bool | overflow () const |
Did we lose some values because the array is too small? More... | |
virtual T & | at (size_t index) const |
Reference to the element of the array located at the given index. More... | |
void | resize (size_t num) |
Resizes the array to contain "num" elements. More... | |
Interface for OpenCL Array.
Definition at line 35 of file ICLArray.h.
|
inlineexplicit |
Constructor.
[in] | max_num_values | Maximum size of the array. |
Definition at line 43 of file ICLArray.h.
Prevent instances of this class from being copy constructed.
|
virtualdefault |
Default virtual destructor.
|
inlineoverridevirtual |
Pointer to the first element of the array.
Other elements of the array can be accessed using buffer()[idx] for 0 <= idx < num_poins().
Implements IArray< T >.
Definition at line 87 of file ICLArray.h.
|
pure virtual |
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the array's data.
Implemented in CLArray< T >, CLArray< cl_float >, and CLArray< cl_int >.
Referenced by ICLKernel::add_array_argument(), and arm_compute::test::validation::TEST_CASE().
|
inline |
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. |
Definition at line 69 of file ICLArray.h.
Referenced by CLArray< cl_int >::map().
Prevent instances of this class from being copied.
|
inline |
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. |
Definition at line 80 of file ICLArray.h.
Referenced by CLArray< cl_int >::unmap().