1 2#if !defined(__CLC_SCALAR) 3 4_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE fmax(__CLC_GENTYPE x, float y) { 5 return fmax(x, (__CLC_GENTYPE)((__CLC_SCALAR_GENTYPE)y)); 6} 7 8#ifdef cl_khr_fp64 9 10#pragma OPENCL EXTENSION cl_khr_fp64 : enable 11 12_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE fmax(__CLC_GENTYPE x, double y) { 13 return fmax(x, (__CLC_GENTYPE)((__CLC_SCALAR_GENTYPE)y)); 14} 15 16#endif // ifdef cl_khr_fp64 17 18#ifdef cl_khr_fp16 19 20#pragma OPENCL EXTENSION cl_khr_fp16 : enable 21 22_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE fmax(__CLC_GENTYPE x, half y) { 23 return fmax(x, (__CLC_GENTYPE)((__CLC_SCALAR_GENTYPE)y)); 24} 25 26#endif // ifdef cl_khr_fp16 27 28#endif // !defined(__CLC_SCALAR) 29