Commit ba64e786 by Alan Mishchenko

Changing declaration of Vec_Ptr_t sorting function to satisfy some compilers.

parent 2ce1ce8b
...@@ -3582,7 +3582,7 @@ Gia_Man_t * Gia_ManDupCones( Gia_Man_t * p, int * pPos, int nPos, int fTrimPis ) ...@@ -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) ); Gia_ObjSetTravIdCurrent( p, Gia_ManConst0(p) );
Vec_PtrForEachEntry( Gia_Obj_t *, vRoots, pObj, i ) Vec_PtrForEachEntry( Gia_Obj_t *, vRoots, pObj, i )
Gia_ManDupCones_rec( p, pObj, vLeaves, vNodes, vRoots ); 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 // start the new manager
// Gia_ManFillValue( p ); // Gia_ManFillValue( p );
...@@ -3644,7 +3644,7 @@ Gia_Man_t * Gia_ManDupAndCones( Gia_Man_t * p, int * pAnds, int nAnds, int fTrim ...@@ -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) ); Gia_ObjSetTravIdCurrent( p, Gia_ManConst0(p) );
Vec_PtrForEachEntry( Gia_Obj_t *, vRoots, pObj, i ) Vec_PtrForEachEntry( Gia_Obj_t *, vRoots, pObj, i )
Gia_ManDupCones_rec( p, pObj, vLeaves, vNodes, vRoots ); 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 // start the new manager
// Gia_ManFillValue( p ); // Gia_ManFillValue( p );
...@@ -4381,7 +4381,7 @@ Gia_Man_t * Gia_ManDupDemiter( Gia_Man_t * p, int fVerbose ) ...@@ -4381,7 +4381,7 @@ Gia_Man_t * Gia_ManDupDemiter( Gia_Man_t * p, int fVerbose )
vSuperPtr = Vec_PtrAlloc( Vec_IntSize(vSuper) ); vSuperPtr = Vec_PtrAlloc( Vec_IntSize(vSuper) );
Vec_IntForEachEntry( vSuper, iLit, i ) Vec_IntForEachEntry( vSuper, iLit, i )
Vec_PtrPush( vSuperPtr, Gia_Lit2Obj(p, iLit) ); 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 // create new manager
pNew = Gia_ManStart( Gia_ManObjNum(p) ); pNew = Gia_ManStart( Gia_ManObjNum(p) );
pNew->pName = Abc_UtilStrsav( p->pName ); pNew->pName = Abc_UtilStrsav( p->pName );
......
...@@ -894,7 +894,7 @@ void Gia_ManFindCaninicalOrder( Gia_Man_t * p, Vec_Int_t * vCis, Vec_Int_t * vAn ...@@ -894,7 +894,7 @@ void Gia_ManFindCaninicalOrder( Gia_Man_t * p, Vec_Int_t * vCis, Vec_Int_t * vAn
Vec_PtrClear( vTemp ); Vec_PtrClear( vTemp );
Gia_ManForEachPi( p, pObj, i ) Gia_ManForEachPi( p, pObj, i )
Vec_PtrPush( vTemp, pObj ); Vec_PtrPush( vTemp, pObj );
Vec_PtrSort( vTemp, (int (*)(void))Gia_ObjCompareByValue ); Vec_PtrSort( vTemp, (int (*)(const void *, const void *))Gia_ObjCompareByValue );
// create the result // create the result
Vec_PtrForEachEntry( Gia_Obj_t *, vTemp, pObj, i ) Vec_PtrForEachEntry( Gia_Obj_t *, vTemp, pObj, i )
Vec_IntPush( vCis, Gia_ObjId(p, pObj) ); 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 ...@@ -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) ); pObj->Value = Abc_Var2Lit( Gia_ObjFanin0(pObj)->Value, Gia_ObjFaninC0(pObj) );
Vec_PtrPush( vTemp, 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_PtrForEachEntry( Gia_Obj_t *, vTemp, pObj, i )
Vec_IntPush( vCos, Gia_ObjId(p, pObj) ); 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 ...@@ -926,7 +926,7 @@ void Gia_ManFindCaninicalOrder( Gia_Man_t * p, Vec_Int_t * vCis, Vec_Int_t * vAn
Vec_PtrClear( vTemp ); Vec_PtrClear( vTemp );
Gia_ManForEachRo( p, pObj, i ) Gia_ManForEachRo( p, pObj, i )
Vec_PtrPush( vTemp, pObj ); Vec_PtrPush( vTemp, pObj );
Vec_PtrSort( vTemp, (int (*)(void))Gia_ObjCompareByValue ); Vec_PtrSort( vTemp, (int (*)(const void *, const void *))Gia_ObjCompareByValue );
// create the result // create the result
Vec_PtrForEachEntry( Gia_Obj_t *, vTemp, pObj, i ) Vec_PtrForEachEntry( Gia_Obj_t *, vTemp, pObj, i )
{ {
......
...@@ -328,7 +328,7 @@ int Gia_Iso2ManUniqify( Gia_Iso2Man_t * p ) ...@@ -328,7 +328,7 @@ int Gia_Iso2ManUniqify( Gia_Iso2Man_t * p )
} }
Vec_IntShrink( p->vTied, k ); Vec_IntShrink( p->vTied, k );
// sort singletons // 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 // add them to unique and increment signature
Vec_PtrForEachEntry( Gia_Obj_t *, p->vSingles, pObj, i ) Vec_PtrForEachEntry( Gia_Obj_t *, p->vSingles, pObj, i )
{ {
......
...@@ -246,7 +246,7 @@ Hop_Obj_t * Hop_NodeBalanceBuildSuper( Hop_Man_t * p, Vec_Ptr_t * vSuper, Hop_Ty ...@@ -246,7 +246,7 @@ Hop_Obj_t * Hop_NodeBalanceBuildSuper( Hop_Man_t * p, Vec_Ptr_t * vSuper, Hop_Ty
int LeftBound; int LeftBound;
assert( vSuper->nSize > 1 ); assert( vSuper->nSize > 1 );
// sort the new nodes by level in the decreasing order // 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 // balance the nodes
while ( vSuper->nSize > 1 ) while ( vSuper->nSize > 1 )
{ {
......
...@@ -178,7 +178,7 @@ Ivy_Obj_t * Ivy_NodeBalanceBuildSuper( Ivy_Man_t * p, Vec_Ptr_t * vSuper, Ivy_Ty ...@@ -178,7 +178,7 @@ Ivy_Obj_t * Ivy_NodeBalanceBuildSuper( Ivy_Man_t * p, Vec_Ptr_t * vSuper, Ivy_Ty
int LeftBound; int LeftBound;
assert( vSuper->nSize > 1 ); assert( vSuper->nSize > 1 );
// sort the new nodes by level in the decreasing order // 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 // balance the nodes
while ( vSuper->nSize > 1 ) while ( vSuper->nSize > 1 )
{ {
......
...@@ -329,7 +329,7 @@ void Ivy_NodeComputeVolume2( Ivy_Obj_t * pObj, int nNodeLimit, Vec_Ptr_t * vNode ...@@ -329,7 +329,7 @@ void Ivy_NodeComputeVolume2( Ivy_Obj_t * pObj, int nNodeLimit, Vec_Ptr_t * vNode
} while ( Vec_PtrSize(vNodes) < nNodeLimit ); } while ( Vec_PtrSize(vNodes) < nNodeLimit );
// sort nodes by level // 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 // make sure the nodes are ordered in the increasing number of levels
pFanin = (Ivy_Obj_t *)Vec_PtrEntry( vNodes, 0 ); pFanin = (Ivy_Obj_t *)Vec_PtrEntry( vNodes, 0 );
pPivot = (Ivy_Obj_t *)Vec_PtrEntryLast( vNodes ); pPivot = (Ivy_Obj_t *)Vec_PtrEntryLast( vNodes );
......
...@@ -371,7 +371,7 @@ int Ivy_ManFindAlgCut( Ivy_Obj_t * pRoot, Vec_Ptr_t * vFront, Vec_Ptr_t * vLeave ...@@ -371,7 +371,7 @@ int Ivy_ManFindAlgCut( Ivy_Obj_t * pRoot, Vec_Ptr_t * vFront, Vec_Ptr_t * vLeave
if ( Vec_PtrSize(vFront) <= 2 ) if ( Vec_PtrSize(vFront) <= 2 )
return 1; return 1;
// sort the entries in increasing order // 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 // remove duplicates from vFront and save the nodes in vLeaves
pPrev = Vec_PtrEntry(vFront, 0); pPrev = Vec_PtrEntry(vFront, 0);
Vec_PtrPush( vLeaves, pPrev ); Vec_PtrPush( vLeaves, pPrev );
......
...@@ -300,8 +300,8 @@ Aig_Man_t * Saig_ManDupUnfoldConstrs( Aig_Man_t * pAig ) ...@@ -300,8 +300,8 @@ Aig_Man_t * Saig_ManDupUnfoldConstrs( Aig_Man_t * pAig )
Vec_VecFree( (Vec_Vec_t *)vConsAll ); Vec_VecFree( (Vec_Vec_t *)vConsAll );
return Aig_ManDupDfs( pAig ); return Aig_ManDupDfs( pAig );
} }
Vec_PtrSort( vOuts, (int (*)(void))Saig_ManDupCompare ); Vec_PtrSort( vOuts, (int (*)(const void *, const void *))Saig_ManDupCompare );
Vec_PtrSort( vCons, (int (*)(void))Saig_ManDupCompare ); Vec_PtrSort( vCons, (int (*)(const void *, const void *))Saig_ManDupCompare );
Vec_PtrPush( vOutsAll, vOuts ); Vec_PtrPush( vOutsAll, vOuts );
Vec_PtrPush( vConsAll, vCons ); Vec_PtrPush( vConsAll, vCons );
} }
......
...@@ -63,7 +63,7 @@ Vec_Int_t * Saig_ManFindIsoPermCos( Aig_Man_t * pAig, Vec_Int_t * vPermCis ) ...@@ -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) ); pObj->iData = Abc_Var2Lit( pFanin->iData, Aig_ObjFaninC0(pObj) );
Vec_PtrPush( vRoots, 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_PtrForEachEntry( Aig_Obj_t *, vRoots, pObj, i )
Vec_IntPush( vPermCos, Aig_ObjCioId(pObj) ); Vec_IntPush( vPermCos, Aig_ObjCioId(pObj) );
Vec_PtrFree( vRoots ); Vec_PtrFree( vRoots );
...@@ -467,7 +467,7 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV ...@@ -467,7 +467,7 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV
// sort the infos // sort the infos
clk = Abc_Clock(); clk = Abc_Clock();
Vec_PtrSort( vBuffers, (int (*)(void))Iso_StoCompareVecStr ); Vec_PtrSort( vBuffers, (int (*)(const void *, const void *))Iso_StoCompareVecStr );
// create classes // create classes
clk = Abc_Clock(); clk = Abc_Clock();
......
...@@ -303,7 +303,7 @@ Vec_Vec_t * Saig_IsoDetectFast( Aig_Man_t * pAig ) ...@@ -303,7 +303,7 @@ Vec_Vec_t * Saig_IsoDetectFast( Aig_Man_t * pAig )
// sort the infos // sort the infos
clk = Abc_Clock(); clk = Abc_Clock();
Vec_PtrSort( vInfos, (int (*)(void))Iso_StoCompareVecInt ); Vec_PtrSort( vInfos, (int (*)(const void *, const void *))Iso_StoCompareVecInt );
// create classes // create classes
clk = Abc_Clock(); clk = Abc_Clock();
......
...@@ -572,8 +572,8 @@ void Iso_ManCollectClasses( Iso_Man_t * p ) ...@@ -572,8 +572,8 @@ void Iso_ManCollectClasses( Iso_Man_t * p )
} }
} }
clk = Abc_Clock(); clk = Abc_Clock();
Vec_PtrSort( p->vSingles, (int (*)(void))Iso_ObjCompare ); Vec_PtrSort( p->vSingles, (int (*)(const void *, const void *))Iso_ObjCompare );
Vec_PtrSort( p->vClasses, (int (*)(void))Iso_ObjCompare ); Vec_PtrSort( p->vClasses, (int (*)(const void *, const void *))Iso_ObjCompare );
p->timeSort += Abc_Clock() - clk; p->timeSort += Abc_Clock() - clk;
assert( Vec_PtrSize(p->vSingles) == p->nSingles ); assert( Vec_PtrSize(p->vSingles) == p->nSingles );
assert( Vec_PtrSize(p->vClasses) == p->nClasses ); assert( Vec_PtrSize(p->vClasses) == p->nClasses );
...@@ -1115,8 +1115,8 @@ Vec_Int_t * Iso_ManFinalize( Iso_Man_t * p ) ...@@ -1115,8 +1115,8 @@ Vec_Int_t * Iso_ManFinalize( Iso_Man_t * p )
Vec_PtrPush( p->vTemp1, pObj ); Vec_PtrPush( p->vTemp1, pObj );
} }
// sort CIs by their IDs // sort CIs by their IDs
Vec_PtrSort( p->vTemp1, (int (*)(void))Iso_ObjCompareByData ); Vec_PtrSort( p->vTemp1, (int (*)(const void *, const void *))Iso_ObjCompareByData );
Vec_PtrSort( p->vTemp2, (int (*)(void))Iso_ObjCompareByData ); Vec_PtrSort( p->vTemp2, (int (*)(const void *, const void *))Iso_ObjCompareByData );
// create the result // create the result
vRes = Vec_IntAlloc( Aig_ManCiNum(p->pAig) ); vRes = Vec_IntAlloc( Aig_ManCiNum(p->pAig) );
Vec_PtrForEachEntry( Aig_Obj_t *, p->vTemp1, pObj, i ) Vec_PtrForEachEntry( Aig_Obj_t *, p->vTemp1, pObj, i )
......
...@@ -106,7 +106,7 @@ Vec_Ptr_t * Saig_ManWindowOutline( Aig_Man_t * p, Aig_Obj_t * pObj, int nDist ) ...@@ -106,7 +106,7 @@ Vec_Ptr_t * Saig_ManWindowOutline( Aig_Man_t * p, Aig_Obj_t * pObj, int nDist )
vNodes = Vec_PtrAlloc( 1000 ); vNodes = Vec_PtrAlloc( 1000 );
Aig_ManIncrementTravId( p ); Aig_ManIncrementTravId( p );
Saig_ManWindowOutline_rec( p, pObj, nDist, vNodes, pDists ); 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 // make sure LI/LO are labeled/unlabeled mutually
Saig_ManForEachLiLo( p, pObjLi, pObjLo, i ) Saig_ManForEachLiLo( p, pObjLi, pObjLo, i )
assert( Aig_ObjIsTravIdCurrent(p, pObjLi) == assert( Aig_ObjIsTravIdCurrent(p, pObjLi) ==
......
...@@ -865,7 +865,7 @@ int Abc_NtkCheckUniqueCiNames( Abc_Ntk_t * pNtk ) ...@@ -865,7 +865,7 @@ int Abc_NtkCheckUniqueCiNames( Abc_Ntk_t * pNtk )
vNames = Vec_PtrAlloc( Abc_NtkCiNum(pNtk) ); vNames = Vec_PtrAlloc( Abc_NtkCiNum(pNtk) );
Abc_NtkForEachCi( pNtk, pObj, i ) Abc_NtkForEachCi( pNtk, pObj, i )
Vec_PtrPush( vNames, Abc_ObjName(pObj) ); Vec_PtrPush( vNames, Abc_ObjName(pObj) );
Vec_PtrSort( vNames, (int (*)())Abc_NtkNamesCompare ); Vec_PtrSort( vNames, (int (*)(const void *, const void *))Abc_NtkNamesCompare );
for ( i = 1; i < Abc_NtkCiNum(pNtk); i++ ) for ( i = 1; i < Abc_NtkCiNum(pNtk); i++ )
if ( !strcmp( (const char *)Vec_PtrEntry(vNames,i-1), (const char *)Vec_PtrEntry(vNames,i) ) ) if ( !strcmp( (const char *)Vec_PtrEntry(vNames,i-1), (const char *)Vec_PtrEntry(vNames,i) ) )
{ {
...@@ -896,7 +896,7 @@ int Abc_NtkCheckUniqueCoNames( Abc_Ntk_t * pNtk ) ...@@ -896,7 +896,7 @@ int Abc_NtkCheckUniqueCoNames( Abc_Ntk_t * pNtk )
vNames = Vec_PtrAlloc( Abc_NtkCoNum(pNtk) ); vNames = Vec_PtrAlloc( Abc_NtkCoNum(pNtk) );
Abc_NtkForEachCo( pNtk, pObj, i ) Abc_NtkForEachCo( pNtk, pObj, i )
Vec_PtrPush( vNames, Abc_ObjName(pObj) ); Vec_PtrPush( vNames, Abc_ObjName(pObj) );
Vec_PtrSort( vNames, (int (*)())Abc_NtkNamesCompare ); Vec_PtrSort( vNames, (int (*)(const void *, const void *))Abc_NtkNamesCompare );
for ( i = 1; i < Abc_NtkCoNum(pNtk); i++ ) for ( i = 1; i < Abc_NtkCoNum(pNtk); i++ )
{ {
// printf( "%s\n", Vec_PtrEntry(vNames,i) ); // printf( "%s\n", Vec_PtrEntry(vNames,i) );
......
...@@ -476,9 +476,9 @@ void Abc_NodeSortCubes( Abc_Obj_t * pNode, Vec_Ptr_t * vCubes, Vec_Str_t * vStor ...@@ -476,9 +476,9 @@ void Abc_NodeSortCubes( Abc_Obj_t * pNode, Vec_Ptr_t * vCubes, Vec_Str_t * vStor
Vec_PtrPush( vCubes, pCube ); Vec_PtrPush( vCubes, pCube );
} }
if ( fWeight ) if ( fWeight )
Vec_PtrSort( vCubes, (int (*)())Abc_NodeCompareCubes2 ); Vec_PtrSort( vCubes, (int (*)(const void *, const void *))Abc_NodeCompareCubes2 );
else else
Vec_PtrSort( vCubes, (int (*)())Abc_NodeCompareCubes1 ); Vec_PtrSort( vCubes, (int (*)(const void *, const void *))Abc_NodeCompareCubes1 );
Vec_StrGrow( vStore, Vec_PtrSize(vCubes) * (nVars + 3) ); Vec_StrGrow( vStore, Vec_PtrSize(vCubes) * (nVars + 3) );
pPivot = Vec_StrArray( vStore ); pPivot = Vec_StrArray( vStore );
Vec_PtrForEachEntry( char *, vCubes, pCube, i ) Vec_PtrForEachEntry( char *, vCubes, pCube, i )
......
...@@ -442,7 +442,7 @@ void Abc_NtkPrintBoxInfo( Abc_Ntk_t * pNtk ) ...@@ -442,7 +442,7 @@ void Abc_NtkPrintBoxInfo( Abc_Ntk_t * pNtk )
} }
// sort models by name // sort models by name
vMods = pNtk->pDesign->vModules; vMods = pNtk->pDesign->vModules;
Vec_PtrSort( vMods, (int(*)())Abc_NtkCompareNames ); Vec_PtrSort( vMods, (int(*)(const void *, const void *))Abc_NtkCompareNames );
// Vec_PtrForEachEntry( Abc_Ntk_t *, vMods, pModel, i ) // Vec_PtrForEachEntry( Abc_Ntk_t *, vMods, pModel, i )
// printf( "%s\n", Abc_NtkName(pModel) ); // printf( "%s\n", Abc_NtkName(pModel) );
......
...@@ -558,7 +558,7 @@ void Au_ManPrintBoxInfo( Au_Ntk_t * pNtk ) ...@@ -558,7 +558,7 @@ void Au_ManPrintBoxInfo( Au_Ntk_t * pNtk )
vMods->nSize--; vMods->nSize--;
vMods->pArray++; vMods->pArray++;
// sort models by name // sort models by name
Vec_PtrSort( vMods, (int(*)())Au_NtkCompareNames ); Vec_PtrSort( vMods, (int(*)(const void *, const void *))Au_NtkCompareNames );
// swap the first model // swap the first model
Num = Vec_PtrFind( vMods, pNtk ); Num = Vec_PtrFind( vMods, pNtk );
assert( Num >= 0 && Num < Vec_PtrSize(vMods) ); assert( Num >= 0 && Num < Vec_PtrSize(vMods) );
...@@ -643,7 +643,7 @@ void Au_ManPrintBoxInfoSorted( Au_Ntk_t * pNtk ) ...@@ -643,7 +643,7 @@ void Au_ManPrintBoxInfoSorted( Au_Ntk_t * pNtk )
vMods->pArray--; vMods->pArray--;
vMods->nSize++; vMods->nSize++;
Vec_PtrSort( vModsNew, (int(*)())Au_NtkCompareSign ); Vec_PtrSort( vModsNew, (int(*)(const void *, const void *))Au_NtkCompareSign );
Vec_PtrForEachEntryStart( Au_Ntk_t *, vModsNew, pModel, i, 1 ) Vec_PtrForEachEntryStart( Au_Ntk_t *, vModsNew, pModel, i, 1 )
{ {
printf( "MODULE " ); printf( "MODULE " );
......
...@@ -703,7 +703,7 @@ void Abc_ObjSortInReverseOrder( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes ) ...@@ -703,7 +703,7 @@ void Abc_ObjSortInReverseOrder( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes )
vOrder = Abc_NtkDfsReverse( pNtk ); vOrder = Abc_NtkDfsReverse( pNtk );
Vec_PtrForEachEntry( Abc_Obj_t *, vOrder, pNode, i ) Vec_PtrForEachEntry( Abc_Obj_t *, vOrder, pNode, i )
pNode->iTemp = i; pNode->iTemp = i;
Vec_PtrSort( vNodes, (int (*)())Abc_ObjCompareByNumber ); Vec_PtrSort( vNodes, (int (*)(const void *, const void *))Abc_ObjCompareByNumber );
Vec_PtrForEachEntry( Abc_Obj_t *, vOrder, pNode, i ) Vec_PtrForEachEntry( Abc_Obj_t *, vOrder, pNode, i )
pNode->iTemp = 0; pNode->iTemp = 0;
Vec_PtrFree( vOrder ); Vec_PtrFree( vOrder );
......
...@@ -266,7 +266,7 @@ Abc_Obj_t * Abc_NodeBalance_rec( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pNodeOld, Vec_ ...@@ -266,7 +266,7 @@ Abc_Obj_t * Abc_NodeBalance_rec( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pNodeOld, Vec_
if ( vSuper->nSize < 2 ) if ( vSuper->nSize < 2 )
printf( "BUG!\n" ); printf( "BUG!\n" );
// sort the new nodes by level in the decreasing order // sort the new nodes by level in the decreasing order
Vec_PtrSort( vSuper, (int (*)(void))Abc_NodeCompareLevelsDecrease ); Vec_PtrSort( vSuper, (int (*)(const void *, const void *))Abc_NodeCompareLevelsDecrease );
// balance the nodes // balance the nodes
assert( vSuper->nSize > 1 ); assert( vSuper->nSize > 1 );
while ( vSuper->nSize > 1 ) while ( vSuper->nSize > 1 )
......
...@@ -91,7 +91,7 @@ void Abc_CollectTopOr( Abc_Obj_t * pObj, Vec_Ptr_t * vSuper ) ...@@ -91,7 +91,7 @@ void Abc_CollectTopOr( Abc_Obj_t * pObj, Vec_Ptr_t * vSuper )
if ( Abc_ObjIsComplement(pObj) ) if ( Abc_ObjIsComplement(pObj) )
{ {
Abc_CollectTopOr_rec( Abc_ObjNot(pObj), vSuper ); Abc_CollectTopOr_rec( Abc_ObjNot(pObj), vSuper );
Vec_PtrUniqify( vSuper, (int (*)())Abc_ObjCompareById ); Vec_PtrUniqify( vSuper, (int (*)(const void *, const void *))Abc_ObjCompareById );
} }
else else
Vec_PtrPush( vSuper, Abc_ObjNot(pObj) ); Vec_PtrPush( vSuper, Abc_ObjNot(pObj) );
......
...@@ -610,7 +610,7 @@ Abc_Obj_t * Abc_NtkBddDecompose( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pNode, int nLu ...@@ -610,7 +610,7 @@ Abc_Obj_t * Abc_NtkBddDecompose( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pNode, int nLu
// cofactor w.r.t. the bound set variables // cofactor w.r.t. the bound set variables
vCofs = Abc_NtkBddCofactors( dd, (DdNode *)pNode->pData, nLutSize ); vCofs = Abc_NtkBddCofactors( dd, (DdNode *)pNode->pData, nLutSize );
vUniq = Vec_PtrDup( vCofs ); vUniq = Vec_PtrDup( vCofs );
Vec_PtrUniqify( vUniq, (int (*)())Vec_PtrSortCompare ); Vec_PtrUniqify( vUniq, (int (*)(const void *, const void *))Vec_PtrSortCompare );
// only perform decomposition with it is support reduring with two less vars // only perform decomposition with it is support reduring with two less vars
if( Vec_PtrSize(vUniq) > (1 << (nLutSize-2)) ) if( Vec_PtrSize(vUniq) > (1 << (nLutSize-2)) )
{ {
......
...@@ -1141,7 +1141,7 @@ Vec_Ptr_t * Abc_NktMffcServer( Abc_Ntk_t * pNtk, int nInMax, int nOutMax ) ...@@ -1141,7 +1141,7 @@ Vec_Ptr_t * Abc_NktMffcServer( Abc_Ntk_t * pNtk, int nInMax, int nOutMax )
// sort by their MFFC size // sort by their MFFC size
Vec_PtrForEachEntry( Abc_Obj_t *, vPivots, pObj, i ) Vec_PtrForEachEntry( Abc_Obj_t *, vPivots, pObj, i )
pObj->iTemp = Vec_IntSize((Vec_Int_t *)Vec_PtrEntry(vVolumes, Abc_ObjId(pObj))); pObj->iTemp = Vec_IntSize((Vec_Int_t *)Vec_PtrEntry(vVolumes, Abc_ObjId(pObj)));
Vec_PtrSort( vPivots, (int (*)(void))Abc_NodeCompareVolumeDecrease ); Vec_PtrSort( vPivots, (int (*)(const void *, const void *))Abc_NodeCompareVolumeDecrease );
// create marks // create marks
vMarks = Vec_IntStart( Abc_NtkObjNumMax(pNtk) ); vMarks = Vec_IntStart( Abc_NtkObjNumMax(pNtk) );
Vec_PtrForEachEntry( Abc_Obj_t *, vPivots, pObj, i ) Vec_PtrForEachEntry( Abc_Obj_t *, vPivots, pObj, i )
......
...@@ -564,7 +564,7 @@ void Npn_ManWrite( Npn_Man_t * p, char * pFileName ) ...@@ -564,7 +564,7 @@ void Npn_ManWrite( Npn_Man_t * p, char * pFileName )
for ( i = 0; i < p->nBins; i++ ) for ( i = 0; i < p->nBins; i++ )
for ( pEntry = Npn_ManObj(p, p->pBins[i]); pEntry; pEntry = Npn_ManObj(p, pEntry->iNext) ) for ( pEntry = Npn_ManObj(p, p->pBins[i]); pEntry; pEntry = Npn_ManObj(p, pEntry->iNext) )
Vec_PtrPush( vEntries, pEntry ); Vec_PtrPush( vEntries, pEntry );
Vec_PtrSort( vEntries, (int (*)())Npn_ManCompareEntries ); Vec_PtrSort( vEntries, (int (*)(const void *, const void *))Npn_ManCompareEntries );
Vec_PtrForEachEntry( Npn_Obj_t *, vEntries, pEntry, i ) Vec_PtrForEachEntry( Npn_Obj_t *, vEntries, pEntry, i )
{ {
Extra_PrintHexadecimal( pFile, (unsigned *)&pEntry->uTruth, 6 ); Extra_PrintHexadecimal( pFile, (unsigned *)&pEntry->uTruth, 6 );
......
...@@ -712,7 +712,7 @@ Vec_Ptr_t * Abc_NodeGetSuper( Abc_Obj_t * pNode ) ...@@ -712,7 +712,7 @@ Vec_Ptr_t * Abc_NodeGetSuper( Abc_Obj_t * pNode )
Vec_PtrFree( vSuper ); Vec_PtrFree( vSuper );
vSuper = vFront; vSuper = vFront;
// uniquify and return the frontier // uniquify and return the frontier
Vec_PtrUniqify( vSuper, (int (*)())Vec_CompareNodeIds ); Vec_PtrUniqify( vSuper, (int (*)(const void *, const void *))Vec_CompareNodeIds );
return vSuper; return vSuper;
} }
......
...@@ -888,7 +888,7 @@ int Abc_NtkReplaceAutonomousLogic( Abc_Ntk_t * pNtk ) ...@@ -888,7 +888,7 @@ int Abc_NtkReplaceAutonomousLogic( Abc_Ntk_t * pNtk )
Vec_PtrPush( vNodes, pFanin ); Vec_PtrPush( vNodes, pFanin );
} }
} }
Vec_PtrUniqify( vNodes, (int (*)(void))Abc_ObjPointerCompare ); Vec_PtrUniqify( vNodes, (int (*)(const void *, const void *))Abc_ObjPointerCompare );
// replace these nodes by the PIs // replace these nodes by the PIs
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i ) Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
{ {
......
...@@ -445,7 +445,7 @@ void Cba_NtkObjOrder( Cba_Ntk_t * p, Vec_Int_t * vObjs, Vec_Int_t * vNameIds ) ...@@ -445,7 +445,7 @@ void Cba_NtkObjOrder( Cba_Ntk_t * p, Vec_Int_t * vObjs, Vec_Int_t * vNameIds )
// printf( "%s \n", pName ); // printf( "%s \n", pName );
// printf( "\n" ); // printf( "\n" );
// do the sorting // do the sorting
Vec_PtrSort( vNames, (int (*)(void))Cba_StrCmp ); Vec_PtrSort( vNames, (int (*)(const void *, const void *))Cba_StrCmp );
// print after // print after
// Vec_PtrForEachEntry( char *, vNames, pName, i ) // Vec_PtrForEachEntry( char *, vNames, pName, i )
// printf( "%s \n", pName ); // printf( "%s \n", pName );
......
...@@ -867,10 +867,10 @@ static Vec_Bit_t * Wlc_NtkMarkLimit( Wlc_Ntk_t * p, Wlc_Par_t * pPars ) ...@@ -867,10 +867,10 @@ static Vec_Bit_t * Wlc_NtkMarkLimit( Wlc_Ntk_t * p, Wlc_Par_t * pPars )
} }
} }
Vec_PtrSort( vAdds, (int (*)(void))IntPairPtrCompare ) ; Vec_PtrSort( vAdds, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
Vec_PtrSort( vMults, (int (*)(void))IntPairPtrCompare ) ; Vec_PtrSort( vMults, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
Vec_PtrSort( vMuxes, (int (*)(void))IntPairPtrCompare ) ; Vec_PtrSort( vMuxes, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
Vec_PtrSort( vFlops, (int (*)(void))IntPairPtrCompare ) ; Vec_PtrSort( vFlops, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
Vec_PtrForEachEntry( Int_Pair_t *, vAdds, pPair, i ) Vec_PtrForEachEntry( Int_Pair_t *, vAdds, pPair, i )
{ {
......
...@@ -435,7 +435,7 @@ void Abc_SclBufSize( Bus_Man_t * p, float Gain ) ...@@ -435,7 +435,7 @@ void Abc_SclBufSize( Bus_Man_t * p, float Gain )
// add one or more inverters // add one or more inverters
// Abc_NtkPrintFanoutProfile( pObj ); // Abc_NtkPrintFanoutProfile( pObj );
Abc_NodeCollectFanouts( pObj, p->vFanouts ); Abc_NodeCollectFanouts( pObj, p->vFanouts );
Vec_PtrSort( p->vFanouts, (int(*)(void))Bus_SclCompareFanouts ); Vec_PtrSort( p->vFanouts, (int(*)(const void *, const void *))Bus_SclCompareFanouts );
do do
{ {
Abc_Obj_t * pInv; Abc_Obj_t * pInv;
......
...@@ -371,7 +371,7 @@ Abc_Obj_t * Abc_SclPerformBufferingOne( Abc_Obj_t * pObj, int Degree, int fUseIn ...@@ -371,7 +371,7 @@ Abc_Obj_t * Abc_SclPerformBufferingOne( Abc_Obj_t * pObj, int Degree, int fUseIn
// collect fanouts and sort by reverse level // collect fanouts and sort by reverse level
vFanouts = Vec_PtrAlloc( Abc_ObjFanoutNum(pObj) ); vFanouts = Vec_PtrAlloc( Abc_ObjFanoutNum(pObj) );
Abc_NodeCollectFanouts( pObj, vFanouts ); Abc_NodeCollectFanouts( pObj, vFanouts );
Vec_PtrSort( vFanouts, (int (*)(void))Abc_NodeCompareLevels ); Vec_PtrSort( vFanouts, (int (*)(const void *, const void *))Abc_NodeCompareLevels );
// select the first Degree fanouts // select the first Degree fanouts
if ( fUseInvs ) if ( fUseInvs )
pBuffer = Abc_NtkCreateNodeInv( pObj->pNtk, NULL ); pBuffer = Abc_NtkCreateNodeInv( pObj->pNtk, NULL );
......
...@@ -938,8 +938,8 @@ static int Vec_PtrSortComparePtr( void ** pp1, void ** pp2 ) ...@@ -938,8 +938,8 @@ static int Vec_PtrSortComparePtr( void ** pp1, void ** pp2 )
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
static void Vec_PtrSort( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() ) ___unused; static void Vec_PtrSort( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(const void *, const void *) ) ___unused;
static void Vec_PtrSort( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() ) static void Vec_PtrSort( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(const void *, const void *) )
{ {
if ( p->nSize < 2 ) if ( p->nSize < 2 )
return; return;
...@@ -962,8 +962,8 @@ static void Vec_PtrSort( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() ) ...@@ -962,8 +962,8 @@ static void Vec_PtrSort( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() )
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
static void Vec_PtrUniqify( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() ) ___unused; static void Vec_PtrUniqify( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(const void *, const void *) ) ___unused;
static void Vec_PtrUniqify( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() ) static void Vec_PtrUniqify( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(const void *, const void *) )
{ {
int i, k; int i, k;
if ( p->nSize < 2 ) if ( p->nSize < 2 )
...@@ -974,15 +974,15 @@ static void Vec_PtrUniqify( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() ) ...@@ -974,15 +974,15 @@ static void Vec_PtrUniqify( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() )
p->pArray[k++] = p->pArray[i]; p->pArray[k++] = p->pArray[i];
p->nSize = k; p->nSize = k;
} }
static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(void**, void**), void (*Vec_PtrObjFree)(void*), Vec_Int_t * vCounts ) ___unused; static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(const void *, const void *), void (*Vec_PtrObjFree)(void*), Vec_Int_t * vCounts ) ___unused;
static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(void**, void**), void (*Vec_PtrObjFree)(void*), Vec_Int_t * vCounts ) static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(const void *, const void *), void (*Vec_PtrObjFree)(void*), Vec_Int_t * vCounts )
{ {
int i, k; int i, k;
if ( vCounts ) if ( vCounts )
Vec_IntFill( vCounts, 1, 1 ); Vec_IntFill( vCounts, 1, 1 );
if ( p->nSize < 2 ) if ( p->nSize < 2 )
return; return;
Vec_PtrSort( p, (int (*)())Vec_PtrSortCompare ); Vec_PtrSort( p, Vec_PtrSortCompare );
for ( i = k = 1; i < p->nSize; i++ ) for ( i = k = 1; i < p->nSize; i++ )
if ( Vec_PtrSortCompare(p->pArray+i, p->pArray+k-1) != 0 ) if ( Vec_PtrSortCompare(p->pArray+i, p->pArray+k-1) != 0 )
{ {
......
...@@ -133,7 +133,7 @@ void Cgt_ManDetectFanout( Aig_Man_t * pAig, Aig_Obj_t * pObj, int nOdcMax, Vec_P ...@@ -133,7 +133,7 @@ void Cgt_ManDetectFanout( Aig_Man_t * pAig, Aig_Obj_t * pObj, int nOdcMax, Vec_P
Vec_PtrWriteEntry( vFanout, k++, pObj ); Vec_PtrWriteEntry( vFanout, k++, pObj );
} }
Vec_PtrShrink( vFanout, k ); Vec_PtrShrink( vFanout, k );
Vec_PtrSort( vFanout, (int (*)(void))Aig_ObjCompareIdIncrease ); Vec_PtrSort( vFanout, (int (*)(const void *, const void *))Aig_ObjCompareIdIncrease );
assert( Vec_PtrSize(vFanout) > 0 ); assert( Vec_PtrSize(vFanout) > 0 );
} }
......
...@@ -59,7 +59,7 @@ void Dar_BalanceUniqify( Aig_Obj_t * pObj, Vec_Ptr_t * vNodes, int fExor ) ...@@ -59,7 +59,7 @@ void Dar_BalanceUniqify( Aig_Obj_t * pObj, Vec_Ptr_t * vNodes, int fExor )
Aig_Obj_t * pTemp, * pTempNext; Aig_Obj_t * pTemp, * pTempNext;
int i, k; int i, k;
// sort the nodes by their literal // sort the nodes by their literal
Vec_PtrSort( vNodes, (int (*)())Dar_ObjCompareLits ); Vec_PtrSort( vNodes, (int (*)(const void *, const void *))Dar_ObjCompareLits );
// remove duplicates // remove duplicates
k = 0; k = 0;
Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pTemp, i ) Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pTemp, i )
...@@ -402,7 +402,7 @@ Aig_Obj_t * Dar_BalanceBuildSuper( Aig_Man_t * p, Vec_Ptr_t * vSuper, Aig_Type_t ...@@ -402,7 +402,7 @@ Aig_Obj_t * Dar_BalanceBuildSuper( Aig_Man_t * p, Vec_Ptr_t * vSuper, Aig_Type_t
int LeftBound; int LeftBound;
assert( vSuper->nSize > 1 ); assert( vSuper->nSize > 1 );
// sort the new nodes by level in the decreasing order // sort the new nodes by level in the decreasing order
Vec_PtrSort( vSuper, (int (*)(void))Aig_NodeCompareLevelsDecrease ); Vec_PtrSort( vSuper, (int (*)(const void *, const void *))Aig_NodeCompareLevelsDecrease );
// balance the nodes // balance the nodes
while ( vSuper->nSize > 1 ) while ( vSuper->nSize > 1 )
{ {
...@@ -462,7 +462,7 @@ Aig_Obj_t * Dar_BalanceBuildSuperTop( Aig_Man_t * p, Vec_Ptr_t * vSuper, Aig_Typ ...@@ -462,7 +462,7 @@ Aig_Obj_t * Dar_BalanceBuildSuperTop( Aig_Man_t * p, Vec_Ptr_t * vSuper, Aig_Typ
int i, nBaseSizeAll, nBaseSize; int i, nBaseSizeAll, nBaseSize;
assert( vSuper->nSize > 1 ); assert( vSuper->nSize > 1 );
// sort the new nodes by level in the decreasing order // sort the new nodes by level in the decreasing order
Vec_PtrSort( vSuper, (int (*)(void))Aig_NodeCompareLevelsDecrease ); Vec_PtrSort( vSuper, (int (*)(const void *, const void *))Aig_NodeCompareLevelsDecrease );
// add one LUT at a time // add one LUT at a time
while ( Vec_PtrSize(vSuper) > 1 ) while ( Vec_PtrSize(vSuper) > 1 )
{ {
......
...@@ -282,7 +282,7 @@ Vec_Ptr_t * Abc_MfsComputeDivisors( Mfs_Man_t * p, Abc_Obj_t * pNode, int nLevDi ...@@ -282,7 +282,7 @@ Vec_Ptr_t * Abc_MfsComputeDivisors( Mfs_Man_t * p, Abc_Obj_t * pNode, int nLevDi
p->nMaxDivs += (Vec_PtrSize(vDivs) >= p->pPars->nWinMax); p->nMaxDivs += (Vec_PtrSize(vDivs) >= p->pPars->nWinMax);
// sort the divisors by level in the increasing order // sort the divisors by level in the increasing order
Vec_PtrSort( vDivs, (int (*)(void))Abc_NodeCompareLevelsIncrease ); Vec_PtrSort( vDivs, (int (*)(const void *, const void *))Abc_NodeCompareLevelsIncrease );
// add the fanins of the node // add the fanins of the node
Abc_ObjForEachFanin( pNode, pFanin, k ) Abc_ObjForEachFanin( pNode, pFanin, k )
......
...@@ -705,8 +705,8 @@ Abc_Cex_t * Vta_ManRefineAbstraction( Vta_Man_t * p, int f ) ...@@ -705,8 +705,8 @@ Abc_Cex_t * Vta_ManRefineAbstraction( Vta_Man_t * p, int f )
// objects with equal distance should receive priority based on number // objects with equal distance should receive priority based on number
// those objects whose prototypes have been added in other timeframes // those objects whose prototypes have been added in other timeframes
// should have higher priority than the current object // should have higher priority than the current object
Vec_PtrSort( vTermsUsed, (int (*)(void))Vta_ManComputeDepthIncrease ); Vec_PtrSort( vTermsUsed, (int (*)(const void *, const void *))Vta_ManComputeDepthIncrease );
Vec_PtrSort( vTermsUnused, (int (*)(void))Vta_ManComputeDepthIncrease ); Vec_PtrSort( vTermsUnused, (int (*)(const void *, const void *))Vta_ManComputeDepthIncrease );
if ( Vec_PtrSize(vTermsUsed) > 1 ) if ( Vec_PtrSize(vTermsUsed) > 1 )
{ {
pThis0 = (Vta_Obj_t *)Vec_PtrEntry(vTermsUsed, 0); pThis0 = (Vta_Obj_t *)Vec_PtrEntry(vTermsUsed, 0);
......
...@@ -91,8 +91,8 @@ void Dch_ManCollectTfoCands( Dch_Man_t * p, Aig_Obj_t * pObj1, Aig_Obj_t * pObj2 ...@@ -91,8 +91,8 @@ void Dch_ManCollectTfoCands( Dch_Man_t * p, Aig_Obj_t * pObj1, Aig_Obj_t * pObj2
Aig_ObjSetTravIdCurrent( p->pAigTotal, Aig_ManConst1(p->pAigTotal) ); Aig_ObjSetTravIdCurrent( p->pAigTotal, Aig_ManConst1(p->pAigTotal) );
Dch_ManCollectTfoCands_rec( p, pObj1 ); Dch_ManCollectTfoCands_rec( p, pObj1 );
Dch_ManCollectTfoCands_rec( p, pObj2 ); Dch_ManCollectTfoCands_rec( p, pObj2 );
Vec_PtrSort( p->vSimRoots, (int (*)(void))Aig_ObjCompareIdIncrease ); Vec_PtrSort( p->vSimRoots, (int (*)(const void *, const void *))Aig_ObjCompareIdIncrease );
Vec_PtrSort( p->vSimClasses, (int (*)(void))Aig_ObjCompareIdIncrease ); Vec_PtrSort( p->vSimClasses, (int (*)(const void *, const void *))Aig_ObjCompareIdIncrease );
Vec_PtrForEachEntry( Aig_Obj_t *, p->vSimClasses, pObj, i ) Vec_PtrForEachEntry( Aig_Obj_t *, p->vSimClasses, pObj, i )
pObj->fMarkA = 0; pObj->fMarkA = 0;
} }
......
...@@ -157,7 +157,7 @@ int Pdr_ManPushClauses( Pdr_Man_t * p ) ...@@ -157,7 +157,7 @@ int Pdr_ManPushClauses( Pdr_Man_t * p )
assert( p->iUseFrame > 0 ); assert( p->iUseFrame > 0 );
Vec_VecForEachLevelStartStop( p->vClauses, vArrayK, k, iStartFrame, kMax ) Vec_VecForEachLevelStartStop( p->vClauses, vArrayK, k, iStartFrame, kMax )
{ {
Vec_PtrSort( vArrayK, (int (*)(void))Pdr_SetCompare ); Vec_PtrSort( vArrayK, (int (*)(const void *, const void *))Pdr_SetCompare );
vArrayK1 = Vec_VecEntry( p->vClauses, k+1 ); vArrayK1 = Vec_VecEntry( p->vClauses, k+1 );
Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCubeK, j ) Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCubeK, j )
{ {
...@@ -216,7 +216,7 @@ int Pdr_ManPushClauses( Pdr_Man_t * p ) ...@@ -216,7 +216,7 @@ int Pdr_ManPushClauses( Pdr_Man_t * p )
// clean up the last one // clean up the last one
vArrayK = Vec_VecEntry( p->vClauses, kMax ); vArrayK = Vec_VecEntry( p->vClauses, kMax );
Vec_PtrSort( vArrayK, (int (*)(void))Pdr_SetCompare ); Vec_PtrSort( vArrayK, (int (*)(const void *, const void *))Pdr_SetCompare );
Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCubeK, j ) Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCubeK, j )
{ {
// remove cubes in the same frame that are contained by pCubeK // remove cubes in the same frame that are contained by pCubeK
......
...@@ -47,7 +47,7 @@ Vec_Ptr_t * IPdr_ManPushClausesK( Pdr_Man_t * p, int k ) ...@@ -47,7 +47,7 @@ Vec_Ptr_t * IPdr_ManPushClausesK( Pdr_Man_t * p, int k )
assert( Vec_VecSize(p->vClauses) == k + 1 ); assert( Vec_VecSize(p->vClauses) == k + 1 );
vArrayK = Vec_VecEntry( p->vClauses, k ); vArrayK = Vec_VecEntry( p->vClauses, k );
Vec_PtrSort( vArrayK, (int (*)(void))Pdr_SetCompare ); Vec_PtrSort( vArrayK, (int (*)(const void *, const void *))Pdr_SetCompare );
vArrayK1 = Vec_PtrAlloc( 100 ); vArrayK1 = Vec_PtrAlloc( 100 );
Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCubeK, j ) Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCubeK, j )
{ {
...@@ -117,7 +117,7 @@ void IPdr_ManPrintClauses( Vec_Vec_t * vClauses, int kStart, int nRegs ) ...@@ -117,7 +117,7 @@ void IPdr_ManPrintClauses( Vec_Vec_t * vClauses, int kStart, int nRegs )
int i, k, Counter = 0; int i, k, Counter = 0;
Vec_VecForEachLevelStart( vClauses, vArrayK, k, kStart ) Vec_VecForEachLevelStart( vClauses, vArrayK, k, kStart )
{ {
Vec_PtrSort( vArrayK, (int (*)(void))Pdr_SetCompare ); Vec_PtrSort( vArrayK, (int (*)(const void *, const void *))Pdr_SetCompare );
Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCube, i ) Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCube, i )
{ {
Abc_Print( 1, "Frame[%4d]Cube[%4d] = ", k, Counter++ ); Abc_Print( 1, "Frame[%4d]Cube[%4d] = ", k, Counter++ );
......
...@@ -248,7 +248,7 @@ void Pdr_ManPrintClauses( Pdr_Man_t * p, int kStart ) ...@@ -248,7 +248,7 @@ void Pdr_ManPrintClauses( Pdr_Man_t * p, int kStart )
int i, k, Counter = 0; int i, k, Counter = 0;
Vec_VecForEachLevelStart( p->vClauses, vArrayK, k, kStart ) Vec_VecForEachLevelStart( p->vClauses, vArrayK, k, kStart )
{ {
Vec_PtrSort( vArrayK, (int (*)(void))Pdr_SetCompare ); Vec_PtrSort( vArrayK, (int (*)(const void *, const void *))Pdr_SetCompare );
Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCube, i ) Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCube, i )
{ {
Abc_Print( 1, "C=%4d. F=%4d ", Counter++, k ); Abc_Print( 1, "C=%4d. F=%4d ", Counter++, k );
...@@ -370,7 +370,7 @@ void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName, int fProved ) ...@@ -370,7 +370,7 @@ void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName, int fProved )
vCubes = Pdr_ManCollectCubes( p, kStart ); vCubes = Pdr_ManCollectCubes( p, kStart );
else else
vCubes = Vec_PtrDup( p->vInfCubes ); vCubes = Vec_PtrDup( p->vInfCubes );
Vec_PtrSort( vCubes, (int (*)(void))Pdr_SetCompare ); Vec_PtrSort( vCubes, (int (*)(const void *, const void *))Pdr_SetCompare );
// Pdr_ManDumpAig( p->pAig, vCubes ); // Pdr_ManDumpAig( p->pAig, vCubes );
// count cubes // count cubes
Count = 0; Count = 0;
...@@ -446,7 +446,7 @@ Vec_Str_t * Pdr_ManDumpString( Pdr_Man_t * p ) ...@@ -446,7 +446,7 @@ Vec_Str_t * Pdr_ManDumpString( Pdr_Man_t * p )
vCubes = Pdr_ManCollectCubes( p, kStart ); vCubes = Pdr_ManCollectCubes( p, kStart );
else else
vCubes = Vec_PtrDup( p->vInfCubes ); vCubes = Vec_PtrDup( p->vInfCubes );
Vec_PtrSort( vCubes, (int (*)(void))Pdr_SetCompare ); Vec_PtrSort( vCubes, (int (*)(const void *, const void *))Pdr_SetCompare );
// collect variable appearances // collect variable appearances
vFlopCounts = p->pPars->fUseSupp ? Pdr_ManCountFlops( p, vCubes ) : NULL; vFlopCounts = p->pPars->fUseSupp ? Pdr_ManCountFlops( p, vCubes ) : NULL;
// output cubes // output cubes
......
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