命名空间
变体
操作

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

来自 cppreference.cn
< cpp‎ | 容器‎ | 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> 的公开成员函数) [编辑]