[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / libclc / generic / lib / relational / isordered.cl
blobcedd05f6e0492da730ebbe97b7d27010c77efdaa
1 #include <clc/clc.h>
2 #include "relational.h"
4 #define _CLC_DEFINE_ISORDERED(RET_TYPE, FUNCTION, ARG1_TYPE, ARG2_TYPE) \
5 _CLC_DEF _CLC_OVERLOAD RET_TYPE FUNCTION(ARG1_TYPE x, ARG2_TYPE y) { \
6 return isequal(x, x) && isequal(y, y); \
7 } \
9 _CLC_DEFINE_ISORDERED(int, isordered, float, float)
10 _CLC_DEFINE_RELATIONAL_BINARY_VEC_ALL(int, isordered, float, float)
12 #ifdef cl_khr_fp64
13 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
15 // The scalar version of isordered(double, double) returns an int, but the vector versions
16 // return long.
18 _CLC_DEFINE_ISORDERED(int, isordered, double, double)
19 _CLC_DEFINE_RELATIONAL_BINARY_VEC_ALL(long, isordered, double, double)
21 #endif
22 #ifdef cl_khr_fp16
23 #pragma OPENCL EXTENSION cl_khr_fp16 : enable
25 // The scalar version of isordered(half, half) returns an int, but the vector versions
26 // return short.
28 _CLC_DEFINE_ISORDERED(int, isordered, half, half)
29 _CLC_DEFINE_RELATIONAL_BINARY_VEC_ALL(short, isordered, half, half)
31 #endif
33 #undef _CLC_DEFINE_ISORDERED