Ilia Mirkin imir...@alum.mit.edu writes:
Just bikeshedding here, but isn't the common way of doing this to just have
(1ULL bits) - 1
?
Yes, that's probably more clear. One advantage of doing the shift in the
other direction is if we ever end up supporting textures with 64-bit
ints then we
On 09/18/2014 04:24 AM, Neil Roberts wrote:
Ilia Mirkin imir...@alum.mit.edu writes:
Just bikeshedding here, but isn't the common way of doing this to just have
(1ULL bits) - 1
?
Yes, that's probably more clear. One advantage of doing the shift in the
other direction is if we ever end up
Actually I think this might be a slightly cleaner way to do the shift
because it doesn't depend on any particular size of unsigned int and
there are fewer ~s.
- Neil
--- 8 --- (use git am --scissors to automatically chop here)
The un_to_float function was trying to get the
This needs some changes since the code may not work on all platforms.
On Wed, Sep 17, 2014 at 10:06 AM, Neil Roberts n...@linux.intel.com wrote:
Actually I think this might be a slightly cleaner way to do the shift
because it doesn't depend on any particular size of unsigned int and
there are
Hi Ken,
Ken Phillis Jr kphilli...@gmail.com writes:
- unsigned int max = ~(~0ul bits);
+ unsigned int max = ~0u (sizeof max * 8 - bits);
why not use, sizeof(unsigned int)? the call sizeof max may not always
work depending on compiler
Could you explain which compilers “sizeof
On Wed, Sep 17, 2014 at 11:06 AM, Neil Roberts n...@linux.intel.com wrote:
Actually I think this might be a slightly cleaner way to do the shift
because it doesn't depend on any particular size of unsigned int and
there are fewer ~s.
- Neil
--- 8 --- (use git am --scissors