diff options
Diffstat (limited to 'src/aig/gia')
-rw-r--r-- | src/aig/gia/gia.h | 4 | ||||
-rw-r--r-- | src/aig/gia/giaIf.c | 7 | ||||
-rw-r--r-- | src/aig/gia/giaMan.c | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index addf27f3..f8668224 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -195,7 +195,7 @@ struct Gps_Par_t_ int fCut; int fNpn; int fLutProf; - int fDumpFile; + char * pDumpFile; }; typedef struct Emb_Par_t_ Emb_Par_t; @@ -1089,7 +1089,7 @@ extern void Gia_ManHashProfile( Gia_Man_t * p ); extern int Gia_ManHashLookup( Gia_Man_t * p, Gia_Obj_t * p0, Gia_Obj_t * p1 ); extern int Gia_ManHashAndMulti( Gia_Man_t * p, Vec_Int_t * vLits ); /*=== giaIf.c ===========================================================*/ -extern void Gia_ManPrintMappingStats( Gia_Man_t * p, int fDumpFile ); +extern void Gia_ManPrintMappingStats( Gia_Man_t * p, char * pDumpFile ); extern void Gia_ManPrintPackingStats( Gia_Man_t * p ); extern void Gia_ManPrintLutStats( Gia_Man_t * p ); extern int Gia_ManLutFaninCount( Gia_Man_t * p ); diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c index b267e7f3..d665b4cb 100644 --- a/src/aig/gia/giaIf.c +++ b/src/aig/gia/giaIf.c @@ -305,7 +305,7 @@ int Gia_ManComputeOverlap( Gia_Man_t * p ) SeeAlso [] ***********************************************************************/ -void Gia_ManPrintMappingStats( Gia_Man_t * p, int fDumpFile ) +void Gia_ManPrintMappingStats( Gia_Man_t * p, char * pDumpFile ) { int * pLevels; int i, k, iFan, nLutSize = 0, nLuts = 0, nFanins = 0, LevelMax = 0; @@ -331,12 +331,11 @@ void Gia_ManPrintMappingStats( Gia_Man_t * p, int fDumpFile ) Abc_Print( 1, "mem =%5.2f MB", 4.0*(Gia_ManObjNum(p) + 2*nLuts + nFanins)/(1<<20) ); Abc_Print( 1, "\n" ); - if ( fDumpFile ) + if ( pDumpFile ) { - char * pFileName = "stats_map.txt"; static char FileNameOld[1000] = {0}; static abctime clk = 0; - FILE * pTable = fopen( pFileName, "a+" ); + FILE * pTable = fopen( pDumpFile, "a+" ); if ( strcmp( FileNameOld, p->pName ) ) { sprintf( FileNameOld, "%s", p->pName ); diff --git a/src/aig/gia/giaMan.c b/src/aig/gia/giaMan.c index 00ab594e..805ab4f9 100644 --- a/src/aig/gia/giaMan.c +++ b/src/aig/gia/giaMan.c @@ -369,7 +369,7 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars ) if ( p->pSibls ) Gia_ManPrintChoiceStats( p ); if ( Gia_ManHasMapping(p) ) - Gia_ManPrintMappingStats( p, pPars && pPars->fDumpFile ); + Gia_ManPrintMappingStats( p, pPars ? pPars->pDumpFile : NULL ); if ( pPars && pPars->fNpn && Gia_ManHasMapping(p) && Gia_ManLutSizeMax(p) <= 4 ) Gia_ManPrintNpnClasses( p ); if ( p->vPacking ) |