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 <stdexec::sender Sndr,
typename Label,
typename Functor, Kokkos::ExecutionPolicy ExecPolicy>
49 template <stdexec::receiver Rcvr>
50 constexpr auto connect(Rcvr rcvr) &&
noexcept(
noexcept(
61 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, execution_space_completing_sender<Env> Sndr>
71 noexcept(std::is_nothrow_constructible_v<
77 auto [label, functor, policy] = std::forward<Data>(data);
79 auto schd = stdexec::get_completion_scheduler<stdexec::set_value_t>(stdexec::get_env(sndr), env);
87 "The policy's execution space type must be the same as the completion scheduler's execution space type.");
93 typename std::remove_cvref_t<Data>::policy_t(
94 Kokkos::Impl::PolicyUpdate{}, std::move(policy), schd.state->exec)}},
95 std::forward<Sndr>(sndr)};
101#if !STDEXEC_HAS_BUILTIN(__builtin_structured_binding_size)
105template <stdexec::sender Sndr,
typename Label,
typename Functor, Kokkos::ExecutionPolicy ExecPolicy>
106inline constexpr auto __structured_binding_size_v<
#define KOKKOS_EXECUTION_IMPL_FORWARDING_ATTRIBUTES_GET_ENV(_type_, _obj_)
#define KOKKOS_EXECUTION_COMPL_SIGS_ADD(_sndr_type_,...)
Completion signatures of _sndr_type_.
typename MakeOpStateFn< Sndr, Rcvr, Clsrs... >::type opstate_t
const policy_t & get_policy() const &noexcept
typename policy_t::execution_space execution_space
Kokkos::Execution::Impl::ParallelForData< Label, Functor, policy_t > data
stdexec::sender_t sender_concept
typename closure_t::execution_space execution_space
ParallelForClosure< std::string_view, typename Kokkos::Execution::Impl::bulk_traits< Data >::functor_t, ExecPolicy > closure_t
constexpr auto connect(Rcvr rcvr) &&noexcept(noexcept(MakeOpStateFn< Sndr, Rcvr, closure_t >{}(std::declval< Sndr >(), std::declval< Rcvr >(), std::declval< closure_t >()))) -> opstate_t< Sndr, Rcvr, closure_t >
Custom algorithm for the Kokkos::parallel_for construct.
Kokkos::DefaultExecutionSpace execution_space