21.02
|
ICLDistribution1D interface class. More...
#include <ICLDistribution1D.h>
Public Member Functions | |
ICLDistribution1D (size_t num_bins, int32_t offset, uint32_t range) | |
Constructor: Creates a 1D CLDistribution of a consecutive interval [offset, offset + range - 1] defined by a start offset and valid range, divided equally into num_bins parts. More... | |
ICLDistribution1D (const ICLDistribution1D &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
const ICLDistribution1D & | operator= (const ICLDistribution1D &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) 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... | |
virtual cl::Buffer & | cl_buffer ()=0 |
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the distribution's data. More... | |
uint32_t * | buffer () const override |
Returns a pointer to the start of the distribution. More... | |
Public Member Functions inherited from IDistribution1D | |
IDistribution1D (size_t num_bins, int32_t offset, uint32_t range) | |
Constructor: Creates a 1D Distribution of a consecutive interval [offset, offset + range - 1] defined by a start offset and valid range, divided equally into num_bins parts. More... | |
size_t | num_bins () const |
Returns the number of bins that the distribution has. More... | |
int32_t | offset () const |
Returns the offset of the distribution. More... | |
uint32_t | range () const |
Returns the range of the distribution. More... | |
uint32_t | window () const |
Returns the window of the distribution, which is the range divided by the number of bins. More... | |
void | set_range (uint32_t range) |
Sets the range of the distribution. More... | |
size_t | size () const override |
Returns the total size in bytes of the distribution. More... | |
size_t | dimensions () const override |
Returns the dimensions of the distribution. More... | |
Public Member Functions inherited from IDistribution | |
virtual | ~IDistribution ()=default |
Default virtual destructor. More... | |
void | clear () const |
Clears the distribution by setting every element to zero. More... | |
ICLDistribution1D interface class.
Definition at line 41 of file ICLDistribution1D.h.
ICLDistribution1D | ( | size_t | num_bins, |
int32_t | offset, | ||
uint32_t | range | ||
) |
Constructor: Creates a 1D CLDistribution of a consecutive interval [offset, offset + range - 1] defined by a start offset and valid range, divided equally into num_bins parts.
[in] | num_bins | The number of bins the distribution is divided in. |
[in] | offset | The start of the values to use. |
[in] | range | The total number of the consecutive values of the distribution interval. |
Definition at line 30 of file ICLDistribution1D.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
overridevirtual |
Returns a pointer to the start of the distribution.
Other elements of the array can be accessed using buffer()[idx] for 0 <= idx < num_bins()
Implements IDistribution.
Definition at line 48 of file ICLDistribution1D.cpp.
Referenced by CLHistogramKernel::run().
|
pure virtual |
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing the distribution's data.
Implemented in CLDistribution1D.
Referenced by CLHistogramKernel::configure(), and CLHistogramBorderKernel::configure().
void map | ( | cl::CommandQueue & | q, |
bool | blocking = true |
||
) |
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 35 of file ICLDistribution1D.cpp.
References ARM_COMPUTE_ERROR_ON.
Referenced by CLDistribution1D::map(), and CLHistogramKernel::run().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
void unmap | ( | cl::CommandQueue & | q | ) |
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 41 of file ICLDistribution1D.cpp.
References ARM_COMPUTE_ERROR_ON.
Referenced by CLHistogramKernel::run(), and CLDistribution1D::unmap().