#include <opencl_event.h>
This can contain an OpenCL event or be set to null. An event this class contains can be copied or moved to another instance of this class. Copying an instance with an OpenCL event simply means copying the ID and calling the retain method. Once all instances referencing an OpenCL event are deleted the underlying event is discarded. This class also provides utility methods for testing or waiting on its event, along with testing to see if it is null.
◆ Event() [1/4]
Constructs a new event that is set to null (no OpenCL event).
◆ Event() [2/4]
Event::Event |
( |
cl_event |
id | ) |
|
Constructs a new event using the given OpenCL event ID.
- Parameters
-
id | The OpenCL event ID that this new event contains. This must be a valid OpenCL event that has one reference count. |
◆ Event() [3/4]
Event::Event |
( |
const Event & |
other | ) |
|
Constructs a new event that is a copy of the given event.
- Parameters
-
other | The other event object that is copied to this new event. |
◆ Event() [4/4]
Event::Event |
( |
Event && |
other | ) |
|
Constructs a new event taking the OpenCL event or null state of the given event.
- Parameters
-
other | The other event object whose data is taken and set to this new event. |
◆ ~Event()
Releases the underlying OpenCL event, reducing its reference count by one.
◆ isDone()
bool Event::isDone |
( |
| ) |
const |
Tests if this object's OpenCL event is complete.
- Returns
- True if this event is complete or null, otherwise false.
◆ isNull()
bool Event::isNull |
( |
| ) |
const |
Tests if this event is null and does not contain an OpenCL event.
- Returns
- True if this event is null or false otherwise.
◆ operator=() [1/2]
void Event::operator= |
( |
const Event & |
other | ) |
|
Makes a copy of the given event object, releasing any OpenCL event this event may currently contain.
- Parameters
-
other | The other event object that is copied to this event. |
◆ operator=() [2/2]
void Event::operator= |
( |
Event && |
other | ) |
|
Takes the OpenCL event or null state of the given event object releasing any OpenCL event this event may currently contain.
- Parameters
-
other | The other event object whose OpenCL event or null state is taken. |
◆ wait()
void Event::wait |
( |
| ) |
const |
Waits for this object's OpenCL event to complete, blocking until it does. If this event is null then this returns immediately.
The documentation for this class was generated from the following files: