Commit 4bf51de5 authored by Rusty Russell's avatar Rusty Russell

ilog: reformat so webpage doesn't get confused.

The extra spaces make my web formatter think they're literal text, which
looks weird.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent fa1277d4
...@@ -2,15 +2,18 @@ ...@@ -2,15 +2,18 @@
* ilog - Integer logarithm. * ilog - Integer logarithm.
* *
* ilog_32() and ilog_64() compute the minimum number of bits required to store * ilog_32() and ilog_64() compute the minimum number of bits required to store
* an unsigned 32-bit or 64-bit value without any leading zero bits. * an unsigned 32-bit or 64-bit value without any leading zero bits.
*
* This can also be thought of as the location of the highest set bit, with * This can also be thought of as the location of the highest set bit, with
* counting starting from one (so that 0 returns 0, 1 returns 1, and 2**31 * counting starting from one (so that 0 returns 0, 1 returns 1, and 2**31
* returns 32). * returns 32).
*
* When the value is known to be non-zero ilog32_nz() and ilog64_nz() can * When the value is known to be non-zero ilog32_nz() and ilog64_nz() can
* compile into as few as two instructions, one of which may get optimized out * compile into as few as two instructions, one of which may get optimized out
* later. * later.
*
* STATIC_ILOG_32 and STATIC_ILOG_64 allow computation on compile-time * STATIC_ILOG_32 and STATIC_ILOG_64 allow computation on compile-time
* constants, so other compile-time constants can be derived from them. * constants, so other compile-time constants can be derived from them.
* *
* Example: * Example:
* #include <stdio.h> * #include <stdio.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment