data-structures-c
|
Round up to the next power of two. More...
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Functions | |
static uint32_t | round_up_pow2_32 (uint32_t x) |
Round up to the next power of two.
Sources used:
|
inlinestatic |
Round up to the next power of two.
Assumes:
x
is strictly larger than 0. x
is smaller than than or equal to UINT32_MAX / 2 + 1.x | The number at hand. |