1 #include
<clc
/internal
/clc.h
>
2 #include
<clc
/relational
/relational.h
>
4 // Note
: It would be nice to use __builtin_isunordered with vector inputs
, but
5 // it seems to only take scalar values as input
, which will produce incorrect
6 // output for vector input types.
8 _CLC_DEFINE_RELATIONAL_BINARY
(int, __clc_isunordered
, __builtin_isunordered
,
13 #pragma OPENCL EXTENSION cl_khr_fp64
: enable
15 // The scalar version of __clc_isunordered
(double, double
) returns an int
, but
16 // the vector versions return long.
18 _CLC_DEF _CLC_OVERLOAD int __clc_isunordered
(double x
, double y
) {
19 return __builtin_isunordered
(x, y
);
22 _CLC_DEFINE_RELATIONAL_BINARY_VEC_ALL
(long, __clc_isunordered
, double
, double
)
27 #pragma OPENCL EXTENSION cl_khr_fp16
: enable
29 // The scalar version of __clc_isunordered
(half, half
) returns an int
, but the
30 // vector versions return short.
32 _CLC_DEF _CLC_OVERLOAD int __clc_isunordered
(half x
, half y
) {
33 return __builtin_isunordered
(x, y
);
36 _CLC_DEFINE_RELATIONAL_BINARY_VEC_ALL
(short, __clc_isunordered
, half
, half
)