Skip to content

Commit abc146b

Browse files
committed
Introduce [parallel.simd.alg]
1 parent e216d8d commit abc146b

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

data_parallel_types.html

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,6 +2258,77 @@ <h1><ins><code>simd</code> casts</ins></h1>
22582258
</cxx-returns>
22592259
</cxx-function>
22602260
</cxx-section>
2261+
2262+
<cxx-section id="parallel.simd.alg">
2263+
<h1><ins><code>simd</code> algorithms</ins></h1>
2264+
2265+
<cxx-function>
2266+
<cxx-signature><ins>template&lt;class T, class Abi&gt; simd&lt;T, Abi&gt; min(const simd&lt;T, Abi&gt;& a, const simd&lt;T, Abi&gt;& b) noexcept;</ins></cxx-signature>
2267+
2268+
<cxx-returns>
2269+
<ins>
2270+
The result of the element-wise application of <code>std::min(a[i], b[i])</code> for all <code>i</code> &#8714; <code>[0, size())</code>.
2271+
</ins>
2272+
</cxx-returns>
2273+
</cxx-function>
2274+
2275+
<cxx-function>
2276+
<cxx-signature><ins>template&lt;class T, class Abi&gt; simd&lt;T, Abi&gt; max(const simd&lt;T, Abi&gt;& a, const simd&lt;T, Abi&gt;& b) noexcept;</ins></cxx-signature>
2277+
2278+
<cxx-returns>
2279+
<ins>
2280+
The result of the element-wise application of <code>std::max(a[i], b[i])</code> for all <code>i</code> &#8714; <code>[0, size())</code>.
2281+
</ins>
2282+
</cxx-returns>
2283+
</cxx-function>
2284+
2285+
<cxx-function>
2286+
<cxx-signature><ins>
2287+
template&lt;class T, class Abi&gt;
2288+
pair&lt;simd&lt;T, Abi&gt;, simd&lt;T, Abi&gt;&gt; minmax(const simd&lt;T, Abi&gt;& a, const simd&lt;T, Abi&gt;& b) noexcept;</ins></cxx-signature>
2289+
2290+
<cxx-returns>
2291+
<ins>
2292+
A pair initialized with
2293+
2294+
<bl>
2295+
<li>
2296+
<ins>
2297+
the result of element-wise application of <code>std::min(a[i], b[i])</code> for all <code>i</code> &#8714; <code>[0, size())</code> in the <code>first</code> member, and
2298+
2299+
</ins>
2300+
</li>
2301+
2302+
<li>
2303+
<ins>
2304+
the result of element-wise application of <code>std::max(a[i], b[i])</code> for all <code>i</code> &#8714; <code>[0, size())</code> in the <code>second</code> member, and
2305+
2306+
</ins>
2307+
</li>
2308+
</bl>
2309+
</ins>
2310+
</cxx-returns>
2311+
</cxx-function>
2312+
2313+
<cxx-function>
2314+
<cxx-signature><ins>
2315+
template&lt;class T, class Abi&gt; simd&lt;T, Abi&gt;
2316+
clamp(const simd&lt;T, Abi&gt;& v, const simd&lt;T, Abi&gt;& lo, const simd&lt;T, Abi&gt;& hi);</ins></cxx-signature>
2317+
2318+
<cxx-requires>
2319+
<ins>
2320+
No element in <code>lo</code> shall be greater than the corresponding element in <code>hi</code>.
2321+
</ins>
2322+
</cxx-requires>
2323+
2324+
<cxx-returns>
2325+
<ins>
2326+
The result of element-wise application of <code>std::clamp(v[i], lo[i], hi[i])</code> for all <code>i</code> &#8714; <code>[0, size())</code>.
2327+
2328+
</ins>
2329+
</cxx-returns>
2330+
</cxx-function>
2331+
</cxx-section>
22612332
</cxx-section>
22622333
</cxx-section>
22632334
</cxx-clause>

0 commit comments

Comments
 (0)