Skip to content

Commit aad04c4

Browse files
committed
Apply Matthias' inline corrections
1 parent 1434eb3 commit aad04c4

File tree

1 file changed

+53
-47
lines changed

1 file changed

+53
-47
lines changed

data_parallel_types.html

Lines changed: 53 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,11 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
242242

243243
<p>
244244
<ins>
245-
Use of the <code>simd_abi::fixed_size&lt;N&gt;</code> tag type requires data-parallel types to store <code>N</code> elements (i.e. <code>simd&lt;T, simd_abi::fixed_size&lt;N&gt;&gt;::size()</code> is <code>N</code>). <code>simd&lt;T, fixed_size&lt;N&gt;&gt;</code> and <code>simd_mask&lt;T, fixed_size&lt;N&gt;&gt;</code> with <code>N &gt; 0</code> and <code>N &lt;= max_fixed_size&lt;T&gt;</code> is supported. Additionally, for every supported <code>simd&lt;T, Abi&gt;</code> (see <cxx-ref to="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&lt;T, Abi&gt;::size()</code> is true.
245+
Use of the <code>simd_abi::fixed_size&lt;N&gt;</code> tag type requires data-parallel types to store <code>N</code> elements (i.e. <code>simd&lt;T, simd_abi::fixed_size&lt;N&gt;&gt;::size()</code> is <code>N</code>). <code>simd&lt;T, fixed_size&lt;N&gt;&gt;</code> and <code>simd_mask&lt;T, fixed_size&lt;N&gt;&gt;</code> with <code>N &gt; 0</code> and <code>N &lt;= max_fixed_size&lt;T&gt;</code> shall be supported. Additionally, for every supported <code>simd&lt;T, Abi&gt;</code> (see <cxx-ref to="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&lt;T, Abi&gt;::size()</code> shall be supported.
246246

247247
<cxx-note>It is unspecified whether <code>simd&lt;T, fixed_size&lt;T, fixed_size&lt;N&gt;&gt;</code> with <code>N &gt; max_fixed_size&lt;T&gt;</code> is supported. The value of <code>max_fixed_size&lt;T&gt;</code> can depend on compiler flags and can change between different compiler versions.</cxx-note>
248248

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&lt;N&gt;</code> tag. Otherwise, the efficiency of <code>simd&lt;T, Abi&gt;</code> is likely to be better than for <code>simd&lt;T, fixed_size&lt;simd_size_v&lt;T, Abi&gt;&gt;&gt;</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&lt;N&gt;</code> tag. Otherwise, the efficiency of <code>simd&lt;T, Abi&gt;</code> is likely to be better than for <code>simd&lt;T, fixed_size&lt;simd_size_v&lt;T, Abi&gt;&gt;&gt;</code> (with <code>Abi</code> not a specialization of <code>simd_abi::fixed_size</code>).</cxx-note>
250250
</ins>
251251
</p>
252252

@@ -263,23 +263,26 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
263263
<br>
264264
<br>
265265

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
268266

269-
<bl>
270-
<li>
271-
<ins>
272-
<code>compatible&lt;T&gt;</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
275268

276-
<li>
277-
<ins>
278-
<code>compatible&lt;long double&gt;</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&lt;T&gt;</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&lt;long double&gt;</code> as an alias for <code>scalar</code>.
279+
</ins>
280+
</li>
281+
</bl>
282+
283+
<ins>
284+
<em>&mdash; end example</em> ]
285+
</ins>
283286
</ins>
284287
</p>
285288

@@ -290,8 +293,7 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
290293
<br>
291294
<br>
292295

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&lt;T&gt;</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&lt;T&gt;</code> as an alias for
295297

296298
<bl>
297299
<li>
@@ -306,7 +308,9 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
306308
</ins>
307309
</li>
308310
</bl>
309-
</cxx-example>
311+
<ins>
312+
<em>&mdash; end example</em> ]
313+
</ins>
310314
</ins>
311315
</p>
312316

@@ -326,7 +330,7 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
326330

327331
<p>
328332
<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
330334

331335
<bl>
332336
<li>
@@ -381,7 +385,7 @@ <h1><ins><code>simd</code> ABI tags</ins></h1>
381385
<h1><ins><code>simd</code> type traits</ins></h1>
382386

383387
<ins>
384-
<code>template&lt;class&gt; struct is_abi_tag { <em>see-below</em> };</code>
388+
<code>template&lt;class T&gt; struct is_abi_tag { <em>see-below</em> };</code>
385389
</ins>
386390

