std::layout_right::mapping<Extents>::stride

来自cppreference.com
< cpp‎ | container‎ | mdspan‎ | layout right‎ | mapping
 
 
 
 
 
constexpr index_type stride(rank_type i) const noexcept;
(C++23 起)

返回映射在秩索引 i 处的步长。等价于 return extents().rev-prod-of-extents(i);

此重载只有在 extents_type​::​rank() > 0true 时才会参与重载决议

i >= extents_type::rank()true 时行为未定义。

参数

i-范围 [0extents_type::rank()) 中的秩索引

返回值

处于指定秩索引处的步长。

示例

参阅

获取沿指定维度的步长
(std::layout_stride::mapping<Extents> 的公开成员函数)
获取沿指定维度的步长
(std::mdspan<T,Extents,LayoutPolicy,AccessorPolicy> 的公开成员函数)