kokkos-execution
0.0.1
Toggle main menu visibility
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
4
#include "
kokkos-execution/execution_space/execution_space_fwd.hpp
"
5
6
#include "
kokkos-execution/execution_space/diagnostics.hpp
"
7
#include "
kokkos-execution/execution_space/parallel_for.hpp
"
8
#include "
kokkos-execution/execution_space/sender_concepts.hpp
"
9
#include "
kokkos-execution/impl/bulk.hpp
"
10
#include "
kokkos-execution/impl/dispatch_label.hpp
"
11
#include "
kokkos-execution/impl/sender_introspection.hpp
"
12
13
namespace
Kokkos::Execution::ExecutionSpaceImpl
{
14
15
template
<>
16
struct
TransformSenderFor
<
stdexec
::bulk_t> {
17
template
<
typename
Env,
typename
Data,
typename
Sndr>
18
struct
Transformer
{
19
using
execution_space
=
Impl::exec_of_t<Sndr, Env>
;
20
21
using
functor_t
=
Impl::functor_for_bulk_t<Data>
;
22
using
iter_space_t
=
Impl::iter_space_for_bulk_t<Data>
;
23
using
make_policy_t
=
Impl::make_policy_for_bulk_t<execution_space, Data>
;
24
25
using
policy_t
=
Impl::make_policy_result_t<make_policy_t, iter_space_t>
;
26
27
using
data_t
=
Impl::ParallelForData<functor_t, policy_t, Impl::Label<std::string_view>
>;
28
29
using
sndr_t
=
ParallelForSender<stdexec::bulk_t, Sndr, execution_space, data_t>
;
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 =
37
{{
Impl::Label
{
KOKKOS_EXECUTION_IMPL_DISPATCH_LABEL
(
execution_space
,
": bulk"
)}},
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
{
56
return
no_execution_space_scheduler_in_env<stdexec::bulk_t, Sndr, Env>
();
57
}
58
};
59
60
}
// namespace Kokkos::Execution::ExecutionSpaceImpl
61
62
#endif
// KOKKOS_EXECUTION_EXECUTION_SPACE_BULK_HPP
Kokkos::Execution::ExecutionSpaceImpl::execution_space_completing_sender
Concept for a sender whose completion scheduler is Kokkos::Execution::ExecutionSpaceImpl::Scheduler.
Definition
sender_concepts.hpp:12
dispatch_label.hpp
KOKKOS_EXECUTION_IMPL_DISPATCH_LABEL
#define KOKKOS_EXECUTION_IMPL_DISPATCH_LABEL(_exec_, _suffix_)
Definition
dispatch_label.hpp:51
diagnostics.hpp
parallel_for.hpp
sender_concepts.hpp
execution_space_fwd.hpp
bulk.hpp
Kokkos::Execution::ExecutionSpaceImpl
Definition
execution_space.hpp:28
Kokkos::Execution::ExecutionSpaceImpl::no_execution_space_scheduler_in_env
auto no_execution_space_scheduler_in_env() noexcept
Show a better compile diagnostic when there is no Kokkos::Execution::ExecutionSpaceImpl::Scheduler fo...
Definition
diagnostics.hpp:26
Kokkos::Execution::Impl::iter_space_for_bulk_t
Kokkos::dims< 1, typename Impl::bulk_traits< Data >::shape_t > iter_space_for_bulk_t
Definition
bulk.hpp:43
Kokkos::Execution::Impl::functor_for_bulk_t
typename Impl::bulk_traits< Data >::functor_t functor_for_bulk_t
Definition
bulk.hpp:40
Kokkos::Execution::Impl::make_policy_result_t
std::invoke_result_t< const MakePolicy &, Args... > make_policy_result_t
Definition
make_policy.hpp:77
Kokkos::Execution::Impl::make_policy_for_bulk_t
Impl::make_policy_t< Exec, Kokkos::IndexType< typename Impl::bulk_traits< Data >::shape_t > > make_policy_for_bulk_t
Definition
bulk.hpp:37
Kokkos::Execution::Impl::exec_of_t
typename ExecOf< Args... >::type exec_of_t
Definition
get_exec.hpp:42
stdexec
Definition
when_all.hpp:16
sender_introspection.hpp
Kokkos::Execution::ExecutionSpaceImpl::ParallelForSender
Definition
parallel_for.hpp:40
Kokkos::Execution::ExecutionSpaceImpl::TransformSenderFor< stdexec::bulk_t >::Transformer
Definition
bulk.hpp:18
Kokkos::Execution::ExecutionSpaceImpl::TransformSenderFor< stdexec::bulk_t >::Transformer::iter_space_t
Impl::iter_space_for_bulk_t< Data > iter_space_t
Definition
bulk.hpp:22
Kokkos::Execution::ExecutionSpaceImpl::TransformSenderFor< stdexec::bulk_t >::Transformer::data_t
Impl::ParallelForData< functor_t, policy_t, Impl::Label< std::string_view > > data_t
Definition
bulk.hpp:27
Kokkos::Execution::ExecutionSpaceImpl::TransformSenderFor< stdexec::bulk_t >::Transformer::policy_t
Impl::make_policy_result_t< make_policy_t, iter_space_t > policy_t
Definition
bulk.hpp:25
Kokkos::Execution::ExecutionSpaceImpl::TransformSenderFor< stdexec::bulk_t >::Transformer::execution_space
Impl::exec_of_t< Sndr, Env > execution_space
Definition
bulk.hpp:19
Kokkos::Execution::ExecutionSpaceImpl::TransformSenderFor< stdexec::bulk_t >::Transformer::make_policy_t
Impl::make_policy_for_bulk_t< execution_space, Data > make_policy_t
Definition
bulk.hpp:23
Kokkos::Execution::ExecutionSpaceImpl::TransformSenderFor< stdexec::bulk_t >::Transformer::sndr_t
ParallelForSender< stdexec::bulk_t, Sndr, execution_space, data_t > sndr_t
Definition
bulk.hpp:29
Kokkos::Execution::ExecutionSpaceImpl::TransformSenderFor< stdexec::bulk_t >::Transformer::functor_t
Impl::functor_for_bulk_t< Data > functor_t
Definition
bulk.hpp:21
Kokkos::Execution::ExecutionSpaceImpl::TransformSenderFor< stdexec::bulk_t >::Transformer::operator()
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
Kokkos::Execution::ExecutionSpaceImpl::TransformSenderFor
Definition
execution_space_fwd.hpp:17
Kokkos::Execution::Impl::Label
Label property.
Definition
label.hpp:44
Kokkos::Execution::Impl::ParallelForData
Definition
parallel_for.hpp:116
kokkos-execution
execution_space
bulk.hpp
Generated on
for kokkos-execution by
1.18.0