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

  Synopsis    [Reads the fraction of used slots in the cache.]

  Description [Reads the fraction of used slots in the cache. The unused
  slots are those in which no valid data is stored. Garbage collection,
  variable reordering, and cache resizing may cause used slots to become
  unused.]

  SideEffects [None]

  SeeAlso     [Cudd_ReadCacheSlots]

******************************************************************************/
Function
Synopsis    [Reads the fraction of used slots in the cache.]

Description [Reads the fraction of used slots in the cache. The unused
slots are those in which no valid data is stored. Garbage collection,
variable reordering, and cache resizing may cause used slots to become
unused.]




Function Synopsis [ Reads the fraction of used slots in the cache . ] Description [ Reads the fraction of used slots in the cache . The unused slots are those in which no valid data is stored . Garbage collection variable reordering and cache resizing may cause used slots to become unused . ]
double
Cudd_ReadCacheUsedSlots(
  DdManager * dd)
{
    unsigned long used = 0;
    int slots = dd->cacheSlots;
    DdCache *cache = dd->cache;
    int i;
    for (i = 0; i < slots; i++) {
        used += cache[i].h != 0;
    }
    return((double)used / (double) dd->cacheSlots);
}
double Cudd_ReadCacheUsedSlots ( DdManager * dd ) { unsigned long used = 0 ; int slots = dd -> cacheSlots ; DdCache * cache = dd -> cache ; int i ; for ( i = 0 ; i < slots ; i ++ ) { used += cache [ i ] . h != 0 ; } return ( ( double ) used / ( double ) dd -> cacheSlots ) ; }
Function
Synopsis    [Reads the fraction of used slots in the cache.]
Function Synopsis [ Reads the fraction of used slots in the cache . ]