diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-01-24 15:32:12 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-01-24 15:32:12 -0800 |
commit | 951ca48b9c0ef7ef5161795eb213bb9e199ee104 (patch) | |
tree | e6069e701db3002abad2797b6001c55c0456c6fb /src/opt/sfm | |
parent | 9ef447658e8e8b3bde9562493f83ffb86c3bd90f (diff) | |
download | abc-951ca48b9c0ef7ef5161795eb213bb9e199ee104.tar.gz abc-951ca48b9c0ef7ef5161795eb213bb9e199ee104.tar.bz2 abc-951ca48b9c0ef7ef5161795eb213bb9e199ee104.zip |
Small changes to sort for timing.
Diffstat (limited to 'src/opt/sfm')
-rw-r--r-- | src/opt/sfm/sfmTim.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/opt/sfm/sfmTim.c b/src/opt/sfm/sfmTim.c index d2880639..e9c40d04 100644 --- a/src/opt/sfm/sfmTim.c +++ b/src/opt/sfm/sfmTim.c @@ -336,13 +336,17 @@ void Sfm_TimUpdateTiming( Sfm_Tim_t * p, Vec_Int_t * vTimeNodes ) int Sfm_TimSortArrayByArrival( Sfm_Tim_t * p, Vec_Int_t * vNodes, int iPivot ) { word Entry; - int i, Id, nDivNew = -1; - int MaxDelay = Sfm_TimArrMaxId(p, iPivot); + int i, Id, Time, nDivNew = -1; + int MaxDelay = ABC_INFINITY/2+Sfm_TimArrMaxId(p, iPivot); assert( p->DeltaCrit > 0 ); // collect nodes Vec_WrdClear( &p->vSortData ); Vec_IntForEachEntry( vNodes, Id, i ) - Vec_WrdPush( &p->vSortData, ((word)Id << 32) | Sfm_TimArrMaxId(p, Id) ); + { + Time = Sfm_TimArrMaxId( p, Id ); + assert( -ABC_INFINITY/2 < Time && Time < ABC_INFINITY/2 ); + Vec_WrdPush( &p->vSortData, ((word)Id << 32) | (ABC_INFINITY/2+Time) ); + } // sort nodes by delay Abc_QuickSort3( Vec_WrdArray(&p->vSortData), Vec_WrdSize(&p->vSortData), 0 ); // collect sorted nodes and find place where divisors end |