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
5
7{
8
9namespace impl
10{
11
13template <typename, typename>
15
16template <typename Callable, typename... Events> requires (sizeof...(Events) > 0)
17struct 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
28template <typename Callable, typename EventTypeSubList>
30
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
Concept that models that a callable object is a matcher for the event types in EventTypeSubList if it...
Definition Matcher.hpp:29
Matcher that returns true for any event.
Definition Matcher.hpp:33
constexpr bool operator()(const EventType &) const
Definition Matcher.hpp:35
Helper struct needed for the implementation of the Matcher concept.
Definition Matcher.hpp:14