1#ifndef KOKKOS_EXECUTION_EXECUTION_SPACE_PARALLEL_FOR_HPP
2#define KOKKOS_EXECUTION_EXECUTION_SPACE_PARALLEL_FOR_HPP
16template <
typename Label,
typename Functor, Kokkos::ExecutionPolicy ExecPolicy>
24 if constexpr (std::convertible_to<Label, std::string>) {
25 Kokkos::parallel_for(
data.label,
data.policy,
data.functor);
27 Kokkos::parallel_for(std::string{
data.label},
data.policy,
data.functor);
36template <
typename Tag, stdexec::sender Sndr,
typename Label,
typename Functor, Kokkos::ExecutionPolicy ExecPolicy>
48 template <stdexec::receiver Rcvr>
49 constexpr auto connect(Rcvr rcvr) &&
noexcept(
noexcept(
60 template <
typename Env,
typename Data,
typename Sndr>
64 typename std::remove_cvref_t<Data>::label_t,
65 typename std::remove_cvref_t<Data>::functor_t,
66 typename std::remove_cvref_t<Data>::policy_t
69 template <
typename Env,
typename Data,
typename Sndr>
70 requires stdexec::__sends<stdexec::set_value_t, Sndr, Env>
72 noexcept(std::is_nothrow_constructible_v<
78 auto [label, functor, policy] = std::forward<Data>(data);
80 auto schd = stdexec::get_completion_scheduler<stdexec::set_value_t>(stdexec::get_env(sndr), env);
88 "The policy's execution space type must be the same as the completion scheduler's execution space "
94 typename std::remove_cvref_t<Data>::policy_t(
95 Kokkos::Impl::PolicyUpdate{}, std::move(policy), schd.state->exec)}},
96 std::forward<Sndr>(sndr)};
#define KOKKOS_EXECUTION_IMPL_FORWARDING_ATTRIBUTES_GET_ENV(_type_, _obj_)
#define KOKKOS_EXECUTION_COMPL_SIGS_ADD(_sndr_type_,...)
Completion signatures of _sndr_type_.
Concept for a sender whose completion scheduler is Kokkos::Execution::ExecutionSpaceImpl::Scheduler.
typename make_opstate_t< Sndr, Rcvr, Clsrs... >::type opstate_t
Impl::MakeOpState< Domain, OpState >::Huddle< Sndr, Rcvr, Clsrs... > make_opstate_t
auto no_execution_space_scheduler_in_env() noexcept
Show a better compile diagnostic when there is no Kokkos::Execution::ExecutionSpaceImpl::Scheduler fo...
const policy_t & get_policy() const &noexcept
typename policy_t::execution_space execution_space
Kokkos::Execution::Impl::ParallelForData< Label, Functor, policy_t > data
constexpr auto connect(Rcvr rcvr) &&noexcept(noexcept(make_opstate_t< Sndr, Rcvr, closure_t >{}(std::declval< Sndr >(), std::declval< Rcvr >(), std::declval< closure_t >()))) -> opstate_t< Sndr, Rcvr, closure_t >
ParallelForClosure< std::string_view, typename Kokkos::Execution::Impl::bulk_traits< Data >::functor_t, ExecPolicy > closure_t
typename closure_t::execution_space execution_space
stdexec::sender_tag sender_concept
Custom algorithm for the Kokkos::parallel_for construct.
Kokkos::DefaultExecutionSpace execution_space