kokkos-utils
0.0.1
Loading...
Searching...
No Matches
EventBeginEndIdMatcher.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_UTILS_CALLBACKS_EVENTBEGINENDIDMATCHER_HPP
2
#define KOKKOS_UTILS_CALLBACKS_EVENTBEGINENDIDMATCHER_HPP
3
4
#include "
kokkos-utils/callbacks/EventIdMatcher.hpp
"
5
#include "
kokkos-utils/callbacks/Matcher.hpp
"
6
7
namespace
Kokkos::utils::callbacks
8
{
9
21
template
<BeginEvent BeginEventType, MatcherFor<BeginEventType> BeginMatcherType>
22
struct
EventBeginEndIdMatcher
23
{
24
using
end_event_t
=
paired_event_t<BeginEventType>
;
25
26
bool
operator()
(
const
BeginEventType& event)
27
{
28
const
bool
matching =
matcher
(event);
29
30
if
(matching)
31
matcher_end
.event_id =
event
.event_id;
32
33
return
matching;
34
}
35
36
bool
operator()
(
const
end_event_t
& event)
const
{
37
return
matcher_end
(event);
38
}
39
40
BeginMatcherType
matcher
;
41
EventIdMatcher
matcher_end
{};
42
};
43
44
}
// namespace Kokkos::utils::callbacks
45
46
#endif
// KOKKOS_UTILS_CALLBACKS_EVENTBEGINENDIDMATCHER_HPP
EventIdMatcher.hpp
Matcher.hpp
Kokkos::utils::callbacks
Definition
BeginEndTimerListener.hpp:12
Kokkos::utils::callbacks::paired_event_t
typename PairedEventType< EventType >::type paired_event_t
Definition
Events.hpp:301
Kokkos::utils::callbacks::EventBeginEndIdMatcher
Match a begin event and its corresponding end event based on their event_id.
Definition
EventBeginEndIdMatcher.hpp:23
Kokkos::utils::callbacks::EventBeginEndIdMatcher::matcher
BeginMatcherType matcher
Definition
EventBeginEndIdMatcher.hpp:40
Kokkos::utils::callbacks::EventBeginEndIdMatcher::operator()
bool operator()(const BeginEventType &event)
Definition
EventBeginEndIdMatcher.hpp:26
Kokkos::utils::callbacks::EventBeginEndIdMatcher::operator()
bool operator()(const end_event_t &event) const
Definition
EventBeginEndIdMatcher.hpp:36
Kokkos::utils::callbacks::EventBeginEndIdMatcher< BeginEventType, ConjunctionMatcher< queue_matcher_t, MatcherType > >::matcher_end
EventIdMatcher matcher_end
Definition
EventBeginEndIdMatcher.hpp:41
Kokkos::utils::callbacks::EventBeginEndIdMatcher< BeginEventType, ConjunctionMatcher< queue_matcher_t, MatcherType > >::end_event_t
paired_event_t< BeginEventType > end_event_t
Definition
EventBeginEndIdMatcher.hpp:24
Kokkos::utils::callbacks::EventIdMatcher
Match an event whose event_id is event_id.
Definition
EventIdMatcher.hpp:11
include
kokkos-utils
callbacks
EventBeginEndIdMatcher.hpp
Generated on Wed Jun 25 2025 05:46:48 for kokkos-utils by
1.13.2