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 or
SubExtents:: rank( ) = = 0 is true ; otherwise,
submdspan_ mapping_ result{ layout_ right:: mapping( sub_ ext) , offset} ,
if
SubExtents:: rank( ) = = 1 is true andfor k equal to rank_ - 1 ,
SliceSpecifiers. . . [ k ] is a unit-stride slice type; 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 SliceSpecifiers. . . [ p ] is a unit-stride slice type,
the following conditions are met:
for k equal to rank_ - 1 ,
SliceSpecifiers. . . [ k ] is a unit-stride slice type; and for each k in the range
[rank_ - SubExtents:: rank( ) - u + 1 , rank_ - u - 1 ),SliceSpecifiers. . . [ k ] denotes full_ extent_ t ; and for k equal to rank_ - SubExtents:: rank( ) - u ,
SliceSpecifiers. . . [ k ] is a unit-stride slice type;
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}