Commit b63b332b by Alan Mishchenko

Trying to make sorting of nodes platform-indendent.

parent 40ddda3e
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
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