From Jason Turner

[mdspan.extents]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpilzobyg0/{from.md → to.md} +19 -7
tmp/tmpilzobyg0/{from.md → to.md} RENAMED
@@ -1,12 +1,12 @@
1
  #### Class template `extents` <a id="mdspan.extents">[[mdspan.extents]]</a>
2
 
3
  ##### Overview <a id="mdspan.extents.overview">[[mdspan.extents.overview]]</a>
4
 
5
  The class template `extents` represents a multidimensional index space
6
- of rank equal to `sizeof...(Extents)`. In subclause [[views]], `extents`
7
- is used synonymously with multidimensional index space.
8
 
9
  ``` cpp
10
  namespace std {
11
  template<class IndexType, size_t... Extents>
12
  class extents {
@@ -186,12 +186,12 @@ Let `N` be `sizeof...(OtherIndexTypes)`, and let `exts_arr` be
186
 
187
  - If `N != rank_dynamic()` is `true`, `exts_arr[`r`]` equals Eᵣ for each
188
  r for which Eᵣ is a static extent, and
189
  - either
190
  - `sizeof...(exts) == 0` is `true`, or
191
- - each element of `exts` is nonnegative and is representable as a
192
- value of type `index_type`.
193
 
194
  *Ensures:* `*this == extents(exts_arr)` is `true`.
195
 
196
  ``` cpp
197
  template<class OtherIndexType, size_t N>
@@ -213,16 +213,16 @@ template<class OtherIndexType, size_t N>
213
 
214
  - If `N != rank_dynamic()` is `true`, `exts[`r`]` equals Eᵣ for each r
215
  for which Eᵣ is a static extent, and
216
  - either
217
  - `N` is zero, or
218
- - `exts[`r`]` is nonnegative and is representable as a value of type
219
  `index_type` for every rank index r.
220
 
221
  *Effects:*
222
 
223
- - If `N` equals `dynamic_rank()`, for all d in the range
224
  [0, `rank_dynamic()`), direct-non-list-initializes
225
  *`dynamic-extents`*`[`d`]` with `as_const(exts[`d`])`.
226
  - Otherwise, for all d in the range [0, `rank_dynamic()`),
227
  direct-non-list-initializes *`dynamic-extents`*`[`d`]` with
228
  `as_const(exts[`*`dynamic-index-inv`*`(`d`)])`.
@@ -232,11 +232,12 @@ template<class... Integrals>
232
  explicit extents(Integrals...) -> see below;
233
  ```
234
 
235
  *Constraints:* `(is_convertible_v<Integrals, size_t> && ...)` is `true`.
236
 
237
- *Remarks:* The deduced type is `dextents<size_t, sizeof...(Integrals)>`.
 
238
 
239
  ##### Observers of the multidimensional index space <a id="mdspan.extents.obs">[[mdspan.extents.obs]]</a>
240
 
241
  ``` cpp
242
  static constexpr size_t static_extent(rank_type i) noexcept;
@@ -275,5 +276,16 @@ template<class IndexType, size_t Rank>
275
 
276
  *Result:* A type `E` that is a specialization of `extents` such that
277
  `E::rank() == Rank && E::rank() == E::rank_dynamic()` is `true`, and
278
  `E::index_type` denotes `IndexType`.
279
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  #### Class template `extents` <a id="mdspan.extents">[[mdspan.extents]]</a>
2
 
3
  ##### Overview <a id="mdspan.extents.overview">[[mdspan.extents.overview]]</a>
4
 
5
  The class template `extents` represents a multidimensional index space
6
+ of rank equal to `sizeof...(Extents)`. In  [[views]], `extents` is used
7
+ synonymously with multidimensional index space.
8
 
9
  ``` cpp
10
  namespace std {
11
  template<class IndexType, size_t... Extents>
12
  class extents {
 
186
 
187
  - If `N != rank_dynamic()` is `true`, `exts_arr[`r`]` equals Eᵣ for each
188
  r for which Eᵣ is a static extent, and
189
  - either
190
  - `sizeof...(exts) == 0` is `true`, or
191
+ - each element of `exts` is representable as a nonnegative value of
192
+ type `index_type`.
193
 
194
  *Ensures:* `*this == extents(exts_arr)` is `true`.
195
 
196
  ``` cpp
197
  template<class OtherIndexType, size_t N>
 
213
 
214
  - If `N != rank_dynamic()` is `true`, `exts[`r`]` equals Eᵣ for each r
215
  for which Eᵣ is a static extent, and
216
  - either
217
  - `N` is zero, or
218
+ - `exts[`r`]` is representable as a nonnegative value of type
219
  `index_type` for every rank index r.
220
 
221
  *Effects:*
222
 
223
+ - If `N` equals `rank_dynamic()`, for all d in the range
224
  [0, `rank_dynamic()`), direct-non-list-initializes
225
  *`dynamic-extents`*`[`d`]` with `as_const(exts[`d`])`.
226
  - Otherwise, for all d in the range [0, `rank_dynamic()`),
227
  direct-non-list-initializes *`dynamic-extents`*`[`d`]` with
228
  `as_const(exts[`*`dynamic-index-inv`*`(`d`)])`.
 
232
  explicit extents(Integrals...) -> see below;
233
  ```
234
 
235
  *Constraints:* `(is_convertible_v<Integrals, size_t> && ...)` is `true`.
236
 
237
+ *Remarks:* The deduced type is
238
+ `extents<size_t, maybe-static-ext<Integrals>...>`.
239
 
240
  ##### Observers of the multidimensional index space <a id="mdspan.extents.obs">[[mdspan.extents.obs]]</a>
241
 
242
  ``` cpp
243
  static constexpr size_t static_extent(rank_type i) noexcept;
 
276
 
277
  *Result:* A type `E` that is a specialization of `extents` such that
278
  `E::rank() == Rank && E::rank() == E::rank_dynamic()` is `true`, and
279
  `E::index_type` denotes `IndexType`.
280
 
281
+ ##### Alias template `dims` <a id="mdspan.extents.dims">[[mdspan.extents.dims]]</a>
282
+
283
+ ``` cpp
284
+ template<size_t Rank, class IndexType = size_t>
285
+ using dims = see below;
286
+ ```
287
+
288
+ *Result:* A type `E` that is a specialization of `extents` such that
289
+ `E::rank() == Rank && E::rank() == E::rank_dynamic()` is `true`, and
290
+ `E::index_type` denotes `IndexType`.
291
+