std::layout_left::mapping(3)
π std::layout_left::mapping(3) β C++ Standard Libary π
πΈ NAME πΈ
std::layout_left::mapping β std::layout_left::mapping
β¨ Synopsis β¨
Defined in header <mdspan>
template< class Extents > (since C++23)
class layout_left::mapping;
Okay so the class template layout_left::mapping controls how multidimensional indices are mapped in a column-major manner to a one-dimensional value representing the offset. The mapping has stride 1 at leftmost extent and strides increase left-to-right as the products of extents. Itβs giving column-major main character energy, no cap. π₯
Every specialization of mapping is a LayoutMapping and a TriviallyCopyable type which satisfies regular. π
π¨ Heads up, bestie: the program is ill-formed if the size of the multidimensional index spaceExtents()is not representable as a value of typeExtents::index_typewhenExtents::rank_dynamic()is0. Thatβs a hard error, fr fr. π
π§ Template parameters π§
Extentsβ specifies number of dimensions, their sizes, and which are known at compile time. Must be a specialization ofstd::extents.
π Member types π
Member type β definition, slay:
extents_typeβExtentsindex_typeβextents_type::index_typesize_typeβextents_type::size_typerank_typeβextents_type::rank_typelayout_typeβstd::layout_left
π Member objects π
extents_(private) β The extents of typeextents_type. (exposition-only member object*)
π¦ Member functions π¦
constructorβ constructs a new mapping (public member function)operator=β assigns a mapping (public member function)
π₯ Observers π₯
extentsβ obtains the extents object (public member function)required_span_sizeβ returns the required size of the mapping (public member function)operator()β maps multidimensional indices into an offset value (public member function)is_unique[static] β determines if this mapping is unique (every combination of indexes maps to a different underlying element) (public static member function)is_exhaustive[static] β determines if this mapping is exhaustive (every underlying element can be accessed with some combination of indexes) (public static member function)is_strided[static] β determines if this mapping is unique (every combination of indexes maps to a different underlying element) (public static member function)is_always_unique[static] β determines if this layout mapping is always unique (public static member function)is_always_exhaustive[static] β determines if this layout mapping is always exhaustive (public static member function)is_always_strided[static] β determines if this layout mapping is always strided (public static member function)strideβ obtains the stride along the specified dimension (public member function)
π Non-member functions π
operator==β compares this layout mapping with other mapping (function template)submdspan_mapping(std::layout_left::mapping)(C++26) β calculates the mapping and data handle offset used forsubdmspan(public member function)
π See also π
mappingβ a layout mapping oflayout_right(public member class template ofstd::layout_right)mappingβ a layout mapping oflayout_stride(public member class template ofstd::layout_stride)
Source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::layout_left::mapping(3). Byeee, bestie πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms