[Libclc-dev] [PATCH] Move definition of INFINITY

Aaron Watry awatry at gmail.com
Wed Jun 11 12:29:38 PDT 2014


We were missing a declaration of INFINITY in the clc headers and already
had one in gen_convert.py

NOTE: This may not necessarily be the correct value of INFINITY based on
the cl_platform.h headers

Signed-off-by: Aaron Watry <awatry at gmail.com>
---
 generic/include/clc/float/definitions.h | 2 ++
 generic/lib/gen_convert.py              | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/generic/include/clc/float/definitions.h b/generic/include/clc/float/definitions.h
index af54fdf..1446ad9 100644
--- a/generic/include/clc/float/definitions.h
+++ b/generic/include/clc/float/definitions.h
@@ -1,3 +1,5 @@
+#define INFINITY 1.0f / 0.0f
+
 #define FLT_DIG         6
 #define FLT_MANT_DIG    24
 #define FLT_MAX_10_EXP  +38
diff --git a/generic/lib/gen_convert.py b/generic/lib/gen_convert.py
index 8e54f0c..f91a89a 100644
--- a/generic/lib/gen_convert.py
+++ b/generic/lib/gen_convert.py
@@ -144,8 +144,6 @@ print("""/* !!!! AUTOGENERATED FILE generated by convert_type.py !!!!!
 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
 #endif
 
-#define INFINITY 1.0f / 0.0f
-
 """)
 
 #
-- 
1.9.1





More information about the Libclc-dev mailing list