[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / libclc / r600 / lib / math / fmax.cl
blobe4b9e4c821fb27336c73079a88bf9da660ed38cf
1 #include <clc/clc.h>
3 #include "../../../generic/lib/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>