[libclc] r261714 - math: Fix ilogb(double) return type
Aaron Watry via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 23 16:52:15 PST 2016
Author: awatry
Date: Tue Feb 23 18:52:15 2016
New Revision: 261714
URL: http://llvm.org/viewvc/llvm-project?rev=261714&view=rev
Log:
math: Fix ilogb(double) return type
Signed-off-by: Aaron Watry <awatry at gmail.com>
Reviewed-by: Jan Vesely <jan.vesely at rutgers.edu>
Modified:
libclc/trunk/generic/lib/math/ilogb.cl
Modified: libclc/trunk/generic/lib/math/ilogb.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/ilogb.cl?rev=261714&r1=261713&r2=261714&view=diff
==============================================================================
--- libclc/trunk/generic/lib/math/ilogb.cl (original)
+++ libclc/trunk/generic/lib/math/ilogb.cl Tue Feb 23 18:52:15 2016
@@ -41,7 +41,7 @@ _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_
#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;
More information about the cfe-commits
mailing list