v3: change __builtin_nanf() to __builtin_nanf("")
This doesn't work yet, but it was agreed to commit as-is with the logic
that "broken" is better than "completely missing" and this should be
fixed in clang.
v2: use __builtin_inff() and also add nan/huge_val definitions
Signed-off-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 211065
+#define INFINITY __builtin_inff()
+#define NAN __builtin_nanf("")
+#define HUGE_VALF __builtin_huge_valf()
+
#define FLT_DIG 6
#define FLT_MANT_DIG 24
#define FLT_MAX_10_EXP +38
#ifdef cl_khr_fp64
+#define HUGE_VAL __builtin_huge_val()
+
#define DBL_DIG 15
#define DBL_MANT_DIG 53
#define DBL_MAX_10_EXP +308
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#endif
-#define INFINITY 1.0f / 0.0f
-
""")
#