ABC_NAMESPACE_IMPL_START //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// //////////////////////////////////////////////////////////////////////// /**Function************************************************************* Synopsis [] Description [] SideEffects [] SeeAlso [] ***********************************************************************/ Cov_Man_t * Cov_ManAlloc( Abc_Ntk_t * pNtk, int nFaninMax ) { Cov_Man_t * pMan; Cov_Obj_t * pMem; Abc_Obj_t * pObj; int i; assert( pNtk->pManCut == NULL ); // start the manager pMan = ABC_ALLOC( Cov_Man_t, 1 ); memset( pMan, 0, sizeof(Cov_Man_t) ); pMan->nFaninMax = nFaninMax; pMan->nCubesMax = 2 * pMan->nFaninMax; pMan->nWords = Abc_BitWordNum( nFaninMax * 2 ); // get the cubes pMan->vComTo0 = Vec_IntAlloc( 2*nFaninMax ); pMan->vComTo1 = Vec_IntAlloc( 2*nFaninMax ); pMan->vPairs0 = Vec_IntAlloc( nFaninMax ); pMan->vPairs1 = Vec_IntAlloc( nFaninMax ); pMan->vTriv0 = Vec_IntAlloc( 1 ); Vec_IntPush( pMan->vTriv0, -1 ); pMan->vTriv1 = Vec_IntAlloc( 1 ); Vec_IntPush( pMan->vTriv1, -1 ); // allocate memory for object structures pMan->pMemory = pMem = ABC_ALLOC( Cov_Obj_t, sizeof(Cov_Obj_t) * Abc_NtkObjNumMax(pNtk) ); memset( pMem, 0, sizeof(Cov_Obj_t) * Abc_NtkObjNumMax(pNtk) ); // allocate storage for the pointers to the memory pMan->vObjStrs = Vec_PtrAlloc( Abc_NtkObjNumMax(pNtk) ); Vec_PtrFill( pMan->vObjStrs, Abc_NtkObjNumMax(pNtk), NULL ); Abc_NtkForEachObj( pNtk, pObj, i ) Vec_PtrWriteEntry( pMan->vObjStrs, i, pMem + i ); // create the cube manager pMan->pManMin = Min_ManAlloc( nFaninMax ); return pMan; }
ABC_NAMESPACE_IMPL_START //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// //////////////////////////////////////////////////////////////////////// /**Function************************************************************* Synopsis [] Description [] SideEffects [] SeeAlso [] ***********************************************************************/ Mfs_Man_t * Mfs_ManAlloc( Mfs_Par_t * pPars ) { Mfs_Man_t * p; // start the manager p = ABC_ALLOC( Mfs_Man_t, 1 ); memset( p, 0, sizeof(Mfs_Man_t) ); p->pPars = pPars; p->vProjVarsCnf = Vec_IntAlloc( 100 ); p->vProjVarsSat = Vec_IntAlloc( 100 ); p->vDivLits = Vec_IntAlloc( 100 ); p->nDivWords = Abc_BitWordNum(p->pPars->nDivMax + MFS_FANIN_MAX); p->vDivCexes = Vec_PtrAllocSimInfo( p->pPars->nDivMax+MFS_FANIN_MAX+1, p->nDivWords ); p->pMan = Int_ManAlloc(); p->vMem = Vec_IntAlloc( 0 ); p->vLevels = Vec_VecStart( 32 ); p->vMfsFanins= Vec_PtrAlloc( 32 ); return p; }