diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-12-15 12:42:42 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-12-15 12:42:42 -0800 |
commit | b63b332bac5883c1a60064381a81c7543a636061 (patch) | |
tree | 7b58ecb1a270d34824d6941c7381cd79c5690514 | |
parent | 40ddda3edd9819782f46a40c690070279fea627c (diff) | |
download | abc-b63b332bac5883c1a60064381a81c7543a636061.tar.gz abc-b63b332bac5883c1a60064381a81c7543a636061.tar.bz2 abc-b63b332bac5883c1a60064381a81c7543a636061.zip |
Trying to make sorting of nodes platform-indendent.
-rw-r--r-- | src/aig/hop/hopBalance.c | 5 | ||||
-rw-r--r-- | src/aig/ivy/ivyBalance.c | 5 | ||||
-rw-r--r-- | src/aig/saig/saigBmc3.c | 5 | ||||
-rw-r--r-- | src/base/abc/abcNames.c | 5 | ||||
-rw-r--r-- | src/base/abc/abcUtil.c | 5 | ||||
-rw-r--r-- | src/base/abci/abcMffc.c | 5 |
6 files changed, 30 insertions, 0 deletions
diff --git a/src/aig/hop/hopBalance.c b/src/aig/hop/hopBalance.c index d7458bdc..e9aa4d4d 100644 --- a/src/aig/hop/hopBalance.c +++ b/src/aig/hop/hopBalance.c @@ -221,6 +221,11 @@ int Hop_NodeCompareLevelsDecrease( Hop_Obj_t ** pp1, Hop_Obj_t ** pp2 ) return -1; if ( Diff < 0 ) return 1; + Diff = Hop_Regular(*pp1)->Id - Hop_Regular(*pp2)->Id; + if ( Diff > 0 ) + return -1; + if ( Diff < 0 ) + return 1; return 0; } diff --git a/src/aig/ivy/ivyBalance.c b/src/aig/ivy/ivyBalance.c index 2d001f8c..6eba318c 100644 --- a/src/aig/ivy/ivyBalance.c +++ b/src/aig/ivy/ivyBalance.c @@ -103,6 +103,11 @@ int Ivy_NodeCompareLevelsDecrease( Ivy_Obj_t ** pp1, Ivy_Obj_t ** pp2 ) return -1; if ( Diff < 0 ) return 1; + Diff = Ivy_Regular(*pp1)->Id - Ivy_Regular(*pp2)->Id; + if ( Diff > 0 ) + return -1; + if ( Diff < 0 ) + return 1; return 0; } diff --git a/src/aig/saig/saigBmc3.c b/src/aig/saig/saigBmc3.c index f6ec3e0d..2dd7cbe3 100644 --- a/src/aig/saig/saigBmc3.c +++ b/src/aig/saig/saigBmc3.c @@ -1015,6 +1015,11 @@ int Aig_NodeCompareRefsIncrease( Aig_Obj_t ** pp1, Aig_Obj_t ** pp2 ) return -1; if ( Diff > 0 ) return 1; + Diff = Aig_ObjId(*pp1) - Aig_ObjId(*pp2); + if ( Diff < 0 ) + return -1; + if ( Diff > 0 ) + return 1; return 0; } diff --git a/src/base/abc/abcNames.c b/src/base/abc/abcNames.c index 0845f3d2..74e4e493 100644 --- a/src/base/abc/abcNames.c +++ b/src/base/abc/abcNames.c @@ -314,6 +314,11 @@ int Abc_NodeCompareNames( Abc_Obj_t ** pp1, Abc_Obj_t ** pp2 ) return -1; if ( Diff > 0 ) return 1; + Diff = (*pp1)->Id - (*pp2)->Id; + if ( Diff < 0 ) + return -1; + if ( Diff > 0 ) + return 1; return 0; } diff --git a/src/base/abc/abcUtil.c b/src/base/abc/abcUtil.c index 108514b5..0cf25ae3 100644 --- a/src/base/abc/abcUtil.c +++ b/src/base/abc/abcUtil.c @@ -1401,6 +1401,11 @@ int Abc_NodeCompareLevelsIncrease( Abc_Obj_t ** pp1, Abc_Obj_t ** pp2 ) return -1; if ( Diff > 0 ) return 1; + Diff = Abc_ObjRegular(*pp1)->Id - Abc_ObjRegular(*pp2)->Id; + if ( Diff < 0 ) + return -1; + if ( Diff > 0 ) + return 1; return 0; } diff --git a/src/base/abci/abcMffc.c b/src/base/abci/abcMffc.c index 3fb4bdf1..b4510bd0 100644 --- a/src/base/abci/abcMffc.c +++ b/src/base/abci/abcMffc.c @@ -1125,6 +1125,11 @@ int Abc_NodeCompareVolumeDecrease( Abc_Obj_t ** pp1, Abc_Obj_t ** pp2 ) return -1; if ( Diff < 0 ) return 1; + Diff = Abc_ObjRegular(*pp1)->Id - Abc_ObjRegular(*pp2)->Id; + if ( Diff > 0 ) + return -1; + if ( Diff < 0 ) + return 1; return 0; } |