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_TypeInfo.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 << Kokkos::Impl::TypeInfo<Domain>::name() <<
": apply_sender for tag "
22
<< Kokkos::Impl::TypeInfo<Tag>::name();
23
#endif
24
return
ApplySenderForType<Tag>{}(std::forward<Sndr>(sndr), std::forward<Args>(args)...);
25
}
26
};
27
28
template
<
typename
Domain,
template
<
typename
>
typename
TransformSenderForType>
29
struct
TransformSender
{
30
template
<stdexec::sender Sndr,
typename
Env>
31
requires
stdexec::__applicable<TransformSenderForType<stdexec::tag_of_t<Sndr>>, Sndr&&,
const
Env&>
32
static
auto
transform_sender
(stdexec::set_value_t, Sndr&& sndr,
const
Env& env)
33
noexcept
(stdexec::__nothrow_applicable<TransformSenderForType<stdexec::tag_of_t<Sndr>>, Sndr&&,
const
Env&>) {
34
#if defined(KOKKOS_EXECUTION_ENABLE_DEBUG_LOGGING)
35
PLOG_DEBUG << Kokkos::Impl::TypeInfo<Domain>::name() <<
": transform_sender for tag "
36
<< Kokkos::Impl::TypeInfo<stdexec::tag_of_t<Sndr>>::name();
37
#endif
38
return
stdexec::__apply(TransformSenderForType<stdexec::tag_of_t<Sndr>>{}, std::forward<Sndr>(sndr), env);
39
}
40
};
41
42
}
// namespace Kokkos::Execution::Impl
43
44
#endif
// KOKKOS_EXECUTION_IMPL_DOMAIN_HPP
stdexec.hpp
Kokkos::Execution::Impl
Definition
attributes.hpp:6
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:29
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:32
kokkos-execution
impl
domain.hpp
Generated on
for kokkos-execution by
1.18.0