Jan Vesely | 369e203 | 2014-09-05 13:59:09 +0000 | [diff] [blame] | 1 | #include <clc/clc.h> |
2 | #include "relational.h" | ||||
3 | |||||
4 | _CLC_DEFINE_RELATIONAL_UNARY(int, isnormal, __builtin_isnormal, float) | ||||
5 | |||||
6 | #ifdef cl_khr_fp64 | ||||
7 | |||||
8 | #pragma OPENCL EXTENSION cl_khr_fp64 : enable | ||||
9 | |||||
10 | // The scalar version of isnormal(double) returns an int, but the vector versions | ||||
11 | // return long. | ||||
12 | _CLC_DEF _CLC_OVERLOAD int isnormal(double x) { | ||||
13 | return __builtin_isnormal(x); | ||||
14 | } | ||||
15 | |||||
16 | _CLC_DEFINE_RELATIONAL_UNARY_VEC_ALL(long, isnormal, double) | ||||
17 | |||||
18 | #endif |