models/memory/CaffDRAM/Dsettings.cpp
bool Dsettings :: is_powerOf2(unsigned num)
{
    int bits = myLog2(num);
    return ((unsigned)(0x1 << bits) == num);
}
//! Test if a number is a power of 2.
Test if a number is a power of 2.
Test if a number is a power of 2 .
bool Dsettings :: is_powerOf2(unsigned num)
{
    int bits = myLog2(num);
    return ((unsigned)(0x1 << bits) == num);
}
bool Dsettings :: is_powerOf2 ( unsigned num ) { int bits = myLog2 ( num ) ; return ( ( unsigned ) ( 0x1 << bits ) == num ) ; }
Test if a number is a power of 2.
Test if a number is a power of 2 .