kokkos-execution
0.0.1
Toggle main menu visibility
Loading...
Searching...
No Matches
domain.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_EXECUTION_IMPL_DOMAIN_HPP
2
#define KOKKOS_EXECUTION_IMPL_DOMAIN_HPP
3
4
#include "
kokkos-execution/stdexec.hpp
"
5
6
#include "
kokkos-execution/impl/type_info.hpp
"
7
8
#if defined(KOKKOS_EXECUTION_ENABLE_DEBUG_LOGGING)
9
# include "plog/Log.h"
10
#endif
11
12
namespace
Kokkos::Execution::Impl
{
13
14
template
<
typename
Domain,
template
<
typename
>
typename
ApplySenderForType>
15
struct
ApplySender
{
16
template
<
typename
Tag, stdexec::sender Sndr,
typename
... Args>
17
requires
stdexec::__callable<ApplySenderForType<Tag>, Sndr&&, Args&&...>
18
static
auto
apply_sender
(Tag, Sndr&& sndr, Args&&... args)
19
noexcept
(stdexec::__nothrow_callable<ApplySenderForType<Tag>, Sndr&&, Args&&...>) {
20
#if defined(KOKKOS_EXECUTION_ENABLE_DEBUG_LOGGING)
21
PLOG_DEBUG << Impl::display_string_of<Domain>() <<
": apply_sender for tag "
<<
Impl::display_string_of<Tag>
();
22
#endif
23
return
ApplySenderForType<Tag>{}(std::forward<Sndr>(sndr), std::forward<Args>(args)...);
24
}
25
};
26
27
template
<
typename
Domain,
template
<
typename
>
typename
TransformSenderForType>
28
struct
TransformSender
{
29
template
<stdexec::sender Sndr,
typename
Env>
30
requires
stdexec::__applicable<TransformSenderForType<stdexec::tag_of_t<Sndr>>, Sndr&&,
const
Env&>
31
static
auto
transform_sender
(stdexec::set_value_t, Sndr&& sndr,
const
Env& env)
32
noexcept
(stdexec::__nothrow_applicable<TransformSenderForType<stdexec::tag_of_t<Sndr>>, Sndr&&,
const
Env&>) {
33
#if defined(KOKKOS_EXECUTION_ENABLE_DEBUG_LOGGING)
34
PLOG_DEBUG << Impl::display_string_of<Domain>() <<
": transform_sender for tag "
35
<<
Impl::display_string_of<stdexec::tag_of_t<Sndr>
>();
36
#endif
37
return
stdexec::__apply(TransformSenderForType<stdexec::tag_of_t<Sndr>>{}, std::forward<Sndr>(sndr), env);
38
}
39
};
40
41
}
// namespace Kokkos::Execution::Impl
42
43
#endif
// KOKKOS_EXECUTION_IMPL_DOMAIN_HPP
stdexec.hpp
Kokkos::Execution::Impl
Definition
attributes.hpp:6
Kokkos::Execution::Impl::display_string_of
constexpr auto display_string_of() noexcept -> std::string_view
Definition
type_info.hpp:20
Kokkos::Execution::Impl::ApplySender
Definition
domain.hpp:15
Kokkos::Execution::Impl::ApplySender::apply_sender
static auto apply_sender(Tag, Sndr &&sndr, Args &&... args) noexcept(stdexec::__nothrow_callable< ApplySenderForType< Tag >, Sndr &&, Args &&... >)
Definition
domain.hpp:18
Kokkos::Execution::Impl::TransformSender
Definition
domain.hpp:28
Kokkos::Execution::Impl::TransformSender::transform_sender
static auto transform_sender(stdexec::set_value_t, Sndr &&sndr, const Env &env) noexcept(stdexec::__nothrow_applicable< TransformSenderForType< stdexec::tag_of_t< Sndr > >, Sndr &&, const Env & >)
Definition
domain.hpp:31
type_info.hpp
kokkos-execution
impl
domain.hpp
Generated on
for kokkos-execution by
1.18.0