std::layout_stride::mapping
來自 cppreference.com
< cpp | 容器 | mdspan | layout stride
定義於標頭檔案 <mdspan> |
||
template< class Extents > class layout_stride::mapping; |
(C++23 起) | |
類模板 layout_stride::mapping
控制多維索引如何透過使用者定義的步幅對映到表示偏移量的一維值。
每個 mapping
特化都是一個 LayoutMapping 和一個滿足 TriviallyCopyable 型別的 regular
型別。
如果多維索引空間 Extents() 的大小不可表示為 Extents::index_type 型別的值,當 Extents::rank_dynamic() 為 0 時,程式是非良構的。
目錄 |
[編輯] 模板引數
Extents | - | 指定維度數、它們的大小以及哪些在編譯時已知。必須是 std::extents 的特化。 |
[編輯] 成員型別
成員型別 | 定義 |
extents_type
|
Extents
|
index_type
|
extents_type::index_type
|
size_type
|
extents_type::size_type
|
rank_type
|
extents_type::rank_type
|
layout_type
|
std::layout_stride |
[編輯] 成員常量
成員 | 定義 |
constexpr rank_type rank_ (private) [static] |
extents_type::rank() (僅用於解釋的靜態成員常量*) |
[編輯] 資料成員
成員 | 定義 |
extents_type extents_ (private) |
擴充套件物件 (僅用於闡釋的成員物件*) |
std::array<index_type, rank_> strides_ (private) |
步幅陣列 (僅用於闡釋的成員物件*) |
[編輯] 成員函式
構造一個新對映 (public member function) | |
operator= (顯式預設) |
賦值一個對映 (public member function) |
觀察器 | |
獲取區段物件 (public member function) | |
獲取步幅陣列 (public member function) | |
返回對映的所需大小 (public member function) | |
將多維索引對映到偏移量值 (public member function) | |
[靜態] |
確定此對映是否唯一(索引的每個組合對映到不同的底層元素) (public static member function) |
確定此對映是否詳盡(每個底層元素都可以透過某些索引組合訪問) (public member function) | |
[靜態] |
確定此對映是否帶步幅(在每個維度中,每次增加一個索引都跳過相同數量的底層元素) (public static member function) |
[靜態] |
確定此佈局對映是否總是唯一的 (public static member function) |
確定此佈局對映是否總是詳盡的 (public static member function) | |
確定此佈局對映是否總是帶步幅的 (public static member function) | |
獲取沿指定維度的步長 (public member function) |
[編輯] 非成員函式
將此 layout_stride 的佈局對映與其他對映進行比較(函式模板) | |
計算用於 subdmspan 的對映和資料控制代碼偏移量(public member function) |
[編輯] 參見
layout_left 的佈局對映 ( std::layout_left 的公有成員類模板) | |
layout_right 的佈局對映 ( std::layout_right 的公有成員類模板) |