Gromacs
2021.4
|
#include <gromacs/math/functions.h>
Specialization of StaticLog2<n> for n==0.
This specialization should never actually be used since log2(0) is negative infinity. However, since Log2() is often used to calculate the number of bits needed for a number, we might be using the value 0 with a conditional statement around the logarithm. Depending on the compiler the expansion of the template can occur before the conditional statement, so to avoid infinite recursion we need a specialization for the case n==0.
Static Public Attributes | |
static const int | value = -1 |
Base value for recursive static calculation of Log2(int) | |