|
kokkos-execution 0.0.1
|
An event that can be recorded on an execution space instance. More...
#include <event.hpp>
Public Member Functions | |
| Event ()=default | |
| Event (const Event &)=delete | |
| Event & | operator= (const Event &)=delete |
| Event (Event &&) noexcept=delete | |
| Event & | operator= (Event &&) noexcept=delete |
| ~Event ()=default | |
| void | record (const Exec &) |
| void | wait () const |
Public Attributes | |
| std::atomic< bool > | m_recorded {false} |
| uint64_t | m_event_id = invalid_event_id |
An event that can be recorded on an execution space instance.
This is the default implementation. It assumes the backend has blocking dispatch.
It is assumed that the thread calling record does so after submitting the operation on the execution space instance. Since the backend is assumed blocking, this means that the operation must have completed before the call to record, so that making the effects visible after the call to wait on the waiting thread is all that is needed.
|
default |
|
delete |
References Event().
|
deletenoexcept |
References Event().
|
default |
References Event().
|
delete |
References Event().
|
deletenoexcept |
References Event().
|
inline |
Definition at line 122 of file event.hpp.
References m_recorded, and record().
|
inline |
The while loop is needed because the promise that memory writes that happened before the atomic store from the point of view of the recording thread become visible in the waiting thread only holds if the waiting thread actually reads the value that the recording thread stored. See https://en.cppreference.com/cpp/atomic/memory_order.
Definition at line 126 of file event.hpp.
References m_recorded.
| uint64_t Kokkos::Execution::Impl::Event< Exec >::m_event_id = invalid_event_id |
| std::atomic<bool> Kokkos::Execution::Impl::Event< Exec >::m_recorded {false} |