qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 3/7] qxl: refactor rounding up to a nearest power


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PULL 3/7] qxl: refactor rounding up to a nearest power of 2
Date: Thu, 05 Mar 2015 11:11:53 +0100

  Hi,

> This patch's implementation of pow2ceil() is needlessly complicated,
> just like pow2floor() in master.  Simpler:
> 
>     uint64_t pow2ceil2(uint64_t value)
>     {
>         int n = clz64(value - 1);
>         return n ? 1ull << (64 - n) : 0;
>     }
> 
> I can rebase my patch on top of this one, and clean things up to my
> taste.

I happily accept that offer (if that's ok with peter).

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]