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

  Synopsis    [Prepares the DD heap for dynamic reordering.]

  Description [Prepares the DD heap for dynamic reordering. Does
  garbage collection, to guarantee that there are no dead nodes;
  clears the cache, which is invalidated by dynamic reordering; initializes
  the number of isolated projection functions; and initializes the
  interaction matrix.  Returns 1 in case of success; 0 otherwise.]

  SideEffects [None]

******************************************************************************/
Function
Synopsis    [Prepares the DD heap for dynamic reordering.]

Description [Prepares the DD heap for dynamic reordering. Does
garbage collection, to guarantee that there are no dead nodes;
clears the cache, which is invalidated by dynamic reordering; initializes
the number of isolated projection functions; and initializes the
interaction matrix.  Returns 1 in case of success; 0 otherwise.]


Function Synopsis [ Prepares the DD heap for dynamic reordering . ] Description [ Prepares the DD heap for dynamic reordering . Does garbage collection to guarantee that there are no dead nodes ; clears the cache which is invalidated by dynamic reordering ; initializes the number of isolated projection functions ; and initializes the interaction matrix . Returns 1 in case of success ; 0 otherwise . ]
static int
ddReorderPreprocess(
  DdManager * table)
{
    int i;
    int res;
    cuddCacheFlush(table);
    cuddLocalCacheClearAll(table);
    cuddGarbageCollect(table,0);
    table->isolated = 0;
    for (i = 0; i < table->size; i++) {
        if (table->vars[i]->ref == 1) table->isolated++;
    }
    res = cuddInitInteract(table);
    if (res == 0) return(0);
    return(1);
}
static int ddReorderPreprocess ( DdManager * table ) { int i ; int res ; cuddCacheFlush ( table ) ; cuddLocalCacheClearAll ( table ) ; cuddGarbageCollect ( table , 0 ) ; table -> isolated = 0 ; for ( i = 0 ; i < table -> size ; i ++ ) { if ( table -> vars [ i ] -> ref == 1 ) table -> isolated ++ ; } res = cuddInitInteract ( table ) ; if ( res == 0 ) return ( 0 ) ; return ( 1 ) ; }
Function
Synopsis    [Prepares the DD heap for dynamic reordering.]
Function Synopsis [ Prepares the DD heap for dynamic reordering . ]
/* Clear the cache. */ /* Eliminate dead nodes. Do not scan the cache again. */ /* Initialize number of isolated projection functions. */ /* Initialize the interaction matrix. */