@@ -1856,6 +1856,39 @@ inline constexpr RetT extend_vavrg2_sat(AT a, BT b, RetT c) {
1856
1856
return detail::extend_vbinary2<RetT, true , false >(a, b, c, detail::average ());
1857
1857
}
1858
1858
1859
+ // / Extend \p a and \p b to 33 bit and vectorized compare input values using
1860
+ // / specified comparison \p cmp .
1861
+ // /
1862
+ // / \tparam [in] AT The type of the first value, can only be 32 bit integer
1863
+ // / \tparam [in] BT The type of the second value, can only be 32 bit integer
1864
+ // / \tparam [in] BinaryOperation The type of the compare operation
1865
+ // / \param [in] a The first value
1866
+ // / \param [in] b The second value
1867
+ // / \param [in] cmp The comparsion operator
1868
+ // / \returns The comparison result of the two extended values.
1869
+ template <typename AT, typename BT, typename BinaryOperation>
1870
+ inline constexpr unsigned extend_vcompare2 (AT a, BT b, BinaryOperation cmp) {
1871
+ return detail::extend_vbinary2<unsigned , false , false >(a, b, 0 , cmp);
1872
+ }
1873
+
1874
+ // / Extend Inputs to 33 bit, and vectorized compare input values using specified
1875
+ // / comparison \p cmp , then add the result with \p c .
1876
+ // /
1877
+ // / \tparam [in] AT The type of the first value, can only be 32 bit integer
1878
+ // / \tparam [in] BT The type of the second value, can only be 32 bit integer
1879
+ // / \tparam [in] BinaryOperation The type of the compare operation
1880
+ // / \param [in] a The first value
1881
+ // / \param [in] b The second value
1882
+ // / \param [in] c The third value
1883
+ // / \param [in] cmp The comparsion operator
1884
+ // / \returns The comparison result of the two extended values, and add the
1885
+ // / result with \p c .
1886
+ template <typename AT, typename BT, typename BinaryOperation>
1887
+ inline constexpr unsigned extend_vcompare2_add (AT a, BT b, unsigned c,
1888
+ BinaryOperation cmp) {
1889
+ return detail::extend_vbinary2<unsigned , false , true >(a, b, c, cmp);
1890
+ }
1891
+
1859
1892
// / Compute vectorized addition of \p a and \p b, with each value treated as a
1860
1893
// / 4 elements vector type and extend each element to 9 bit.
1861
1894
// / \tparam [in] RetT The type of the return value, can only be 32 bit integer
@@ -2121,4 +2154,37 @@ inline constexpr RetT extend_vavrg4_sat(AT a, BT b, RetT c) {
2121
2154
return detail::extend_vbinary4<RetT, true , false >(a, b, c, detail::average ());
2122
2155
}
2123
2156
2157
+ // / Extend \p a and \p b to 33 bit and vectorized compare input values using
2158
+ // / specified comparison \p cmp .
2159
+ // /
2160
+ // / \tparam [in] AT The type of the first value, can only be 32 bit integer
2161
+ // / \tparam [in] BT The type of the second value, can only be 32 bit integer
2162
+ // / \tparam [in] BinaryOperation The type of the compare operation
2163
+ // / \param [in] a The first value
2164
+ // / \param [in] b The second value
2165
+ // / \param [in] cmp The comparsion operator
2166
+ // / \returns The comparison result of the two extended values.
2167
+ template <typename AT, typename BT, typename BinaryOperation>
2168
+ inline constexpr unsigned extend_vcompare4 (AT a, BT b, BinaryOperation cmp) {
2169
+ return detail::extend_vbinary4<unsigned , false , false >(a, b, 0 , cmp);
2170
+ }
2171
+
2172
+ // / Extend Inputs to 33 bit, and vectorized compare input values using specified
2173
+ // / comparison \p cmp , then add the result with \p c .
2174
+ // /
2175
+ // / \tparam [in] AT The type of the first value, can only be 32 bit integer
2176
+ // / \tparam [in] BT The type of the second value, can only be 32 bit integer
2177
+ // / \tparam [in] BinaryOperation The type of the compare operation
2178
+ // / \param [in] a The first value
2179
+ // / \param [in] b The second value
2180
+ // / \param [in] c The third value
2181
+ // / \param [in] cmp The comparsion operator
2182
+ // / \returns The comparison result of the two extended values, and add the
2183
+ // / result with \p c .
2184
+ template <typename AT, typename BT, typename BinaryOperation>
2185
+ inline constexpr unsigned extend_vcompare4_add (AT a, BT b, unsigned c,
2186
+ BinaryOperation cmp) {
2187
+ return detail::extend_vbinary4<unsigned , false , true >(a, b, c, cmp);
2188
+ }
2189
+
2124
2190
} // namespace syclcompat
0 commit comments