|
| using | extents_type = Extents |
| | This mapping's extents type.
|
| |
| using | index_type = typename extents_type::index_type |
| | The index type of this mapping.
|
| |
| using | layout_type = layout_transpose |
| | The tag type of the layout used by this mapping.
|
| |
| using | nested_mapping_type = typename NestedLayout::template mapping<mdspan_detail::reverse_extents_t<extents_type>> |
| | The wrapped (un-transposed) mapping type.
|
| |
| using | rank_type = typename extents_type::rank_type |
| | The rank type of this mapping.
|
| |
| using | size_type = typename extents_type::size_type |
| | The size type of this mapping.
|
| |
|
| constexpr | mapping (nested_mapping_type const &nested) noexcept |
| | Construct a transposed mapping from a nested mapping.
|
| |
| constexpr auto | extents () const noexcept -> extents_type const & |
| | Obtain the (transposed) extents of this mapping.
|
| |
| constexpr auto | is_exhaustive () const noexcept -> bool |
| | Determine if this mapping is exhaustive.
|
| |
| constexpr auto | is_strided () const noexcept -> bool |
| | Determine if this mapping is strided.
|
| |
| constexpr auto | is_unique () const noexcept -> bool |
| | Determine if this mapping is unique.
|
| |
| constexpr auto | nested_mapping () const noexcept -> nested_mapping_type const & |
| | Obtain the wrapped (un-transposed) mapping.
|
| |
| template<class Index0, class Index1> |
| constexpr auto | operator() (Index0 index0, Index1 index1) const noexcept -> index_type |
| | Access the flat element index for the given two-dimensional index.
|
| |
| constexpr auto | required_span_size () const noexcept -> index_type |
| | Obtain the required span size.
|
| |
| constexpr auto | stride (rank_type rank_index) const noexcept -> index_type |
| | Obtain the stride along the specified (transposed) dimension.
|
| |
|
| template<class OtherExtents, std::enable_if_t< is_equality_comparable_v< nested_mapping_type, typename mapping< OtherExtents >::nested_mapping_type > &&extents_type::rank()==OtherExtents::rank(), bool > = true> |
| constexpr auto | operator!= (mapping const left, mapping< OtherExtents > const right) noexcept -> bool |
| | Compare two transposed mappings for inequality.
|
| |
| template<class OtherExtents, std::enable_if_t< is_equality_comparable_v< nested_mapping_type, typename mapping< OtherExtents >::nested_mapping_type > &&extents_type::rank()==OtherExtents::rank(), bool > = true> |
| constexpr auto | operator== (mapping const left, mapping< OtherExtents > const right) noexcept -> bool |
| | Compare two transposed mappings for equality.
|
| |
| template<class CanonicalSlice0, class CanonicalSlice1, class Mapping = mapping> |
| constexpr auto | submdspan_mapping (mapping const src, CanonicalSlice0 slice0, CanonicalSlice1 slice1) noexcept(noexcept(transpose_result(mdspan_detail::do_submdspan_mapping(std::declval< Mapping const & >().nested_mapping(), std::move(std::declval< CanonicalSlice1 >()), std::move(std::declval< CanonicalSlice0 >()))))) -> |
| | Compute the sub-mapping and offset for a transposed mapping.
|
| |
template<class NestedLayout>
template<class Extents>
class arene::base::linalg::layout_transpose< NestedLayout >::mapping< Extents >
The mapping type produced by layout_transpose for a given set of extents.
- Template Parameters
-
| The | extents of the space used for this mapping |
- Note
- Mandates
template<class NestedLayout>
template<class Extents>
template<class CanonicalSlice0, class CanonicalSlice1, class Mapping = mapping>
| auto submdspan_mapping |
( |
mapping< Extents > const | src, |
|
|
CanonicalSlice0 | slice0, |
|
|
CanonicalSlice1 | slice1 ) -> |
|
friend |
Compute the sub-mapping and offset for a transposed mapping.
- Template Parameters
-
| CanonicalSlice0 | The type of the slice specifier for the first (transposed) dimension |
| CanonicalSlice1 | The type of the slice specifier for the second (transposed) dimension |
| Mapping | Defaulted to mapping so the trailing return type can be SFINAE-friendly |
- Parameters
-
| src | The source transposed mapping to slice |
| slice0 | The slice specifier for the first (transposed) dimension |
| slice1 | The slice specifier for the second (transposed) dimension |
- Returns
- A
submdspan_mapping_result obtained by slicing the nested mapping with the slices reversed, then re-transposing a rank-2 result
Because layout_transpose swaps the two dimensions, slicing dimension 0 of the transpose is equivalent to slicing dimension 1 of the nested mapping. The slices are therefore reversed and forwarded to the nested mapping's own submdspan_mapping via do_submdspan_mapping. The resulting sub-mapping is re-transposed if it is still rank 2.