diff options
author | Aaron Watry <awatry@gmail.com> | 2016-02-24 00:52:15 +0000 |
---|---|---|
committer | Aaron Watry <awatry@gmail.com> | 2016-02-24 00:52:15 +0000 |
commit | d2b49fa813766219b768c361cef721951153b41f (patch) | |
tree | 5b949634252061ec7ef0be43bf864dcb1dfb94d4 | |
parent | f08376f22d6464a17e6423a8e8152c7eb09007b2 (diff) |
math: Fix ilogb(double) return type
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@261714 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | generic/lib/math/ilogb.cl | 2 |
1 files changed, 1 insertions, 1 deletions
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; |