next_pow2()

Updated: October 28, 2024

Round up to the next power of 2

Synopsis:

#include <qvm/utils.h>
static unsigned next_pow2(unsigned val)

Arguments:

val
The value to be rounded up.

Returns:

The value that has been rounded up to the next power of 2.