summaryrefslogtreecommitdiffstats
path: root/src/aig
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2021-09-26 11:30:54 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2021-09-26 11:30:54 -0700
commitba64e78608064612db61d6515f19dd2cabe69cee (patch)
treed4df3672f9d056a010244711f73c848e020168e8 /src/aig
parent2ce1ce8bed69623de58d9394e22a3a8812096561 (diff)
downloadabc-ba64e78608064612db61d6515f19dd2cabe69cee.tar.gz
abc-ba64e78608064612db61d6515f19dd2cabe69cee.tar.bz2
abc-ba64e78608064612db61d6515f19dd2cabe69cee.zip
Changing declaration of Vec_Ptr_t sorting function to satisfy some compilers.
Diffstat (limited to 'src/aig')
-rw-r--r--src/aig/gia/giaDup.c6
-rw-r--r--src/aig/gia/giaIso.c6
-rw-r--r--src/aig/gia/giaIso2.c2
-rw-r--r--src/aig/hop/hopBalance.c2
-rw-r--r--src/aig/ivy/ivyBalance.c2
-rw-r--r--src/aig/ivy/ivyCutTrav.c2
-rw-r--r--src/aig/ivy/ivyRwrAlg.c2
-rw-r--r--src/aig/saig/saigConstr.c4
-rw-r--r--src/aig/saig/saigIso.c4
-rw-r--r--src/aig/saig/saigIsoFast.c2
-rw-r--r--src/aig/saig/saigIsoSlow.c8
-rw-r--r--src/aig/saig/saigWnd.c2
12 files changed, 21 insertions, 21 deletions
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c
index 65eff161..b3fcd295 100644
--- a/src/aig/gia/giaDup.c
+++ b/src/aig/gia/giaDup.c
@@ -3582,7 +3582,7 @@ Gia_Man_t * Gia_ManDupCones( Gia_Man_t * p, int * pPos, int nPos, int fTrimPis )
Gia_ObjSetTravIdCurrent( p, Gia_ManConst0(p) );
Vec_PtrForEachEntry( Gia_Obj_t *, vRoots, pObj, i )
Gia_ManDupCones_rec( p, pObj, vLeaves, vNodes, vRoots );
- Vec_PtrSort( vLeaves, (int (*)(void))Gia_ObjCompareByCioId );
+ Vec_PtrSort( vLeaves, (int (*)(const void *, const void *))Gia_ObjCompareByCioId );
// start the new manager
// Gia_ManFillValue( p );
@@ -3644,7 +3644,7 @@ Gia_Man_t * Gia_ManDupAndCones( Gia_Man_t * p, int * pAnds, int nAnds, int fTrim
Gia_ObjSetTravIdCurrent( p, Gia_ManConst0(p) );
Vec_PtrForEachEntry( Gia_Obj_t *, vRoots, pObj, i )
Gia_ManDupCones_rec( p, pObj, vLeaves, vNodes, vRoots );
- Vec_PtrSort( vLeaves, (int (*)(void))Gia_ObjCompareByCioId );
+ Vec_PtrSort( vLeaves, (int (*)(const void *, const void *))Gia_ObjCompareByCioId );
// start the new manager
// Gia_ManFillValue( p );
@@ -4381,7 +4381,7 @@ Gia_Man_t * Gia_ManDupDemiter( Gia_Man_t * p, int fVerbose )
vSuperPtr = Vec_PtrAlloc( Vec_IntSize(vSuper) );
Vec_IntForEachEntry( vSuper, iLit, i )
Vec_PtrPush( vSuperPtr, Gia_Lit2Obj(p, iLit) );
- Vec_PtrSort( vSuperPtr, (int (*)(void))Gia_ManSortByValue );
+ Vec_PtrSort( vSuperPtr, (int (*)(const void *, const void *))Gia_ManSortByValue );
// create new manager
pNew = Gia_ManStart( Gia_ManObjNum(p) );
pNew->pName = Abc_UtilStrsav( p->pName );
diff --git a/src/aig/gia/giaIso.c b/src/aig/gia/giaIso.c
index 76419e93..fcfa3448 100644
--- a/src/aig/gia/giaIso.c
+++ b/src/aig/gia/giaIso.c
@@ -894,7 +894,7 @@ void Gia_ManFindCaninicalOrder( Gia_Man_t * p, Vec_Int_t * vCis, Vec_Int_t * vAn
Vec_PtrClear( vTemp );
Gia_ManForEachPi( p, pObj, i )
Vec_PtrPush( vTemp, pObj );
- Vec_PtrSort( vTemp, (int (*)(void))Gia_ObjCompareByValue );
+ Vec_PtrSort( vTemp, (int (*)(const void *, const void *))Gia_ObjCompareByValue );
// create the result
Vec_PtrForEachEntry( Gia_Obj_t *, vTemp, pObj, i )
Vec_IntPush( vCis, Gia_ObjId(p, pObj) );
@@ -917,7 +917,7 @@ void Gia_ManFindCaninicalOrder( Gia_Man_t * p, Vec_Int_t * vCis, Vec_Int_t * vAn
pObj->Value = Abc_Var2Lit( Gia_ObjFanin0(pObj)->Value, Gia_ObjFaninC0(pObj) );
Vec_PtrPush( vTemp, pObj );
}
- Vec_PtrSort( vTemp, (int (*)(void))Gia_ObjCompareByValue );
+ Vec_PtrSort( vTemp, (int (*)(const void *, const void *))Gia_ObjCompareByValue );
Vec_PtrForEachEntry( Gia_Obj_t *, vTemp, pObj, i )
Vec_IntPush( vCos, Gia_ObjId(p, pObj) );
}
@@ -926,7 +926,7 @@ void Gia_ManFindCaninicalOrder( Gia_Man_t * p, Vec_Int_t * vCis, Vec_Int_t * vAn
Vec_PtrClear( vTemp );
Gia_ManForEachRo( p, pObj, i )
Vec_PtrPush( vTemp, pObj );
- Vec_PtrSort( vTemp, (int (*)(void))Gia_ObjCompareByValue );
+ Vec_PtrSort( vTemp, (int (*)(const void *, const void *))Gia_ObjCompareByValue );
// create the result
Vec_PtrForEachEntry( Gia_Obj_t *, vTemp, pObj, i )
{
diff --git a/src/aig/gia/giaIso2.c b/src/aig/gia/giaIso2.c
index 576b118f..22b1d09e 100644
--- a/src/aig/gia/giaIso2.c
+++ b/src/aig/gia/giaIso2.c
@@ -328,7 +328,7 @@ int Gia_Iso2ManUniqify( Gia_Iso2Man_t * p )
}
Vec_IntShrink( p->vTied, k );
// sort singletons
- Vec_PtrSort( p->vSingles, (int (*)(void))Gia_ObjCompareByValue2 );
+ Vec_PtrSort( p->vSingles, (int (*)(const void *, const void *))Gia_ObjCompareByValue2 );
// add them to unique and increment signature
Vec_PtrForEachEntry( Gia_Obj_t *, p->vSingles, pObj, i )
{
diff --git a/src/aig/hop/hopBalance.c b/src/aig/hop/hopBalance.c
index e9aa4d4d..a3ce1c86 100644
--- a/src/aig/hop/hopBalance.c
+++ b/src/aig/hop/hopBalance.c
@@ -246,7 +246,7 @@ Hop_Obj_t * Hop_NodeBalanceBuildSuper( Hop_Man_t * p, Vec_Ptr_t * vSuper, Hop_Ty
int LeftBound;
assert( vSuper->nSize > 1 );
// sort the new nodes by level in the decreasing order
- Vec_PtrSort( vSuper, (int (*)(void))Hop_NodeCompareLevelsDecrease );
+ Vec_PtrSort( vSuper, (int (*)(const void *, const void *))Hop_NodeCompareLevelsDecrease );
// balance the nodes
while ( vSuper->nSize > 1 )
{
diff --git a/src/aig/ivy/ivyBalance.c b/src/aig/ivy/ivyBalance.c
index 6eba318c..2bcc69ee 100644
--- a/src/aig/ivy/ivyBalance.c
+++ b/src/aig/ivy/ivyBalance.c
@@ -178,7 +178,7 @@ Ivy_Obj_t * Ivy_NodeBalanceBuildSuper( Ivy_Man_t * p, Vec_Ptr_t * vSuper, Ivy_Ty
int LeftBound;
assert( vSuper->nSize > 1 );
// sort the new nodes by level in the decreasing order
- Vec_PtrSort( vSuper, (int (*)(void))Ivy_NodeCompareLevelsDecrease );
+ Vec_PtrSort( vSuper, (int (*)(const void *, const void *))Ivy_NodeCompareLevelsDecrease );
// balance the nodes
while ( vSuper->nSize > 1 )
{
diff --git a/src/aig/ivy/ivyCutTrav.c b/src/aig/ivy/ivyCutTrav.c
index 74212b10..b1cdb456 100644
--- a/src/aig/ivy/ivyCutTrav.c
+++ b/src/aig/ivy/ivyCutTrav.c
@@ -329,7 +329,7 @@ void Ivy_NodeComputeVolume2( Ivy_Obj_t * pObj, int nNodeLimit, Vec_Ptr_t * vNode
} while ( Vec_PtrSize(vNodes) < nNodeLimit );
// sort nodes by level
- Vec_PtrSort( vNodes, (int (*)(void))Ivy_CompareNodesByLevel );
+ Vec_PtrSort( vNodes, (int (*)(const void *, const void *))Ivy_CompareNodesByLevel );
// make sure the nodes are ordered in the increasing number of levels
pFanin = (Ivy_Obj_t *)Vec_PtrEntry( vNodes, 0 );
pPivot = (Ivy_Obj_t *)Vec_PtrEntryLast( vNodes );
diff --git a/src/aig/ivy/ivyRwrAlg.c b/src/aig/ivy/ivyRwrAlg.c
index ce605003..53fe5817 100644
--- a/src/aig/ivy/ivyRwrAlg.c
+++ b/src/aig/ivy/ivyRwrAlg.c
@@ -371,7 +371,7 @@ int Ivy_ManFindAlgCut( Ivy_Obj_t * pRoot, Vec_Ptr_t * vFront, Vec_Ptr_t * vLeave
if ( Vec_PtrSize(vFront) <= 2 )
return 1;
// sort the entries in increasing order
- Vec_PtrSort( vFront, (int (*)(void))Ivy_ManFindAlgCutCompare );
+ Vec_PtrSort( vFront, (int (*)(const void *, const void *))Ivy_ManFindAlgCutCompare );
// remove duplicates from vFront and save the nodes in vLeaves
pPrev = Vec_PtrEntry(vFront, 0);
Vec_PtrPush( vLeaves, pPrev );
diff --git a/src/aig/saig/saigConstr.c b/src/aig/saig/saigConstr.c
index ac58839b..90e82816 100644
--- a/src/aig/saig/saigConstr.c
+++ b/src/aig/saig/saigConstr.c
@@ -300,8 +300,8 @@ Aig_Man_t * Saig_ManDupUnfoldConstrs( Aig_Man_t * pAig )
Vec_VecFree( (Vec_Vec_t *)vConsAll );
return Aig_ManDupDfs( pAig );
}
- Vec_PtrSort( vOuts, (int (*)(void))Saig_ManDupCompare );
- Vec_PtrSort( vCons, (int (*)(void))Saig_ManDupCompare );
+ Vec_PtrSort( vOuts, (int (*)(const void *, const void *))Saig_ManDupCompare );
+ Vec_PtrSort( vCons, (int (*)(const void *, const void *))Saig_ManDupCompare );
Vec_PtrPush( vOutsAll, vOuts );
Vec_PtrPush( vConsAll, vCons );
}
diff --git a/src/aig/saig/saigIso.c b/src/aig/saig/saigIso.c
index 40500361..7b8d488a 100644
--- a/src/aig/saig/saigIso.c
+++ b/src/aig/saig/saigIso.c
@@ -63,7 +63,7 @@ Vec_Int_t * Saig_ManFindIsoPermCos( Aig_Man_t * pAig, Vec_Int_t * vPermCis )
pObj->iData = Abc_Var2Lit( pFanin->iData, Aig_ObjFaninC0(pObj) );
Vec_PtrPush( vRoots, pObj );
}
- Vec_PtrSort( vRoots, (int (*)(void))Iso_ObjCompareByData );
+ Vec_PtrSort( vRoots, (int (*)(const void *, const void *))Iso_ObjCompareByData );
Vec_PtrForEachEntry( Aig_Obj_t *, vRoots, pObj, i )
Vec_IntPush( vPermCos, Aig_ObjCioId(pObj) );
Vec_PtrFree( vRoots );
@@ -467,7 +467,7 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV
// sort the infos
clk = Abc_Clock();
- Vec_PtrSort( vBuffers, (int (*)(void))Iso_StoCompareVecStr );
+ Vec_PtrSort( vBuffers, (int (*)(const void *, const void *))Iso_StoCompareVecStr );
// create classes
clk = Abc_Clock();
diff --git a/src/aig/saig/saigIsoFast.c b/src/aig/saig/saigIsoFast.c
index 7393e7fc..10d1384d 100644
--- a/src/aig/saig/saigIsoFast.c
+++ b/src/aig/saig/saigIsoFast.c
@@ -303,7 +303,7 @@ Vec_Vec_t * Saig_IsoDetectFast( Aig_Man_t * pAig )
// sort the infos
clk = Abc_Clock();
- Vec_PtrSort( vInfos, (int (*)(void))Iso_StoCompareVecInt );
+ Vec_PtrSort( vInfos, (int (*)(const void *, const void *))Iso_StoCompareVecInt );
// create classes
clk = Abc_Clock();
diff --git a/src/aig/saig/saigIsoSlow.c b/src/aig/saig/saigIsoSlow.c
index a0e2d1d0..4784d98a 100644
--- a/src/aig/saig/saigIsoSlow.c
+++ b/src/aig/saig/saigIsoSlow.c
@@ -572,8 +572,8 @@ void Iso_ManCollectClasses( Iso_Man_t * p )
}
}
clk = Abc_Clock();
- Vec_PtrSort( p->vSingles, (int (*)(void))Iso_ObjCompare );
- Vec_PtrSort( p->vClasses, (int (*)(void))Iso_ObjCompare );
+ Vec_PtrSort( p->vSingles, (int (*)(const void *, const void *))Iso_ObjCompare );
+ Vec_PtrSort( p->vClasses, (int (*)(const void *, const void *))Iso_ObjCompare );
p->timeSort += Abc_Clock() - clk;
assert( Vec_PtrSize(p->vSingles) == p->nSingles );
assert( Vec_PtrSize(p->vClasses) == p->nClasses );
@@ -1115,8 +1115,8 @@ Vec_Int_t * Iso_ManFinalize( Iso_Man_t * p )
Vec_PtrPush( p->vTemp1, pObj );
}
// sort CIs by their IDs
- Vec_PtrSort( p->vTemp1, (int (*)(void))Iso_ObjCompareByData );
- Vec_PtrSort( p->vTemp2, (int (*)(void))Iso_ObjCompareByData );
+ Vec_PtrSort( p->vTemp1, (int (*)(const void *, const void *))Iso_ObjCompareByData );
+ Vec_PtrSort( p->vTemp2, (int (*)(const void *, const void *))Iso_ObjCompareByData );
// create the result
vRes = Vec_IntAlloc( Aig_ManCiNum(p->pAig) );
Vec_PtrForEachEntry( Aig_Obj_t *, p->vTemp1, pObj, i )
diff --git a/src/aig/saig/saigWnd.c b/src/aig/saig/saigWnd.c
index ce70e7b4..949a2728 100644
--- a/src/aig/saig/saigWnd.c
+++ b/src/aig/saig/saigWnd.c
@@ -106,7 +106,7 @@ Vec_Ptr_t * Saig_ManWindowOutline( Aig_Man_t * p, Aig_Obj_t * pObj, int nDist )
vNodes = Vec_PtrAlloc( 1000 );
Aig_ManIncrementTravId( p );
Saig_ManWindowOutline_rec( p, pObj, nDist, vNodes, pDists );
- Vec_PtrSort( vNodes, (int (*)(void))Aig_ObjCompareIdIncrease );
+ Vec_PtrSort( vNodes, (int (*)(const void *, const void *))Aig_ObjCompareIdIncrease );
// make sure LI/LO are labeled/unlabeled mutually
Saig_ManForEachLiLo( p, pObjLi, pObjLo, i )
assert( Aig_ObjIsTravIdCurrent(p, pObjLi) ==