diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-04-20 00:27:35 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-04-20 00:27:35 -0700 |
commit | d5555c51f00436bcf770b7cc9721bbca80aff08e (patch) | |
tree | 4c2c6e9a501f8c86b7387d8ccc7269543137da82 /src/aig | |
parent | d8647f0b7bafcd5177c060ce85f6c00f89ff253e (diff) | |
download | abc-d5555c51f00436bcf770b7cc9721bbca80aff08e.tar.gz abc-d5555c51f00436bcf770b7cc9721bbca80aff08e.tar.bz2 abc-d5555c51f00436bcf770b7cc9721bbca80aff08e.zip |
Fixing c++ portability issues.
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/gia/giaAiger.c | 12 | ||||
-rw-r--r-- | src/aig/llb/llb.h | 2 | ||||
-rw-r--r-- | src/aig/llb/llb4Cex.c | 2 | ||||
-rw-r--r-- | src/aig/llb/llb4Nonlin.c | 6 | ||||
-rw-r--r-- | src/aig/llb/llbInt.h | 2 |
5 files changed, 14 insertions, 10 deletions
diff --git a/src/aig/gia/giaAiger.c b/src/aig/gia/giaAiger.c index 7d6f7ad9..74171c2b 100644 --- a/src/aig/gia/giaAiger.c +++ b/src/aig/gia/giaAiger.c @@ -749,10 +749,10 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck pNew->vUserPiIds = Vec_IntStartFull( Gia_ManPiNum(pNew) ); pNew->vUserPoIds = Vec_IntStartFull( Gia_ManPoNum(pNew) ); pNew->vUserFfIds = Vec_IntStartFull( Gia_ManRegNum(pNew) ); - while ( pCur < pContents + nFileSize && *pCur != 'c' ) + while ( (char *)pCur < pContents + nFileSize && *pCur != 'c' ) { int iTerm; - char * pType = pCur; + char * pType = (char *)pCur; // check terminal type if ( *pCur != 'i' && *pCur != 'o' && *pCur != 'l' ) { @@ -761,7 +761,7 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck break; } // get terminal number - iTerm = atoi( ++pCur ); while ( *pCur++ != ' ' ); + iTerm = atoi( (char *)++pCur ); while ( *pCur++ != ' ' ); // skip spaces while ( *pCur++ == ' ' ); // decode the user numbers: @@ -774,11 +774,11 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck break; } if ( *pCur == 'i' && *pType == 'i' ) - Vec_IntWriteEntry( pNew->vUserPiIds, iTerm, atoi(pCur+1) ); + Vec_IntWriteEntry( pNew->vUserPiIds, iTerm, atoi((char *)pCur+1) ); else if ( *pCur == 'o' && *pType == 'o' ) - Vec_IntWriteEntry( pNew->vUserPoIds, iTerm, atoi(pCur+1) ); + Vec_IntWriteEntry( pNew->vUserPoIds, iTerm, atoi((char *)pCur+1) ); else if ( *pCur == 'l' && *pType == 'l' ) - Vec_IntWriteEntry( pNew->vUserFfIds, iTerm, atoi(pCur+1) ); + Vec_IntWriteEntry( pNew->vUserFfIds, iTerm, atoi((char *)pCur+1) ); else { fprintf( stdout, "Wrong name format.\n" ); diff --git a/src/aig/llb/llb.h b/src/aig/llb/llb.h index 3cbd8136..e5fa6956 100644 --- a/src/aig/llb/llb.h +++ b/src/aig/llb/llb.h @@ -79,6 +79,8 @@ struct Gia_ParLlb_t_ /*=== llbCore.c ==========================================================*/ extern void Llb_ManSetDefaultParams( Gia_ParLlb_t * pPars ); +/*=== llb4Nonlin.c ==========================================================*/ +extern int Llb_Nonlin4CoreReach( Aig_Man_t * pAig, Gia_ParLlb_t * pPars ); diff --git a/src/aig/llb/llb4Cex.c b/src/aig/llb/llb4Cex.c index 54b4d965..42515a77 100644 --- a/src/aig/llb/llb4Cex.c +++ b/src/aig/llb/llb4Cex.c @@ -90,7 +90,7 @@ Abc_Cex_t * Llb4_Nonlin4TransformCex( Aig_Man_t * pAig, Vec_Ptr_t * vStates, int // solve each time frame iBit = Saig_ManRegNum(pAig); - pThis = Vec_PtrEntry( vStates, 0 ); + pThis = (unsigned *)Vec_PtrEntry( vStates, 0 ); vAssumps = Vec_IntAlloc( 2 * Aig_ManRegNum(pAig) ); Vec_PtrForEachEntryStart( unsigned *, vStates, pNext, i, 1 ) { diff --git a/src/aig/llb/llb4Nonlin.c b/src/aig/llb/llb4Nonlin.c index b153c8af..8c2f1657 100644 --- a/src/aig/llb/llb4Nonlin.c +++ b/src/aig/llb/llb4Nonlin.c @@ -916,7 +916,7 @@ void Llb_Nonlin4Reorder( DdManager * dd, int fTwice, int fVerbose ) if ( fVerbose ) Abc_PrintTime( 1, "Time", clock() - clk ); } - + /**Function************************************************************* Synopsis [] @@ -947,6 +947,7 @@ Llb_Mnx_t * Llb_MnxStart( Aig_Man_t * pAig, Gia_ParLlb_t * pPars ) p->vOrder = Llb_Nonlin4CreateOrder( pAig ); p->dd = Cudd_Init( Vec_IntSize(p->vOrder), 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0 ); Cudd_AutodynEnable( p->dd, CUDD_REORDER_SYMM_SIFT ); + Cudd_SetMaxGrowth( p->dd, 1.05 ); p->vRoots = Llb_Nonlin4DerivePartitions( p->dd, pAig, p->vOrder ); } @@ -958,7 +959,7 @@ Llb_Mnx_t * Llb_MnxStart( Aig_Man_t * pAig, Gia_ParLlb_t * pPars ) Llb_Nonlin4Reorder( p->dd, 0, 1 ); return p; } - + /**Function************************************************************* Synopsis [] @@ -1000,6 +1001,7 @@ void Llb_MnxStop( Llb_Mnx_t * p ) // remove arrays Vec_PtrFree( p->vRings ); Vec_PtrFree( p->vRoots ); +Cudd_PrintInfo( p->dd, stdout ); Extra_StopManager( p->dd ); Vec_IntFreeP( &p->vOrder ); Vec_IntFreeP( &p->vVars2Q ); diff --git a/src/aig/llb/llbInt.h b/src/aig/llb/llbInt.h index ce62f79b..93165159 100644 --- a/src/aig/llb/llbInt.h +++ b/src/aig/llb/llbInt.h @@ -195,7 +195,7 @@ extern Vec_Ptr_t * Llb_Nonlin4Group( DdManager * dd, Vec_Ptr_t * vParts, Vec /*=== llb4Map.c =========================================================*/ //extern Vec_Int_t * Llb_AigMap( Aig_Man_t * pAig, int nLutSize, int nLutMin ); /*=== llb4Nonlin.c ======================================================*/ -extern int Llb_Nonlin4CoreReach( Aig_Man_t * pAig, Gia_ParLlb_t * pPars ); +//extern int Llb_Nonlin4CoreReach( Aig_Man_t * pAig, Gia_ParLlb_t * pPars ); /*=== llb4Sweep.c ======================================================*/ extern void Llb4_Nonlin4Sweep( Aig_Man_t * pAig, int nSweepMax, int nClusterMax, DdManager ** pdd, Vec_Int_t ** pvOrder, Vec_Ptr_t ** pvGroups, int fVerbose ); |