名稱空間
變體
操作

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

來自 cppreference.com
< 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> 的公開成員函式) [編輯]