std::layout_stride::mapping<Extents>:: mapping-traits
From cppreference.net
<
cpp
|
container
|
mdspan
|
layout stride
|
mapping
|
static
constexpr
bool
is_unique
(
)
noexcept
;
|
(1) | (自 C++23 起) |
|
constexpr
bool
is_exhaustive
(
)
const
noexcept
;
|
(2) | (自 C++23 起) |
|
static
constexpr
bool
is_strided
(
)
noexcept
;
|
(3) | (自 C++23 起) |
|
static
constexpr
bool
is_always_unique
(
)
noexcept
;
|
(4) | (自 C++23 起) |
|
static
constexpr
bool
is_always_exhaustive
(
)
noexcept
;
|
(5) | (自 C++23 起) |
|
static
constexpr
bool
is_always_strided
(
)
noexcept
;
|
(6) | (自 C++23 起) |
每个
mapping
特化的每个实例都是唯一且具有跨距的。
当满足以下任一条件时,该映射是完备的:
- rank_ 为 0 ,或
-
存在一个在范围
[ 0 ,rank_)内整数的排列 p ,使得:
-
- stride ( p [ 0 ] ) 等于 1 且
- stride ( p [ i ] ) 等于 stride ( p [ i - 1 ] ) * extents ( ) . extent ( p [ i - 1 ] )
-
对于所有
i
属于
[1,rank_)区间,其中 p [ i ] 是 p 的第 i 个元素。
( rank_ 是在 std :: layout_stride :: mapping 中定义的仅用于说明的静态成员常量。)
请参阅 LayoutMapping 了解这些谓词映射特性的语义。
目录 |
参数
(无)
返回值
1,3-4,6)
true
2)
true
如果映射是穷尽的(参见上文)
5)
false
示例
|
本节内容不完整
原因:缺少示例 |
参见
| 本节内容尚不完整 |