2 #include
"relational.h"
4 //Note
: It would be nice to use __builtin_islessgreater 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, islessgreater
, __builtin_islessgreater
, float
, float
)
11 #pragma OPENCL EXTENSION cl_khr_fp64
: enable
13 // The scalar version of islessgreater
(double, double
) returns an int
, but the vector versions
16 _CLC_DEF _CLC_OVERLOAD int islessgreater
(double x
, double y
){
17 return __builtin_islessgreater
(x, y
);
20 _CLC_DEFINE_RELATIONAL_BINARY_VEC_ALL
(long, islessgreater
, double
, double
)
25 #pragma OPENCL EXTENSION cl_khr_fp16
: enable
27 // The scalar version of islessgreater
(half, half
) returns an int
, but the vector versions
30 _CLC_DEF _CLC_OVERLOAD int islessgreater
(half x
, half y
){
31 return __builtin_islessgreater
(x, y
);
34 _CLC_DEFINE_RELATIONAL_BINARY_VEC_ALL
(short, islessgreater
, half
, half
)