本文整理汇总了C++中Vec_IntFree函数的典型用法代码示例。如果您正苦于以下问题:C++ Vec_IntFree函数的具体用法?C++ Vec_IntFree怎么用?C++ Vec_IntFree使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Vec_IntFree函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Cec_ManPatStop
/**Function*************************************************************
Synopsis [Deletes AIG.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Cec_ManPatStop( Cec_ManPat_t * p )
{
Vec_StrFree( p->vStorage );
Vec_IntFree( p->vPattern1 );
Vec_IntFree( p->vPattern2 );
ABC_FREE( p );
}
示例2: Abc_FrameDeallocate
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_FrameDeallocate( Abc_Frame_t * p )
{
extern void Rwt_ManGlobalStop();
extern void undefine_cube_size();
// extern void Ivy_TruthManStop();
// Abc_HManStop();
// undefine_cube_size();
Rwt_ManGlobalStop();
// Ivy_TruthManStop();
if ( p->vAbcObjIds) Vec_IntFree( p->vAbcObjIds );
if ( p->vCexVec ) Vec_PtrFreeFree( p->vCexVec );
if ( p->vPoEquivs ) Vec_VecFree( (Vec_Vec_t *)p->vPoEquivs );
if ( p->vStatuses ) Vec_IntFree( p->vStatuses );
if ( p->pLibVer ) Abc_LibFree( (Abc_Lib_t *)p->pLibVer, NULL );
if ( p->pManDec ) Dec_ManStop( (Dec_Man_t *)p->pManDec );
if ( p->dd ) Extra_StopManager( p->dd );
if ( p->vStore ) Vec_PtrFree( p->vStore );
if ( p->pSave1 ) Aig_ManStop( (Aig_Man_t *)p->pSave1 );
if ( p->pSave2 ) Aig_ManStop( (Aig_Man_t *)p->pSave2 );
if ( p->pSave3 ) Aig_ManStop( (Aig_Man_t *)p->pSave3 );
if ( p->pSave4 ) Aig_ManStop( (Aig_Man_t *)p->pSave4 );
if ( p->vPlugInComBinPairs )
{
char * pTemp;
int i;
Vec_PtrForEachEntry( char *, p->vPlugInComBinPairs, pTemp, i )
ABC_FREE( pTemp );
Vec_PtrFree( p->vPlugInComBinPairs );
}
示例3: Sym_ManStop
/**Function*************************************************************
Synopsis [Stops the simulation manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Sym_ManStop( Sym_Man_t * p )
{
int i;
Sym_ManPrintStats( p );
if ( p->vSuppFun ) Sim_UtilInfoFree( p->vSuppFun );
if ( p->vSim ) Sim_UtilInfoFree( p->vSim );
if ( p->vNodes ) Vec_PtrFree( p->vNodes );
if ( p->vSupports ) Vec_VecFree( p->vSupports );
for ( i = 0; i < p->nOutputs; i++ )
{
Extra_BitMatrixStop( p->vMatrSymms->pArray[i] );
Extra_BitMatrixStop( p->vMatrNonSymms->pArray[i] );
}
Vec_IntFree( p->vVarsU );
Vec_IntFree( p->vVarsV );
Vec_PtrFree( p->vMatrSymms );
Vec_PtrFree( p->vMatrNonSymms );
Vec_IntFree( p->vPairsTotal );
Vec_IntFree( p->vPairsSym );
Vec_IntFree( p->vPairsNonSym );
FREE( p->uPatRand );
FREE( p->uPatCol );
FREE( p->uPatRow );
free( p );
}
示例4: Seq_NtkImplementRetiming
/**Function*************************************************************
Synopsis [Implements the retiming on the sequential AIG.]
Description [Split the retiming into forward and backward.]
SideEffects []
SeeAlso []
***********************************************************************/
int Seq_NtkImplementRetiming( Abc_Ntk_t * pNtk, Vec_Str_t * vLags, int fVerbose )
{
Vec_Int_t * vSteps;
Vec_Ptr_t * vMoves;
int RetValue;
// forward retiming
vSteps = Abc_NtkUtilRetimingSplit( vLags, 1 );
// translate each set of steps into moves
if ( fVerbose )
printf( "The number of forward steps = %6d.\n", Vec_IntSize(vSteps) );
vMoves = Abc_NtkUtilRetimingGetMoves( pNtk, vSteps, 1 );
if ( fVerbose )
printf( "The number of forward moves = %6d.\n", Vec_PtrSize(vMoves) );
// implement this retiming
Seq_NtkImplementRetimingForward( pNtk, vMoves );
Vec_IntFree( vSteps );
Vec_PtrFree( vMoves );
// backward retiming
vSteps = Abc_NtkUtilRetimingSplit( vLags, 0 );
// translate each set of steps into moves
if ( fVerbose )
printf( "The number of backward steps = %6d.\n", Vec_IntSize(vSteps) );
vMoves = Abc_NtkUtilRetimingGetMoves( pNtk, vSteps, 0 );
if ( fVerbose )
printf( "The number of backward moves = %6d.\n", Vec_PtrSize(vMoves) );
// implement this retiming
RetValue = Seq_NtkImplementRetimingBackward( pNtk, vMoves, fVerbose );
Vec_IntFree( vSteps );
Vec_PtrFree( vMoves );
return RetValue;
}
示例5: Dec_ManStop
/**Function*************************************************************
Synopsis [Stops the MVC maanager used in the factoring package.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Dec_ManStop( Dec_Man_t * p )
{
Mvc_ManagerFree( p->pMvcMem );
Vec_IntFree( p->vCubes );
Vec_IntFree( p->vLits );
free( p->puCanons );
free( p->pPhases );
free( p->pPerms );
free( p->pMap );
free( p );
}
示例6: Cec_ManSatStop
/**Function*************************************************************
Synopsis [Frees the manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Cec_ManSatStop( Cec_ManSat_t * p )
{
if ( p->pSat )
sat_solver_delete( p->pSat );
Vec_IntFree( p->vCex );
Vec_IntFree( p->vVisits );
Vec_PtrFree( p->vUsedNodes );
Vec_PtrFree( p->vFanins );
ABC_FREE( p->pSatVars );
ABC_FREE( p );
}
示例7: Gia_ManComputeMffcs
Vec_Wec_t * Gia_ManComputeMffcs( Gia_Man_t * p, int LimitMin, int LimitMax, int SuppMax, int RatioBest )
{
Gia_Obj_t * pObj;
Vec_Wec_t * vMffcs;
Vec_Int_t * vNodes, * vLeaves, * vInners, * vMffc;
int i, iPivot;
assert( p->pMuxes );
vNodes = Vec_IntAlloc( 2 * LimitMax );
vLeaves = Vec_IntAlloc( 2 * LimitMax );
vInners = Vec_IntAlloc( 2 * LimitMax );
vMffcs = Vec_WecAlloc( 1000 );
Gia_ManCreateRefs( p );
Gia_ManForEachAnd( p, pObj, i )
{
if ( !Gia_ObjRefNum(p, pObj) )
continue;
if ( !Gia_ObjCheckMffc(p, pObj, LimitMax, vNodes, vLeaves, vInners) )
continue;
if ( Vec_IntSize(vInners) < LimitMin )
continue;
if ( Vec_IntSize(vLeaves) > SuppMax )
continue;
// improve cut
// collect cut
vMffc = Vec_WecPushLevel( vMffcs );
Vec_IntGrow( vMffc, Vec_IntSize(vLeaves) + Vec_IntSize(vInners) + 20 );
Vec_IntPush( vMffc, i );
Vec_IntPush( vMffc, Vec_IntSize(vLeaves) );
Vec_IntPush( vMffc, Vec_IntSize(vInners) );
Vec_IntAppend( vMffc, vLeaves );
// Vec_IntAppend( vMffc, vInners );
// add last entry equal to the ratio
Vec_IntPush( vMffc, 1000 * Vec_IntSize(vInners) / Vec_IntSize(vLeaves) );
}
Vec_IntFree( vNodes );
Vec_IntFree( vLeaves );
Vec_IntFree( vInners );
// sort MFFCs by their inner/leaf ratio
Vec_WecSortByLastInt( vMffcs, 1 );
Vec_WecForEachLevel( vMffcs, vMffc, i )
Vec_IntPop( vMffc );
// remove those whose ratio is not good
iPivot = RatioBest * Vec_WecSize(vMffcs) / 100;
Vec_WecForEachLevelStart( vMffcs, vMffc, i, iPivot )
Vec_IntErase( vMffc );
assert( iPivot <= Vec_WecSize(vMffcs) );
Vec_WecShrink( vMffcs, iPivot );
return vMffcs;
}
示例8: Abc_NtkDressMapIds
/**Function*************************************************************
Synopsis [Computes equivalence classes of objects in pNtk1 and pNtk2.]
Description [Internal procedure.]
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Ptr_t * Abc_NtkDressMapIds( Aig_Man_t * pMiter, Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2 )
{
Vec_Ptr_t * vRes;
Vec_Int_t * vId2Lit1, * vId2Lit2, * vCounts0, * vCounts1, * vClassC, * vClass2Num;
int i, Class;
// start the classes
vRes = Vec_PtrAlloc( 1000 );
// set polarity of the nodes
Abc_NtkDressMapSetPolarity( pNtk1 );
Abc_NtkDressMapSetPolarity( pNtk2 );
// create mapping of node IDs of pNtk1/pNtk2 into the IDs of equiv classes of pMiter
vId2Lit1 = Abc_NtkDressMapClasses( pMiter, pNtk1 );
vId2Lit2 = Abc_NtkDressMapClasses( pMiter, pNtk2 );
// count the number of nodes in each equivalence class
vCounts0 = Vec_IntStart( Aig_ManObjNumMax(pMiter) );
Vec_IntForEachEntry( vId2Lit1, Class, i )
if ( Class >= 0 )
Vec_IntAddToEntry( vCounts0, Class, 1 );
vCounts1 = Vec_IntStart( Aig_ManObjNumMax(pMiter) );
Vec_IntForEachEntry( vId2Lit2, Class, i )
if ( Class >= 0 )
Vec_IntAddToEntry( vCounts1, Class, 1 );
// get the costant class
vClassC = Vec_IntAlloc( 100 );
Vec_IntForEachEntry( vId2Lit1, Class, i )
if ( Class == 0 )
Vec_IntPush( vClassC, Abc_ObjDressMakeId(pNtk1, i, 0) );
Vec_IntForEachEntry( vId2Lit2, Class, i )
if ( Class == 0 )
Vec_IntPush( vClassC, Abc_ObjDressMakeId(pNtk2, i, 1) );
Vec_PtrPush( vRes, vClassC );
// map repr node IDs into class numbers
vClass2Num = Vec_IntAlloc( 0 );
Vec_IntFill( vClass2Num, Aig_ManObjNumMax(pMiter), -1 );
// keep classes having at least one element from pNtk1 and one from pNtk2
Vec_IntForEachEntry( vId2Lit1, Class, i )
if ( Class > 0 && Vec_IntEntry(vCounts0, Class) && Vec_IntEntry(vCounts1, Class) )
Vec_IntPush( Abc_ObjDressClass(vRes, vClass2Num, Class), Abc_ObjDressMakeId(pNtk1, i, 0) );
Vec_IntForEachEntry( vId2Lit2, Class, i )
if ( Class > 0 && Vec_IntEntry(vCounts0, Class) && Vec_IntEntry(vCounts1, Class) )
Vec_IntPush( Abc_ObjDressClass(vRes, vClass2Num, Class), Abc_ObjDressMakeId(pNtk2, i, 1) );
// package them accordingly
Vec_IntFree( vClass2Num );
Vec_IntFree( vCounts0 );
Vec_IntFree( vCounts1 );
Vec_IntFree( vId2Lit1 );
Vec_IntFree( vId2Lit2 );
return vRes;
}
示例9: Cbs0_ManStop
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Cbs0_ManStop( Cbs0_Man_t * p )
{
Vec_IntFree( p->vModel );
ABC_FREE( p->pProp.pData );
ABC_FREE( p->pJust.pData );
ABC_FREE( p );
}
示例10: Gia_ManDupUnnormalize
/**Function*************************************************************
Synopsis [Duplicates AIG according to the timing manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Gia_Man_t * Gia_ManDupUnnormalize( Gia_Man_t * p )
{
Vec_Int_t * vNodes;
Gia_Man_t * pNew;
Gia_Obj_t * pObj;
int i;
vNodes = Gia_ManOrderWithBoxes( p );
if ( vNodes == NULL )
return NULL;
Gia_ManFillValue( p );
pNew = Gia_ManStart( Gia_ManObjNum(p) );
pNew->pName = Abc_UtilStrsav( p->pName );
pNew->pSpec = Abc_UtilStrsav( p->pSpec );
if ( p->pSibls )
pNew->pSibls = ABC_CALLOC( int, Gia_ManObjNum(p) );
Gia_ManForEachObjVec( vNodes, p, pObj, i )
{
if ( Gia_ObjIsAnd(pObj) )
{
pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
if ( Gia_ObjSibl(p, Gia_ObjId(p, pObj)) )
pNew->pSibls[Abc_Lit2Var(pObj->Value)] = Abc_Lit2Var(Gia_ObjSiblObj(p, Gia_ObjId(p, pObj))->Value);
}
else if ( Gia_ObjIsCi(pObj) )
pObj->Value = Gia_ManAppendCi( pNew );
else if ( Gia_ObjIsCo(pObj) )
pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
else if ( Gia_ObjIsConst0(pObj) )
pObj->Value = 0;
else assert( 0 );
}
Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) );
Vec_IntFree( vNodes );
return pNew;
}
示例11: Aig_ManForEachCo
// pProgress = Bar_ProgressStart( stdout, Aig_ManCoNum(p) );
Aig_ManForEachCo( p, pObj, i )
{
// Bar_ProgressUpdate( pProgress, i, NULL );
// get old supports
vSup = Vec_VecEntryInt( vSupps, i );
if ( Vec_IntSize(vSup) < 2 )
continue;
// compute new supports
CountOver = CountQuant = 0;
vSupNew = Vec_IntDup( vSup );
// go through the nodes where the first var appears
Aig_ManForEachCo( p, pObj, k )
// iVar = Vec_IntEntry( vSup, 0 );
// vSupIn = Vec_VecEntry( vSuppsIn, iVar );
// Vec_IntForEachEntry( vSupIn, Entry, k )
{
// pObj = Aig_ManObj( p, Entry );
// get support of this output
// vSup2 = (Vec_Int_t *)pObj->pNext;
vSup2 = Vec_VecEntryInt( vSupps, k );
// count the number of common vars
nCommon = Vec_IntTwoCountCommon(vSup, vSup2);
if ( nCommon < 2 )
continue;
if ( nCommon > nComLim )
{
vSupNew = Vec_IntTwoMerge( vTemp = vSupNew, vSup2 );
Vec_IntFree( vTemp );
CountOver++;
}
else
CountQuant++;
}
示例12: Gia_ManPrintTents
void Gia_ManPrintTents( Gia_Man_t * p )
{
Vec_Int_t * vObjs;
Gia_Obj_t * pObj;
int t, i, iObjId, nSizePrev, nSizeCurr;
assert( Gia_ManPoNum(p) > 0 );
vObjs = Vec_IntAlloc( 100 );
// save constant class
Gia_ManIncrementTravId( p );
Gia_ObjSetTravIdCurrent( p, Gia_ManConst0(p) );
Vec_IntPush( vObjs, 0 );
// create starting root
nSizePrev = Vec_IntSize(vObjs);
Gia_ManForEachPo( p, pObj, i )
Gia_ManPrintTents_rec( p, pObj, vObjs );
// build tents
printf( "Tents: " );
for ( t = 1; nSizePrev < Vec_IntSize(vObjs); t++ )
{
nSizeCurr = Vec_IntSize(vObjs);
Vec_IntForEachEntryStartStop( vObjs, iObjId, i, nSizePrev, nSizeCurr )
if ( Gia_ObjIsRo(p, Gia_ManObj(p, iObjId)) )
Gia_ManPrintTents_rec( p, Gia_ObjRoToRi(p, Gia_ManObj(p, iObjId)), vObjs );
printf( "%d=%d ", t, nSizeCurr - nSizePrev );
nSizePrev = nSizeCurr;
}
printf( " Unused=%d\n", Gia_ManObjNum(p) - Vec_IntSize(vObjs) );
Vec_IntFree( vObjs );
// the remaining objects are PIs without fanout
// Gia_ManForEachObj( p, pObj, i )
// if ( !Gia_ObjIsTravIdCurrent(p, pObj) )
// Gia_ObjPrint( p, pObj );
}
示例13: Llb_NonlinRemoveVar
/**Function*************************************************************
Synopsis [Removes one variable.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Llb_NonlinRemoveVar( Llb_Mgr_t * p, Llb_Var_t * pVar )
{
assert( p->pVars[pVar->iVar] == pVar );
p->pVars[pVar->iVar] = NULL;
Vec_IntFree( pVar->vParts );
ABC_FREE( pVar );
}
示例14: Inter_ManStop
/**Function*************************************************************
Synopsis [Frees the interpolation manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Inter_ManStop( Inter_Man_t * p )
{
if ( p->fVerbose )
{
p->timeOther = p->timeTotal-p->timeRwr-p->timeCnf-p->timeSat-p->timeInt-p->timeEqu;
printf( "Runtime statistics:\n" );
ABC_PRTP( "Rewriting ", p->timeRwr, p->timeTotal );
ABC_PRTP( "CNF mapping", p->timeCnf, p->timeTotal );
ABC_PRTP( "SAT solving", p->timeSat, p->timeTotal );
ABC_PRTP( "Interpol ", p->timeInt, p->timeTotal );
ABC_PRTP( "Containment", p->timeEqu, p->timeTotal );
ABC_PRTP( "Other ", p->timeOther, p->timeTotal );
ABC_PRTP( "TOTAL ", p->timeTotal, p->timeTotal );
}
if ( p->pCnfAig )
Cnf_DataFree( p->pCnfAig );
if ( p->pCnfFrames )
Cnf_DataFree( p->pCnfFrames );
if ( p->pCnfInter )
Cnf_DataFree( p->pCnfInter );
Vec_IntFree( p->vVarsAB );
if ( p->pAigTrans )
Aig_ManStop( p->pAigTrans );
if ( p->pFrames )
Aig_ManStop( p->pFrames );
if ( p->pInter )
Aig_ManStop( p->pInter );
if ( p->pInterNew )
Aig_ManStop( p->pInterNew );
ABC_FREE( p );
}
示例15: Ivy_ManDfsSeq
/**Function*************************************************************
Synopsis [Collects AND/EXOR nodes in the DFS order from CIs to COs.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Int_t * Ivy_ManDfsSeq( Ivy_Man_t * p, Vec_Int_t ** pvLatches )
{
Vec_Int_t * vNodes, * vLatches;
Ivy_Obj_t * pObj;
int i;
// assert( Ivy_ManLatchNum(p) > 0 );
// make sure the nodes are not marked
Ivy_ManForEachObj( p, pObj, i )
assert( !pObj->fMarkA && !pObj->fMarkB );
// collect the latches
vLatches = Vec_IntAlloc( Ivy_ManLatchNum(p) );
Ivy_ManForEachLatch( p, pObj, i )
Vec_IntPush( vLatches, pObj->Id );
// collect the nodes
vNodes = Vec_IntAlloc( Ivy_ManNodeNum(p) );
Ivy_ManForEachPo( p, pObj, i )
Ivy_ManDfs_rec( p, Ivy_ObjFanin0(pObj), vNodes );
Ivy_ManForEachNodeVec( p, vLatches, pObj, i )
Ivy_ManDfs_rec( p, Ivy_ObjFanin0(pObj), vNodes );
// unmark the collected nodes
// Ivy_ManForEachNodeVec( p, vNodes, pObj, i )
// Ivy_ObjClearMarkA(pObj);
Ivy_ManForEachObj( p, pObj, i )
Ivy_ObjClearMarkA(pObj);
// make sure network does not have dangling nodes
// assert( Vec_IntSize(vNodes) == Ivy_ManNodeNum(p) + Ivy_ManBufNum(p) );
// temporary!!!
if ( pvLatches == NULL )
Vec_IntFree( vLatches );
else
*pvLatches = vLatches;
return vNodes;
}