找出大於等於某個值的最小 power of two
count leading zeros (clz) http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
http://en.wikipedia.org/wiki/Find_first_set
http://stackoverflow.com/questions/466204/rounding-off-to-nearest-power-of-2
http://graphics.stanford.edu/~seander/bithacks.html
http://stackoverflow.com/questions/364985/algorithm-for-finding-the-smallest-power-of-two-thats-greater-or-equal-to-a-giv
沒有留言:
張貼留言