cl::sycl::event Class Reference
Abstraction of a cl_event object. More...
#include <event.h>
Public Member Functions | |
event () | |
Constructs a ready SYCL event. More... | |
COMPUTECPP_DEPRECATED_BY_SYCL_VER (201703, "Use the OpenCL interop constructor which takes a SYCL context instead.") event(cl_event) | |
Creates a SYCL event from an OpenCL event. More... | |
event (cl_event clEvent, const context &syclContext) | |
Creates a SYCL event from an OpenCL event. More... | |
event (const event &rhs)=default | |
Default copy constructor. More... | |
event & | operator= (const event &rhs)=default |
Default copy assignment. More... | |
event (event &&rhs)=default | |
Default move constructor. More... | |
event & | operator= (event &&rhs)=default |
Default move assignment operator. More... | |
cl_event | get () const |
Returns the underlying cl_event. More... | |
vector_class< event > | get_wait_list () |
Returns the list of events that depend on the current one. More... | |
void | wait () |
Waits for the event to complete. More... | |
void | wait_and_throw () |
Waits for the event to complete. More... | |
devent_shptr | get_impl () const |
Returns a pointer to the implementation of the event. More... | |
bool | is_host () const |
Returns true if the event is a host event. More... | |
template<info::event param> | |
info::param_traits< info::event, param >::return_type | get_info () const |
Gets the OpenCL event information from the SYCL event. More... | |
template<info::event_profiling param> | |
COMPUTECPP_EXPORT info::param_traits< info::event_profiling, param >::return_type | get_profiling_info () const |
Queries the SYCL event for profiling information. More... | |
Static Public Member Functions | |
static void | wait (const vector_class< event > &eventList) |
Waits for all the events in the list. More... | |
static void | wait_and_throw (const vector_class< event > &eventList) |
Waits for all the events in the list. More... | |
Protected Member Functions | |
cl_event | get_no_retain () const |
Retrieves the OpenCL event without retaining it. More... | |
Friends | |
bool | operator== (const event &lhs, const event &rhs) |
Determines if lhs and rhs are equal. More... | |
bool | operator!= (const event &lhs, const event &rhs) |
Determines if lhs and rhs are not equal. More... | |
Detailed Description
Abstraction of a cl_event object.
See Section 4.4.6 of the SYCL Specification 1.2.1
Constructor & Destructor Documentation
◆ event() [1/4]
cl::sycl::event::event | ( | ) |
Constructs a ready SYCL event.
If the constructed SYCL event is waited on, it will complete immediately.
◆ event() [2/4]
cl::sycl::event::event | ( | cl_event | clEvent, |
const context & | syclContext | ||
) |
Creates a SYCL event from an OpenCL event.
- Parameters
-
The OpenCL event we are constructing the SYCL object from Context associated with the OpenCL event
◆ event() [3/4]
|
default |
Default copy constructor.
◆ event() [4/4]
|
default |
Default move constructor.
- Parameters
-
rhs will have its contents moved. after the operation rhs will be invalid.
Member Function Documentation
◆ COMPUTECPP_DEPRECATED_BY_SYCL_VER()
cl::sycl::event::COMPUTECPP_DEPRECATED_BY_SYCL_VER | ( | 201703 | , |
"Use the OpenCL interop constructor which takes a SYCL context instead." | |||
) |
Creates a SYCL event from an OpenCL event.
- Parameters
-
The OpenCL event we are constructing the SYCL object from
- Deprecated:
- Need to provide a context as well
◆ get()
cl_event cl::sycl::event::get | ( | ) | const |
Returns the underlying cl_event.
- Returns
- The associated OpenCL event
◆ get_impl()
devent_shptr cl::sycl::event::get_impl | ( | ) | const |
Returns a pointer to the implementation of the event.
- Returns
- A pointer to an event implementation
◆ get_info()
|
inline |
Gets the OpenCL event information from the SYCL event.
- Template Parameters
-
info::event param The OpenCL parameter requested
- Returns
- opencl_event_info<param> The equivalent OpenCL type
◆ get_no_retain()
|
protected |
Retrieves the OpenCL event without retaining it.
- Parameters
-
OpenCL event associated with this event object
◆ get_profiling_info()
COMPUTECPP_EXPORT info::param_traits<info::event_profiling, param>::return_type cl::sycl::event::get_profiling_info | ( | ) | const |
Queries the SYCL event for profiling information.
- Template Parameters
-
param The profiling parameter requested
- Returns
- An implementation defined 64-bit value describing the time in nanoseconds when the requested profiling event occurred
- Exceptions
-
invalid_object_error If the queue associated with the event was not constructed with the property::queue::enable_profiling property
◆ get_wait_list()
vector_class<event> cl::sycl::event::get_wait_list | ( | ) |
Returns the list of events that depend on the current one.
- Returns
- A vector of SYCL events that this event depends on.
◆ is_host()
bool cl::sycl::event::is_host | ( | ) | const |
Returns true if the event is a host event.
- Returns
- True if the event is a host event, false otherwise
◆ operator=() [1/2]
◆ operator=() [2/2]
Default move assignment operator.
- Parameters
-
rhs will have its contents moved. after the operation rhs will be invalid.
◆ wait() [1/2]
void cl::sycl::event::wait | ( | ) |
Waits for the event to complete.
◆ wait() [2/2]
|
static |
Waits for all the events in the list.
- Parameters
-
eventList List of events to wait
◆ wait_and_throw() [1/2]
void cl::sycl::event::wait_and_throw | ( | ) |
Waits for the event to complete.
Throws any exception that can be associated with the execution of the event
- Exceptions
-
cl::sycl::exception
◆ wait_and_throw() [2/2]
|
static |
Waits for all the events in the list.
Exceptions may be thrown.
- Parameters
-
eventList List of events to wait
Friends And Related Function Documentation
◆ operator!=
◆ operator==
The documentation for this class was generated from the following file: