[libc++][Android] BuildKite CI: update Clang and sysroot versions (#116151)
[llvm-project.git] / libclc / r600 / lib / math / fmax.cl
bloba43530fc7507ee7f82d88ecd66c4e9b26dd5bb87
1 #include <clc/clc.h>
2 #include <clc/clcmacro.h>
4 #include "../../../generic/lib/math/math.h"
6 _CLC_DEF _CLC_OVERLOAD float fmax(float x, float y)
8 /* Flush denormals if not enabled. Otherwise fmax instruction flushes
9 * the values for comparison, but outputs original denormal */
10 x = __clc_flush_denormal_if_not_supported(x);
11 y = __clc_flush_denormal_if_not_supported(y);
12 return __builtin_fmaxf(x, y);
14 _CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, float, fmax, float, float)
16 #ifdef cl_khr_fp64
18 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
20 _CLC_DEF _CLC_OVERLOAD double fmax(double x, double y)
22 return __builtin_fmax(x, y);
24 _CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, fmax, double, double)
26 #endif
28 #define __CLC_BODY <../../../generic/lib/math/fmax.inc>
29 #include <clc/math/gentype.inc>