[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / libclc / generic / lib / relational / isgreater.cl
blob167d6f213552ba6e976303f2649b2c34e75143fb
1 #include <clc/clc.h>
2 #include "relational.h"
4 //Note: It would be nice to use __builtin_isgreater with vector inputs, but it seems to only take scalar values as
5 // input, which will produce incorrect output for vector input types.
7 _CLC_DEFINE_RELATIONAL_BINARY(int, isgreater, __builtin_isgreater, float, float)
9 #ifdef cl_khr_fp64
11 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
13 // The scalar version of isgreater(double, double) returns an int, but the vector versions
14 // return long.
16 _CLC_DEF _CLC_OVERLOAD int isgreater(double x, double y){
17 return __builtin_isgreater(x, y);
20 _CLC_DEFINE_RELATIONAL_BINARY_VEC_ALL(long, isgreater, double, double)
22 #endif
24 #ifdef cl_khr_fp16
26 #pragma OPENCL EXTENSION cl_khr_fp16 : enable
28 // The scalar version of isgreater(half, half) returns an int, but the vector versions
29 // return short.
31 _CLC_DEF _CLC_OVERLOAD int isgreater(half x, half y){
32 return __builtin_isgreater(x, y);
35 _CLC_DEFINE_RELATIONAL_BINARY_VEC_ALL(short, isgreater, half, half)
37 #endif