diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2006-08-12 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2006-08-12 08:01:00 -0700 |
commit | eb2a5b43a46b90f3c46b388f50ea0ca8918983aa (patch) | |
tree | 55a47e46ceefc8837d8a05807d8b7169d763e3f0 /src/temp/player/playerToAbc.c | |
parent | 6b44b18e69f4e26249140e10c459615a77b32fc5 (diff) | |
download | abc-eb2a5b43a46b90f3c46b388f50ea0ca8918983aa.tar.gz abc-eb2a5b43a46b90f3c46b388f50ea0ca8918983aa.tar.bz2 abc-eb2a5b43a46b90f3c46b388f50ea0ca8918983aa.zip |
Version abc60812
Diffstat (limited to 'src/temp/player/playerToAbc.c')
-rw-r--r-- | src/temp/player/playerToAbc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/temp/player/playerToAbc.c b/src/temp/player/playerToAbc.c index 91994ca6..ca84ded1 100644 --- a/src/temp/player/playerToAbc.c +++ b/src/temp/player/playerToAbc.c @@ -446,7 +446,7 @@ static inline int Abc_NodePlayerCost( int nFanins ) SeeAlso [] ***********************************************************************/ -static inline int Abc_NtkPlayerCostOne( int nCost, int RankCost ) +static inline int Abc_NtkPlayerCostOneLevel( int nCost, int RankCost ) { return (nCost / RankCost) + ((nCost % RankCost) > 0); } @@ -466,7 +466,8 @@ int Abc_NtkPlayerCost( Abc_Ntk_t * pNtk, int RankCost, int fVerbose ) { Abc_Obj_t * pObj; int * pLevelCosts, * pLevelCostsR; - int nFanins, nLevels, LevelR, Cost, CostTotal, CostTotalR, nRanksTotal, nRanksTotalR, i; + int Cost, CostTotal, CostTotalR, nRanksTotal, nRanksTotalR; + int nFanins, nLevels, LevelR, i; // compute the reverse levels Abc_NtkStartReverseLevels( pNtk ); // compute the costs for each level @@ -491,17 +492,19 @@ int Abc_NtkPlayerCost( Abc_Ntk_t * pNtk, int RankCost, int fVerbose ) { CostTotal += pLevelCosts[i]; CostTotalR += pLevelCostsR[i]; - nRanksTotal += Abc_NtkPlayerCostOne( pLevelCosts[i], RankCost ); - nRanksTotalR += Abc_NtkPlayerCostOne( pLevelCostsR[i], RankCost ); + nRanksTotal += Abc_NtkPlayerCostOneLevel( pLevelCosts[i], RankCost ); + nRanksTotalR += Abc_NtkPlayerCostOneLevel( pLevelCostsR[i], RankCost ); } assert( CostTotal == CostTotalR ); // print out statistics if ( fVerbose ) { for ( i = 1; i <= nLevels; i++ ) + { printf( "Level %2d : Cost = %7d. Ranks = %6.3f. Cost = %7d. Ranks = %6.3f.\n", i, pLevelCosts[i], ((double)pLevelCosts[i])/RankCost, pLevelCostsR[nLevels+1-i], ((double)pLevelCostsR[nLevels+1-i])/RankCost ); + } printf( "TOTAL : Cost = %7d. Ranks = %6d. RanksR = %5d. RanksBest = %5d.\n", CostTotal, nRanksTotal, nRanksTotalR, nLevels ); } |