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
6
8{
9
21template <BeginEvent BeginEventType, MatcherFor<BeginEventType> BeginMatcherType>
23{
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;
42};
43
44} // namespace Kokkos::utils::callbacks
45
46#endif // KOKKOS_UTILS_CALLBACKS_EVENTBEGINENDIDMATCHER_HPP
typename PairedEventType< EventType >::type paired_event_t
Definition Events.hpp:301
Match a begin event and its corresponding end event based on their event_id.
Match an event whose event_id is event_id.