kokkos-execution
0.0.1
Toggle main menu visibility
Loading...
Searching...
No Matches
attributes.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_EXECUTION_IMPL_ATTRIBUTES_HPP
2
#define KOKKOS_EXECUTION_IMPL_ATTRIBUTES_HPP
3
4
#include "
kokkos-execution/stdexec.hpp
"
5
6
namespace
Kokkos::Execution::Impl
{
7
15
template
<stdexec::sender Sndr>
16
struct
ForwardingAttributes
{
17
template
<stdexec::__forwarding_query Query,
typename
... Args>
18
requires
stdexec::__queryable_with<stdexec::env_of_t<Sndr>, Query, Args...>
19
[[nodiscard]]
20
constexpr
auto
query
(Query, Args&&... args)
const
21
noexcept
(stdexec::__nothrow_queryable_with<stdexec::env_of_t<Sndr>, Query, Args...>)
22
-> stdexec::__query_result_t<stdexec::env_of_t<Sndr>, Query, Args...> {
23
return
stdexec::__query<Query>()(stdexec::get_env(
sndr
), std::forward<Args>(args)...);
24
}
25
26
Sndr
const
&
sndr
;
// NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
27
};
28
29
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
30
#define KOKKOS_EXECUTION_IMPL_FORWARDING_ATTRIBUTES_GET_ENV(_type_, _obj_) \
31
[[nodiscard]] \
32
constexpr auto get_env() const noexcept -> Kokkos::Execution::Impl::ForwardingAttributes<_type_> { \
33
return {_obj_}; \
34
}
35
36
}
// namespace Kokkos::Execution::Impl
37
38
#endif
// KOKKOS_EXECUTION_IMPL_ATTRIBUTES_HPP
stdexec.hpp
Kokkos::Execution::Impl
Definition
attributes.hpp:6
Kokkos::Execution::Impl::ForwardingAttributes
Filter queries on a sender to allow forwarding queries only.
Definition
attributes.hpp:16
Kokkos::Execution::Impl::ForwardingAttributes::sndr
Sndr const & sndr
Definition
attributes.hpp:26
Kokkos::Execution::Impl::ForwardingAttributes::query
constexpr auto query(Query, Args &&... args) const noexcept(stdexec::__nothrow_queryable_with< stdexec::env_of_t< Sndr >, Query, Args... >) -> stdexec::__query_result_t< stdexec::env_of_t< Sndr >, Query, Args... >
Definition
attributes.hpp:20
kokkos-execution
impl
attributes.hpp
Generated on
for kokkos-execution by
1.18.0