kokkos-execution 0.0.1
Loading...
Searching...
No Matches
Kokkos::Execution::Impl::SyncWait::SyncWait Struct Reference

#include <sync_wait.hpp>

Public Types

template<typename Sndr>
using sends_error = std::bool_constant<stdexec::__sends<stdexec::set_error_t, Sndr, env>>
template<typename Sndr>
using result_t = stdexec::__sync_wait::__value_tuple_for_t<Sndr>
template<typename Sndr>
using receiver_t = Receiver<Impl::exec_of_t<Sndr, env>, sends_error<Sndr>, result_t<Sndr>>

Public Member Functions

template<stdexec::sender Sndr>
auto operator() (Sndr &&sndr) const noexcept(!sends_error< Sndr && >::value &&is_nothrow_connectable< Sndr && >) -> std::optional< result_t< Sndr && > >

Static Public Attributes

template<typename Sndr>
static constexpr bool is_nothrow_connectable = stdexec::__nothrow_connectable<Sndr, receiver_t<Sndr>>

Detailed Description

Definition at line 92 of file sync_wait.hpp.

Member Typedef Documentation

◆ receiver_t

template<typename Sndr>
using Kokkos::Execution::Impl::SyncWait::SyncWait::receiver_t = Receiver<Impl::exec_of_t<Sndr, env>, sends_error<Sndr>, result_t<Sndr>>

Definition at line 100 of file sync_wait.hpp.

◆ result_t

template<typename Sndr>
using Kokkos::Execution::Impl::SyncWait::SyncWait::result_t = stdexec::__sync_wait::__value_tuple_for_t<Sndr>

Definition at line 97 of file sync_wait.hpp.

◆ sends_error

template<typename Sndr>
using Kokkos::Execution::Impl::SyncWait::SyncWait::sends_error = std::bool_constant<stdexec::__sends<stdexec::set_error_t, Sndr, env>>

Definition at line 94 of file sync_wait.hpp.

Member Function Documentation

◆ operator()()

template<stdexec::sender Sndr>
auto Kokkos::Execution::Impl::SyncWait::SyncWait::operator() ( Sndr && sndr) const -> std::optional< result_t< Sndr && > >
inlinenoexcept

According to https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2300r10.html#spec-execution.senders.consumers.sync_wait, it has to return an engaged optional (on the value channel).

See https://github.com/NVIDIA/stdexec/blob/45c0f5803c190366a8529833901d1f6340b40d2e/include/stdexec/__detail/__run_loop.hpp#L50.

The run-loop must be started on the thread on which the operation state is started, so that the stdexec::get_start_scheduler query holds by construction.

Definition at line 110 of file sync_wait.hpp.

References is_nothrow_connectable.

Member Data Documentation

◆ is_nothrow_connectable

template<typename Sndr>
bool Kokkos::Execution::Impl::SyncWait::SyncWait::is_nothrow_connectable = stdexec::__nothrow_connectable<Sndr, receiver_t<Sndr>>
staticconstexpr

Definition at line 103 of file sync_wait.hpp.


The documentation for this struct was generated from the following file:
  • /__w/kokkos-execution/kokkos-execution/kokkos-execution/impl/sync_wait.hpp