[Beignet] [PATCH V2] libocl: Move spec required macro to header file.
Ruiling Song
ruiling.song at intel.com
Mon Dec 8 18:48:49 PST 2014
v2: Remove the old macro definition.
Signed-off-by: Ruiling Song <ruiling.song at intel.com>
---
backend/src/libocl/include/ocl_float.h | 3 ++-
backend/src/libocl/tmpl/ocl_math.tmpl.cl | 3 +--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/backend/src/libocl/include/ocl_float.h b/backend/src/libocl/include/ocl_float.h
index 65577a3..916233b 100644
--- a/backend/src/libocl/include/ocl_float.h
+++ b/backend/src/libocl/include/ocl_float.h
@@ -91,6 +91,7 @@ INLINE_OVERLOADABLE int __ocl_finitef (float x){
#define M_2_SQRTPI_F 1.1283791670955126F
#define M_SQRT2_F 1.4142135623730951F
#define M_SQRT1_2_F 0.7071067811865476F
-
+#define FP_ILOGB0 (-0x7FFFFFFF-1)
+#define FP_ILOGBNAN FP_ILOGB0
#endif /* __OCL_FLOAT_H__ */
diff --git a/backend/src/libocl/tmpl/ocl_math.tmpl.cl b/backend/src/libocl/tmpl/ocl_math.tmpl.cl
index ddfde83..c0b2076 100644
--- a/backend/src/libocl/tmpl/ocl_math.tmpl.cl
+++ b/backend/src/libocl/tmpl/ocl_math.tmpl.cl
@@ -1499,8 +1499,7 @@ union {float f; unsigned i;} u;
return (float)(e-127);
}
}
-#define FP_ILOGB0 (-0x7FFFFFFF-1)
-#define FP_ILOGBNAN FP_ILOGB0
+
OVERLOADABLE int ilogb(float x) {
if (__ocl_math_fastpath_flag)
return __gen_ocl_internal_fastpath_ilogb(x);
--
1.7.10.4
More information about the Beignet
mailing list