|
| Reduce () |
| Default constructor. More...
|
|
| Reduce (const cl::Context &context, const cl::Device &device, const ReduceProblem &problem) |
| Constructor. More...
|
|
| Reduce (cl_context context, cl_device_id device, const ReduceProblem &problem) |
| Constructor. More...
|
|
| ~Reduce () |
| Destructor.
|
|
void | enqueue (const cl::CommandQueue &commandQueue, const cl::Buffer &inBuffer, const cl::Buffer &outBuffer,::size_t first,::size_t elements,::size_t outPosition, const VECTOR_CLASS< cl::Event > *events=NULL, cl::Event *event=NULL) |
| Enqueue a reduction operation on a command queue. More...
|
|
void | enqueue (cl_command_queue commandQueue, cl_mem inBuffer, cl_mem outBuffer,::size_t first,::size_t elements,::size_t outPosition, cl_uint numEvents=0, const cl_event *events=NULL, cl_event *event=NULL) |
|
void | enqueue (const cl::CommandQueue &commandQueue, bool blocking, const cl::Buffer &inBuffer, void *out,::size_t first,::size_t elements, const VECTOR_CLASS< cl::Event > *events=NULL, cl::Event *event=NULL) |
| Enqueue a reduction operation and read the result back to the host. More...
|
|
void | enqueue (cl_command_queue commandQueue, bool blocking, cl_mem inBuffer, void *out,::size_t first,::size_t elements, cl_uint numEvents=0, const cl_event *events=NULL, cl_event *event=NULL) |
|
void | setEventCallback (void(*callback)(const cl::Event &, void *), void *userData, void(*free)(void *)=NULL) |
| Set a callback function that will receive a list of all underlying events. More...
|
|
template<typename T > |
void | setEventCallback (const T &callback) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The provided function object will be passed a cl::Event. More...
|
|
void | setEventCallback (void(*callback)(cl_event, void *), void *userData, void(*free)(void *)=NULL) |
|
|
void | enqueue (cl_command_queue commandQueue, cl_mem inBuffer, cl_mem outBuffer,::size_t first,::size_t elements,::size_t outPosition, cl_uint numEvents, const cl_event *events, cl_event *event, cl_int &err, const char *&errStr) |
|
void | enqueue (cl_command_queue commandQueue, bool blocking, cl_mem inBuffer, void *out,::size_t first,::size_t elements, cl_uint numEvents, const cl_event *events, cl_event *event, cl_int &err, const char *&errStr) |
|
void | moveConstruct (Algorithm &other) |
| Constructs this by stealing the pointer from other.
|
|
detail::Algorithm * | moveAssign (Algorithm &other) |
| Sets this by stealing the pointer from other, and returning the previous value.
|
|
void | swap (Algorithm &other) |
| Swaps the pointers between this and other.
|
|
detail::Algorithm * | getDetail () const |
| Returns the embedded pointer.
|
|
detail::Algorithm * | getDetailNonNull () const |
| Returns the embedded pointer. More...
|
|
void | setDetail (detail::Algorithm *ptr) |
| Set the value of the embedded pointer. More...
|
|
Reduction primitive.
One instance of this class can be reused for multiple scans, provided that
- calls to enqueue do not overlap; and
- their execution does not overlap.
An instance of the class is specialized to a specific context, device, and type of value to scan. Any CL integral scalar or vector type can be used.
The implementation divides the data into a number of blocks, each of which is reduced by a work-group. The last work-group handles the final reduction.