You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: data_parallel_types.html
+53-47Lines changed: 53 additions & 47 deletions
Original file line number
Diff line number
Diff line change
@@ -242,11 +242,11 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
242
242
243
243
<p>
244
244
<ins>
245
-
Use of the <code>simd_abi::fixed_size<N></code> tag type requires data-parallel types to store <code>N</code> elements (i.e. <code>simd<T, simd_abi::fixed_size<N>>::size()</code> is <code>N</code>). <code>simd<T, fixed_size<N>></code> and <code>simd_mask<T, fixed_size<N>></code> with <code>N > 0</code> and <code>N <= max_fixed_size<T></code>is supported. Additionally, for every supported <code>simd<T, Abi></code> (see <cxx-refto="parallel.simd.overview"></cxx-ref>), where <code>Abi</code> is an ABI tag is not a specialization of <code>simd_abi::fixed_size</code>, <code>N == simd<T, Abi>::size()</code>is true.
245
+
Use of the <code>simd_abi::fixed_size<N></code> tag type requires data-parallel types to store <code>N</code> elements (i.e. <code>simd<T, simd_abi::fixed_size<N>>::size()</code> is <code>N</code>). <code>simd<T, fixed_size<N>></code> and <code>simd_mask<T, fixed_size<N>></code> with <code>N > 0</code> and <code>N <= max_fixed_size<T></code>shall be supported. Additionally, for every supported <code>simd<T, Abi></code> (see <cxx-refto="parallel.simd.overview"></cxx-ref>), where <code>Abi</code> is an ABI tag that is not a specialization of <code>simd_abi::fixed_size</code>, <code>N == simd<T, Abi>::size()</code>shall be supported.
246
246
247
247
<cxx-note>It is unspecified whether <code>simd<T, fixed_size<T, fixed_size<N>></code> with <code>N > max_fixed_size<T></code> is supported. The value of <code>max_fixed_size<T></code> can depend on compiler flags and can change between different compiler versions.</cxx-note>
248
248
249
-
<cxx-note>An implementation may forego ABI compatibility between differently compiled translation units for <code>simd</code> and <code>simd_mask</code> specializations using the same <code>simd_abi::fixed_size<N></code> tag. Otherwise, the efficiency of <code>simd<T, Abi></code> is likely to be better than for <code>simd<T, fixed_size<simd_size_v<T, Abi>>></code> (with <code>Abi</code> not a specialization of <code>simd_abi::fixed_size</code>).</cxx-note>
249
+
<cxx-note>An implementation can forego ABI compatibility between differently compiled translation units for <code>simd</code> and <code>simd_mask</code> specializations using the same <code>simd_abi::fixed_size<N></code> tag. Otherwise, the efficiency of <code>simd<T, Abi></code> is likely to be better than for <code>simd<T, fixed_size<simd_size_v<T, Abi>>></code> (with <code>Abi</code> not a specialization of <code>simd_abi::fixed_size</code>).</cxx-note>
250
250
</ins>
251
251
</p>
252
252
@@ -263,23 +263,26 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
263
263
<br>
264
264
<br>
265
265
266
-
<cxx-example>
267
-
Consider a target architecture supporting the extended ABI tags <code>__simd128</code> and <code>__simd256</code>, where the <code>__simd256</code> type requires an optional ISA extension on said architecture. Also, the target architecture does not support <code>long double</code> with either ABI tag. The implementation therefore defines
268
266
269
-
<bl>
270
-
<li>
271
-
<ins>
272
-
<code>compatible<T></code> as an alias for <code>__simd128</code> for all vectorizable <code>T</code>, except <code>long double</code>, and
273
-
</ins>
274
-
</li>
267
+
[ <em>Example:</em> Consider a target architecture supporting the extended ABI tags <code>__simd128</code> and <code>__simd256</code>, where the <code>__simd256</code> type requires an optional ISA extension on said architecture. Also, the target architecture does not support <code>long double</code> with either ABI tag. The implementation therefore defines
275
268
276
-
<li>
277
-
<ins>
278
-
<code>compatible<long double></code> as an alias for <code>scalar</code>.
279
-
</ins>
280
-
</li>
281
-
</bl>
282
-
</cxx-example>
269
+
<bl>
270
+
<li>
271
+
<ins>
272
+
<code>compatible<T></code> as an alias for <code>__simd128</code> for all vectorizable <code>T</code>, except <code>long double</code>, and
273
+
</ins>
274
+
</li>
275
+
276
+
<li>
277
+
<ins>
278
+
<code>compatible<long double></code> as an alias for <code>scalar</code>.
279
+
</ins>
280
+
</li>
281
+
</bl>
282
+
283
+
<ins>
284
+
<em>— end example</em> ]
285
+
</ins>
283
286
</ins>
284
287
</p>
285
288
@@ -290,8 +293,7 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
290
293
<br>
291
294
<br>
292
295
293
-
<cxx-example>
294
-
Consider a target architecture supporting the extended ABI tags <code>__simd128</code> and <code>__simd256</code>, where hardware support for <code>__simd256</code> only exists for floating-point types. The implementation therefore defines <code>native<T></code> as an alias for
296
+
[ <em>Example:</em> Consider a target architecture supporting the extended ABI tags <code>__simd128</code> and <code>__simd256</code>, where hardware support for <code>__simd256</code> only exists for floating-point types. The implementation therefore defines <code>native<T></code> as an alias for
295
297
296
298
<bl>
297
299
<li>
@@ -306,7 +308,9 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
306
308
</ins>
307
309
</li>
308
310
</bl>
309
-
</cxx-example>
311
+
<ins>
312
+
<em>— end example</em> ]
313
+
</ins>
310
314
</ins>
311
315
</p>
312
316
@@ -326,7 +330,7 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
326
330
327
331
<p>
328
332
<ins>
329
-
The member <code>type</code>is present if and only if
333
+
The member <code>type</code>shall be present if and only if
330
334
331
335
<bl>
332
336
<li>
@@ -381,7 +385,7 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
The type <code>is_simd_mask<T></code> is a <code>UnaryTypeTrait</code> with a <code>BaseCharacteristic</code> of <code>true_type</code> if <code>T</code> is a specialization of the <code>simd_mask</code> class template, and <code>false_type</code> otherwise.
@@ -472,7 +478,7 @@ <h1><ins><code>simd</code> type traits</ins></h1>
472
478
473
479
<p>
474
480
<ins>
475
-
<code>simd_size<T, Abi></code>has a member <code>value</code> if and only if
481
+
<code>simd_size<T, Abi></code>shall have a member <code>value</code> if and only if
476
482
477
483
<bl>
478
484
<li>
@@ -516,7 +522,7 @@ <h1><ins><code>simd</code> type traits</ins></h1>
516
522
517
523
<p>
518
524
<ins>
519
-
<code>memory_alignment<T, U></code>has a member <code>value</code> if and only if
525
+
<code>memory_alignment<T, U></code>shall have a member <code>value</code> if and only if
520
526
</ins>
521
527
522
528
<bl>
@@ -614,7 +620,7 @@ <h1><ins>Class templates <code>const_where_expression</code> and <code>where_exp
614
620
615
621
<p>
616
622
<ins>
617
-
In this subclause, <code>data[0]</code> is used interchangably for <code>data</code>, <code>mask[0]</code> is used interchangably for <code>mask</code>, and <code>M::size()</code> is used interchangably for <code>1</code>.
623
+
In this subclause, if <code>M</code> is <code>bool</code>, <code>data[0]</code> is used interchangably for <code>data</code>, <code>mask[0]</code> is used interchangably for <code>mask</code>, and <code>M::size()</code> is used interchangably for <code>1</code>.
618
624
</ins>
619
625
</p>
620
626
@@ -626,7 +632,7 @@ <h1><ins>Class templates <code>const_where_expression</code> and <code>where_exp
626
632
627
633
<p>
628
634
<ins>
629
-
In this subclause, the <code>value_type</code> is an alias for <code>T</code> if <code>M</code> is <code>bool</code>, or an alias for <code>typename T::value_type</code> if <code>is_simd_mask_v<M></code> is <code>true</code>.
635
+
In this subclause, the type <code>value_type</code> is an alias for <code>T</code> if <code>M</code> is <code>bool</code>, or an alias for <code>typename T::value_type</code> if <code>is_simd_mask_v<M></code> is <code>true</code>.
630
636
</ins>
631
637
<p>
632
638
@@ -662,15 +668,11 @@ <h1><ins>Class templates <code>const_where_expression</code> and <code>where_exp
662
668
</cxx-function>
663
669
664
670
<cxx-function>
665
-
<cxx-signature>
666
-
<ins>
667
-
template<class U, class Flags> void copy_to(U* mem, Flags) const &&;
668
-
</ins>
669
-
</cxx-signature>
671
+
<cxx-signature><ins>template<class U, class Flags> void copy_to(U* mem, Flags) const &&;</ins></cxx-signature>
670
672
671
673
<cxx-requires>
672
674
<ins>
673
-
If the template parameter <code>Flags</code> is <code>vector_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>memory_alignment_v<T, U></code>. If the template parameter <code>flags</code> is <code>overaligned_tag<N></code>, <code>mem</code> shall point to storage aligned by <code>N</code>. If the template parameter <code>Flags</code> is <code>element_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>alignof(U)</code>. If <code>M</code> is not <code>bool</code>, the largest <em>i</em> ∊ <code>[0, M::size())</code> where <code>mask[i]</code> is <code>true</code> is less than the number of values pointed to by <code>mem</code>.
675
+
If the template parameter <code>Flags</code> is <code>vector_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>memory_alignment_v<T, U></code>. If the template parameter <code>Flags</code> is <code>overaligned_tag<N></code>, <code>mem</code> shall point to storage aligned by <code>N</code>. If the template parameter <code>Flags</code> is <code>element_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>alignof(U)</code>. If <code>M</code> is not <code>bool</code>, the largest <em>i</em> ∊ <code>[0, M::size())</code> where <code>mask[i]</code> is <code>true</code> is less than the number of values pointed to by <code>mem</code>.
674
676
</ins>
675
677
</cxx-requires>
676
678
@@ -789,7 +791,7 @@ <h1><ins>Class templates <code>const_where_expression</code> and <code>where_exp
789
791
790
792
<cxx-requires>
791
793
<ins>
792
-
If the template parameter <code>Flags</code> is <code>vector_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>memory_alignment_v<T, U></code>. If the template parameter <code>Flags</code> is <code>overaligned_tag<N></code>, <code>mem</code> shall point to storage aligned by <code>N</code>. If the template parameter <code>Flags</code> is <code>element_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>alignon(U)</code>. If <code>is_simd_flag_type_v<U></code> is <code>true</code>, for all selected indices <em>i</em>, <em>i</em> shall be less than the number of values pointed to by <code>mem</code>.
794
+
If the template parameter <code>Flags</code> is <code>vector_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>memory_alignment_v<T, U></code>. If the template parameter <code>Flags</code> is <code>overaligned_tag<N></code>, <code>mem</code> shall point to storage aligned by <code>N</code>. If the template parameter <code>Flags</code> is <code>element_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>alignof(U)</code>. If <code>is_simd_flag_type_v<U></code> is <code>true</code>, for all selected indices <em>i</em>, <em>i</em> shall be less than the number of values pointed to by <code>mem</code>.
Consider an implementation that supports the type <code>__vec4f</code> and the function <code>__vec4f</code>, <code>_vec4f_addsub(__vec4f, __vec4f)</code> for the currently targeted system.
1015
+
Consider an implementation that supports the type <code>__vec4f</code> and the function <code>__vec4f_vec4f_addsub(__vec4f, __vec4f)</code> for the currently targeted system.
1016
1016
A user may require the use of <code>_vec4f_addsub</code> for maximum performance and thus writes:
This function shall not participate in overload resolution unless <code>declval<value_type &&>() @= std::forward<U>(x)</code> (where <code>@=</code> denotes the indicated compound assignment operator) is well-formed.
1142
+
This function shall not participate in overload resolution unless <code>declval<value_type &>() @= std::forward<U>(x)</code> (where <code>@=</code> denotes the indicated compound assignment operator) is well-formed.
If the template parameter <code>Flags</code> is <code>vector_aligned_tag</code>, <code>mem</code> shall point to storage aligend by <code>memory_alignment_v<simd, U></code>. If the template parameter <code>Flags</code> is <code>overaligned_tag<N></code>, <code>mem</code> shall point to storage aligned by <code>N</code>. If the template parameter <code>Flags</code> is <code>element_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>alignon(U)</code>. <code>[mem, mem + size())</code> is a valid range.
1323
+
If the template parameter <code>Flags</code> is <code>vector_aligned_tag</code>, <code>mem</code> shall point to storage aligend by <code>memory_alignment_v<simd, U></code>. If the template parameter <code>Flags</code> is <code>overaligned_tag<N></code>, <code>mem</code> shall point to storage aligned by <code>N</code>. If the template parameter <code>Flags</code> is <code>element_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>alignof(U)</code>. <code>[mem, mem + size())</code> is a valid range.
If the template parameter <code>Flags</code> is <code>vector_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>memory_alignment_v<simd, U></code>. If the template parameter <code>Flags</code> is <code>overaligned_tag<N></code>, <code>mem</code> shall point to storage aligend by <code>N</code>. If the template parameter <code>Flags</code> is <code>element_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>alignonf(U)</code>. <code>[mem, mem + size())</code> is a valid range.
1363
+
If the template parameter <code>Flags</code> is <code>vector_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>memory_alignment_v<simd, U></code>. If the template parameter <code>Flags</code> is <code>overaligned_tag<N></code>, <code>mem</code> shall point to storage aligend by <code>N</code>. If the template parameter <code>Flags</code> is <code>element_aligned_tag</code>, <code>mem</code> shall point to storage aligned by <code>alignof(U)</code>. <code>[mem, mem + size())</code> is a valid range.
0 commit comments