387391
<p>
@@ -397,7 +401,7 @@ <h1><ins><code>simd</code> type traits</ins></h1>
397401
</p>
398402

399403
<ins>
400-
<code>template&lt;class&gt; struct is_simd { <em>see-below</em> };</code>
404+
<code>template&lt;class T&gt; struct is_simd { <em>see-below</em> };</code>
401405
</ins>
402406

403407
<p>
@@ -412,6 +416,8 @@ <h1><ins><code>simd</code> type traits</ins></h1>
412416
</ins>
413417
</p>
414418

419+
<ins><code>template&lt;class T&gt; struct is_simd_mask { <em>see-below</em> };</code></ins>
420+
415421
<p>
416422
<ins>
417423
The type <code>is_simd_mask&lt;T&gt;</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>
472478

473479
<p>
474480
<ins>
475-
<code>simd_size&lt;T, Abi&gt;</code> has a member <code>value</code> if and only if
481+
<code>simd_size&lt;T, Abi&gt;</code> shall have a member <code>value</code> if and only if
476482

477483
<bl>
478484
<li>
@@ -516,7 +522,7 @@ <h1><ins><code>simd</code> type traits</ins></h1>
516522

517523
<p>
518524
<ins>
519-
<code>memory_alignment&lt;T, U&gt;</code> has a member <code>value</code> if and only if
525+
<code>memory_alignment&lt;T, U&gt;</code> shall have a member <code>value</code> if and only if
520526
</ins>
521527

522528
<bl>
@@ -614,7 +620,7 @@ <h1><ins>Class templates <code>const_where_expression</code> and <code>where_exp
614620

615621
<p>
616622
<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>.
618624
</ins>
619625
</p>
620626

@@ -626,7 +632,7 @@ <h1><ins>Class templates <code>const_where_expression</code> and <code>where_exp
626632

627633
<p>
628634
<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&lt;M&gt;</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&lt;M&gt;</code> is <code>true</code>.
630636
</ins>
631637
<p>
632638

@@ -662,15 +668,11 @@ <h1><ins>Class templates <code>const_where_expression</code> and <code>where_exp
662668
</cxx-function>
663669

664670
<cxx-function>
665-
<cxx-signature>
666-
<ins>
667-
template&lt;class U, class Flags&gt; void copy_to(U* mem, Flags) const &&;
668-
</ins>
669-
</cxx-signature>
671+
<cxx-signature><ins>template&lt;class U, class Flags&gt; void copy_to(U* mem, Flags) const &&;</ins></cxx-signature>
670672

671673
<cxx-requires>
672674
<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&lt;T, U&gt;</code>. If the template parameter <code>flags</code> is <code>overaligned_tag&lt;N&gt;</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> &#8714; <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&lt;T, U&gt;</code>. If the template parameter <code>Flags</code> is <code>overaligned_tag&lt;N&gt;</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> &#8714; <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>.
674676
</ins>
675677
</cxx-requires>
676678

@@ -789,7 +791,7 @@ <h1><ins>Class templates <code>const_where_expression</code> and <code>where_exp
789791

790792
<cxx-requires>
791793
<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&lt;T, U&gt;</code>. If the template parameter <code>Flags</code> is <code>overaligned_tag&lt;N&gt;</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&lt;U&gt;</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&lt;T, U&gt;</code>. If the template parameter <code>Flags</code> is <code>overaligned_tag&lt;N&gt;</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&lt;U&gt;</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>.
793795
</ins>
794796
</cxx-requires>
795797

@@ -861,27 +863,25 @@ <h1><ins>Class template <code>simd</code> overview</ins></h1>
861863
// load constructor
862864
template&lt;class U, class Flags&gt; simd(const U* mem, Flags f);
863865

864-
<cxx-ref insynopsis="" to="parallel.simd.load"></cxx-ref> loads
866+
<cxx-ref insynopsis="" to="parallel.simd.copy"></cxx-ref>
865867
template&lt;class U, class Flags&gt; copy_from(const U* mem, Flags f);
866-
867-
<cxx-ref insynopsis="" to="parallel.simd.store"></cxx-ref> stores
868868
template&lt;class U, class Flags&gt; copy_to(U* mem, Flags f);
869869

870-
<cxx-ref insynopsis="" to="parallel.simd.subscr"></cxx-ref> scalar access
870+
<cxx-ref insynopsis="" to="parallel.simd.subscr"></cxx-ref>
871871
reference operator[](size_t);
872872
value_type operator[](size_t) const;
873873

