1#ifndef KOKKOS_UTILS_CALLBACKS_TIMERLISTENER_HPP
2#define KOKKOS_UTILS_CALLBACKS_TIMERLISTENER_HPP
10template <
typename TimerType>
12 {
timer.start() } -> std::same_as<void>;
15template <
typename TimerType,
typename EventType>
17 {
timer.start(event) } -> std::same_as<void>;
20template <
typename TimerType>
22 {
timer.stop() } -> std::same_as<void>;
25template <
typename TimerType,
typename EventType>
27 {
timer.stop(event) } -> std::same_as<void>;
52 const bool matching =
matcher(event);
62 this->timer.start(event);
73 this->timer.stop(event);
Check that Callable is a matcher for each event in EventTypes.
Callable is a matcher if it is invocable with at least one event type from Kokkos::utils::callbacks::...
Listener that starts a timer when a begin event is received and stops it when a corresponding end eve...
void reset()
Reset the listener so that it can be reused to match a begin event again.
void operator()(const EventType &event)
bool closed() const
When the listener has matched both the begin and end events, it is said to be "closed".
bool connected() const
When the listener has matched the begin, but not yet the end event, it is said to be "connected".
BeginEndMatcherType matcher