1#ifndef KOKKOS_EXECUTION_IMPL_HIP_EVENT_HPP
2#define KOKKOS_EXECUTION_IMPL_HIP_EVENT_HPP
4#include "Kokkos_Core.hpp"
24 explicit Event(
const Kokkos::HIP& exec) {
31 :
m_event(std::exchange(other.m_event,
nullptr))
37 KOKKOS_IMPL_HIP_SAFE_CALL(hipEventDestroy(
m_event));
39 m_event = std::exchange(other.m_event,
nullptr);
47 KOKKOS_IMPL_HIP_SAFE_CALL(hipEventDestroy(
m_event));
50 void record(
const Kokkos::HIP& exec) {
52 KOKKOS_IMPL_HIP_SAFE_CALL(hipEventCreateWithFlags(&
m_event, hipEventDisableTiming));
54 KOKKOS_IMPL_HIP_SAFE_CALL(hipEventRecord(
m_event, exec.hip_stream()));
60 if (hipEventQuery(
m_event) != hipSuccess) {
61 KOKKOS_IMPL_HIP_SAFE_CALL(hipEventSynchronize(
m_event));
static constexpr auto invalid_event_id
void record_event(const Exec &exec, uint64_t &event_id)
Event(const Kokkos::Cuda &) -> Event< Kokkos::Cuda >
void wait_event(const uint64_t event_id)
Event(const Event &)=delete
void record(const Kokkos::HIP &exec)
Event(Event &&other) noexcept
Event & operator=(Event &&other) noexcept
Event & operator=(const Event &)=delete
Event(const Kokkos::HIP &exec)
An event that can be recorded on an execution space instance.
Determine if events are supported.