Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
uni20::TensorAccessState Concept Reference

Movable state retaining one acquired tensor data-handle lifetime. More...

#include <access.hpp>

Concept definition

template<class State>
concept uni20::TensorAccessState = std::move_constructible<State> && std::is_nothrow_move_constructible_v<State> &&
requires(State& state) {
{ state.release() } noexcept;
}
Movable state retaining one acquired tensor data-handle lifetime.
Definition access.hpp:29

Detailed Description

Movable state retaining one acquired tensor data-handle lifetime.

release() must be idempotent: its first call ends active access, and later calls have no effect. Moving an active state transfers that responsibility and leaves the source inactive, so releasing or destroying the moved-from state has no effect. Move construction must not throw because leases transfer this state together with the resolved mdspan that depends on it.

Template Parameters
StateAccess-state type under test.