1#ifndef KOKKOS_EXECUTION_IMPL_CUDA_EVENT_HPP
2#define KOKKOS_EXECUTION_IMPL_CUDA_EVENT_HPP
4#include "Kokkos_Core.hpp"
30 KOKKOS_IMPL_CUDA_SAFE_CALL(cudaEventDestroy(
m_event));
33 void record(
const Kokkos::Cuda& exec) {
35 KOKKOS_IMPL_CUDA_SAFE_CALL(cudaEventCreateWithFlags(&
m_event, cudaEventDisableTiming));
37 KOKKOS_IMPL_CUDA_SAFE_CALL(cudaEventRecord(
m_event, exec.cuda_stream()));
41 if (cudaEventQuery(
m_event) != cudaSuccess) {
42 KOKKOS_IMPL_CUDA_SAFE_CALL(cudaEventSynchronize(
m_event));
49 KOKKOS_EXPECTS(
bool(
event.m_event));
50 KOKKOS_IMPL_CUDA_SAFE_CALL(cudaStreamWaitEvent(exec.cuda_stream(),
event.m_event));
Constrain an EventType type to be a valid event type for Exec execution space type.
static constexpr auto invalid_event_id
void impl_wait(const Kokkos::Cuda &exec, const Event< Kokkos::Cuda > &event)
Event & operator=(const Event &)=delete
Event(Event &&) noexcept=delete
Event(const Event &)=delete
void record(const Kokkos::Cuda &exec)
An event that can be recorded on an execution space instance.
Determine if the Kokkos backend has non-blocking dispatch.