Skip to content

Commit b8da32d

Browse files
committed
Introduce [parallel.simd.subscr]
1 parent fc83079 commit b8da32d

File tree

1 file changed

+100
-52
lines changed

1 file changed

+100
-52
lines changed

data_parallel_types.html

Lines changed: 100 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,69 +1352,117 @@ <h1><ins><code>simd</code> constructors</ins></h1>
13521352
<cxx-section id="parallel.simd.copy">
13531353
<h1><ins><code>simd</code> copy functions</ins></h1>
13541354

1355-
<cxx-function>
1356-
<cxx-signature><ins>template&lt;class U, class Flags&gt; void copy_from(const U* mem, Flags);</ins></cxx-signature>
1355+
<cxx-function>
1356+
<cxx-signature><ins>template&lt;class U, class Flags&gt; void copy_from(const U* mem, Flags);</ins></cxx-signature>
13571357

1358-
<cxx-requires>
1359-
<ins>
1360-
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.
1361-
</ins>
1362-
</cxx-requires>
1358+
<cxx-requires>
1359+
<ins>
1360+
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.
1361+
</ins>
1362+
</cxx-requires>
13631363

1364-
<cxx-effects>
1365-
<ins>
1366-
Replaces the elements of the <code>simd</code> object such that the <em>i</em>-th element is assigned with <code>static_cast&lt;T&gt;(mem[i])</code> for all <code>i</code> &#8714; <code>[0, size())</code>.
1367-
</ins>
1368-
</cxx-effects>
1364+
<cxx-effects>
1365+
<ins>
1366+
Replaces the elements of the <code>simd</code> object such that the <em>i</em>-th element is assigned with <code>static_cast&lt;T&gt;(mem[i])</code> for all <code>i</code> &#8714; <code>[0, size())</code>.
1367+
</ins>
1368+
</cxx-effects>
13691369

1370-
<cxx-remarks>
1371-
<ins>
1372-
This function shall not participate in overload resolution unless
1370+
<cxx-remarks>
1371+
<ins>
1372+
This function shall not participate in overload resolution unless
13731373

1374-
<bl>
1375-
<li>
1376-
<code>is_simd_flag_type_v&lt;Flags&gt;</code> is <code>true</code>, and
1377-
</li>
1374+
<bl>
1375+
<li>
1376+
<code>is_simd_flag_type_v&lt;Flags&gt;</code> is <code>true</code>, and
1377+
</li>
13781378

1379-
<li>
1380-
<code>U</code> is a vectorizable type.
1381-
</li>
1382-
</bl>
1383-
</ins>
1384-
</cxx-remarks>
1385-
</cxx-function>
1379+
<li>
1380+
<code>U</code> is a vectorizable type.
1381+
</li>
1382+
</bl>
1383+
</ins>
1384+
</cxx-remarks>
1385+
</cxx-function>
13861386

1387-
<cxx-function>
1388-
<cxx-signature><ins>template&lt;class U, class Flags&gt; void copy_to(U* mem, Flags) const;</ins></cxx-signature>
1387+
<cxx-function>
1388+
<cxx-signature><ins>template&lt;class U, class Flags&gt; void copy_to(U* mem, Flags) const;</ins></cxx-signature>
13891389

1390-
<cxx-requires>
1391-
<ins>
1392-
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 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.
1393-
</ins>
1394-
</cxx-requires>
1390+
<cxx-requires>
1391+
<ins>
1392+
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 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.
1393+
</ins>
1394+
</cxx-requires>
13951395

1396-
<cxx-effects>
1397-
<ins>
1398-
Copies all <code>simd</code> elements as if <code>mem[i] = static_cast&lt;U&gt;(operator[](i))</code> for all <code>i</code> &#8714; <code>[0, size())</code>.
1399-
</ins>
1400-
</cxx-effects>
1396+
<cxx-effects>
1397+
<ins>
1398+
Copies all <code>simd</code> elements as if <code>mem[i] = static_cast&lt;U&gt;(operator[](i))</code> for all <code>i</code> &#8714; <code>[0, size())</code>.
1399+
</ins>
1400+
</cxx-effects>
14011401

1402-
<cxx-remarks>
1403-
<ins>
1404-
This function shall not participate in overload resolution unless
1402+
<cxx-remarks>
1403+
<ins>
1404+
This function shall not participate in overload resolution unless
14051405

1406-
<bl>
1407-
<li>
1408-
<code>is_simd_flag_type_v&lt;Flags&gt;</code> is <code>true</code>, and
1409-
</li>
1406+
<bl>
1407+
<li>
1408+
<code>is_simd_flag_type_v&lt;Flags&gt;</code> is <code>true</code>, and
1409+
</li>
14101410

1411-
<li>
1412-
<code>U</code> is a vectorizable type.
1413-
</li>
1414-
</bl>
1415-
</ins>
1416-
</cxx-remarks>
1417-
</cxx-function>
1411+
<li>
1412+
<code>U</code> is a vectorizable type.
1413+
</li>
1414+
</bl>
1415+
</ins>
1416+
</cxx-remarks>
1417+
</cxx-function>
1418+
</cxx-section>
1419+
1420+
<cxx-section id="parallel.simd.subscr">
1421+
<h1><ins><code>simd</code> subscript operators</ins></h1>
1422+
1423+
<cxx-function>
1424+
<cxx-signature><ins>reference operator[](size_t i);</ins></cxx-signature>
1425+
1426+
<cxx-requires>
1427+
<ins>
1428+
<code>i &lt; size()</code>.
1429+
</ins>
1430+
</cxx-requires>
1431+
1432+
<cxx-returns>
1433+
<ins>
1434+
A <code>reference</code> (see <a href="#parallel.simd.reference">[parallel.simd.reference]</a>) referring to the <em>i</em>-th element.
1435+
</ins>
1436+
</cxx-returns>
1437+
1438+
<cxx-throws>
1439+
<ins>
1440+
Nothing.
1441+
</ins>
1442+
</cxx-throws>
1443+
</cxx-function>
1444+
1445+
<cxx-function>
1446+
<cxx-signature><ins>value_type operator[](size_t i) const;</ins></cxx-signature>
1447+
1448+
<cxx-requires>
1449+
<ins>
1450+
<code>i &lt; size()</code>.
1451+
</ins>
1452+
</cxx-requires>
1453+
1454+
<cxx-returns>
1455+
<ins>
1456+
The value of the <em>i</em>-th element.
1457+
</ins>
1458+
</cxx-returns>
1459+
1460+
<cxx-throws>
1461+
<ins>
1462+
Nothing.
1463+
</ins>
1464+
</cxx-throws>
1465+
</cxx-function>
14181466
</cxx-section>
14191467
</cxx-section>
14201468
</cxx-clause>

0 commit comments

Comments
 (0)