[LangRef] Fix code segment and numbering issue in the 'call' instruction section...
[llvm-project.git] / libclc / clc / lib / generic / relational / clc_isequal.cl
blob7664df7767cb3fb5f18ffb7bb7ec1294872791f4
1 #include <clc/internal/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); \
8 _CLC_DEFINE_ISEQUAL(int, __clc_isequal, float, float)
9 _CLC_DEFINE_ISEQUAL(int2, __clc_isequal, float2, float2)
10 _CLC_DEFINE_ISEQUAL(int3, __clc_isequal, float3, float3)
11 _CLC_DEFINE_ISEQUAL(int4, __clc_isequal, float4, float4)
12 _CLC_DEFINE_ISEQUAL(int8, __clc_isequal, float8, float8)
13 _CLC_DEFINE_ISEQUAL(int16, __clc_isequal, float16, float16)
15 #ifdef cl_khr_fp64
17 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
19 // The scalar version of __clc_isequal(double) returns an int, but the vector
20 // versions return long.
21 _CLC_DEFINE_ISEQUAL(int, __clc_isequal, double, double)
22 _CLC_DEFINE_ISEQUAL(long2, __clc_isequal, double2, double2)
23 _CLC_DEFINE_ISEQUAL(long3, __clc_isequal, double3, double3)
24 _CLC_DEFINE_ISEQUAL(long4, __clc_isequal, double4, double4)
25 _CLC_DEFINE_ISEQUAL(long8, __clc_isequal, double8, double8)
26 _CLC_DEFINE_ISEQUAL(long16, __clc_isequal, double16, double16)
28 #endif
29 #ifdef cl_khr_fp16
31 #pragma OPENCL EXTENSION cl_khr_fp16 : enable
33 // The scalar version of __clc_isequal(half) returns an int, but the vector
34 // versions return short.
35 _CLC_DEFINE_ISEQUAL(int, __clc_isequal, half, half)
36 _CLC_DEFINE_ISEQUAL(short2, __clc_isequal, half2, half2)
37 _CLC_DEFINE_ISEQUAL(short3, __clc_isequal, half3, half3)
38 _CLC_DEFINE_ISEQUAL(short4, __clc_isequal, half4, half4)
39 _CLC_DEFINE_ISEQUAL(short8, __clc_isequal, half8, half8)
40 _CLC_DEFINE_ISEQUAL(short16, __clc_isequal, half16, half16)
42 #endif
44 #undef _CLC_DEFINE_ISEQUAL