874-
<cxx-ref insynopsis="" to="parallel.simd.unary"></cxx-ref> unary operators
874+
<cxx-ref insynopsis="" to="parallel.simd.unary"></cxx-ref>
875875
simd& operator++();
876876
simd operator++(int);
877877
simd& operator--();
878878
simd operator--(int);
879879
mask_type operator!() const;
880-
simd operator~() const; // see below
880+
simd operator~() const;
881881
simd operator+() const;
882882
simd operator-() const;
883883

884-
<cxx-ref insynopsis="" to="parallel.simd.binary"></cxx-ref> binary operators
884+
<cxx-ref insynopsis="" to="parallel.simd.binary"></cxx-ref>
885885
friend simd operator+(const simd&, const simd&);
886886
friend simd operator-(const simd&, const simd&);
887887
friend simd operator*(const simd&, const simd&);
@@ -895,7 +895,7 @@ <h1><ins>Class template <code>simd</code> overview</ins></h1>
895895
friend simd operator&lt;&lt;(const simd&, int);
896896
friend simd operator&gt;&gt;(const simd&, int);
897897

898-
<cxx-ref insynopsis="" to="parallel.simd.cassign"></cxx-ref> compound assignment
898+
<cxx-ref insynopsis="" to="parallel.simd.cassign"></cxx-ref>
899899
friend simd& operator+=(simd&, const simd&);
900900
friend simd& operator-=(simd&, const simd&);
901901
friend simd& operator*=(simd&, const simd&);
@@ -909,7 +909,7 @@ <h1><ins>Class template <code>simd</code> overview</ins></h1>
909909
friend simd& operator&lt;&lt;=(simd&, int);
910910
friend simd& operator&gt;&gt;=(simd&, int);
911911

912-
<cxx-ref insynopsis="" to="parallel.simd.comparison"></cxx-ref> compares
912+
<cxx-ref insynopsis="" to="parallel.simd.comparison"></cxx-ref>
913913
friend mask_type operator==(const simd&, const simd&);
914914
friend mask_type operator!=(const simd&, const simd&);
915915
friend mask_type operator&gt;=(const simd&, const simd&);
@@ -1012,7 +1012,7 @@ <h1><ins>Class template <code>simd</code> overview</ins></h1>
10121012
<br>
10131013

10141014
[ <em>Example:</em>
1015-
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.
10161016
A user may require the use of <code>_vec4f_addsub</code> for maximum performance and thus writes:
10171017

10181018
<pre><ins>
@@ -1139,7 +1139,7 @@ <h1><ins>Element references</ins></h1>
11391139

11401140
<cxx-remarks>
11411141
<ins>
1142-
This function shall not participate in overload resolution unless <code>declval&lt;value_type &&&gt;() @= std::forward&lt;U&gt;(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&lt;value_type &&gt;() @= std::forward&lt;U&gt;(x)</code> (where <code>@=</code> denotes the indicated compound assignment operator) is well-formed.
11431143
</ins>
11441144
</cxx-remarks>
11451145
</cxx-function>
@@ -1320,7 +1320,7 @@ <h1><ins><code>simd</code> constructors</ins></h1>
13201320

13211321
<cxx-requires>
13221322
<ins>
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&lt;simd, U&gt;</code>. If the template parameter <code>Flags</code> is <code>overaligned_tag&lt;N&gt;</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&lt;simd, U&gt;</code>. If the template parameter <code>Flags</code> is <code>overaligned_tag&lt;N&gt;</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.
13241324
</ins>
13251325
</cxx-requires>
13261326

@@ -1360,7 +1360,7 @@ <h1><ins><code>simd</code> copy functions</ins></h1>
13601360

13611361
<cxx-requires>
13621362
<ins>
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&lt;simd, U&gt;</code>. If the template parameter <code>Flags</code> is <code>overaligned_tag&lt;N&gt;</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&lt;simd, U&gt;</code>. If the template parameter <code>Flags</code> is <code>overaligned_tag&lt;N&gt;</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.
13641364
</ins>
13651365
</cxx-requires>
13661366

@@ -1776,6 +1776,12 @@ <h1><ins><code>simd</code> compare operators</ins></h1>
17761776
<cxx-section id="parallel.simd.reductions">
17771777
<h1><ins><code>simd</code> reductions</ins></h1>
17781778

1779+
<p>
1780+
<ins>
1781+
In this subclause, <code>BinaryOperation</code> shall be a binary element-wise operation.
1782+
</ins>
1783+
</p>
1784+
17791785
<cxx-function>
17801786
<cxx-signature><ins>
17811787
template&lt;class T, class Abi, class BinaryOperation = plus&lt;&gt;&gt;

0 commit comments

Comments
 (0)