1#ifndef KOKKOS_EXECUTION_EXECUTION_SPACE_WHEN_ALL_HPP
2#define KOKKOS_EXECUTION_EXECUTION_SPACE_WHEN_ALL_HPP
18struct __sexpr_impl<
Kokkos::Execution::ExecutionSpaceImpl::when_all_t> : stdexec::__when_all::__when_all_impl {
19 using base_t = stdexec::__when_all::__when_all_impl;
21 template <
typename State>
22 using state_env_t = stdexec::env_of_t<decltype(std::declval<const State&>().__rcvr_)>;
24 template <
typename State>
28 template <
typename State>
29 using base_env_t =
decltype(base_t::__get_env(stdexec::__ignore{}, std::declval<const State&>()));
31 template <
typename ExecEnvPolicy,
typename State>
34 template <
typename State>
40 std::declval<execution_space>()));
43 static constexpr auto get_env(
const State& state)
noexcept ->
type {
45 base_t::__get_env(stdexec::__ignore{}, state),
50 template <
typename State>
55 static constexpr auto get_env(
const State& state)
noexcept ->
type {
56 return base_t::__get_env(stdexec::__ignore{}, state);
68 []<
typename State>(stdexec::__ignore,
const State& state)
noexcept ->
81 template <
typename Self,
typename... Envs>
83 if constexpr (stdexec::__minvocable_q<stdexec::__when_all::__when_all_impl::__completions_t, Self, Envs...>) {
84 return stdexec::__when_all::__when_all_impl::__completions_t<Self, Envs...>{};
85 }
else if constexpr (
sizeof...(Envs) == 0) {
86 return stdexec::__throw_dependent_sender_error<Self>();
97 template <
typename Env,
typename... Sndrs>
98 auto operator()(
const Env&, stdexec::when_all_t, stdexec::__, Sndrs&&... sndrs)
const {
99 return stdexec::__make_sexpr<Kokkos::Execution::ExecutionSpaceImpl::when_all_t>(
100 stdexec::__{}, std::forward<Sndrs>(sndrs)...);
constexpr auto join_env_with_exec(Env &&env, const Exec &exec) noexcept
Unconditionally join exec to env.
std::conditional_t< stdexec::__queryable_with< Env, Impl::get_exec_t >, WithExecEnvPolicy, WithoutExecEnvPolicy > extend_env_with_exec_policy_t
If Env is queryable with Impl::get_exec_t, use WithExecEnvPolicy.
constexpr get_exec_t get_exec
typename ExecOf< Args... >::type exec_of_t
static constexpr auto __get_env
stdexec::env_of_t< decltype(std::declval< const State & >().__rcvr_)> state_env_t
static consteval auto __get_completion_signatures()
decltype(base_t::__get_env(stdexec::__ignore{}, std::declval< const State & >())) base_env_t
Kokkos::Execution::ExecutionSpaceImpl::extend_env_with_exec_policy_t< state_env_t< State > > state_exec_env_policy_t
stdexec::__when_all::__when_all_impl base_t
static constexpr auto get_env(const State &state) noexcept -> type
Kokkos::Execution::Impl::exec_of_t< state_env_t< State > > execution_space
decltype(Kokkos::Execution::ExecutionSpaceImpl::join_env_with_exec( std::declval< base_env_t< State > >(), std::declval< execution_space >())) type
static constexpr auto get_env(const State &state) noexcept -> type