[mdspan.layout.rightpad.obs] (original) (raw)

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_(P_rank) - index_type(1))...)) + 1.

template<class... Indices> constexpr size_t operator()(Indices... idxs) const noexcept;

Constraints:

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:

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;

Preconditions: r is smaller than rank_.

Returns:

template<class LayoutRightPaddedMapping> friend constexpr bool operator==(const mapping& x, const LayoutRightPaddedMapping& y) noexcept;

Constraints:

Returns: true if x.extents() == y.extents() is true and_rank__ < 2 || x.stride(rank_ - 2) == y.stride(rank_ - 2) is true.

Otherwise, false.