Skip to content

Commit f634e30

Browse files
committed
Introduce [parallel.simd.mask.reductions]
1 parent 75c9d75 commit f634e30

File tree

1 file changed

+131
-0
lines changed

1 file changed

+131
-0
lines changed

data_parallel_types.html

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2747,6 +2747,137 @@ <h1><ins><code>simd_mask</code> compound assignment</ins></h1>
27472747
</cxx-returns>
27482748
</cxx-function>
27492749
</cxx-section>
2750+
2751+
<cxx-section id="parallel.simd.mask.reductions">
2752+
<cxx-function>
2753+
<cxx-signature><ins>template&lt;class T, class Abi&gt; bool all_of(const simd_mask&lt;T, abi&gt;& k) noexcept;</ins></cxx-signature>
2754+
2755+
<cxx-returns>
2756+
<ins>
2757+
<code>true</code> if all boolean elements in <code>k</code> are <code>true</code>, <code>false</code> otherwise.
2758+
</ins>
2759+
</cxx-returns>
2760+
</cxx-function>
2761+
2762+
<cxx-function>
2763+
<cxx-signature><ins>template&lt;class T, class Abi&gt; bool any_of(const simd_mask&lt;T, abi&gt;& k) noexcept;</ins></cxx-signature>
2764+
2765+
<cxx-returns>
2766+
<ins>
2767+
<code>true</code> if at least one boolean element in <code>k</code> is <code>true</code>, <code>false</code> otherwise.
2768+
</ins>
2769+
</cxx-returns>
2770+
</cxx-function>
2771+
2772+
<cxx-function>
2773+
<cxx-signature><ins>template&lt;class T, class Abi&gt; bool none_of(const simd_mask&lt;T, abi&gt;& k) noexcept;</ins></cxx-signature>
2774+
2775+
<cxx-returns>
2776+
<ins>
2777+
<code>true</code> if none of the one boolean elements in <code>k</code> is <code>true</code>, <code>false</code> otherwise.
2778+
</ins>
2779+
</cxx-returns>
2780+
</cxx-function>
2781+
2782+
<cxx-function>
2783+
<cxx-signature><ins>template&lt;class T, class Abi&gt; bool some_of(const simd_mask&lt;T, abi&gt;& k) noexcept;</ins></cxx-signature>
2784+
2785+
<cxx-returns>
2786+
<ins>
2787+
<code>true</code> if at least one of the one boolean elements in <code>k</code> is <code>true</code> and at least one of the boolean elements in <code>k</code> is <code>false</code>, <code>false</code> otherwise.
2788+
</ins>
2789+
</cxx-returns>
2790+
</cxx-function>
2791+
2792+
<cxx-function>
2793+
<cxx-signature><ins>template&lt;class T, class Abi&gt; int popcount(const simd_mask&lt;T, Abi&gt;& k) noexcept;</ins></cxx-signature>
2794+
2795+
<cxx-returns>
2796+
<ins>
2797+
The number of boolean elements in <code>k</code> that are <code>true</code>.
2798+
</ins>
2799+
</cxx-returns>
2800+
</cxx-function>
2801+
2802+
<cxx-function>
2803+
<cxx-signature><ins>template&lt;class T, class Abi&gt; int find_first_set(const simd_mask&lt;T, Abi&gt;& k);</ins></cxx-signature>
2804+
2805+
<cxx-requires>
2806+
<ins>
2807+
<code>any_of(k)</code> returns <code>true</code>.
2808+
</ins>
2809+
</cxx-requires>
2810+
2811+
<cxx-returns>
2812+
<ins>
2813+
The lowest element index <code>i</code> where <code>k[i]</code> is <code>true</code>.
2814+
</ins>
2815+
</cxx-returns>
2816+
</cxx-function>
2817+
2818+
<cxx-function>
2819+
<cxx-signature><ins>template&lt;class T, class Abi&gt; int find_last_set(const simd_mask&lt;T, Abi&gt;& k);</ins></cxx-signature>
2820+
2821+
<cxx-requires>
2822+
<ins>
2823+
<code>any_of(k)</code> returns <code>true</code>.
2824+
</ins>
2825+
</cxx-requires>
2826+
2827+
<cxx-returns>
2828+
<ins>
2829+
The greatest element index <code>i</code> where <code>k[i]</code> is <code>true</code>.
2830+
</ins>
2831+
</cxx-returns>
2832+
</cxx-function>
2833+
2834+
<cxx-function>
2835+
<cxx-signature><ins>
2836+
bool all_of(<em>see-below</em>) noexcept;
2837+
bool any_of(<em>see-below</em>) noexcept;
2838+
bool none_of(<em>see-below</em>) noexcept;
2839+
bool some_of(<em>see-below</em>) noexcept;
2840+
int popcount(<em>see-below</em>) noexcept;
2841+
</ins></cxx-signature>
2842+
2843+
<cxx-returns>
2844+
<ins>
2845+
<code>all_of</code> and <code>any_of</code> return their arguments; <code>none_of</code> returns the negation of its argument; <code>some_of</code> returns <code>false</code>; <code>popcount</code> returns the integral representation of its argument; <code>find_first_set</code> and <code>find_last_set</code> return <code>0</code>.
2846+
</ins>
2847+
</cxx-returns>
2848+
2849+
<cxx-remarks>
2850+
<ins>
2851+
The functions shall not participate in overload resolution unless the argument is of type <code>bool</code>.
2852+
</ins>
2853+
</cxx-remarks>
2854+
</cxx-function>
2855+
2856+
<cxx-function>
2857+
<cxx-signature><ins>
2858+
int find_first_set(<em>see-below</em>) noexcept;
2859+
int find_last_set(<em>see-below</em>) noexcept;
2860+
</ins></cxx-signature>
2861+
2862+
<cxx-requires>
2863+
<ins>
2864+
The value of the argument is <code>true</code>.
2865+
</ins>
2866+
</cxx-requires>
2867+
2868+
<cxx-returns>
2869+
<ins>
2870+
<code>0</code>.
2871+
</ins>
2872+
</cxx-returns>
2873+
2874+
<cxx-remarks>
2875+
<ins>
2876+
The functions shall not participate in overload resolution unless the argument is of type <code>bool</code>.
2877+
</ins>
2878+
</cxx-remarks>
2879+
</cxx-function>
2880+
</cxx-section>
27502881
</cxx-section>
27512882
</cxx-clause>
27522883

0 commit comments

Comments
 (0)