[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / libclc / generic / lib / relational / isequal.cl
blob3f14f945bfd3379f1fb3b2df981b9c40147e5cc0
1 #include <clc/clc.h>
3 #define _CLC_DEFINE_ISEQUAL(RET_TYPE, FUNCTION, ARG1_TYPE, ARG2_TYPE) \
4 _CLC_DEF _CLC_OVERLOAD RET_TYPE FUNCTION(ARG1_TYPE x, ARG2_TYPE y) { \
5 return (x == y); \
6 } \
8 _CLC_DEFINE_ISEQUAL(int, isequal, float, float)
9 _CLC_DEFINE_ISEQUAL(int2, isequal, float2, float2)
10 _CLC_DEFINE_ISEQUAL(int3, isequal, float3, float3)
11 _CLC_DEFINE_ISEQUAL(int4, isequal, float4, float4)
12 _CLC_DEFINE_ISEQUAL(int8, isequal, float8, float8)
13 _CLC_DEFINE_ISEQUAL(int16, isequal, float16, float16)
15 #ifdef cl_khr_fp64
17 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
19 // The scalar version of isequal(double) returns an int, but the vector versions
20 // return long.
21 _CLC_DEFINE_ISEQUAL(int, isequal, double, double)
22 _CLC_DEFINE_ISEQUAL(long2, isequal, double2, double2)
23 _CLC_DEFINE_ISEQUAL(long3, isequal, double3, double3)
24 _CLC_DEFINE_ISEQUAL(long4, isequal, double4, double4)
25 _CLC_DEFINE_ISEQUAL(long8, isequal, double8, double8)
26 _CLC_DEFINE_ISEQUAL(long16, isequal, double16, double16)
28 #endif
29 #ifdef cl_khr_fp16
31 #pragma OPENCL EXTENSION cl_khr_fp16 : enable
33 // The scalar version of isequal(half) returns an int, but the vector versions
34 // return short.
35 _CLC_DEFINE_ISEQUAL(int, isequal, half, half)
36 _CLC_DEFINE_ISEQUAL(short2, isequal, half2, half2)
37 _CLC_DEFINE_ISEQUAL(short3, isequal, half3, half3)
38 _CLC_DEFINE_ISEQUAL(short4, isequal, half4, half4)
39 _CLC_DEFINE_ISEQUAL(short8, isequal, half8, half8)
40 _CLC_DEFINE_ISEQUAL(short16, isequal, half16, half16)
42 #endif
44 #undef _CLC_DEFINE_ISEQUAL