std::layout_left::mapping
来自 cppreference.cn
< cpp | 容器 | mdspan | layout left
定义于头文件 <mdspan> |
||
template< class Extents > class layout_left::mapping; |
(C++23 起) | |
类模板 layout_left::mapping
控制多维索引如何以列主序方式映射到表示偏移量的一维值。该映射在最左边的扩展处步幅为 1,并且步幅从左到右随着扩展的乘积而增加。
mapping
的每个特化都是一个 LayoutMapping 和一个 TriviallyCopyable 类型,它满足 regular
。
如果多维索引空间 Extents() 的大小无法表示为类型 Extents::index_type 的值,当 Extents::rank_dynamic() 为 0 时,程序是 ill-formed 的。
目录 |
[编辑] 模板参数
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_left |
[编辑] 数据成员
成员 | 定义 |
extents_type extents_ (private) |
扩展对象 (仅用于阐释的成员对象*) |
[编辑] 成员函数
构造一个新映射 (public 成员函数) | |
operator= (显式默认) |
赋值一个映射 (public 成员函数) |
观察器 | |
获取区段对象 (public 成员函数) | |
返回映射的所需大小 (public 成员函数) | |
将多维索引映射到偏移量值 (public 成员函数) | |
[静态] |
确定此映射是否唯一(索引的每个组合映射到不同的底层元素) (public static 成员函数) |
[静态] |
确定此映射是否详尽(每个底层元素都可以通过某些索引组合访问) (public static 成员函数) |
[静态] |
确定此映射是否带步幅(在每个维度中,每次增加一个索引都跳过相同数量的底层元素) (public static 成员函数) |
[静态] |
确定此布局映射是否总是唯一的 (public static 成员函数) |
确定此布局映射是否总是详尽的 (public static 成员函数) | |
确定此布局映射是否总是带步幅的 (public static 成员函数) | |
获取沿指定维度的步长 (public 成员函数) |
[编辑] 非成员函数
将此 layout_left 的布局映射与其他映射进行比较(函数模板) | |
计算用于 subdmspan 的映射和数据句柄偏移量(public 成员函数) |
[编辑] 另请参阅
layout_right 的布局映射 ( std::layout_right 的公共成员类模板) | |
layout_stride 的布局映射 ( std::layout_stride 的公共成员类模板) |