summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuiling Song <ruiling.song@intel.com>2014-12-09 10:48:49 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-12-15 09:54:46 +0800
commit8c76b4b4cc7f7b1c29c0d1853329e06bc7fb1142 (patch)
tree17dfadae74c41b28db3cf18f64dc826f8667c0af
parent1795f38f18c3881201249a2502f20b63a0f0d47a (diff)
libocl: Move spec required macro to header file.
v2: Remove the old macro definition. Signed-off-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r--backend/src/libocl/include/ocl_float.h3
-rw-r--r--backend/src/libocl/tmpl/ocl_math.tmpl.cl3
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 65577a33..916233ba 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 ddfde830..c0b20766 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);