tlx
Loading...
Searching...
No Matches
round_to_power_of_two.hpp File Reference
#include <cstddef>

Go to the source code of this file.

Namespaces

namespace  tlx

Functions

template<typename Integral>
static Integral round_up_to_power_of_two_template (Integral n)
static int round_up_to_power_of_two (int i)
 does what it says: round up to next power of two
static unsigned int round_up_to_power_of_two (unsigned int i)
 does what it says: round up to next power of two
static long round_up_to_power_of_two (long i)
 does what it says: round up to next power of two
static unsigned long round_up_to_power_of_two (unsigned long i)
 does what it says: round up to next power of two
static long long round_up_to_power_of_two (long long i)
 does what it says: round up to next power of two
static unsigned long long round_up_to_power_of_two (unsigned long long i)
 does what it says: round up to next power of two
static int round_down_to_power_of_two (int i)
 does what it says: round down to next power of two
static unsigned int round_down_to_power_of_two (unsigned int i)
 does what it says: round down to next power of two
static long round_down_to_power_of_two (long i)
 does what it says: round down to next power of two
static unsigned long round_down_to_power_of_two (unsigned long i)
 does what it says: round down to next power of two
static long long round_down_to_power_of_two (long long i)
 does what it says: round down to next power of two
static unsigned long long round_down_to_power_of_two (unsigned long long i)
 does what it says: round down to next power of two