CLOGS
C++ library for sorting and searching in OpenCL applications
|
Base class for all algorithm classes. More...
#include <core.h>
Public Member Functions | |
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) |
Protected Member Functions | |
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... | |
Base class for all algorithm classes.
|
protected |
Returns the embedded pointer.
std::logic_error | if the pointer is null. |
|
protected |
Set the value of the embedded pointer.
Note that this overwrites the previous value without freeing it.
|
inline |
Set a callback function that will receive a list of all underlying events.
The callback will be called multiple times during each enqueue, because the implementation uses multiple commands. This allows profiling information to be extracted from the events once they complete.
The callback may also be set to NULL
to disable it.
enqueue
, generally before the events complete.callback | The callback function. |
userData | Arbitrary data to be passed to the callback. |
free | Passed userData when this object is destroyed. |
|
inline |
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.
The function object type must be copyable.
void clogs::Algorithm::setEventCallback | ( | void(*)(cl_event, void *) | callback, |
void * | userData, | ||
void(*)(void *) | free = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.