名稱空間
變體
操作

std::layout_left::mapping<Extents>::stride

來自 cppreference.com
< cpp‎ | 容器‎ | mdspan‎ | layout left‎ | mapping
 
 
 
 
 
constexpr index_type stride(rank_type i) const noexcept;
(C++23 起)

返回對映在維度索引 i 處的步長。等價於 return extents().fwd-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> 的公共成員函式) [編輯]