2023年12月15日 星期五

Rounding off to nearest power of 2

找出大於等於某個值的最小 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

沒有留言:

張貼留言

SIP header Via

所有 SIP 訊息 都要有 Via,縮寫 v。一開始的 UAC 和後續途經的每個 proxy 都會疊加一個 Via 放傳送的位址,依序作為回應的路徑。 格式 sent-protocol sent-by [ ;branch= branch ][ ; 參數 ...] s...