名稱空間
變體
操作

std::layout_stride::mapping<Extents>::required_span_size

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

返回對映所需的尺寸。

s 等於

  • 1,如果 extents().rank() == 0true
  • 否則,0,如果多維索引空間 extents() 的大小為 0
  • 否則,1 加上所有 r 在範圍 [0extents().rank()) 內的 extents().extent(r) - 1extents_type::index-cast(strides_[r]) 乘積之和。

呼叫等價於 return s;

[編輯] 返回值

對映所需的尺寸。

[編輯] 示例

[編輯] 參閱

返回對映的所需大小
(std::layout_left::mapping<Extents> 的公有成員函式) [編輯]
返回對映的所需大小
(std::layout_right::mapping<Extents> 的公有成員函式) [編輯]
返回多維索引空間的大小
(std::mdspan<T,Extents,LayoutPolicy,AccessorPolicy> 的公有成員函式) [編輯]