Skip to content

Commit 6e614e1

Browse files
authored
[clang][docs] Revise documentation for __builtin_reduce_(max|min). (#114637)
The function operation described in the document did not match its actual semantic meaning, this patch resolved the problem.
1 parent aed4356 commit 6e614e1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

clang/docs/LanguageExtensions.rst

+4-6
Original file line numberDiff line numberDiff line change
@@ -745,12 +745,10 @@ Let ``VT`` be a vector type and ``ET`` the element type of ``VT``.
745745
======================================= ====================================================================== ==================================
746746
Name Operation Supported element types
747747
======================================= ====================================================================== ==================================
748-
ET __builtin_reduce_max(VT a) return x or y, whichever is larger; If exactly one argument is integer and floating point types
749-
a NaN, return the other argument. If both arguments are NaNs,
750-
fmax() return a NaN.
751-
ET __builtin_reduce_min(VT a) return x or y, whichever is smaller; If exactly one argument integer and floating point types
752-
is a NaN, return the other argument. If both arguments are
753-
NaNs, fmax() return a NaN.
748+
ET __builtin_reduce_max(VT a) return the largest element of the vector. The floating point result integer and floating point types
749+
will always be a number unless all elements of the vector are NaN.
750+
ET __builtin_reduce_min(VT a) return the smallest element of the vector. The floating point result integer and floating point types
751+
will always be a number unless all elements of the vector are NaN.
754752
ET __builtin_reduce_add(VT a) \+ integer types
755753
ET __builtin_reduce_mul(VT a) \* integer types
756754
ET __builtin_reduce_and(VT a) & integer types

0 commit comments

Comments
 (0)