Namespaces
Variants
Views
Actions

std::layout_stride::mapping

From cppreference.com
 
 
 
 
 
Defined in header <mdspan>
template< class Extents >
class layout_stride::mapping;
(since C++23)

The class template layout_stride::mapping controls how multidimensional indices are mapped with user-defined strides to a one-dimensional value representing the offset.

Every specialization of mapping is a LayoutMapping and a TriviallyCopyable type which satisfies regular.

The program is ill-formed if the size of the multidimensional index space Extents() is not representable as a value of type Extents::index_type when Extents::rank_dynamic() is 0.

Contents

[edit] Template parameters

Extents - specifies number of dimensions, their sizes, and which are known at compile time. Must be a specialization of std::extents.

[edit] Member types

Member type Definition
extents_type Extents
index_type extents_type::index_type
size_type extents_type::size_type
rank_type extents_type::rank_type
layout_type std::layout_stride

[edit] Member constants

Member Definition
constexpr rank_type rank_ (private) [static] extents_type::rank()
(exposition-only static member constant*)

[edit] Member objects

Member name Definition
extents_ (private) The extents of type extents_type.
(exposition-only member object*)
strides_ (private) The strides of type std::array<index_type, rank_>.
(exposition-only member object*)

[edit] Member functions

constructs a new mapping
(public member function) [edit]
assigns a mapping
(public member function) [edit]
Observers
obtains the extents object
(public member function) [edit]
obtains the array of strides
(public member function) [edit]
returns the required size of the mapping
(public member function) [edit]
maps multidimensional indices into an offset value
(public member function) [edit]
[static]
determines if this mapping is unique (every combination of indexes maps to a different underlying element)
(public static member function) [edit]
determines if this mapping is exhaustive (every underlying element can be accessed with some combination of indexes)
(public member function) [edit]
[static]
determines if this mapping is unique (every combination of indexes maps to a different underlying element)
(public static member function) [edit]
determines if this layout mapping is always unique
(public static member function) [edit]
determines if this layout mapping is always exhaustive
(public static member function) [edit]
determines if this layout mapping is always strided
(public static member function) [edit]
obtains the stride along the specified dimension
(public member function) [edit]

[edit] Non-member functions

compares this layout mapping with other mapping
(function template) [edit]
calculates the mapping and data handle offset used for subdmspan
(public member function) [edit]

[edit] See also

a layout mapping of layout_left
(public member class template of std::layout_left)[edit]
a layout mapping of layout_right
(public member class template of std::layout_right)[edit]