diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
commit | 0871bffae307e0553e0c5186336189e8b55cf6a6 (patch) | |
tree | 4571d1563fe33a53a57fea1c35fb668b9d33265f /src/opt/rwr/rwrUtil.c | |
parent | f936cc0680c98ffe51b3a1716c996072d5dbf76c (diff) | |
download | abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.gz abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.bz2 abc-0871bffae307e0553e0c5186336189e8b55cf6a6.zip |
Version abc90215
Diffstat (limited to 'src/opt/rwr/rwrUtil.c')
-rw-r--r-- | src/opt/rwr/rwrUtil.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/opt/rwr/rwrUtil.c b/src/opt/rwr/rwrUtil.c index b2add2bf..8da3b6eb 100644 --- a/src/opt/rwr/rwrUtil.c +++ b/src/opt/rwr/rwrUtil.c @@ -78,7 +78,7 @@ void Rwr_ManWriteToArray( Rwr_Man_t * p ) Extra_PrintHex( pFile, 0, 4 ); fprintf( pFile, " \n};\n" ); fclose( pFile ); - printf( "The number of nodes saved = %d. ", nEntries ); PRT( "Saving", clock() - clk ); + printf( "The number of nodes saved = %d. ", nEntries ); ABC_PRT( "Saving", clock() - clk ); } /**Function************************************************************* @@ -127,7 +127,7 @@ void Rwr_ManLoadFromArray( Rwr_Man_t * p, int fVerbose ) if ( fVerbose ) { printf( "The number of classes = %d. Canonical nodes = %d.\n", p->nClasses, p->nAdded ); - printf( "The number of nodes loaded = %d. ", nEntries ); PRT( "Loading", clock() - clk ); + printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", clock() - clk ); } } @@ -151,7 +151,7 @@ void Rwr_ManWriteToFile( Rwr_Man_t * p, char * pFileName ) int i, nEntries, clk = clock(); // prepare the buffer nEntries = p->vForest->nSize - 5; - pBuffer = ALLOC( unsigned, nEntries * 2 ); + pBuffer = ABC_ALLOC( unsigned, nEntries * 2 ); for ( i = 0; i < nEntries; i++ ) { pNode = p->vForest->pArray[i+5]; @@ -164,9 +164,9 @@ void Rwr_ManWriteToFile( Rwr_Man_t * p, char * pFileName ) pFile = fopen( pFileName, "wb" ); fwrite( &nEntries, sizeof(int), 1, pFile ); fwrite( pBuffer, sizeof(unsigned), nEntries * 2, pFile ); - free( pBuffer ); + ABC_FREE( pBuffer ); fclose( pFile ); - printf( "The number of nodes saved = %d. ", nEntries ); PRT( "Saving", clock() - clk ); + printf( "The number of nodes saved = %d. ", nEntries ); ABC_PRT( "Saving", clock() - clk ); } /**Function************************************************************* @@ -196,7 +196,7 @@ void Rwr_ManLoadFromFile( Rwr_Man_t * p, char * pFileName ) return; } fread( &nEntries, sizeof(int), 1, pFile ); - pBuffer = ALLOC( unsigned, nEntries * 2 ); + pBuffer = ABC_ALLOC( unsigned, nEntries * 2 ); fread( pBuffer, sizeof(unsigned), nEntries * 2, pFile ); fclose( pFile ); // reconstruct the forest @@ -218,9 +218,9 @@ void Rwr_ManLoadFromFile( Rwr_Man_t * p, char * pFileName ) // Rwr_ManTryNode( p, p0, p1, Level, Volume ); Rwr_ManAddNode( p, p0, p1, fExor, Level, Volume + fExor ); } - free( pBuffer ); + ABC_FREE( pBuffer ); printf( "The number of classes = %d. Canonical nodes = %d.\n", p->nClasses, p->nAdded ); - printf( "The number of nodes loaded = %d. ", nEntries ); PRT( "Loading", clock() - clk ); + printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", clock() - clk ); } @@ -260,7 +260,7 @@ char * Rwr_ManGetPractical( Rwr_Man_t * p ) { char * pPractical; int i; - pPractical = ALLOC( char, p->nFuncs ); + pPractical = ABC_ALLOC( char, p->nFuncs ); memset( pPractical, 0, sizeof(char) * p->nFuncs ); pPractical[0] = 1; for ( i = 1; ; i++ ) |