1#ifndef KOKKOS_UTILS_TIMER_EVENT_HPP
2#define KOKKOS_UTILS_TIMER_EVENT_HPP
29requires Kokkos::ExecutionSpace<T> || std::is_void_v<T>
34 std::chrono::high_resolution_clock::is_steady,
35 std::chrono::high_resolution_clock,
36 std::chrono::steady_clock
44 template <
typename U = T>
45 requires std::is_void_v<U>
47 event = std::chrono::steady_clock::now();
50 template <
typename Exec = T>
51 requires Kokkos::ExecutionSpace<Exec>
53 event = std::chrono::steady_clock::now();
57 template <
typename Duration>
59 return std::chrono::duration_cast<Duration>(other.
event -
event);
65#ifdef KOKKOS_ENABLE_CUDA
69#ifdef KOKKOS_ENABLE_HIP
void record(const Exec &)
typename impl_clock_t::time_point impl_event_t
void record()
Record this event.
std::conditional_t< std::chrono::high_resolution_clock::is_steady, std::chrono::high_resolution_clock, std::chrono::steady_clock > impl_clock_t
Let's choose a steady clock.
Duration duration(const Event &other) const
Get a Duration object between this event and other.