[Libclc-dev] [PATCH] math: Fix ilogb(double) return type
Jan Vesely via Libclc-dev
libclc-dev at lists.llvm.org
Tue Feb 23 14:05:36 PST 2016
On Tue, 2016-02-23 at 15:25 -0600, Aaron Watry wrote:
> Signed-off-by: Aaron Watry <awatry at gmail.com>
> CC: Jan Vesely <jan.vesely at rutgers.edu>
LGTM. sorry I did not catch it during review.
Reviewed-by: 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;
--
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20160223/df1ffdf1/attachment-0001.sig>
More information about the Libclc-dev
mailing list