23 Containers library [containers]

23.7 Views [views]

23.7.3 Multidimensional access [views.multidim]

23.7.3.4 Layout mapping [mdspan.layout]

23.7.3.4.9 Class template layout_right_padded​::​mapping [mdspan.layout.rightpad]

23.7.3.4.9.4 Observers [mdspan.layout.rightpad.obs]

constexpr array<index_type, rank_> strides() const noexcept;
Returns: array<index_type, rank_>(stride(P_rank).).
constexpr index_type required_span_size() const noexcept;
Returns: 0 if the multidimensional index space extents_ is empty, otherwise (*this)(extents_.extent(P_rank) - index_type(1).) + 1.
template<class. Indices> constexpr size_t operator()(Indices.. idxs) const noexcept;
Preconditions: extents_type​::​index-cast(idxs) is a multidimensional index in extents() ([mdspan.overview]).
Returns: ((static_cast<index_type>(idxs) * stride(P_rank)) + .. + 0).
static constexpr bool is_always_exhaustive() noexcept;
Returns:
  • If rank_ equals zero or one, then true;
  • otherwise, if neither static-padding-stride nor last-static-extent equal dynamic_extent, then static-padding-stride == last-static-extent;
  • otherwise, false.
constexpr bool is_exhaustive() const noexcept;
Returns: true if rank_ equals zero or one; otherwise, extents_.extent(rank_ - 1) == stride(rank_ - 2)
constexpr index_type stride(rank_type r) const noexcept;
Returns:
  • If r equals rank_ - 1: 1;
  • otherwise, if r equals rank_ - 2: stride-rm2;
  • otherwise, the product of stride-rm2 and all values extents_.extent(k) with k in the range of [r + 1, rank_ - 1).
template<class LayoutRightPaddedMapping> friend constexpr bool operator=(const mapping& x, const LayoutRightPaddedMapping& y) noexcept;
Constraints:
  • is-layout-right-padded-mapping-of<LayoutRightPaddedMapping> is true.
  • LayoutRightPaddedMapping​::​extents_type​::​rank() == rank_ is true.
Returns: true if x.extents() == y.extents() is true and rank_ < 2 || x.stride(rank_ - 2) == y.stride(rank_ - 2) is true.
Otherwise, false.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant