abc/src/bdd/cudd/cuddCache.c
/**Function********************************************************************

  Synopsis    [Returns the floor of the logarithm to the base 2.]

  Description [Returns the floor of the logarithm to the base 2.
  The input value is assumed to be greater than 0.]

  SideEffects [None]

  SeeAlso     []

******************************************************************************/
Function
Synopsis    [Returns the floor of the logarithm to the base 2.]

Description [Returns the floor of the logarithm to the base 2.
The input value is assumed to be greater than 0.]




Function Synopsis [ Returns the floor of the logarithm to the base 2 . ] Description [ Returns the floor of the logarithm to the base 2 . The input value is assumed to be greater than 0 . ]
int
cuddComputeFloorLog2(
  unsigned int value)
{
    int floorLog = 0;
#ifdef DD_DEBUG
    assert(value > 0);
#endif
    while (value > 1) {
        floorLog++;
        value >>= 1;
    }
    return(floorLog);
}
int cuddComputeFloorLog2 ( unsigned int value ) { int floorLog = 0 ; #ifdef DD_DEBUG assert ( value > 0 ) ; #endif while ( value > 1 ) { floorLog ++ ; value >>= 1 ; } return ( floorLog ) ; }
Function
Synopsis    [Returns the floor of the logarithm to the base 2.]
Function Synopsis [ Returns the floor of the logarithm to the base 2 . ]