Re: wineport: Add support for ctz().
17 Mar
2011
17 Mar
'11
8:04 p.m.
On 03/17/2011 02:04 PM, Alexander Kochetkov wrote:
For my purposes the 'return -1' path will never be taken, so it's not needed. I want to be able to do:
while (bitmap) { i = ctz(bitmap); /* get the LSB index */ bitmap ^= 1<< i; /* zero LSB */
/* for each set bit i... */ }
If there's a faster way to do this I'm all ears.
while (bitmap) { bitmap = (bitmap& (bitmap - 1)); /* zero LSB */
/* for each set bit i... */ }
You could try this solution to zero lsb.
Yes, that's another way to zero the LSB, but I need the index (i).
5474
Age (days ago)
5474
Last active (days ago)
0 comments
1 participants
participants (1)
-
Adam Martinson