kokkos-utils 0.0.1
 
Loading...
Searching...
No Matches
Listener.hpp
Go to the documentation of this file.
1#ifndef KOKKOS_UTILS_CALLBACKS_LISTENER_HPP
2#define KOKKOS_UTILS_CALLBACKS_LISTENER_HPP
3
5
7{
8
9namespace impl
10{
11
17template <typename Callable>
19{
20 template <Event EventType>
21 using type = std::is_invocable_r<void, Callable, const EventType&>;
22};
23
24} // namespace impl
25
30template <typename Callable>
32
34template <typename Callable, typename... EventTypes>
36
38template <typename Callable>
39using listener_event_type_list_t = Kokkos::Impl::filter_type_list_t<impl::IsListenerFor<Callable>::template type, EventTypeList>;
40
41} // namespace Kokkos::utils::callbacks
42
43#endif // KOKKOS_UTILS_CALLBACKS_LISTENER_HPP
Check that Callable is a listener for each event in EventTypes.
Definition Listener.hpp:35
Callable is a listener if it is invocable with at least one event type from Kokkos::utils::callbacks:...
Definition Listener.hpp:31
Kokkos::Impl::filter_type_list_t< impl::IsListenerFor< Callable >::template type, EventTypeList > listener_event_type_list_t
Type list holding the event types that Callable can be a listener for.
Definition Listener.hpp:39
Kokkos::Impl::type_list< BeginParallelForEvent, EndParallelForEvent, BeginParallelReduceEvent, EndParallelReduceEvent, BeginParallelScanEvent, EndParallelScanEvent, BeginFenceEvent, EndFenceEvent, AllocateDataEvent, DeallocateDataEvent, BeginDeepCopyEvent, EndDeepCopyEvent, CreateProfileSectionEvent, DestroyProfileSectionEvent, StartProfileSectionEvent, StopProfileSectionEvent, PushRegionEvent, PopRegionEvent, ProfileEvent > EventTypeList
Type list holding all event types.
Definition Events.hpp:199
constexpr bool type_list_all_v
constexpr bool type_list_any_v
std::is_invocable_r< void, Callable, const EventType & > type
Definition Listener.hpp:21