P99
|
Branchless arithmetic and bit twiddling snippets. More...
#include "p99_int.h"
Go to the source code of this file.
Macros | |
#define | p99_arith_abs(X) (P99_SIGNED(X) ? p00_arith_abs(X) : P99_RVAL(uintmax_t, (X))) |
Functions | |
P99_CONST_FUNCTION uintmax_t | p99_arith_log2 (uintmax_t p00_a) |
Computes the floored base-2 logarithm. More... | |
P99_CONST_FUNCTION intmax_t | p99_arith_max (intmax_t p00_a, intmax_t p00_b) |
P99_CONST_FUNCTION intmax_t | p99_arith_min (intmax_t p00_a, intmax_t p00_b) |
P99_CONST_FUNCTION uintmax_t | p99_arith_next_pow2 (uintmax_t p00_a) |
P99_CONST_FUNCTION uintmax_t | p99_arith_prev_pow2 (uintmax_t p00_a) |
Branchless arithmetic and bit twiddling snippets.
Definition in file p99_arith.h.