kokkos-execution 0.0.1
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
5
7
15template <stdexec::sender Sndr>
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
Filter queries on a sender to allow forwarding queries only.
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... >