kokkos-utils 0.0.1
 
Loading...
Searching...
No Matches
BeginEndTimerListener.hpp
Go to the documentation of this file.
1#ifndef KOKKOS_UTILS_CALLBACKS_BEGINENDTIMERLISTENER_HPP
2#define KOKKOS_UTILS_CALLBACKS_BEGINENDTIMERLISTENER_HPP
3
10
12{
13
22template <Matcher MatcherType, Event BeginEventType, Kokkos::utils::concepts::ExecutionSpace Exec, typename TimerType = EnqueuedEventTimer<Exec>>
24struct BeginEndTimerListener : public TimerListener<EventBeginEndIdMatcher<BeginEventType, ConjunctionMatcher<EventQueueMatcher<Exec>, MatcherType>>, TimerType>
25{
28 using timer_t = TimerType;
30
31 template <typename T>
32 BeginEndTimerListener(T&& matcher, const Exec& exec) : base_t{
33 matcher_t{.matcher = ConjunctionMatcher{queue_matcher_t{.exec = exec}, MatcherType{std::forward<T>(matcher)}}},
34 timer_t{.exec = exec}
35 } {}
36};
37
41template <MatcherFor<BeginParallelForEvent> MatcherType, Kokkos::utils::concepts::ExecutionSpace Exec>
43
45template <MatcherFor<BeginParallelReduceEvent> MatcherType, Kokkos::utils::concepts::ExecutionSpace Exec>
47
49template <MatcherFor<BeginParallelScanEvent> MatcherType, Kokkos::utils::concepts::ExecutionSpace Exec>
51
53template <MatcherFor<BeginDeepCopyEvent> MatcherType, Kokkos::utils::concepts::ExecutionSpace Exec>
56
60template <MatcherFor<BeginParallelForEvent> MatcherType, Kokkos::utils::concepts::ExecutionSpace Exec>
62
64template <MatcherFor<BeginParallelReduceEvent> MatcherType, Kokkos::utils::concepts::ExecutionSpace Exec>
66
68template <MatcherFor<BeginParallelScanEvent> MatcherType, Kokkos::utils::concepts::ExecutionSpace Exec>
70
72template <MatcherFor<BeginDeepCopyEvent> MatcherType, Kokkos::utils::concepts::ExecutionSpace Exec>
75
76} // namespace Kokkos::utils::callbacks
77
78#endif // KOKKOS_UTILS_CALLBACKS_BEGINENDTIMERLISTENER_HPP
Check that Callable is a matcher for each event in EventTypes.
Definition Matcher.hpp:35
BeginEndTimerListener< MatcherType, BeginParallelForEvent, Exec, EnqueuedEventWithLaunchTimer< Exec > > ParallelForWithLaunchTimerListener
BeginEndTimerListener< MatcherType, BeginParallelReduceEvent, Exec > ParallelReduceTimerListener
Timer listener for timing the execution of a parallel reduce that matches MatcherType.
BeginEndTimerListener< MatcherType, BeginParallelScanEvent, Exec, EnqueuedEventWithLaunchTimer< Exec > > ParallelWithLaunchScanTimerListener
Timer listener for timing the execution and the launch of a parallel scan that matches MatcherType.
BeginEndTimerListener< MatcherType, BeginParallelForEvent, Exec > ParallelForTimerListener
BeginEndTimerListener< MatcherType, BeginParallelScanEvent, Exec > ParallelScanTimerListener
Timer listener for timing the execution of a parallel scan that matches MatcherType.
BeginEndTimerListener< MatcherType, BeginParallelReduceEvent, Exec, EnqueuedEventWithLaunchTimer< Exec > > ParallelWithLaunchReduceTimerListener
Timer listener for timing the execution and the launch of a parallel reduce that matches MatcherType.
BeginEndTimerListener< MatcherType, BeginDeepCopyEvent, Exec > DeepCopyTimerListener
Timer listener for timing the execution of a deep copy that matches MatcherType.
BeginEndTimerListener< MatcherType, BeginDeepCopyEvent, Exec, EnqueuedEventWithLaunchTimer< Exec > > DeepCopyWithLaunchTimerListener
Timer listener for timing the execution and the launch of a deep copy that matches MatcherType.
Timer listener that is well-suited for timing the execution of a parallel workload enqueued on a part...
EventBeginEndIdMatcher< BeginEventType, ConjunctionMatcher< queue_matcher_t, MatcherType > > matcher_t
Conjunction of matchers that is true only if all matchers agree.
Match a begin event and its corresponding end event based on their event_id.
Match an event whose dev_id is the same as the one of exec.
Listener that starts a timer when a begin event is received and stops it when a corresponding end eve...