diff options
Diffstat (limited to 'src/misc/extra/extraBddImage.c')
-rw-r--r-- | src/misc/extra/extraBddImage.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/misc/extra/extraBddImage.c b/src/misc/extra/extraBddImage.c index 23c1c682..11d60a40 100644 --- a/src/misc/extra/extraBddImage.c +++ b/src/misc/extra/extraBddImage.c @@ -170,7 +170,7 @@ Extra_ImageTree_t * Extra_bddImageStart( pNodes = Extra_CreateNodes( dd, nParts + 1, pParts, dd->size, pVars ); // create the tree - pTree = ALLOC( Extra_ImageTree_t, 1 ); + pTree = ABC_ALLOC( Extra_ImageTree_t, 1 ); memset( pTree, 0, sizeof(Extra_ImageTree_t) ); pTree->pCare = pNodes[nParts]; pTree->fVerbose = fVerbose; @@ -181,7 +181,7 @@ Extra_ImageTree_t * Extra_bddImageStart( // make sure the variables are gone for ( v = 0; v < dd->size; v++ ) assert( pVars[v] == NULL ); - FREE( pVars ); + ABC_FREE( pVars ); // merge the topmost nodes while ( (pTree->pRoot = Extra_MergeTopNodes( dd, nParts + 1, pNodes )) == NULL ); @@ -189,7 +189,7 @@ Extra_ImageTree_t * Extra_bddImageStart( // make sure the nodes are gone for ( v = 0; v < nParts + 1; v++ ) assert( pNodes[v] == NULL ); - FREE( pNodes ); + ABC_FREE( pNodes ); // if ( fVerbose ) // Extra_bddImagePrintTree( pTree ); @@ -199,7 +199,7 @@ Extra_ImageTree_t * Extra_bddImageStart( // clean the partitions Extra_DeleteParts_rec( pTree->pRoot ); - FREE( pParts ); + ABC_FREE( pParts ); return pTree; } @@ -229,9 +229,9 @@ DdNode * Extra_bddImageCompute( Extra_ImageTree_t * pTree, DdNode * bCare ) if ( bRem != b1 ) { printf( "Original care set support: " ); -PRB( dd, pTree->bCareSupp ); +ABC_PRB( dd, pTree->bCareSupp ); printf( "Current care set support: " ); -PRB( dd, bSupp ); +ABC_PRB( dd, bSupp ); Cudd_RecursiveDeref( dd, bSupp ); Cudd_RecursiveDeref( dd, bRem ); printf( "The care set depends on some vars that were not in the care set during scheduling.\n" ); @@ -272,7 +272,7 @@ void Extra_bddImageTreeDelete( Extra_ImageTree_t * pTree ) if ( pTree->bCareSupp ) Cudd_RecursiveDeref( pTree->pRoot->dd, pTree->bCareSupp ); Extra_bddImageTreeDelete_rec( pTree->pRoot ); - FREE( pTree ); + ABC_FREE( pTree ); } /**Function************************************************************* @@ -317,11 +317,11 @@ Extra_ImagePart_t ** Extra_CreateParts( DdManager * dd, int i; // start the partitions - pParts = ALLOC( Extra_ImagePart_t *, nParts + 1 ); + pParts = ABC_ALLOC( Extra_ImagePart_t *, nParts + 1 ); // create structures for each variable for ( i = 0; i < nParts; i++ ) { - pParts[i] = ALLOC( Extra_ImagePart_t, 1 ); + pParts[i] = ABC_ALLOC( Extra_ImagePart_t, 1 ); pParts[i]->bFunc = pbParts[i]; Cudd_Ref( pParts[i]->bFunc ); pParts[i]->bSupp = Cudd_Support( dd, pParts[i]->bFunc ); Cudd_Ref( pParts[i]->bSupp ); pParts[i]->nSupp = Extra_bddSuppSize( dd, pParts[i]->bSupp ); @@ -329,7 +329,7 @@ Extra_ImagePart_t ** Extra_CreateParts( DdManager * dd, pParts[i]->iPart = i; } // add the care set as the last partition - pParts[nParts] = ALLOC( Extra_ImagePart_t, 1 ); + pParts[nParts] = ABC_ALLOC( Extra_ImagePart_t, 1 ); pParts[nParts]->bFunc = bCare; Cudd_Ref( pParts[nParts]->bFunc ); pParts[nParts]->bSupp = Cudd_Support( dd, pParts[nParts]->bFunc ); Cudd_Ref( pParts[nParts]->bSupp ); pParts[nParts]->nSupp = Extra_bddSuppSize( dd, pParts[nParts]->bSupp ); @@ -359,11 +359,11 @@ Extra_ImageVar_t ** Extra_CreateVars( DdManager * dd, int nVarsTotal, iVar, p, Counter; // put all the functions into one array - pbFuncs = ALLOC( DdNode *, nParts ); + pbFuncs = ABC_ALLOC( DdNode *, nParts ); for ( p = 0; p < nParts; p++ ) pbFuncs[p] = pParts[p]->bSupp; bSupp = Cudd_VectorSupport( dd, pbFuncs, nParts ); Cudd_Ref( bSupp ); - FREE( pbFuncs ); + ABC_FREE( pbFuncs ); // remove the NS vars bCubeNs = Cudd_bddComputeCube( dd, pbVars, NULL, nVars ); Cudd_Ref( bCubeNs ); @@ -375,13 +375,13 @@ Extra_ImageVar_t ** Extra_CreateVars( DdManager * dd, nVarsTotal = Extra_bddSuppSize( dd, bSupp ); // start the variables - pVars = ALLOC( Extra_ImageVar_t *, dd->size ); + pVars = ABC_ALLOC( Extra_ImageVar_t *, dd->size ); memset( pVars, 0, sizeof(Extra_ImageVar_t *) * dd->size ); // create structures for each variable for ( bSuppTemp = bSupp; bSuppTemp != b1; bSuppTemp = cuddT(bSuppTemp) ) { iVar = bSuppTemp->index; - pVars[iVar] = ALLOC( Extra_ImageVar_t, 1 ); + pVars[iVar] = ABC_ALLOC( Extra_ImageVar_t, 1 ); pVars[iVar]->iNum = iVar; // collect all the parts this var belongs to Counter = 0; @@ -428,11 +428,11 @@ Extra_ImageNode_t ** Extra_CreateNodes( DdManager * dd, Extra_ImagePart_t * pPart; // the partition (temporary) */ // start the partitions - pNodes = ALLOC( Extra_ImageNode_t *, nParts ); + pNodes = ABC_ALLOC( Extra_ImageNode_t *, nParts ); // create structures for each leaf nodes for ( i = 0; i < nParts; i++ ) { - pNodes[i] = ALLOC( Extra_ImageNode_t, 1 ); + pNodes[i] = ABC_ALLOC( Extra_ImageNode_t, 1 ); memset( pNodes[i], 0, sizeof(Extra_ImageNode_t) ); pNodes[i]->dd = dd; pNodes[i]->pPart = pParts[i]; @@ -459,7 +459,7 @@ Extra_ImageNode_t ** Extra_CreateNodes( DdManager * dd, } // remove these variables Cudd_RecursiveDeref( dd, pVars[v]->bParts ); - FREE( pVars[v] ); + ABC_FREE( pVars[v] ); } // assign the leaf node images @@ -494,9 +494,9 @@ Extra_ImageNode_t ** Extra_CreateNodes( DdManager * dd, for ( i = 0; i < nParts; i++ ) { pNode = pNodes[i]; -PRB( dd, pNode->bCube ); -PRB( dd, pNode->pPart->bFunc ); -PRB( dd, pNode->pPart->bSupp ); +ABC_PRB( dd, pNode->bCube ); +ABC_PRB( dd, pNode->pPart->bFunc ); +ABC_PRB( dd, pNode->pPart->bSupp ); printf( "\n" ); } */ @@ -525,7 +525,7 @@ void Extra_DeleteParts_rec( Extra_ImageNode_t * pNode ) pPart = pNode->pPart; Cudd_RecursiveDeref( pNode->dd, pPart->bFunc ); Cudd_RecursiveDeref( pNode->dd, pPart->bSupp ); - FREE( pNode->pPart ); + ABC_FREE( pNode->pPart ); } /**Function************************************************************* @@ -550,7 +550,7 @@ void Extra_bddImageTreeDelete_rec( Extra_ImageNode_t * pNode ) if ( pNode->bImage ) Cudd_RecursiveDeref( pNode->dd, pNode->bImage ); assert( pNode->pPart == NULL ); - FREE( pNode ); + ABC_FREE( pNode ); } /**Function************************************************************* @@ -663,11 +663,11 @@ int Extra_BuildTreeNode( DdManager * dd, Cudd_RecursiveDeref( dd, bTemp ); // clean this var Cudd_RecursiveDeref( dd, pVars[v]->bParts ); - FREE( pVars[v] ); + ABC_FREE( pVars[v] ); } // clean the best var Cudd_RecursiveDeref( dd, pVars[iVarBest]->bParts ); - FREE( pVars[iVarBest] ); + ABC_FREE( pVars[iVarBest] ); // combines two nodes pNode = Extra_CombineTwoNodes( dd, bCube, pNode1, pNode2 ); @@ -783,7 +783,7 @@ Extra_ImageNode_t * Extra_CombineTwoNodes( DdManager * dd, DdNode * bCube, Extra_ImagePart_t * pPart; // create a new partition - pPart = ALLOC( Extra_ImagePart_t, 1 ); + pPart = ABC_ALLOC( Extra_ImagePart_t, 1 ); memset( pPart, 0, sizeof(Extra_ImagePart_t) ); // create the function pPart->bFunc = Cudd_bddAndAbstract( dd, pNode1->pPart->bFunc, pNode2->pPart->bFunc, bCube ); @@ -796,12 +796,12 @@ Extra_ImageNode_t * Extra_CombineTwoNodes( DdManager * dd, DdNode * bCube, pPart->nNodes = Cudd_DagSize( pPart->bFunc ); pPart->iPart = -1; /* -PRB( dd, pNode1->pPart->bSupp ); -PRB( dd, pNode2->pPart->bSupp ); -PRB( dd, pPart->bSupp ); +ABC_PRB( dd, pNode1->pPart->bSupp ); +ABC_PRB( dd, pNode2->pPart->bSupp ); +ABC_PRB( dd, pPart->bSupp ); */ // create a new node - pNode = ALLOC( Extra_ImageNode_t, 1 ); + pNode = ABC_ALLOC( Extra_ImageNode_t, 1 ); memset( pNode, 0, sizeof(Extra_ImageNode_t) ); pNode->dd = dd; pNode->pPart = pPart; @@ -1013,7 +1013,7 @@ void Extra_bddImagePrintTree_rec( Extra_ImageNode_t * pNode, int Offset ) printf( "<%d> ", pNode->pPart->iPart ); if ( Cube != NULL ) { - PRB( pNode->dd, Cube ); + ABC_PRB( pNode->dd, Cube ); } else printf( "\n" ); @@ -1023,7 +1023,7 @@ void Extra_bddImagePrintTree_rec( Extra_ImageNode_t * pNode, int Offset ) printf( "<*> " ); if ( Cube != NULL ) { - PRB( pNode->dd, Cube ); + ABC_PRB( pNode->dd, Cube ); } else printf( "\n" ); @@ -1069,7 +1069,7 @@ Extra_ImageTree2_t * Extra_bddImageStart2( DdNode * bCubeAll, * bCubeNot, * bTemp; int i; - pTree = ALLOC( Extra_ImageTree2_t, 1 ); + pTree = ABC_ALLOC( Extra_ImageTree2_t, 1 ); pTree->dd = dd; pTree->bImage = NULL; @@ -1130,7 +1130,7 @@ void Extra_bddImageTreeDelete2( Extra_ImageTree2_t * pTree ) Cudd_RecursiveDeref( pTree->dd, pTree->bCube ); if ( pTree->bImage ) Cudd_RecursiveDeref( pTree->dd, pTree->bImage ); - FREE( pTree ); + ABC_FREE( pTree ); } /**Function************************************************************* |