kokkos-utils 0.0.1
 
Loading...
Searching...
No Matches
Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType > Struct Template Reference

Timer listener for a profiling region that matches MatcherType. More...

#include <RegionTimerListener.hpp>

Inheritance diagram for Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType >:
Kokkos::utils::callbacks::TimerListener< BeginEndMatcherType, TimerType >

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{})
 
- Public Member Functions inherited from Kokkos::utils::callbacks::TimerListener< BeginEndMatcherType, 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

- Public Attributes inherited from Kokkos::utils::callbacks::TimerListener< BeginEndMatcherType, TimerType >
BeginEndMatcherType matcher {}
 
TimerType timer {}
 
bool matched_begin = false
 
bool matched_end = false
 

Detailed Description

template<MatcherFor< PushRegionEvent > MatcherType, typename TimerType = Kokkos::utils::timer::Timer<void>>
struct Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType >

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.

Member Typedef Documentation

◆ base_t

template<MatcherFor< PushRegionEvent > MatcherType, typename TimerType = Kokkos::utils::timer::Timer<void>>
using Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType >::base_t = TimerListener<matcher_t, timer_t>

Definition at line 30 of file RegionTimerListener.hpp.

◆ matcher_t

template<MatcherFor< PushRegionEvent > MatcherType, typename TimerType = Kokkos::utils::timer::Timer<void>>
using Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType >::matcher_t = EventTypeMatcher<region_matcher_t, PushRegionEvent, PopRegionEvent>

Definition at line 28 of file RegionTimerListener.hpp.

◆ region_matcher_t

template<MatcherFor< PushRegionEvent > MatcherType, typename TimerType = Kokkos::utils::timer::Timer<void>>
using Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType >::region_matcher_t = EventRegionMatcher<MatcherType, true>

Definition at line 27 of file RegionTimerListener.hpp.

◆ timer_t

template<MatcherFor< PushRegionEvent > MatcherType, typename TimerType = Kokkos::utils::timer::Timer<void>>
using Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType >::timer_t = TimerType

Definition at line 29 of file RegionTimerListener.hpp.

Constructor & Destructor Documentation

◆ RegionTimerListener()

template<MatcherFor< PushRegionEvent > MatcherType, typename TimerType = Kokkos::utils::timer::Timer<void>>
template<typename T, typename U = TimerType>
Kokkos::utils::callbacks::RegionTimerListener< MatcherType, TimerType >::RegionTimerListener ( T && matcher_,
U && timer_ = TimerType{} )
inline

Definition at line 33 of file RegionTimerListener.hpp.


The documentation for this struct was generated from the following file: