mirror of https://github.com/YosysHQ/abc.git
Changing declaration of Vec_Ptr_t sorting function to satisfy some compilers.
This commit is contained in:
parent
2ce1ce8bed
commit
ba64e78608
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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) ==
|
||||
|
|
|
|||
|
|
@ -865,7 +865,7 @@ int Abc_NtkCheckUniqueCiNames( Abc_Ntk_t * pNtk )
|
|||
vNames = Vec_PtrAlloc( Abc_NtkCiNum(pNtk) );
|
||||
Abc_NtkForEachCi( pNtk, pObj, i )
|
||||
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++ )
|
||||
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 )
|
|||
vNames = Vec_PtrAlloc( Abc_NtkCoNum(pNtk) );
|
||||
Abc_NtkForEachCo( pNtk, pObj, i )
|
||||
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++ )
|
||||
{
|
||||
// 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
|
|||
Vec_PtrPush( vCubes, pCube );
|
||||
}
|
||||
if ( fWeight )
|
||||
Vec_PtrSort( vCubes, (int (*)())Abc_NodeCompareCubes2 );
|
||||
Vec_PtrSort( vCubes, (int (*)(const void *, const void *))Abc_NodeCompareCubes2 );
|
||||
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) );
|
||||
pPivot = Vec_StrArray( vStore );
|
||||
Vec_PtrForEachEntry( char *, vCubes, pCube, i )
|
||||
|
|
|
|||
|
|
@ -442,7 +442,7 @@ void Abc_NtkPrintBoxInfo( Abc_Ntk_t * pNtk )
|
|||
}
|
||||
// sort models by name
|
||||
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 )
|
||||
// printf( "%s\n", Abc_NtkName(pModel) );
|
||||
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ void Au_ManPrintBoxInfo( Au_Ntk_t * pNtk )
|
|||
vMods->nSize--;
|
||||
vMods->pArray++;
|
||||
// sort models by name
|
||||
Vec_PtrSort( vMods, (int(*)())Au_NtkCompareNames );
|
||||
Vec_PtrSort( vMods, (int(*)(const void *, const void *))Au_NtkCompareNames );
|
||||
// swap the first model
|
||||
Num = Vec_PtrFind( vMods, pNtk );
|
||||
assert( Num >= 0 && Num < Vec_PtrSize(vMods) );
|
||||
|
|
@ -643,7 +643,7 @@ void Au_ManPrintBoxInfoSorted( Au_Ntk_t * pNtk )
|
|||
vMods->pArray--;
|
||||
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 )
|
||||
{
|
||||
printf( "MODULE " );
|
||||
|
|
|
|||
|
|
@ -703,7 +703,7 @@ void Abc_ObjSortInReverseOrder( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes )
|
|||
vOrder = Abc_NtkDfsReverse( pNtk );
|
||||
Vec_PtrForEachEntry( Abc_Obj_t *, vOrder, pNode, 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 )
|
||||
pNode->iTemp = 0;
|
||||
Vec_PtrFree( vOrder );
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ Abc_Obj_t * Abc_NodeBalance_rec( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pNodeOld, Vec_
|
|||
if ( vSuper->nSize < 2 )
|
||||
printf( "BUG!\n" );
|
||||
// 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
|
||||
assert( vSuper->nSize > 1 );
|
||||
while ( vSuper->nSize > 1 )
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ void Abc_CollectTopOr( Abc_Obj_t * pObj, Vec_Ptr_t * vSuper )
|
|||
if ( Abc_ObjIsComplement(pObj) )
|
||||
{
|
||||
Abc_CollectTopOr_rec( Abc_ObjNot(pObj), vSuper );
|
||||
Vec_PtrUniqify( vSuper, (int (*)())Abc_ObjCompareById );
|
||||
Vec_PtrUniqify( vSuper, (int (*)(const void *, const void *))Abc_ObjCompareById );
|
||||
}
|
||||
else
|
||||
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
|
|||
// cofactor w.r.t. the bound set variables
|
||||
vCofs = Abc_NtkBddCofactors( dd, (DdNode *)pNode->pData, nLutSize );
|
||||
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
|
||||
if( Vec_PtrSize(vUniq) > (1 << (nLutSize-2)) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1141,7 +1141,7 @@ Vec_Ptr_t * Abc_NktMffcServer( Abc_Ntk_t * pNtk, int nInMax, int nOutMax )
|
|||
// sort by their MFFC size
|
||||
Vec_PtrForEachEntry( Abc_Obj_t *, vPivots, pObj, i )
|
||||
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
|
||||
vMarks = Vec_IntStart( Abc_NtkObjNumMax(pNtk) );
|
||||
Vec_PtrForEachEntry( Abc_Obj_t *, vPivots, pObj, i )
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ void Npn_ManWrite( Npn_Man_t * p, char * pFileName )
|
|||
for ( i = 0; i < p->nBins; i++ )
|
||||
for ( pEntry = Npn_ManObj(p, p->pBins[i]); pEntry; pEntry = Npn_ManObj(p, pEntry->iNext) )
|
||||
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 )
|
||||
{
|
||||
Extra_PrintHexadecimal( pFile, (unsigned *)&pEntry->uTruth, 6 );
|
||||
|
|
|
|||
|
|
@ -712,7 +712,7 @@ Vec_Ptr_t * Abc_NodeGetSuper( Abc_Obj_t * pNode )
|
|||
Vec_PtrFree( vSuper );
|
||||
vSuper = vFront;
|
||||
// uniquify and return the frontier
|
||||
Vec_PtrUniqify( vSuper, (int (*)())Vec_CompareNodeIds );
|
||||
Vec_PtrUniqify( vSuper, (int (*)(const void *, const void *))Vec_CompareNodeIds );
|
||||
return vSuper;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -888,7 +888,7 @@ int Abc_NtkReplaceAutonomousLogic( Abc_Ntk_t * pNtk )
|
|||
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
|
||||
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 )
|
|||
// printf( "%s \n", pName );
|
||||
// printf( "\n" );
|
||||
// do the sorting
|
||||
Vec_PtrSort( vNames, (int (*)(void))Cba_StrCmp );
|
||||
Vec_PtrSort( vNames, (int (*)(const void *, const void *))Cba_StrCmp );
|
||||
// print after
|
||||
// Vec_PtrForEachEntry( char *, vNames, pName, i )
|
||||
// printf( "%s \n", pName );
|
||||
|
|
|
|||
|
|
@ -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( vMults, (int (*)(void))IntPairPtrCompare ) ;
|
||||
Vec_PtrSort( vMuxes, (int (*)(void))IntPairPtrCompare ) ;
|
||||
Vec_PtrSort( vFlops, (int (*)(void))IntPairPtrCompare ) ;
|
||||
Vec_PtrSort( vAdds, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
|
||||
Vec_PtrSort( vMults, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
|
||||
Vec_PtrSort( vMuxes, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
|
||||
Vec_PtrSort( vFlops, (int (*)(const void *, const void *))IntPairPtrCompare ) ;
|
||||
|
||||
Vec_PtrForEachEntry( Int_Pair_t *, vAdds, pPair, i )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ void Abc_SclBufSize( Bus_Man_t * p, float Gain )
|
|||
// add one or more inverters
|
||||
// Abc_NtkPrintFanoutProfile( pObj );
|
||||
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
|
||||
{
|
||||
Abc_Obj_t * pInv;
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ Abc_Obj_t * Abc_SclPerformBufferingOne( Abc_Obj_t * pObj, int Degree, int fUseIn
|
|||
// collect fanouts and sort by reverse level
|
||||
vFanouts = Vec_PtrAlloc( Abc_ObjFanoutNum(pObj) );
|
||||
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
|
||||
if ( fUseInvs )
|
||||
pBuffer = Abc_NtkCreateNodeInv( pObj->pNtk, NULL );
|
||||
|
|
|
|||
|
|
@ -938,8 +938,8 @@ static int Vec_PtrSortComparePtr( void ** pp1, void ** pp2 )
|
|||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
static void Vec_PtrSort( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() ) ___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 *) ) ___unused;
|
||||
static void Vec_PtrSort( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(const void *, const void *) )
|
||||
{
|
||||
if ( p->nSize < 2 )
|
||||
return;
|
||||
|
|
@ -962,8 +962,8 @@ static void Vec_PtrSort( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() )
|
|||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
static void Vec_PtrUniqify( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() ) ___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 *) ) ___unused;
|
||||
static void Vec_PtrUniqify( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(const void *, const void *) )
|
||||
{
|
||||
int i, k;
|
||||
if ( p->nSize < 2 )
|
||||
|
|
@ -974,15 +974,15 @@ static void Vec_PtrUniqify( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() )
|
|||
p->pArray[k++] = p->pArray[i];
|
||||
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)(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 ) ___unused;
|
||||
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;
|
||||
if ( vCounts )
|
||||
Vec_IntFill( vCounts, 1, 1 );
|
||||
if ( p->nSize < 2 )
|
||||
return;
|
||||
Vec_PtrSort( p, (int (*)())Vec_PtrSortCompare );
|
||||
Vec_PtrSort( p, Vec_PtrSortCompare );
|
||||
for ( i = k = 1; i < p->nSize; i++ )
|
||||
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
|
|||
Vec_PtrWriteEntry( vFanout, k++, pObj );
|
||||
}
|
||||
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 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ void Dar_BalanceUniqify( Aig_Obj_t * pObj, Vec_Ptr_t * vNodes, int fExor )
|
|||
Aig_Obj_t * pTemp, * pTempNext;
|
||||
int i, k;
|
||||
// sort the nodes by their literal
|
||||
Vec_PtrSort( vNodes, (int (*)())Dar_ObjCompareLits );
|
||||
Vec_PtrSort( vNodes, (int (*)(const void *, const void *))Dar_ObjCompareLits );
|
||||
// remove duplicates
|
||||
k = 0;
|
||||
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
|
|||
int LeftBound;
|
||||
assert( vSuper->nSize > 1 );
|
||||
// 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
|
||||
while ( vSuper->nSize > 1 )
|
||||
{
|
||||
|
|
@ -462,7 +462,7 @@ Aig_Obj_t * Dar_BalanceBuildSuperTop( Aig_Man_t * p, Vec_Ptr_t * vSuper, Aig_Typ
|
|||
int i, nBaseSizeAll, nBaseSize;
|
||||
assert( vSuper->nSize > 1 );
|
||||
// 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
|
||||
while ( Vec_PtrSize(vSuper) > 1 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
// 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
|
||||
Abc_ObjForEachFanin( pNode, pFanin, k )
|
||||
|
|
|
|||
|
|
@ -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
|
||||
// those objects whose prototypes have been added in other timeframes
|
||||
// should have higher priority than the current object
|
||||
Vec_PtrSort( vTermsUsed, (int (*)(void))Vta_ManComputeDepthIncrease );
|
||||
Vec_PtrSort( vTermsUnused, (int (*)(void))Vta_ManComputeDepthIncrease );
|
||||
Vec_PtrSort( vTermsUsed, (int (*)(const void *, const void *))Vta_ManComputeDepthIncrease );
|
||||
Vec_PtrSort( vTermsUnused, (int (*)(const void *, const void *))Vta_ManComputeDepthIncrease );
|
||||
if ( Vec_PtrSize(vTermsUsed) > 1 )
|
||||
{
|
||||
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
|
|||
Aig_ObjSetTravIdCurrent( p->pAigTotal, Aig_ManConst1(p->pAigTotal) );
|
||||
Dch_ManCollectTfoCands_rec( p, pObj1 );
|
||||
Dch_ManCollectTfoCands_rec( p, pObj2 );
|
||||
Vec_PtrSort( p->vSimRoots, (int (*)(void))Aig_ObjCompareIdIncrease );
|
||||
Vec_PtrSort( p->vSimClasses, (int (*)(void))Aig_ObjCompareIdIncrease );
|
||||
Vec_PtrSort( p->vSimRoots, (int (*)(const void *, const void *))Aig_ObjCompareIdIncrease );
|
||||
Vec_PtrSort( p->vSimClasses, (int (*)(const void *, const void *))Aig_ObjCompareIdIncrease );
|
||||
Vec_PtrForEachEntry( Aig_Obj_t *, p->vSimClasses, pObj, i )
|
||||
pObj->fMarkA = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ int Pdr_ManPushClauses( Pdr_Man_t * p )
|
|||
assert( p->iUseFrame > 0 );
|
||||
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 );
|
||||
Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCubeK, j )
|
||||
{
|
||||
|
|
@ -216,7 +216,7 @@ int Pdr_ManPushClauses( Pdr_Man_t * p )
|
|||
|
||||
// clean up the last one
|
||||
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 )
|
||||
{
|
||||
// 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 )
|
|||
|
||||
assert( Vec_VecSize(p->vClauses) == k + 1 );
|
||||
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 );
|
||||
Vec_PtrForEachEntry( Pdr_Set_t *, vArrayK, pCubeK, j )
|
||||
{
|
||||
|
|
@ -117,7 +117,7 @@ void IPdr_ManPrintClauses( Vec_Vec_t * vClauses, int kStart, int nRegs )
|
|||
int i, k, Counter = 0;
|
||||
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 )
|
||||
{
|
||||
Abc_Print( 1, "Frame[%4d]Cube[%4d] = ", k, Counter++ );
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ void Pdr_ManPrintClauses( Pdr_Man_t * p, int kStart )
|
|||
int i, k, Counter = 0;
|
||||
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 )
|
||||
{
|
||||
Abc_Print( 1, "C=%4d. F=%4d ", Counter++, k );
|
||||
|
|
@ -370,7 +370,7 @@ void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName, int fProved )
|
|||
vCubes = Pdr_ManCollectCubes( p, kStart );
|
||||
else
|
||||
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 );
|
||||
// count cubes
|
||||
Count = 0;
|
||||
|
|
@ -446,7 +446,7 @@ Vec_Str_t * Pdr_ManDumpString( Pdr_Man_t * p )
|
|||
vCubes = Pdr_ManCollectCubes( p, kStart );
|
||||
else
|
||||
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
|
||||
vFlopCounts = p->pPars->fUseSupp ? Pdr_ManCountFlops( p, vCubes ) : NULL;
|
||||
// output cubes
|
||||
|
|
|
|||
Loading…
Reference in New Issue