Template Function qhipster::ilog2

Function Documentation

template<class Integral>
unsigned int qhipster::ilog2(Integral n)

Returns the logarithm base 2 of a non-zero integer.

This function returns the the logarithm base 2 of a non-zero integer

Pre

The integer i is a power of 2

Parameters
  • [in] i: the non-zero integer of which the logarithm base 2 is returned