1 #include
<clc
/internal
/clc.h
>
2 #include
<clc
/relational
/relational.h
>
4 _CLC_DEFINE_RELATIONAL_UNARY
(int, __clc_signbit
, __builtin_signbitf
, float
)
8 #pragma OPENCL EXTENSION cl_khr_fp64
: enable
10 // The scalar version of __clc_signbit
(double) returns an int
, but the vector
11 // versions return long.
13 _CLC_DEF _CLC_OVERLOAD int __clc_signbit
(double x
) {
14 return __builtin_signbit
(x);
17 _CLC_DEFINE_RELATIONAL_UNARY_VEC_ALL
(long, __clc_signbit
, double
)
22 #pragma OPENCL EXTENSION cl_khr_fp16
: enable
24 // The scalar version of __clc_signbit
(half) returns an int
, but the vector
25 // versions return short.
27 _CLC_DEF _CLC_OVERLOAD int __clc_signbit
(half x
) {
28 return __builtin_signbit
(x);
31 _CLC_DEFINE_RELATIONAL_UNARY_VEC_ALL
(short, __clc_signbit
, half
)