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
template<class T, class Abi, class BinaryOperation = plus<>>
1775
+
T reduce(const simd<T, Abi>& x, BinaryOperation binary_op = {});
1776
+
</ins></cxx-signature>
1777
+
1778
+
<cxx-requires>
1779
+
<ins>
1780
+
<code>binary_op</code> shall be callable with two arguments of type <code>T</code> returning <code>T</code>, or callable with two arguments of type <code>simd<T, A1></code> returning <code>simd<T, A1></code> for every <code>A1</code> that is an ABI tag type.
1781
+
</ins>
1782
+
</cxx-requires>
1783
+
1784
+
<cxx-returns>
1785
+
<ins>
1786
+
<code><em>GENERALIZED_SUM</em>(binary_op, x.data[i], ...)</code> for all <code>i</code> ∊ <code>[0, size())</code>.
1787
+
</ins>
1788
+
</cxx-returns>
1789
+
1790
+
<cxx-throws>
1791
+
<ins>
1792
+
Any exception thrown from <code>binary_op</code>.
1793
+
</ins>
1794
+
</cxx-throws>
1795
+
1796
+
<p>
1797
+
<cxx-note>
1798
+
<ins>
1799
+
This overload of <code>reduce</code> does not require an initial value because <code>x</code> is guaranteed to be non-empty.
1800
+
</ins>
1801
+
</cxx-note>
1802
+
</p>
1803
+
</cxx-function>
1804
+
1805
+
<cxx-function>
1806
+
<cxx-signature><ins>
1807
+
template<class M, class V, class BinaryOperation>
<code>binary_op</code> shall be callable with two arguments of type <code>T</code> returning <code>T</code>, or callable with two arguments of type <code>simd<T, A1></code> returning <code>simd<T, A1></code> for every <code>A1</code> that is an ABI tag type. The results of <code>binary_op(identity_element, x)</code> and <code>binary_op(x, identity_element)</code> shall be equal to <code>x</code> for all finite values <code>x</code> representable by <code>V::value_type</code>.
1815
+
</ins>
1816
+
</cxx-requires>
1817
+
1818
+
<cxx-returns>
1819
+
<ins>
1820
+
If <code>none_of(x.mask)</code>, returns <code>identity_element</code>. Otherwise, returns <code><em>GENERALIZED_SUM</em>(binary_op, x.data[i], ...)</code> for all <code>i</code> ∊ {<em>j</em> ∊ ℕ<sub>0</sub> ∣ <em>j</em> < <code>M::size()</code> ⋀ <code>mask[</code><em>j</em><code>]</code> }.
<code>is_integral_v<V::value_type></code> is <code>true</code>.
1905
+
</ins>
1906
+
</cxx-requires>
1907
+
1908
+
<cxx-returns>
1909
+
<ins>
1910
+
If <code>none_of(x.mask)</code>, returns <code>0</code>. Otherwise, returns <code><em>GENERALIZED_SUM</em>(binary_op, x.data[i], ...)</code> for all <code>i</code> ∊ {<em>j</em> ∊ ℕ<sub>0</sub> ∣ <em>j</em> < <code>M::size()</code> ⋀ <code>mask[</code><em>j</em><code>]</code> }.
1911
+
</ins>
1912
+
</cxx-returns>
1913
+
1914
+
<cxx-throws>
1915
+
<ins>
1916
+
Nothing.
1917
+
</ins>
1918
+
</cxx-throws>
1919
+
</cxx-function>
1920
+
1921
+
<cxx-function>
1922
+
<cxx-signature><ins>template<class T, class Abi> T hmin(const simd<T, Abi>& x);</ins></cxx-signature>
1923
+
1924
+
<cxx-returns>
1925
+
<ins>
1926
+
The value of an element <code>x[j]</code> for which <code>x[j] <= x[i]</code> for all <code>i</code> ∊ <code>[0, size())</code>.
1927
+
</ins>
1928
+
</cxx-returns>
1929
+
1930
+
<cxx-throws>
1931
+
<ins>
1932
+
Nothing.
1933
+
</ins>
1934
+
</cxx-throws>
1935
+
</cxx-function>
1936
+
1937
+
<cxx-function>
1938
+
<cxx-signature><ins>template<class T, class V> typename V::value_type hmin(const const_where_expression<M, V>& x);</ins></cxx-signature>
1939
+
1940
+
<cxx-returns>
1941
+
<ins>
1942
+
If <code>none_of(x.mask)</code>, the return value is <code>numeric_limits<V::value_type>::max()</code>. Otherwise, returns the value of an element <code>x.data[j]</code> for which <code>x.mask[j] == true</code> and <code>x.data[j] <= x.data[i]</code> for all <code>i</code> ∊ {<em>j</em> ∊ ℕ<sub>0</sub> ∣ <em>j</em> < <code>M::size()</code> ⋀ <code>mask[</code><em>j</em><code>]</code> }.
1943
+
</ins>
1944
+
</cxx-returns>
1945
+
1946
+
<cxx-throws>
1947
+
<ins>
1948
+
Nothing.
1949
+
</ins>
1950
+
</cxx-throws>
1951
+
</cxx-function>
1952
+
1953
+
<cxx-function>
1954
+
<cxx-signature><ins>template<class T, class Abi> T hmax(const simd<T, Abi>& x);</ins></cxx-signature>
1955
+
1956
+
<cxx-returns>
1957
+
<ins>
1958
+
The value of an element <code>x[j]</code> for which <code>x[j] >= x[i]</code> for all <code>i</code> ∊ <code>[0, size())</code>.
1959
+
</ins>
1960
+
</cxx-returns>
1961
+
1962
+
<cxx-throws>
1963
+
<ins>
1964
+
Nothing.
1965
+
</ins>
1966
+
</cxx-throws>
1967
+
</cxx-function>
1968
+
1969
+
<cxx-function>
1970
+
<cxx-signature><ins>template<class T, class V> typename V::value_type hmax(const const_where_expression<M, V>& x);</ins></cxx-signature>
1971
+
1972
+
<cxx-returns>
1973
+
<ins>
1974
+
If <code>none_of(x.mask)</code>, the return value is <code>numeric_limits<V::value_type>::lowest()</code>. Otherwise, returns the value of an element <code>x.data[j]</code> for which <code>x.mask[j] == true</code> and <code>x.data[j] >= x.data[i]</code> for all <code>i</code> ∊ {<em>j</em> ∊ ℕ<sub>0</sub> ∣ <em>j</em> < <code>M::size()</code> ⋀ <code>mask[</code><em>j</em><code>]</code> }.
0 commit comments