* Return logarithm of the nearest power of two above input value. * * @param v * Input value. * * @return * Logarithm of the nearest power of two above input value. */
| 295 | * Logarithm of the nearest power of two above input value. |
| 296 | */ |
| 297 | static inline unsigned int |
| 298 | log2above(unsigned int v) |
| 299 | { |
| 300 | unsigned int l; |
| 301 | unsigned int r; |
| 302 | |
| 303 | for (l = 0, r = 0; (v >> 1); ++l, v >>= 1) |
| 304 | r |= (v & 1); |
| 305 | return l + r; |
| 306 | } |
| 307 | |
| 308 | /********************************* indexed pool *************************/ |
| 309 |
no outgoing calls
no test coverage detected