Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
linalg/async/concepts.hpp
Go to the documentation of this file.
1#pragma once
2
13
14#include <concepts>
15#include <type_traits>
16#include <utility>
17
18namespace uni20
19{
20
24template <class Tensor>
26 MutableTensorView<Tensor> && (!async::is_async_alias_v<Tensor> || std::copy_constructible<Tensor>);
27
28} // namespace uni20
29
30namespace uni20::linalg
31{
32namespace detail
33{
34
35template <class Scalar>
36using async_operation_scalar_awaiter_t = std::remove_cvref_t<decltype(async::read(std::declval<Scalar>()))>;
37
38} // namespace detail
39
43template <class Value, class Scalar>
45 requires(detail::async_operation_scalar_awaiter_t<Value>& awaiter) {
46 requires OperationScalar<decltype(awaiter.await_resume()), Scalar>;
47 };
48
49} // namespace uni20::linalg
The Async<T> container: coroutine‐safe asynchronous read/write.
Utilities for awaiting on Async<T>: co_await overload, all(), try_await().
Mutable Tensor output supported by async operation wrappers.
Definition linalg/async/concepts.hpp:25
TensorView whose writable mdspec supports eventual element assignment.
Definition tensor/concepts.hpp:133
Concept for numeric scalar types (integer, real, or complex).
Definition scalar_concepts.hpp:81
Concept for awaitables that accept promise-neutral task ownership.
Definition async_task_promise.hpp:61
Scalar argument that an async wrapper can await and convert.
Definition linalg/async/concepts.hpp:44
Numeric argument that an operation can convert to its scalar type.
Definition operation_scalar.hpp:22
Definition linalg/async.hpp:28
Definition async/async.hpp:26
Numeric coefficient sources shared by synchronous and asynchronous operations.
Concepts for tensor-level objects that resolve mdspan kernel operands.