找出大於等於某個值的最小 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
訂閱:
張貼留言 (Atom)
SIP header Via
所有 SIP 訊息 都要有 Via,縮寫 v。一開始的 UAC 和後續途經的每個 proxy 都會疊加一個 Via 放傳送的位址,依序作為回應的路徑。 格式 sent-protocol sent-by [ ;branch= branch ][ ; 參數 ...] s...
-
網路界面驅動程式有兩種接收封包的方式 -- 中斷驅動和 NAPI。傳統是用中斷驅動,在中斷服務程式裡接收封包,但封包量大時會有中斷次數太多而效能變差的問題。NAPI (意思是 New API) 改成中斷服務程式只通知有封包,Kernel 再排程一次接收多個封包來提昇效能。 中...
-
busybox ntpd 是 NTP client,也可作為 NTP server。 參數 -d:Verbose -n:不常駐 -q:(quit) 時間設完後結束 -N:高優先權執行 -w:不設定時間,只是詢問 peers,隱含 -n -l:作為 NTP ser...
-
74HC595 74 系列的移位暫存器 IC 基本上都有序列輸入 (serial-input, SI) 及序列輸出 (serial-output, SO) 功能,有些有加上並列輸入 (parallel-input, PI) 或並列輸出 (parallel-output...
沒有留言:
張貼留言