1#ifndef KOKKOS_UTILS_TIMER_EVENT_HPP
2#define KOKKOS_UTILS_TIMER_EVENT_HPP
31requires Kokkos::utils::concepts::ExecutionSpace<T> || std::is_void_v<T>
36 std::chrono::high_resolution_clock::is_steady,
37 std::chrono::high_resolution_clock,
38 std::chrono::steady_clock
46 template <
typename U = T>
47 requires std::is_void_v<U>
49 event = std::chrono::steady_clock::now();
52 template <
typename Exec = T>
55 event = std::chrono::steady_clock::now();
59 template <
typename Duration>
61 return std::chrono::duration_cast<Duration>(other.
event -
event);
67#ifdef KOKKOS_ENABLE_CUDA
71#ifdef KOKKOS_ENABLE_HIP
Specify that a type is a Kokkos execution space.
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.
void record(const Exec &)
Duration duration(const Event &other) const
Get a Duration object between this event and other.