summaryrefslogtreecommitdiffstats
path: root/src/map
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2021-01-09 18:39:37 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2021-01-09 18:39:37 -0800
commite463930709e964aede28851114edb77b10d95501 (patch)
tree5a9e8593f7ec26b71b641557a7c7262f894b6574 /src/map
parentcd8843c06ce2a37067edb5116f0c735ce3e3b7c7 (diff)
downloadabc-e463930709e964aede28851114edb77b10d95501.tar.gz
abc-e463930709e964aede28851114edb77b10d95501.tar.bz2
abc-e463930709e964aede28851114edb77b10d95501.zip
Updating the mapper when user-specific matching is used.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/if/ifCut.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map/if/ifCut.c b/src/map/if/ifCut.c
index ad37b77f..42d31790 100644
--- a/src/map/if/ifCut.c
+++ b/src/map/if/ifCut.c
@@ -608,6 +608,10 @@ static inline int If_ManSortCompare( If_Man_t * p, If_Cut_t * pC0, If_Cut_t * pC
return -1;
if ( pC0->Delay > pC1->Delay + p->fEpsilon )
return 1;
+ if ( pC0->fUseless < pC1->fUseless )
+ return -1;
+ if ( pC0->fUseless > pC1->fUseless )
+ return 1;
return 0;
}
if ( p->SortMode == 0 ) // delay
@@ -632,6 +636,10 @@ static inline int If_ManSortCompare( If_Man_t * p, If_Cut_t * pC0, If_Cut_t * pC
return -1;
if ( pC0->Power > pC1->Power + p->fEpsilon )
return 1;
+ if ( pC0->fUseless < pC1->fUseless )
+ return -1;
+ if ( pC0->fUseless > pC1->fUseless )
+ return 1;
return 0;
}
assert( p->SortMode == 2 ); // delay old
@@ -639,6 +647,10 @@ static inline int If_ManSortCompare( If_Man_t * p, If_Cut_t * pC0, If_Cut_t * pC
return -1;
if ( pC0->Delay > pC1->Delay + p->fEpsilon )
return 1;
+ if ( pC0->fUseless < pC1->fUseless )
+ return -1;
+ if ( pC0->fUseless > pC1->fUseless )
+ return 1;
if ( pC0->Area < pC1->Area - p->fEpsilon )
return -1;
if ( pC0->Area > pC1->Area + p->fEpsilon )