|
Uni20
Asynchronous tensor and runtime library.
|
Store a data descriptor with the mapping and accessor for an eventual mdspan. More...
#include <mdspec.hpp>
Public Types | |
| using | accessor_type = Accessor |
| using | data_descriptor_type = DataDescriptor |
| using | data_handle_type = typename accessor_type::data_handle_type |
| using | element_type = ElementType |
| using | extents_type = Extents |
| using | index_type = typename extents_type::index_type |
| using | layout_type = LayoutPolicy |
| using | mapping_type = typename layout_type::template mapping< extents_type > |
| using | rank_type = typename extents_type::rank_type |
| using | reference = typename accessor_type::reference |
| using | size_type = typename extents_type::size_type |
| using | value_type = std::remove_cv_t< element_type > |
Public Member Functions | |
| constexpr auto | accessor () const noexcept -> accessor_type const & |
| Return the stored accessor policy. | |
| constexpr auto | data_descriptor () const noexcept -> data_descriptor_type const & |
| Return the descriptor used to acquire read-only data access. | |
| constexpr auto | data_descriptor () noexcept -> data_descriptor_type & |
| Return the descriptor used to acquire writable data access. | |
| constexpr index_type | extent (rank_type axis) const noexcept |
| Return the runtime extent of one axis. | |
| constexpr auto | extents () const noexcept -> extents_type const & |
| Return the stored extents. | |
| constexpr bool | is_exhaustive () const noexcept |
| Report whether this mapping is exhaustive. | |
| constexpr bool | is_strided () const noexcept |
| Report whether this mapping is strided. | |
| constexpr bool | is_unique () const noexcept |
| Report whether this mapping is unique. | |
| constexpr auto | mapping () const noexcept -> mapping_type const & |
| Return the stored layout mapping. | |
| constexpr | mdspec (data_descriptor_type descriptor, mapping_type mapping, accessor_type accessor) |
| Construct unresolved mdspan metadata from its three stored components. | |
| constexpr index_type | stride (rank_type axis) const |
| Return the stride for one axis when the mapping exposes strides. | |
Static Public Member Functions | |
| static constexpr bool | is_always_exhaustive () noexcept |
| Report whether every mapping of this type is exhaustive. | |
| static constexpr bool | is_always_strided () noexcept |
| Report whether every mapping of this type is strided. | |
| static constexpr bool | is_always_unique () noexcept |
| Report whether every mapping of this type is unique. | |
| static constexpr rank_type | rank () noexcept |
| Return the static rank. | |
| static constexpr rank_type | rank_dynamic () noexcept |
| Return the number of dynamic extents. | |
| static constexpr std::size_t | static_extent (rank_type axis) noexcept |
| Return the compile-time extent for one axis. | |
Store a data descriptor with the mapping and accessor for an eventual mdspan.
Unlike an mdspan, this type has no data-handle value and provides no element indexing. Domain-specific access acquisition uses data_descriptor(), then combines the acquired handle with mapping() and accessor() to construct a genuine mdspan.
| ElementType | Element type presented by the eventual mdspan. |
| Extents | Extents type of the eventual mdspan. |
| LayoutPolicy | Layout policy whose mapping is stored. |
| Accessor | Accessor policy stored for the eventual mdspan. |
| DataDescriptor | Descriptor identifying the region from which a handle can be acquired. |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::accessor_type = Accessor |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::data_descriptor_type = DataDescriptor |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::data_handle_type = typename accessor_type::data_handle_type |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::element_type = ElementType |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::extents_type = Extents |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::index_type = typename extents_type::index_type |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::layout_type = LayoutPolicy |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::mapping_type = typename layout_type::template mapping<extents_type> |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::rank_type = typename extents_type::rank_type |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::reference = typename accessor_type::reference |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::size_type = typename extents_type::size_type |
| using uni20::mdspec< ElementType, Extents, LayoutPolicy, Accessor, DataDescriptor >::value_type = std::remove_cv_t<element_type> |
|
inlineexplicitconstexpr |
Construct unresolved mdspan metadata from its three stored components.
| descriptor | Descriptor used by later access acquisition. |
| mapping | Mapping installed in the eventual mdspan. |
| accessor | Accessor installed in the eventual mdspan. |
|
inlineconstexprnoexcept |
Return the stored accessor policy.
|
inlineconstexprnoexcept |
Return the descriptor used to acquire read-only data access.
|
inlineconstexprnoexcept |
Return the descriptor used to acquire writable data access.
|
inlineconstexprnoexcept |
Return the runtime extent of one axis.
| axis | Axis whose extent is requested. |
|
inlineconstexprnoexcept |
Return the stored extents.
|
inlinestaticconstexprnoexcept |
Report whether every mapping of this type is exhaustive.
|
inlinestaticconstexprnoexcept |
Report whether every mapping of this type is strided.
|
inlinestaticconstexprnoexcept |
Report whether every mapping of this type is unique.
|
inlineconstexprnoexcept |
Report whether this mapping is exhaustive.
|
inlineconstexprnoexcept |
Report whether this mapping is strided.
|
inlineconstexprnoexcept |
Report whether this mapping is unique.
|
inlineconstexprnoexcept |
Return the stored layout mapping.
|
inlinestaticconstexprnoexcept |
Return the static rank.
|
inlinestaticconstexprnoexcept |
Return the number of dynamic extents.
|
inlinestaticconstexprnoexcept |
Return the compile-time extent for one axis.
| axis | Axis whose static extent is requested. |
|
inlineconstexpr |
Return the stride for one axis when the mapping exposes strides.
| axis | Axis whose stride is requested. |