|
Uni20
Asynchronous tensor and runtime library.
|
Move-only RAII lease exposing mutable and const immediate TensorViews. More...
#include <access.hpp>
Public Types | |
| using | access_state_type = AccessState |
| using | backend_selector_type = BackendSelector |
| using | const_mdspan_type = ConstMdspan |
| using | extents_type = typename mdspan_type::extents_type |
| using | index_type = typename mdspan_type::index_type |
| using | mdspan_type = MutableMdspan |
| using | storage_policy = StoragePolicy |
Public Member Functions | |
| backend_selector_type const & | backend_selector () const noexcept |
| Return the backend selector retained from the source tensor view. | |
| index_type | extent (std::size_t axis) const |
| Return one resolved tensor extent. | |
| extents_type const & | extents () const |
| Return the resolved tensor extents. | |
| mdspan_type & | mdspan () & |
| Return the resolved writable mdspan. | |
| mdspan_type | mdspan () &&=delete |
| const_mdspan_type const & | mdspan () const & |
| Return the resolved read-only mdspan. | |
| write_tensor_lease & | operator= (write_tensor_lease &&other) noexcept |
| write_tensor_lease & | operator= (write_tensor_lease const &)=delete |
| void | release () noexcept |
| End the access scope and make this lease inactive. | |
| write_tensor_lease (access_state_type state, mdspan_type mdspan, const_mdspan_type const_mdspan, backend_selector_type selector) noexcept | |
| Construct an active write lease. | |
| write_tensor_lease (write_tensor_lease &&other) noexcept | |
| write_tensor_lease (write_tensor_lease const &)=delete | |
| ~write_tensor_lease () | |
Static Public Member Functions | |
| static constexpr std::size_t | rank () noexcept |
| Return the static tensor rank. | |
Move-only RAII lease exposing mutable and const immediate TensorViews.
A non-const lease resolves a writable mdspan. Its const interface resolves a distinct const-element mdspan, preserving ImmediateTensorView shallow-const rules.
| MutableMdspan | Writable resolved mdspan type. |
| ConstMdspan | Read-only resolved mdspan type. |
| AccessState | RAII state retaining exclusive access. |
| BackendSelector | Backend list copied from the source tensor view. |
| StoragePolicy | Storage policy associated with the source tensor view. |
| using uni20::write_tensor_lease< MutableMdspan, ConstMdspan, AccessState, BackendSelector, StoragePolicy >::access_state_type = AccessState |
| using uni20::write_tensor_lease< MutableMdspan, ConstMdspan, AccessState, BackendSelector, StoragePolicy >::backend_selector_type = BackendSelector |
| using uni20::write_tensor_lease< MutableMdspan, ConstMdspan, AccessState, BackendSelector, StoragePolicy >::const_mdspan_type = ConstMdspan |
| using uni20::write_tensor_lease< MutableMdspan, ConstMdspan, AccessState, BackendSelector, StoragePolicy >::extents_type = typename mdspan_type::extents_type |
| using uni20::write_tensor_lease< MutableMdspan, ConstMdspan, AccessState, BackendSelector, StoragePolicy >::index_type = typename mdspan_type::index_type |
| using uni20::write_tensor_lease< MutableMdspan, ConstMdspan, AccessState, BackendSelector, StoragePolicy >::mdspan_type = MutableMdspan |
| using uni20::write_tensor_lease< MutableMdspan, ConstMdspan, AccessState, BackendSelector, StoragePolicy >::storage_policy = StoragePolicy |
|
inlinenoexcept |
Construct an active write lease.
|
delete |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
Return the backend selector retained from the source tensor view.
|
inline |
Return one resolved tensor extent.
|
inline |
Return the resolved tensor extents.
|
inline |
Return the resolved writable mdspan.
|
delete |
|
inline |
Return the resolved read-only mdspan.
|
inlinenoexcept |
|
delete |
|
inlinestaticconstexprnoexcept |
Return the static tensor rank.
|
inlinenoexcept |
End the access scope and make this lease inactive.
Invalidates both resolved mdspans before releasing the access state. Repeated calls have no effect.