16 Event() { KOKKOS_IMPL_HIP_SAFE_CALL(hipEventCreate(&
event)); }
18 ~Event() { KOKKOS_IMPL_HIP_SAFE_CALL(hipEventDestroy(
event)); }
20 void record(
const Kokkos::HIP& space) { KOKKOS_IMPL_HIP_SAFE_CALL(hipEventRecord(
event, space.hip_stream())); }
22 template <
typename Duration = milliseconds>
24 return std::chrono::duration_cast<Duration>(std::chrono::duration<float, std::milli>(elapsed(other)));
33 float elapsed(
Event& other)
35 KOKKOS_IMPL_HIP_SAFE_CALL(hipEventSynchronize(other.
event));
36 KOKKOS_IMPL_HIP_SAFE_CALL(hipEventSynchronize(
event));
39 KOKKOS_IMPL_HIP_SAFE_CALL(hipEventElapsedTime(&elapsed_time,
event, other.
event));