24 template<
typename T_Device>
25 struct Event : std::enable_shared_from_this<Event<T_Device>>
54 return !(*
this == other);
77 return std::string(
"host::Event id=") + std::to_string(
m_idx);
96 return this->shared_from_this();
124 std::lock_guard<std::mutex> lk(
m_mutex);
134 std::unique_lock<std::mutex> lk(
m_mutex);
153 template<
typename T_Device>
#define ALPAKA_LOG_FUNCTION(logLvl)
Log the entry and exit of a scope.
alpaka internal implementations.
constexpr auto getDeviceKind(auto &&any)
Functionality which is usable on the host CPU controller thread.
std::shared_ptr< T > Handle
constexpr decltype(auto) getApi(auto &&any)
Get the API an object depends on.
constexpr auto operator()(auto &&event) const
std::size_t m_LastReadyEnqueueCount
std::shared_future< void > m_future
The number of times this event has been enqueued.
Event(Event const &)=delete
std::string getName() const
std::size_t m_enqueueCount
The time this event has been ready the last time. Ready means that the event was not waiting within a...
bool operator!=(Event const &other) const
auto getDeviceKind() const
bool isReady() noexcept
Check if the event is ready.
bool isEventComplete() noexcept
Check if the event is complete.
Handle< T_Device > m_device
std::shared_ptr< Event > getSharedPtr()
bool operator==(Event const &other) const
Event & operator=(Event const &)=delete
Event & operator=(Event &&)=delete
std::mutex m_mutex
The future signaling the event completion.
Event(internal::concepts::DeviceHandle auto device, uint32_t const idx)
uint32_t m_idx
The mutex used to synchronize access to the event.