kokkos-execution
0.0.1
Toggle main menu visibility
Loading...
Searching...
No Matches
receiver.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_EXECUTION_IMPL_RECEIVER_HPP
2
#define KOKKOS_EXECUTION_IMPL_RECEIVER_HPP
3
4
#include "
kokkos-execution/stdexec.hpp
"
5
6
#include "
kokkos-execution/impl/env.hpp
"
7
#include "
kokkos-execution/impl/submitted.hpp
"
8
9
namespace
Kokkos::Execution::Impl
{
10
12
template
<
typename
ParentOp,
typename
Env = stdexec::env_of_t<ParentOp>>
13
struct
Receiver
{
14
using
receiver_concept
=
SubmittedReceiverTag
;
15
16
ParentOp*
parent_op
;
17
18
void
set_value
() &&
noexcept
{
19
parent_op
->complete(stdexec::set_value);
20
}
21
22
template
<
typename
Error>
23
void
set_error
(Error&& error) &&
noexcept
{
24
parent_op
->complete(stdexec::set_error, std::forward<Error>(error));
25
}
26
27
void
set_stopped
() &&
noexcept
{
28
parent_op
->complete(stdexec::set_stopped);
29
}
30
31
void
submitted
() &&
noexcept
{
32
parent_op
->submit();
33
}
34
35
[[nodiscard]]
36
constexpr
auto
get_env
() const noexcept ->
stdexec
::__fwd_env_t<Env> {
37
return
stdexec::__fwd_env(stdexec::get_env(*
parent_op
));
38
}
39
};
40
41
}
// namespace Kokkos::Execution::Impl
42
43
#endif
// KOKKOS_EXECUTION_IMPL_RECEIVER_HPP
env.hpp
stdexec.hpp
Kokkos::Execution::Impl
Definition
attributes.hpp:6
stdexec
Definition
when_all.hpp:16
Kokkos::Execution::Impl::Receiver
Receiver for an object parent_op that implements complete.
Definition
receiver.hpp:13
Kokkos::Execution::Impl::Receiver::set_stopped
void set_stopped() &&noexcept
Definition
receiver.hpp:27
Kokkos::Execution::Impl::Receiver::get_env
constexpr auto get_env() const noexcept -> stdexec::__fwd_env_t< Env >
Definition
receiver.hpp:36
Kokkos::Execution::Impl::Receiver::submitted
void submitted() &&noexcept
Definition
receiver.hpp:31
Kokkos::Execution::Impl::Receiver< base_t >::receiver_concept
SubmittedReceiverTag receiver_concept
Definition
receiver.hpp:14
Kokkos::Execution::Impl::Receiver::set_error
void set_error(Error &&error) &&noexcept
Definition
receiver.hpp:23
Kokkos::Execution::Impl::Receiver< base_t >::parent_op
base_t * parent_op
Definition
receiver.hpp:16
Kokkos::Execution::Impl::Receiver::set_value
void set_value() &&noexcept
Definition
receiver.hpp:18
Kokkos::Execution::Impl::SubmittedReceiverTag
Definition
submitted.hpp:11
submitted.hpp
kokkos-execution
impl
receiver.hpp
Generated on
for kokkos-execution by
1.18.0