2.5 KiB
[mdspan.sub.map.rightpad]
23 Containers library [containers]
23.7 Views [views]
23.7.3 Multidimensional access [views.multidim]
23.7.3.7 submdspan [mdspan.sub]
23.7.3.7.6 Specializations of submdspan_mapping [mdspan.sub.map]
23.7.3.7.6.6 layout_right_padded specialization of submdspan_mapping [mdspan.sub.map.rightpad]
template<class Extents> template<class... SliceSpecifiers> constexpr auto layout_right_padded::mapping<Extents>::submdspan-mapping-impl( SliceSpecifiers... slices) const -> see below;
Returns:
submdspan_mapping_result{*this, 0}, if rank_ == 0 is true;
otherwise,submdspan_mapping_result{layout_right::mapping(sub_ext), offset},
if rank_ == 1 is true orSubExtents::rank() == 0 is true;
otherwise,submdspan_mapping_result{layout_right::mapping(sub_ext), offset}, if
SubExtents::rank() == 1 is true and
for k equal to rank_ - 1,Sk is a unit-stride slice for mapping;
otherwise,submdspan_mapping_result{layout_right_padded<S_static>::mapping(sub_ext, stride(rank_ - u - 2)), offset} if for a value u for which rank_ - u - 2 is the largest value p smaller than rank_ - 1 for which Sp is a unit-stride slice for mapping, the following conditions are met:
for k equal to rank_ - 1,Sk is a unit-stride slice for mapping; and
for each k in the range [rank_ - SubExtents::rank() - u + 1, rank_ - u - 1)),is_convertible_v<Sk, full_extent_t> is true; and
for k equal to rank_ - SubExtents::rank() - u,
Sk is a unit-stride slice for mapping;
and where S_static is:
dynamic_extent if static-padding-stride is dynamic_extent or for any k in the range [rank_ - u - 1, rank_ - 1)static_extent(k) is dynamic_extent,
otherwise, the product of static-padding-stride and all values static_extent(k) with k in the range [rank_ - u - 1, rank_ - 1);
otherwise,submdspan_mapping_result{layout_stride::mapping(sub_ext, sub_strides), offset}