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
)
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
)
28 #define __CLC_BODY
<..
/..
/..
/generic
/lib
/math
/fmax.inc
>
29 #include
<clc
/math
/gentype.inc
>