Commit 76b00a2d by Alan Mishchenko

Compilation problem with pow().

parent 1d1b11cb
...@@ -196,7 +196,7 @@ void Cba_NtkPrintDistrib( Cba_Ntk_t * p, int fVerbose ) ...@@ -196,7 +196,7 @@ void Cba_NtkPrintDistrib( Cba_Ntk_t * p, int fVerbose )
else if ( Type == CBA_BOX_MOD ) else if ( Type == CBA_BOX_MOD )
Vec_IntAddToEntry( vAnds, CBA_BOX_MOD, 13 * Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)) * Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)) - 7 * Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)) - 2 ); Vec_IntAddToEntry( vAnds, CBA_BOX_MOD, 13 * Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)) * Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)) - 7 * Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)) - 2 );
else if ( Type == CBA_BOX_POW ) else if ( Type == CBA_BOX_POW )
Vec_IntAddToEntry( vAnds, CBA_BOX_POW, 10 * (int)pow(Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)),Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0))) ); Vec_IntAddToEntry( vAnds, CBA_BOX_POW, 10 * (int)pow((double)Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)),(double)Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0))) );
else if ( Type == CBA_BOX_MIN ) else if ( Type == CBA_BOX_MIN )
Vec_IntAddToEntry( vAnds, CBA_BOX_MIN, 4 * Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)) ); Vec_IntAddToEntry( vAnds, CBA_BOX_MIN, 4 * Cba_ObjRangeSize(p, Cba_ObjFinFon(p, i, 0)) );
else if ( Type == CBA_BOX_SQRT ) else if ( Type == CBA_BOX_SQRT )
......
...@@ -559,7 +559,7 @@ void Wlc_NtkPrintDistrib( Wlc_Ntk_t * p, int fTwoSides, int fVerbose ) ...@@ -559,7 +559,7 @@ void Wlc_NtkPrintDistrib( Wlc_Ntk_t * p, int fTwoSides, int fVerbose )
else if ( pObj->Type == WLC_OBJ_ARI_MODULUS ) else if ( pObj->Type == WLC_OBJ_ARI_MODULUS )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_MODULUS, 13 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 7 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 2 ); Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_MODULUS, 13 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 7 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) - 2 );
else if ( pObj->Type == WLC_OBJ_ARI_POWER ) else if ( pObj->Type == WLC_OBJ_ARI_POWER )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_POWER, 10 * (int)pow(Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)),Wlc_ObjRange(Wlc_ObjFanin0(p, pObj))) ); Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_POWER, 10 * (int)pow((double)Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)),(double)Wlc_ObjRange(Wlc_ObjFanin0(p, pObj))) );
else if ( pObj->Type == WLC_OBJ_ARI_MINUS ) else if ( pObj->Type == WLC_OBJ_ARI_MINUS )
Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_MINUS, 4 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) ); Vec_IntAddToEntry( vAnds, WLC_OBJ_ARI_MINUS, 4 * Wlc_ObjRange(Wlc_ObjFanin0(p, pObj)) );
else if ( pObj->Type == WLC_OBJ_ARI_SQRT ) else if ( pObj->Type == WLC_OBJ_ARI_SQRT )
......
...@@ -401,8 +401,8 @@ void Abc_SclBufSize( Bus_Man_t * p, float Gain ) ...@@ -401,8 +401,8 @@ void Abc_SclBufSize( Bus_Man_t * p, float Gain )
abctime clk = Abc_Clock(); abctime clk = Abc_Clock();
int i, k, nObjsOld = Abc_NtkObjNumMax(p->pNtk); int i, k, nObjsOld = Abc_NtkObjNumMax(p->pNtk);
float GainGate, GainInv, Load, LoadNew, Cin, DeptMax = 0; float GainGate, GainInv, Load, LoadNew, Cin, DeptMax = 0;
GainGate = p->pPars->fAddBufs ? pow( Gain, 2.0 ) : Gain; GainGate = p->pPars->fAddBufs ? (float)pow( (double)Gain, (double)2.0 ) : Gain;
GainInv = p->pPars->fAddBufs ? pow( Gain, 2.0 ) : Gain; GainInv = p->pPars->fAddBufs ? (float)pow( (double)Gain, (double)2.0 ) : Gain;
Abc_NtkForEachObjReverse( p->pNtk, pObj, i ) Abc_NtkForEachObjReverse( p->pNtk, pObj, i )
{ {
if ( !((Abc_ObjIsNode(pObj) && Abc_ObjFaninNum(pObj) > 0) || (Abc_ObjIsCi(pObj) && p->pPiDrive)) ) if ( !((Abc_ObjIsNode(pObj) && Abc_ObjFaninNum(pObj) > 0) || (Abc_ObjIsCi(pObj) && p->pPiDrive)) )
......
...@@ -462,7 +462,7 @@ int Cec_GiaSplitTest2( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, in ...@@ -462,7 +462,7 @@ int Cec_GiaSplitTest2( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, in
status = Cnf_GiaSolveOne( pPart, pCnf, nTimeOut, &nSatVars, &nSatConfs ); status = Cnf_GiaSolveOne( pPart, pCnf, nTimeOut, &nSatVars, &nSatConfs );
Cnf_DataFree( pCnf ); Cnf_DataFree( pCnf );
if ( status == 1 ) if ( status == 1 )
Progress += 1.0 / pow(2, Depth); Progress += 1.0 / pow((double)2, (double)Depth);
if ( fVerbose ) if ( fVerbose )
Cec_GiaSplitPrint( nIter, Depth, nSatVars, nSatConfs, status, Progress, Abc_Clock() - clkTotal ); Cec_GiaSplitPrint( nIter, Depth, nSatVars, nSatConfs, status, Progress, Abc_Clock() - clkTotal );
if ( status == 0 ) // SAT if ( status == 0 ) // SAT
...@@ -489,7 +489,7 @@ int Cec_GiaSplitTest2( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, in ...@@ -489,7 +489,7 @@ int Cec_GiaSplitTest2( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, in
status = Cnf_GiaSolveOne( pPart, pCnf, nTimeOut, &nSatVars, &nSatConfs ); status = Cnf_GiaSolveOne( pPart, pCnf, nTimeOut, &nSatVars, &nSatConfs );
Cnf_DataFree( pCnf ); Cnf_DataFree( pCnf );
if ( status == 1 ) if ( status == 1 )
Progress += 1.0 / pow(2, Depth); Progress += 1.0 / pow((double)2, (double)Depth);
if ( fVerbose ) if ( fVerbose )
Cec_GiaSplitPrint( nIter, Depth, nSatVars, nSatConfs, status, Progress, Abc_Clock() - clkTotal ); Cec_GiaSplitPrint( nIter, Depth, nSatVars, nSatConfs, status, Progress, Abc_Clock() - clkTotal );
if ( status == 0 ) // SAT if ( status == 0 ) // SAT
...@@ -681,7 +681,7 @@ int Cec_GiaSplitTestInt( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, ...@@ -681,7 +681,7 @@ int Cec_GiaSplitTestInt( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax,
nIter++; nIter++;
} }
else else
Progress += 1.0 / pow(2, Depth); Progress += 1.0 / pow((double)2, (double)Depth);
Gia_ManStopP( &ThData[i].p ); Gia_ManStopP( &ThData[i].p );
if ( ThData[i].pCnf == NULL ) if ( ThData[i].pCnf == NULL )
continue; continue;
......
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