21.05
|
CLArray implementation. More...
#include <CLArray.h>
Public Member Functions | |
CLArray () | |
Default constructor: empty array. More... | |
CLArray (const CLArray &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLArray & | operator= (const CLArray &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLArray (CLArray &&)=default | |
Allow instances of this class to be move constructed. More... | |
CLArray & | operator= (CLArray &&)=default |
Allow instances of this class to be moved. More... | |
CLArray (size_t max_num_values) | |
Constructor: initializes an array which can contain up to max_num_points values. 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... | |
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 array's data. More... | |
Public Member Functions inherited from ICLArray< T > | |
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... | |
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... | |
Public Member Functions inherited from IArray< T > | |
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... | |
CLArray implementation.
|
inline |
Prevent instances of this class from being copied (As this class contains pointers)
|
inline |
Constructor: initializes an array which can contain up to max_num_points values.
[in] | max_num_values | Maximum number of values the array will be able to stored |
Definition at line 57 of file CLArray.h.
|
inlineoverridevirtual |
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the array's data.
Implements ICLArray< T >.
|
inline |
Enqueue a map operation of the allocated buffer.
[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. |
Definition at line 67 of file CLArray.h.
Prevent instances of this class from being copied (As this class contains pointers)
|
inline |
Enqueue an unmap operation of the allocated and mapped buffer.
Definition at line 77 of file CLArray.h.