Timer listener for a profiling region that matches MatcherType
.
More...
#include <RegionTimerListener.hpp>
Public Types | |
using | region_matcher_t = EventRegionMatcher<MatcherType, true> |
using | matcher_t = EventTypeMatcher<region_matcher_t, PushRegionEvent, PopRegionEvent> |
using | timer_t = TimerType |
using | base_t = TimerListener<matcher_t, timer_t> |
Public Member Functions | |
template<typename T, typename U = TimerType> | |
RegionTimerListener (T &&matcher_, U &&timer_=TimerType{}) | |
![]() | |
template<Event EventType> requires MatcherFor<BeginEndMatcherType, EventType> | |
void | operator() (const EventType &event) |
bool | connected () const |
When the listener has matched the begin, but not yet the end event, it is said to be "connected". | |
bool | closed () const |
When the listener has matched both the begin and end events, it is said to be "closed". | |
void | reset () |
Reset the listener so that it can be reused to match a begin event again. | |
Additional Inherited Members | |
![]() | |
BeginEndMatcherType | matcher {} |
TimerType | timer {} |
bool | matched_begin = false |
bool | matched_end = false |
Timer listener for a profiling region that matches MatcherType
.
The TimerType
defaults to Kokkos::utils::timer::Timer<void> because a profiling region typically is not itself related to an execution space instance.
However, there can be use cases in which it may be of interest to associate the profiling region with an execution space instance, such as when the profiling region surrounds a group of parallel regions that enqueue work in the same execution space instance, or when the profiling region surrounds a Kokkos::Experimental::Graph
submission. In such cases, EnqueuedEventTimer can be used as the underlying timer.
Definition at line 25 of file RegionTimerListener.hpp.
using Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType >::base_t = TimerListener<matcher_t, timer_t> |
Definition at line 30 of file RegionTimerListener.hpp.
using Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType >::matcher_t = EventTypeMatcher<region_matcher_t, PushRegionEvent, PopRegionEvent> |
Definition at line 28 of file RegionTimerListener.hpp.
using Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType >::region_matcher_t = EventRegionMatcher<MatcherType, true> |
Definition at line 27 of file RegionTimerListener.hpp.
using Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType >::timer_t = TimerType |
Definition at line 29 of file RegionTimerListener.hpp.
|
inline |
Definition at line 33 of file RegionTimerListener.hpp.