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
11
13
14template <>
15struct TransformSenderFor<stdexec::bulk_t> {
16 template <typename Env, typename Data, typename Sndr>
18 stdexec::bulk_t,
19 Sndr,
20 std::string_view,
22 Kokkos::RangePolicy<Impl::exec_of_t<Sndr, Env>>
23 >;
24
25 template <typename Env, Kokkos::Execution::Impl::has_parallel_policy Data, typename Sndr>
26 requires stdexec::__sends<stdexec::set_value_t, Sndr, Env>
28 const Env& env,
29 stdexec::bulk_t,
30 Data&& data, // NOLINT(cppcoreguidelines-missing-std-forward)
31 Sndr&& sndr) const
32 noexcept(std::is_nothrow_constructible_v<
35 Sndr&&
36 >) {
38 auto& [parallel_policy, shape, functor] = data;
39
40 auto schd = stdexec::get_completion_scheduler<stdexec::set_value_t>(stdexec::get_env(sndr), env);
41
44 stdexec::__forward_like<Data>(functor),
45 Kokkos::RangePolicy<Impl::exec_of_t<Sndr, Env>>(schd.state->exec, 0, shape)}},
46 std::forward<Sndr>(sndr)};
47 } else {
49 }
50 }
51};
52
53} // namespace Kokkos::Execution::ExecutionSpaceImpl
54
55#endif // KOKKOS_EXECUTION_EXECUTION_SPACE_BULK_HPP
Concept for a sender whose completion scheduler is Kokkos::Execution::ExecutionSpaceImpl::Scheduler.
auto no_execution_space_scheduler_in_env() noexcept
Show a better compile diagnostic when there is no Kokkos::Execution::ExecutionSpaceImpl::Scheduler fo...
BulkTraits< std::remove_cvref_t< Data > > bulk_traits
Definition bulk.hpp:26
consteval std::string_view dispatch_label() noexcept
View the dispatch label as a std::string_view.
ParallelForClosure< Label, Functor, ExecPolicy > closure_t
auto operator()(const Env &env, stdexec::bulk_t, Data &&data, Sndr &&sndr) const noexcept(std::is_nothrow_constructible_v< trnsfrmd_sndr_t< Env, Data, Sndr >, typename trnsfrmd_sndr_t< Env, Data, Sndr >::closure_t &&, Sndr && >)
Definition bulk.hpp:27
ParallelForSender< stdexec::bulk_t, Sndr, std::string_view, typename Kokkos::Execution::Impl::bulk_traits< Data >::functor_t, Kokkos::RangePolicy< Impl::exec_of_t< Sndr, Env > > > trnsfrmd_sndr_t
Definition bulk.hpp:17