1#ifndef KOKKOS_EXECUTION_EXECUTION_SPACE_ENV_HPP
2#define KOKKOS_EXECUTION_EXECUTION_SPACE_ENV_HPP
14template <
typename Env, Kokkos::ExecutionSpace Exec>
16 return stdexec::__env::__join(
21template <
typename ExecEnvPolicy,
typename Env, Kokkos::ExecutionSpace Exec>
23 if constexpr (std::same_as<ExecEnvPolicy, WithExecEnvPolicy>) {
26 return stdexec::__fwd_env(std::forward<Env>(env));
30template <
typename ExecEnvPolicy,
typename Env, Kokkos::ExecutionSpace Exec>
39template <
typename ExecEnvPolicy,
typename Env>
41 if constexpr (std::same_as<ExecEnvPolicy, WithExecEnvPolicy>) {
43 return stdexec::__env::__join(
44 stdexec::prop{
Impl::get_exec, std::move(ref)}, stdexec::__fwd_env(std::forward<Env>(env)));
46 return stdexec::__fwd_env(std::forward<Env>(env));
50template <
typename ExecEnvPolicy,
typename Env>
54template <
typename Env>
constexpr auto join_env_with_exec(Env &&env, const Exec &exec) noexcept
Unconditionally join exec to env.
decltype(extend_env< ExecEnvPolicy >(std::declval< Env >())) extend_env_t
constexpr auto extend_env(Env &&env) noexcept
std::conditional_t< stdexec::__queryable_with< Env, Impl::get_exec_t >, WithExecEnvPolicy, WithoutExecEnvPolicy > exec_env_policy_t
If Env is queryable with Impl::get_exec_t, use WithExecEnvPolicy.
decltype(join_env_with_exec< ExecEnvPolicy >(std::declval< Env >(), std::declval< Exec >())) join_env_with_exec_t
constexpr get_exec_t get_exec
Wrap a Kokkos execution space to make it cheap to copy/move in new environments.