|
Uni20
Asynchronous tensor and runtime library.
|
TensorView materialization over writable and read-only mdspec values. More...
#include <mdspec_tensor_view.hpp>
Public Types | |
| using | backend_selector_type = std::remove_cvref_t< decltype(storage_policy::backend_selector())> |
| using | const_mdspec_type = ConstMdspec |
| using | element_type = typename mutable_mdspec_type::element_type |
| using | extents_type = typename mutable_mdspec_type::extents_type |
| using | index_type = typename extents_type::index_type |
| using | mutable_mdspec_type = MutableMdspec |
| using | storage_policy = StoragePolicy |
| using | value_type = std::remove_cv_t< element_type > |
Public Member Functions | |
| constexpr auto | extent (std::size_t axis) const noexcept -> index_type |
| Return one dense-block extent. | |
| constexpr auto | extents () const noexcept -> extents_type const & |
| Return the dense-block extents. | |
| constexpr auto | mdspan () &-> mutable_mdspec_type |
| Return the writable mdspan when the metadata is immediate. | |
| constexpr auto | mdspan () const &-> const_mdspec_type |
| Return the read-only mdspan when the metadata is immediate. | |
| constexpr auto | mdspec () &-> mutable_mdspec_type |
| Return writable immediate or descriptor-backed metadata. | |
| constexpr auto | mdspec () const &-> const_mdspec_type |
| Return read-only immediate or descriptor-backed metadata. | |
| constexpr | MdspecTensorView (mutable_mdspec_type mutable_mdspec, const_mdspec_type const_mdspec) |
| Construct a tensor view from writable and read-only metadata. | |
| template<class... Index> requires MdspanLike<mutable_mdspec_type> && (sizeof...(Index) == extents_type::rank()) | |
| constexpr decltype(auto) | operator[] (Index... indices) |
| Evaluate or assign one element when writable metadata is immediate. | |
| template<class... Index> requires MdspanLike<const_mdspec_type> && (sizeof...(Index) == extents_type::rank()) | |
| constexpr decltype(auto) | operator[] (Index... indices) const |
| Evaluate one element when read-only metadata is immediate. | |
| constexpr auto | stride (std::size_t axis) const -> index_type |
| Return one dense-block stride when the mapping is strided. | |
Static Public Member Functions | |
| static constexpr auto | backend_selector () noexcept -> backend_selector_type |
| Return the dense storage policy's default backend selector. | |
| static constexpr std::size_t | rank () noexcept |
| Return the static dense-block rank. | |
TensorView materialization over writable and read-only mdspec values.
The view owns multidimensional metadata but not the described element storage. Its storage policy supplies tensor-level backend selection; access acquisition remains governed by the stored mdspec data descriptor.
| MutableMdspec | Metadata exposed through the mutable interface. |
| ConstMdspec | Read-only metadata exposed through the const interface. |
| StoragePolicy | Dense storage policy associated with the metadata. |
| using uni20::MdspecTensorView< MutableMdspec, ConstMdspec, StoragePolicy >::backend_selector_type = std::remove_cvref_t<decltype(storage_policy::backend_selector())> |
| using uni20::MdspecTensorView< MutableMdspec, ConstMdspec, StoragePolicy >::const_mdspec_type = ConstMdspec |
| using uni20::MdspecTensorView< MutableMdspec, ConstMdspec, StoragePolicy >::element_type = typename mutable_mdspec_type::element_type |
| using uni20::MdspecTensorView< MutableMdspec, ConstMdspec, StoragePolicy >::extents_type = typename mutable_mdspec_type::extents_type |
| using uni20::MdspecTensorView< MutableMdspec, ConstMdspec, StoragePolicy >::index_type = typename extents_type::index_type |
| using uni20::MdspecTensorView< MutableMdspec, ConstMdspec, StoragePolicy >::mutable_mdspec_type = MutableMdspec |
| using uni20::MdspecTensorView< MutableMdspec, ConstMdspec, StoragePolicy >::storage_policy = StoragePolicy |
| using uni20::MdspecTensorView< MutableMdspec, ConstMdspec, StoragePolicy >::value_type = std::remove_cv_t<element_type> |
|
inlineconstexpr |
Construct a tensor view from writable and read-only metadata.
|
inlinestaticconstexprnoexcept |
Return the dense storage policy's default backend selector.
|
inlineconstexprnoexcept |
Return one dense-block extent.
|
inlineconstexprnoexcept |
Return the dense-block extents.
|
inlineconstexpr |
Return the writable mdspan when the metadata is immediate.
|
inlineconstexpr |
Return the read-only mdspan when the metadata is immediate.
|
inlineconstexpr |
Return writable immediate or descriptor-backed metadata.
|
inlineconstexpr |
Return read-only immediate or descriptor-backed metadata.
|
inlineconstexpr |
Evaluate or assign one element when writable metadata is immediate.
|
inlineconstexpr |
Evaluate one element when read-only metadata is immediate.
|
inlinestaticconstexprnoexcept |
Return the static dense-block rank.
|
inlineconstexpr |
Return one dense-block stride when the mapping is strided.