kokkos-utils 0.0.1
 
Loading...
Searching...
No Matches
EventRegexMatcher.hpp
Go to the documentation of this file.
1#ifndef KOKKOS_UTILS_CALLBACKS_EVENTREGEXMATCHER_HPP
2#define KOKKOS_UTILS_CALLBACKS_EVENTREGEXMATCHER_HPP
3
4#include <regex>
5
7
9{
10
13{
14 template <NamedEvent EventType>
15 bool operator()(const EventType& event) const {
16 return std::regex_search(event.name, this->regex);
17 }
18
19 template <DataEvent EventType>
20 bool operator()(const EventType& event) const {
21 return std::regex_search(event.alloc.name, this->regex);
22 }
23
24 std::regex regex;
25};
26
27} // namespace Kokkos::utils::callbacks
28
29#endif // KOKKOS_UTILS_CALLBACKS_EVENTREGEXMATCHER_HPP
Matcher to select events whose name matches a regular expression.
bool operator()(const EventType &event) const