Commit d5555c51 by Alan Mishchenko

Fixing c++ portability issues.

parent d8647f0b
......@@ -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" );
......
......@@ -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 );
......
......@@ -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 )
{
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -8525,7 +8525,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
}
*/
/*
{
// extern void Llb_Nonlin4Cluster( Aig_Man_t * pAig );
// extern void Aig_ManTerSimulate( Aig_Man_t * pAig );
......@@ -8537,15 +8537,8 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
// Llb4_Nonlin4SweepExperiment( pAig );
Aig_ManStop( pAig );
}
/*
{
extern void Ssm_ManExperiment( char * pFileIn, char * pFileOut );
// Ssm_ManExperiment( "m\\big2.ssim", "m\\big2_.ssim" );
Ssm_ManExperiment( "m\\big3.ssim", "m\\big3_.ssim" );
}
*/
return 0;
usage:
Abc_Print( -2, "usage: test [-CKDN] [-vwh] <file_name>\n" );
......@@ -28088,7 +28081,6 @@ int Abc_CommandAbc9ReachY( Abc_Frame_t * pAbc, int argc, char ** argv )
Aig_Man_t * pMan;
char * pLogFileName = NULL;
int c;
extern int Llb_Nonlin4CoreReach( Aig_Man_t * pAig, Gia_ParLlb_t * pPars );
// set defaults
Llb_ManSetDefaultParams( pPars );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment