kokkos-utils
0.0.1
Loading...
Searching...
No Matches
Matcher.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_UTILS_CALLBACKS_MATCHER_HPP
2
#define KOKKOS_UTILS_CALLBACKS_MATCHER_HPP
3
4
#include "
kokkos-utils/callbacks/Events.hpp
"
5
6
namespace
Kokkos::utils::callbacks
7
{
8
9
namespace
impl
10
{
11
13
template
<
typename
,
typename
>
14
struct
IsMatcherFor
;
15
16
template
<
typename
Callable,
typename
... Events>
requires
(
sizeof
...(Events) > 0)
17
struct
IsMatcherFor
<Callable, Kokkos::Impl::type_list<Events...>>
18
{
19
static
constexpr
bool
value
= std::conjunction_v<std::is_invocable_r<bool, Callable, const Events&>...>;
20
};
21
22
}
// namespace impl
23
28
template
<
typename
Callable,
typename
EventTypeSubList>
29
concept
Matcher
=
impl::IsMatcherFor<Callable, EventTypeSubList>::value
;
30
32
struct
AnyEventMatcher
33
{
34
template
<Event EventType>
35
constexpr
bool
operator()
(
const
EventType&)
const
{
return
true
; }
36
};
37
38
}
// namespace Kokkos::utils::callbacks
39
40
#endif
// KOKKOS_UTILS_CALLBACKS_MATCHER_HPP
Events.hpp
Kokkos::utils::callbacks::Matcher
Concept that models that a callable object is a matcher for the event types in EventTypeSubList if it...
Definition
Matcher.hpp:29
Kokkos::utils::callbacks::impl
Definition
Helpers.hpp:68
Kokkos::utils::callbacks
Definition
EventInProfileSectionRegexMatcher.hpp:11
Kokkos::utils::callbacks::AnyEventMatcher
Matcher that returns true for any event.
Definition
Matcher.hpp:33
Kokkos::utils::callbacks::AnyEventMatcher::operator()
constexpr bool operator()(const EventType &) const
Definition
Matcher.hpp:35
Kokkos::utils::callbacks::impl::IsMatcherFor< Callable, Kokkos::Impl::type_list< Events... > >::value
static constexpr bool value
Definition
Matcher.hpp:19
Kokkos::utils::callbacks::impl::IsMatcherFor
Helper struct needed for the implementation of the Matcher concept.
Definition
Matcher.hpp:14
include
kokkos-utils
callbacks
Matcher.hpp
Generated on Thu Apr 17 2025 12:50:27 for kokkos-utils by
1.13.2