Retourner au contenu associé (dépêche : La quintessence des algorithmes bit à bit)
Posté par ribwund le 10 septembre 2006 à 14:24. En réponse à la dépêche La quintessence des algorithmes bit à bit. Évalué à 3.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: Bravo mais..
Posté par ribwund . En réponse à la dépêche La quintessence des algorithmes bit à bit. Évalué à 3.
— Built-in Function: int __builtin_ctz (unsigned int x)
Returns the number of trailing 0-bits in x, starting at the least significant bit position. If x is 0, the result is undefined.
et sinon dans /usr/src/linux/include/asm-i386/bitops.h, en 3 instructions assembleur:
/**
* fls - find last bit set
* @x: the word to search
*
* This is defined the same way as ffs.
*/
[1] http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#Other-(...)