kokkos-execution 0.0.1
Loading...
Searching...
No Matches
bulk.hpp
Go to the documentation of this file.
1#ifndef KOKKOS_EXECUTION_EXECUTION_SPACE_BULK_HPP
2#define KOKKOS_EXECUTION_EXECUTION_SPACE_BULK_HPP
3
5
12
14
15template <>
16struct TransformSenderFor<stdexec::bulk_t> {
17 template <typename Env, typename Data, typename Sndr>
18 struct Transformer {
20
24
26
28
30
31 auto operator()(const Env& env, std::remove_reference_t<Data>& data, std::remove_reference_t<Sndr>& sndr) const
32 STDEXEC_AUTO_RETURN(
33 sndr_t{
34 {.state = stdexec::get_completion_scheduler<stdexec::set_value_t>(stdexec::get_env(sndr), env)
35 .state,
36 .data =
38 stdexec::__forward_like<Data>(data.__fun_),
39 make_policy_t{}(iter_space_t(stdexec::__forward_like<Data>(data.__shape_)))}},
40 std::forward<Sndr>(sndr)
41 })
42 };
43
44 template <typename Env, Impl::has_parallel_policy Data, typename Sndr>
45 requires(stdexec::__sends<stdexec::set_value_t, Sndr, Env> && execution_space_completing_sender<Sndr, Env>)
46 auto operator()(
47 const Env& env,
48 stdexec::bulk_t,
49 Data&& data, // NOLINT(cppcoreguidelines-missing-std-forward)
50 Sndr&& sndr // NOLINT(cppcoreguidelines-missing-std-forward)
51 ) const STDEXEC_AUTO_RETURN(Transformer<Env, Data, Sndr>{}(env, data, sndr))
52
53 template <typename Env, Kokkos::Execution::Impl::has_parallel_policy Data, typename Sndr>
54 requires stdexec::__sends<stdexec::set_value_t, Sndr, Env>
55 auto operator()(const Env&, stdexec::bulk_t, Data&&, Sndr&&) const noexcept {
57 }
58};
59
60} // namespace Kokkos::Execution::ExecutionSpaceImpl
61
62#endif // KOKKOS_EXECUTION_EXECUTION_SPACE_BULK_HPP
Concept for a sender whose completion scheduler is Kokkos::Execution::ExecutionSpaceImpl::Scheduler.
#define KOKKOS_EXECUTION_IMPL_DISPATCH_LABEL(_exec_, _suffix_)
auto no_execution_space_scheduler_in_env() noexcept
Show a better compile diagnostic when there is no Kokkos::Execution::ExecutionSpaceImpl::Scheduler fo...
Kokkos::dims< 1, typename Impl::bulk_traits< Data >::shape_t > iter_space_for_bulk_t
Definition bulk.hpp:43
typename Impl::bulk_traits< Data >::functor_t functor_for_bulk_t
Definition bulk.hpp:40
std::invoke_result_t< const MakePolicy &, Args... > make_policy_result_t
Impl::make_policy_t< Exec, Kokkos::IndexType< typename Impl::bulk_traits< Data >::shape_t > > make_policy_for_bulk_t
Definition bulk.hpp:37
typename ExecOf< Args... >::type exec_of_t
Definition get_exec.hpp:42
Impl::ParallelForData< functor_t, policy_t, Impl::Label< std::string_view > > data_t
Definition bulk.hpp:27
Impl::make_policy_result_t< make_policy_t, iter_space_t > policy_t
Definition bulk.hpp:25
Impl::make_policy_for_bulk_t< execution_space, Data > make_policy_t
Definition bulk.hpp:23
ParallelForSender< stdexec::bulk_t, Sndr, execution_space, data_t > sndr_t
Definition bulk.hpp:29
auto operator()(const Env &env, std::remove_reference_t< Data > &data, std::remove_reference_t< Sndr > &sndr) const noexcept(noexcept(sndr_t{ {.state=stdexec::get_completion_scheduler< stdexec::set_value_t >(stdexec::get_env(sndr), env) .state,.data={{Impl::Label{ Kokkos::Execution::Impl::dispatch_label< execution_space, ": bulk">()}}, stdexec::__forward_like< Data >(data.__fun_), make_policy_t{}(iter_space_t(stdexec::__forward_like< Data >(data.__shape_)))}}, std::forward< Sndr >(sndr) })) -> decltype(sndr_t{ {.state=stdexec::get_completion_scheduler< stdexec::set_value_t >(stdexec::get_env(sndr), env) .state,.data={{Impl::Label{ Kokkos::Execution::Impl::dispatch_label< execution_space, ": bulk">()}}, stdexec::__forward_like< Data >(data.__fun_), make_policy_t{}(iter_space_t(stdexec::__forward_like< Data >(data.__shape_)))}}, std::forward< Sndr >(sndr) })
Definition bulk.hpp:31