#
The following elements apply to all functions in [mdspan.sub.map].
2
#
Mandates: For each rank index k of extents(), SliceSpecifiers..[k] is a valid submdspan slice type for the
Preconditions: For each rank index k of extents(), slices..[k] is a valid slice for the
Let sub_ext be the result of submdspan_extents(), slices..) and let SubExtents be decltype(sub_ext).
Let sub_strides be an array<SubExtents​::​index_type, SubExtents​::​rank()> such that for each rank index k of extents() for which the type of slices..[k] is not a collapsing slice type, sub_strides[MAP_RANK(slices,k)] equals:
  • stride(k) * s.stride if the type of s is a specialization of strided_slice and s.stride < s.extent is true, where s is slices..[k];
  • otherwise, stride(k).
Let ls be a pack of values of index_type, where the
If ls..[k] equals extents().extent(k) for any rank index k of extents(), then let offset be a value of type size_t equal to required_span_size().
Otherwise, let offset be a value of type size_t equal to operator()(ls..).

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