kokkos-execution
0.0.1
Toggle main menu visibility
Loading...
Searching...
No Matches
completion_signatures.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_EXECUTION_IMPL_COMPLETION_SIGNATURES_HPP
2
#define KOKKOS_EXECUTION_IMPL_COMPLETION_SIGNATURES_HPP
3
4
#include "
kokkos-execution/stdexec.hpp
"
5
6
namespace
Kokkos::Execution::Impl
{
7
17
template
<stdexec::sender Sndr, stdexec::__valid_completion_signatures ExtraSigs,
typename
... Env>
18
consteval
auto
completion_signatures_add
() {
19
constexpr
auto
completions = stdexec::get_completion_signatures<Sndr, Env...>();
20
21
if
constexpr
(stdexec::__sends<stdexec::set_value_t, Sndr, Env...>) {
22
return
stdexec::__concat_completion_signatures(completions, ExtraSigs{});
23
}
else
{
24
return
completions;
25
}
26
}
27
28
template
<stdexec::sender Sndr, stdexec::__valid_completion_signatures ExtraSigs,
typename
... Env>
29
using
completion_signatures_add_t
=
decltype
(
completion_signatures_add
<Sndr, ExtraSigs, Env...>());
30
31
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
32
#define KOKKOS_EXECUTION_COMPL_SIGS_ADD(_decayed_self_type_, _sndr_type_, ...) \
33
template <stdexec::__decays_to<_decayed_self_type_> Self, typename... Env> \
34
static consteval auto get_completion_signatures() { \
35
return Kokkos::Execution::Impl::completion_signatures_add< \
36
stdexec::__copy_cvref_t<Self, _sndr_type_>, \
37
stdexec::completion_signatures<__VA_ARGS__>, \
38
Env... \
39
>(); \
40
}
41
42
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
43
#define KOKKOS_EXECUTION_COMPL_SIGS_KEEP(_decayed_self_type_, _sndr_type_) \
44
template <stdexec::__decays_to<_decayed_self_type_> Self, typename... Env> \
45
static consteval auto get_completion_signatures() { \
46
return stdexec::get_completion_signatures<stdexec::__copy_cvref_t<Self, _sndr_type_>, Env...>(); \
47
}
48
49
}
// namespace Kokkos::Execution::Impl
50
51
#endif
// KOKKOS_EXECUTION_IMPL_COMPLETION_SIGNATURES_HPP
stdexec.hpp
Kokkos::Execution::Impl
Definition
attributes.hpp:6
Kokkos::Execution::Impl::completion_signatures_add
consteval auto completion_signatures_add()
Concatenate Sndr completion signatures with ExtraSigs if Sndr sends on the value channel; otherwise r...
Definition
completion_signatures.hpp:18
Kokkos::Execution::Impl::completion_signatures_add_t
decltype(completion_signatures_add< Sndr, ExtraSigs, Env... >()) completion_signatures_add_t
Definition
completion_signatures.hpp:29
kokkos-execution
impl
completion_signatures.hpp
Generated on
for kokkos-execution by
1.18.0