Boost logo

Boost Users :

Subject: Re: [Boost-users] run-time integer log2
From: Tim Blechmann (tim_at_[hidden])
Date: 2010-07-13 07:48:52


>> hi all,
>>
>> i am aware, that boost provides a compile-time integer log2 function. but
>> what is the best way to compile an integer log2 at run-time?
>>
>>
> In the good'ol Bits Twiddling Hacks page:

i see, maybe it would be an interesting addition to boost.integer to provide
a generic and efficient version, based on bsr/ffs or the like ...

tim

-- 
tim_at_[hidden]
http://tim.klingt.org
May music never just become another way of making money.
  Keith Tippett

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net