33 INLINE
unsigned long intPow(
unsigned long base,
unsigned long exponent) {
34 if (exponent == 0) {
return 1UL; }
36 unsigned long out = base;
38 for (
unsigned long i = 1; i < exponent; i++)
46 INLINE
unsigned long int2Pow(
unsigned long exponent) {
return 1UL << exponent; }
53 unsigned long& num_bits,
54 unsigned long& new_card) {
64 while (new_card < card) {
unsigned long int2Pow(unsigned long exponent)
Specialized base 2 pow function with integer.
Implementation of pow functions with integers, faster than stl implementation.
gum is the global namespace for all aGrUM entities
void superiorPow(unsigned long card, unsigned long &num_bits, unsigned long &new_card)
Compute the superior and closest power of two of an integer.
unsigned long intPow(unsigned long base, unsigned long exponent)
Specialized pow function with integers (faster implementation).