28template <
class Alias>
class AsyncAliasWriteDescriptorAwaiter {
32 [[nodiscard]]
bool await_ready() const noexcept {
return output_->await_ready(); }
34 void await_suspend(
async::BasicTask task)
noexcept { output_->await_suspend(std::move(task)); }
36 [[nodiscard]] Alias
const& await_resume() {
return output_->await_resume().get(); }
39 [[nodiscard]]
auto node()
const {
return output_->node(); }
53 if constexpr (async::is_async_alias_v<Tensor>)
54 return AsyncAliasWriteDescriptorAwaiter<Tensor>{output};
63template <AsyncTensorOutput Tensor,
class Awaited>
64[[nodiscard]]
decltype(
auto) mutable_async_tensor_value(Awaited&& awaited)
66 if constexpr (async::is_async_alias_v<Tensor>)
68 return Tensor(std::forward<Awaited>(awaited));
78template <AsyncTensorOutput Tensor>
82 if constexpr (std::constructible_from<Tensor, uninitialized_t>)
84 else if constexpr (std::default_initializable<Tensor>)
The Async<T> container: coroutineāsafe asynchronous read/write.
Move-only promise-neutral ownership claim for a Uni20 coroutine.
Definition async_task.hpp:103
Exclusive mutable-access buffer for one Async<T> epoch.
Definition buffers.hpp:859
auto storage() &
Awaiter yielding direct access to writer shared storage.
Definition buffers.hpp:1029
Raised when a writer requests a mutable reference before construction.
Definition async_errors.hpp:74
A lightweight, thread-safe, reference-counted storage for a single object.
Definition shared_storage.hpp:94
bool constructed() const noexcept
Reports whether a value is currently constructed.
Definition shared_storage.hpp:234
T & emplace(Args &&... args)
Destroy any existing value and construct a new one in place.
Definition shared_storage.hpp:270
Coroutine scheduler for AsyncTask.
Capabilities shared by asynchronous Tensor operation wrappers.
Definition async/async.hpp:26
constexpr uninitialized_t uninitialized
Explicit allocation tag for overwrite outputs and scratch space.
Definition common/initialization.hpp:22
Tensor(InputTensor const &) -> Tensor< tensor_element_t< InputTensor >, tensor_mdspec_t< InputTensor >::rank(), HostStorage, detail::materialized_layout_t< void, tensor_mdspec_t< InputTensor > >, DefaultAccessorFactory >
Deduce a runtime-extents host tensor that materializes a tensor view.