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 Sndr,
19 std::string_view,
21 Kokkos::RangePolicy<exec_of_t<Sndr, Env>>
22 >;
23
24 template <
25 typename Env,
28 >
29 requires requires { typename exec_of_t<Sndr, Env>; }
31 const Env& env,
32 stdexec::bulk_t,
33 Data&& data, // NOLINT(cppcoreguidelines-missing-std-forward)
34 Sndr&& sndr) const
35 noexcept(std::is_nothrow_constructible_v<
39 Sndr&&
40 >) {
41 auto& [parallel_policy, shape, functor] = data;
42
43 auto schd = stdexec::get_completion_scheduler<stdexec::set_value_t>(stdexec::get_env(sndr), env);
44
48 stdexec::__forward_like<Data>(functor),
49 Kokkos::RangePolicy<exec_of_t<Sndr, Env>>(schd.state->exec, 0, shape)}},
50 std::forward<Sndr>(sndr)};
51 }
52};
53
54} // namespace Kokkos::Execution::ExecutionSpaceImpl
55
56#endif // KOKKOS_EXECUTION_EXECUTION_SPACE_BULK_HPP
Concept for a sender whose completion scheduler is Kokkos::Execution::ExecutionSpaceImpl::Scheduler.
See https://github.com/NVIDIA/stdexec/blob/16076a81efa4477513e6ede9c2741fd034ecef99/include/stdexec/_...
Definition bulk.hpp:10
typename stdexec::__completion_scheduler_of_t< stdexec::set_value_t, Sndr, Env >::execution_space exec_of_t
Type of the execution space extracted from a sender's completion scheduler.
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
ParallelForSender< Sndr, std::string_view, typename Kokkos::Execution::Impl::bulk_traits< Data >::functor_t, Kokkos::RangePolicy< exec_of_t< Sndr, Env > > > trnsfrmd_sndr_t
Definition bulk.hpp:17
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 >, parallel_for_t, typename trnsfrmd_sndr_t< Env, Data, Sndr >::closure_t &&, Sndr && >)
Definition bulk.hpp:30
Custom algorithm for the Kokkos::parallel_for construct.