kokkos-utils
0.0.1
Loading...
Searching...
No Matches
RegionTimerListener.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_UTILS_CALLBACKS_REGIONTIMERLISTENER_HPP
2
#define KOKKOS_UTILS_CALLBACKS_REGIONTIMERLISTENER_HPP
3
4
#include "
kokkos-utils/callbacks/EventRegionMatcher.hpp
"
5
#include "
kokkos-utils/callbacks/EventTypeMatcher.hpp
"
6
#include "
kokkos-utils/callbacks/TimerListener.hpp
"
7
#include "
kokkos-utils/timer/Timer.hpp
"
8
9
namespace
Kokkos::utils::callbacks
10
{
11
24
template
<MatcherFor<PushRegionEvent> MatcherType,
typename
TimerType = Kokkos::utils::timer::Timer<
void
>>
25
struct
RegionTimerListener
:
public
TimerListener
<EventTypeMatcher<EventRegionMatcher<MatcherType, true>, PushRegionEvent, PopRegionEvent>, TimerType>
26
{
27
using
region_matcher_t
=
EventRegionMatcher<MatcherType, true>
;
28
using
matcher_t
=
EventTypeMatcher<region_matcher_t, PushRegionEvent, PopRegionEvent>
;
29
using
timer_t
= TimerType;
30
using
base_t
=
TimerListener<matcher_t, timer_t>
;
31
32
template
<
typename
T,
typename
U = TimerType>
33
RegionTimerListener
(T&& matcher_, U&& timer_ = TimerType{}) :
base_t
{
34
matcher_t
{
matcher_t
{.
matcher
= {.
matcher
= {std::forward<T>(matcher_)}}}},
35
timer_t{std::forward<U>(timer_)}
36
} {}
37
};
38
39
}
// namespace Kokkos::utils::callbacks
40
41
#endif
// KOKKOS_UTILS_CALLBACKS_REGIONTIMERLISTENER_HPP
EventRegionMatcher.hpp
EventTypeMatcher.hpp
TimerListener.hpp
Timer.hpp
Kokkos::utils::callbacks
Definition
BeginEndTimerListener.hpp:12
Kokkos::utils::callbacks::EventRegionMatcher
Matcher to select events that occur within a region.
Definition
EventRegionMatcher.hpp:23
Kokkos::utils::callbacks::EventTypeMatcher
Restrict the event types that can be matched by matcher to the subset EventTypes.
Definition
EventTypeMatcher.hpp:17
Kokkos::utils::callbacks::EventTypeMatcher::matcher
MatcherType matcher
Definition
EventTypeMatcher.hpp:23
Kokkos::utils::callbacks::RegionTimerListener::RegionTimerListener
RegionTimerListener(T &&matcher_, U &&timer_=TimerType{})
Definition
RegionTimerListener.hpp:33
Kokkos::utils::callbacks::RegionTimerListener::region_matcher_t
EventRegionMatcher< MatcherType, true > region_matcher_t
Definition
RegionTimerListener.hpp:27
Kokkos::utils::callbacks::RegionTimerListener::timer_t
TimerType timer_t
Definition
RegionTimerListener.hpp:29
Kokkos::utils::callbacks::RegionTimerListener::base_t
TimerListener< matcher_t, timer_t > base_t
Definition
RegionTimerListener.hpp:30
Kokkos::utils::callbacks::RegionTimerListener::matcher_t
EventTypeMatcher< region_matcher_t, PushRegionEvent, PopRegionEvent > matcher_t
Definition
RegionTimerListener.hpp:28
Kokkos::utils::callbacks::TimerListener
Listener that starts a timer when a begin event is received and stops it when a corresponding end eve...
Definition
TimerListener.hpp:46
Kokkos::utils::callbacks::TimerListener::matcher
BeginEndMatcherType matcher
Definition
TimerListener.hpp:89
include
kokkos-utils
callbacks
RegionTimerListener.hpp
Generated on Wed Jun 25 2025 05:46:48 for kokkos-utils by
1.13.2