An event object can be used to synchronize memory transfers, enqueues of kernels and signaling barriers. More...
#include <sycl/event.hpp>
Public Member Functions | |
event () | |
Constructs a ready SYCL event. More... | |
event (const event &rhs)=default | |
Constructs a SYCL event instance from an OpenCL cl_event. More... | |
event (event &&rhs)=default | |
event & | operator= (const event &rhs)=default |
event & | operator= (event &&rhs)=default |
bool | operator== (const event &rhs) const |
bool | operator!= (const event &rhs) const |
std::vector< event > | get_wait_list () |
Return the list of events that this event waits for. More... | |
void | wait () |
Wait for the event. More... | |
void | wait_and_throw () |
Wait for the event. More... | |
template<typename Param > | |
detail::is_event_info_desc< Param >::return_type | get_info () const |
Queries this SYCL event for information. More... | |
template<typename Param > | |
detail::is_backend_info_desc< Param >::return_type | get_backend_info () const |
Queries this SYCL event for SYCL backend-specific information. More... | |
template<typename Param > | |
detail::is_event_profiling_info_desc< Param >::return_type | get_profiling_info () const |
Queries this SYCL event for profiling information. More... | |
backend | get_backend () const noexcept |
Returns the backend associated with this platform. More... | |
![]() | |
bool | ext_oneapi_owner_before (const ext::oneapi::detail::weak_object_base< event > &Other) const noexcept |
Compares the object against a weak object using an owner-based implementation-defined ordering. More... | |
bool | ext_oneapi_owner_before (const event &Other) const noexcept |
Compares the object against another object using an owner-based implementation-defined ordering. More... | |
Static Public Member Functions | |
static void | wait (const std::vector< event > &EventList) |
Synchronously wait on a list of events. More... | |
static void | wait_and_throw (const std::vector< event > &EventList) |
Synchronously wait on a list of events. More... | |
Friends | |
template<class T > | |
T | detail::createSyclObjFromImpl (decltype(T::impl) ImplObj) |
template<backend BackendName, class SyclObjectT > | |
auto | get_native (const SyclObjectT &Obj) -> backend_return_t< BackendName, SyclObjectT > |
An event object can be used to synchronize memory transfers, enqueues of kernels and signaling barriers.
sycl::_V1::event::event | ( | ) |
|
default |
Constructs a SYCL event instance from an OpenCL cl_event.
The SyclContext must match the OpenCL context associated with the ClEvent.
ClEvent | is a valid instance of OpenCL cl_event. |
SyclContext | is an instance of SYCL context. |
|
default |
|
noexcept |
Returns the backend associated with this platform.
Definition at line 120 of file event.cpp.
References sycl::_V1::detail::getImplBackend().
Referenced by sycl::_V1::ext::oneapi::cuda::has_native_event().
detail::is_backend_info_desc< Param >::return_type sycl::_V1::event::get_backend_info |
detail::is_event_info_desc< Param >::return_type sycl::_V1::event::get_info |
Queries this SYCL event for information.
Definition at line 71 of file event.cpp.
Referenced by sycl::_V1::ext::intel::experimental::pipe< _name, _dataT, _min_capacity, _propertiesT, class >::read(), and sycl::_V1::ext::intel::experimental::pipe< _name, _dataT, _min_capacity, _propertiesT, class >::write().
detail::is_event_profiling_info_desc< Param >::return_type sycl::_V1::event::get_profiling_info |
Queries this SYCL event for profiling information.
If the requested info is not available when this member function is called due to incompletion of command groups associated with the event, then the call to this member function will block until the requested info is available. If the queue which submitted the command group this event is associated with was not constructed with the property::queue::enable_profiling property, an a SYCL exception with errc::invalid error code is thrown.
Definition at line 83 of file event.cpp.
References sycl::_V1::invalid, and sycl::_V1::make_error_code().
std::vector< event > sycl::_V1::event::get_wait_list | ( | ) |
bool sycl::_V1::event::operator!= | ( | const event & | rhs | ) | const |
bool sycl::_V1::event::operator== | ( | const event & | rhs | ) | const |
void sycl::_V1::event::wait | ( | ) |
Wait for the event.
Definition at line 41 of file event.cpp.
Referenced by syclcompat::fill(), syclcompat::detail::matrix_mem_copy(), syclcompat::memcpy(), and syclcompat::memset().
|
static |
void sycl::_V1::event::wait_and_throw | ( | ) |
|
static |
Synchronously wait on a list of events.
If any uncaught asynchronous errors occurred on the context that the events are waiting on executions from, then call those contexts' asynchronous error handlers with those errors.
EventList | is a vector of SYCL events. |
|
friend |
|
friend |
Definition at line 138 of file backend.hpp.