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