[Libclc-dev] [PATCH] math: Fix ilogb(double) return type

Aaron Watry via Libclc-dev libclc-dev at lists.llvm.org
Tue Feb 23 13:25:18 PST 2016


Signed-off-by: Aaron Watry <awatry at gmail.com>
CC: Jan Vesely <jan.vesely at rutgers.edu>
---
 generic/lib/math/ilogb.cl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/generic/lib/math/ilogb.cl b/generic/lib/math/ilogb.cl
index b783b7e..7ab7899 100644
--- a/generic/lib/math/ilogb.cl
+++ b/generic/lib/math/ilogb.cl
@@ -41,7 +41,7 @@ _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, int, ilogb, float);
 #ifdef cl_khr_fp64
 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
 
-_CLC_OVERLOAD _CLC_DEF ilogb(double x) {
+_CLC_OVERLOAD _CLC_DEF int ilogb(double x) {
     ulong ux = as_ulong(x);
     ulong ax = ux & ~SIGNBIT_DP64;
     int r = (int) (ax >> EXPSHIFTBITS_DP64) - EXPBIAS_DP64;
-- 
2.5.0



More information about the Libclc-dev mailing list