3.9 KiB
[mdspan.layout.stride.obs]
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.7 Class template layout_stride::mapping [mdspan.layout.stride]
23.7.3.4.7.4 Observers [mdspan.layout.stride.obs]
constexpr index_type required_span_size() const noexcept;
Returns: REQUIRED-SPAN-SIZE(extents(), strides_).
template<class... Indices> constexpr index_type operator()(Indices... i) const noexcept;
Constraints:
sizeof...(Indices) == rank_ is true,
(is_convertible_v<Indices, index_type> && ...) is true, and
(is_nothrow_constructible_v<index_type, Indices> && ...) is true.
Preconditions: extents_type::index-cast(i) is a multidimensional index in extents_ ([mdspan.overview]).
Effects: Let P be a parameter pack such thatis_same_v<index_sequence_for<Indices...>, index_sequence<P...>> is true.
Equivalent to:return ((static_cast<index_type>(i) * stride(P)) + ... + 0);
constexpr bool is_exhaustive() const noexcept;
Returns:
-
true if rank_ is 0.
-
Otherwise, true if there is a permutation P of the integers in the range [0, rank_) such that stride(p0) equals 1, andstride(pi) equals stride(piâ1) * extents().extent(piâ1) for i in the range [1, rank_), where pi is the ith element of P.
-
Otherwise, false.
template<class OtherMapping> friend constexpr bool operator==(const mapping& x, const OtherMapping& y) noexcept;
Constraints:
-
layout-mapping-alike is satisfied.
-
rank_ == OtherMapping::extents_type::rank() is true.
-
OtherMapping::is_always_strided() is true.
Preconditions: OtherMapping meets the layout mapping requirements ([mdspan.layout.policy.reqmts]).
Returns: true if x.extents() == y.extents() is true,OFFSET(y) == 0 is true, and each of x.stride(r) == y.stride(r) is true for r in the range [0, x.extents().rank()).
Otherwise, false.