63 Vec_Ptr_t * vSupps, * vOne, * vLower, * vUpper;
95 int * piFirst, * piLast;
96 int i, k, CounterPlus, CounterMinus,
Counter;
120 piFirst[i] = piLast[i] = -1;
143 if ( piFirst[i] == -1 )
145 if ( piFirst[i] == piLast[i] )
153 for ( k = piFirst[i]; k <= piLast[i]; k++ )
165 printf(
"%d ", Counter );
171 CounterPlus = CounterMinus = 0;
189 Counter = Counter + CounterPlus - CounterMinus;
190 printf(
"%d=%d ", i, Counter );
205 printf(
"Obj = %4d : ", i );
277 int i, k, iFanout = -1,
Counter = 0;
475 printf(
"Leaf: %3d=%3d+%3d+%3d ",
Vec_PtrSize(vLower), Pis, Ffs, And );
480 printf(
"Root: %3d=%3d+%3d+%3d ",
Vec_PtrSize(vUpper), Pis, Ffs, And );
486 printf(
"Supp: %3d=%3d+%3d+%3d ",
Vec_PtrSize(vSupp), Pis, Ffs, And );
492 printf(
"Range: %3d=%3d+%3d+%3d ",
Vec_PtrSize(vRange), Pis, Ffs, And );
494 printf(
"S =%3d. V =%3d.\n",
577 if ( pFanout == NULL )
766 int Flow, FlowCur, RetValue, i;
814 printf(
"Llb_ManFlow() error! The computed min-cut is not a cut!\n" );
834 int Flow, FlowCur, RetValue, i;
889 printf(
"Llb_ManFlow() error! The computed min-cut is not a cut!\n" );
1022 int i, iFanout = -1;
1136 for ( i = 0; i < nSize; i++ )
1160 int i, s, Vol, VolLower, VolUpper, VolCmp;
1165 VolCmp =
Abc_MinInt( nVolMin, Vol - nVolMin );
1183 if ( Vol >= VolCmp && (iMinCut == -1 ||
1185 (iMinCut ==
Vec_PtrSize(vMinCut) && iVolBest < Vol)) )
1229 Vec_Ptr_t * vResult, * vMinCut = NULL, * vLower, * vUpper;
1242 if ( nVol <= nVolMax )
1251 if ( vMinCut == NULL )
1254 printf(
"Could not break the cut.\n" );
1280 printf(
"Finished computing %d partitions. ",
Vec_PtrSize(vResult) - 1 );
1301 p->nBddMax = 1000000;
1302 p->nIterMax = 10000000;
1303 p->nClusterMax = 20;
1307 p->nVolumeMax = 100;
1315 p->fVeryVerbose = 0;
1319 p->TimeLimitGlo = 0;
static int Aig_ObjIsTravIdPrevious(Aig_Man_t *p, Aig_Obj_t *pObj)
#define Aig_ObjForEachFanout(p, pObj, pFanout, iFan, i)
static Aig_Obj_t * Llb_ObjGetFanoutPath(Aig_Man_t *p, Aig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
int Llb_ManFlowVerifyCut_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)
Vec_Ptr_t * Llb_ManFlowCompute(Aig_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
static int Saig_ManPoNum(Aig_Man_t *p)
static int Saig_ObjIsLo(Aig_Man_t *p, Aig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
int Llb_ManCutVolume_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
void Llb_ManFlowPrepareCut(Aig_Man_t *p, Vec_Ptr_t *vLower, Vec_Ptr_t *vUpper)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Aig_ManStop(Aig_Man_t *p)
#define Vec_PtrForEachEntryReverse(Type, vVec, pEntry, i)
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
void Llb_ManCutNodes_rec(Aig_Man_t *p, Aig_Obj_t *pObj, Vec_Ptr_t *vNodes)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
int Llb_ManCutLoNum(Aig_Man_t *p, Vec_Ptr_t *vMinCut)
void Aig_ManPrintStats(Aig_Man_t *p)
void Llb_BddSetDefaultParams(Gia_ParLlb_t *p)
Vec_Ptr_t * Llb_ManFlowMinCut(Aig_Man_t *p)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
typedefABC_NAMESPACE_HEADER_START struct Gia_ParLlb_t_ Gia_ParLlb_t
INCLUDES ///.
Vec_Ptr_t * Llb_ManFlow(Aig_Man_t *p, Vec_Ptr_t *vSources, int *pnFlow)
#define ABC_ALLOC(type, num)
Vec_Ptr_t * Llb_ManComputeCuts(Aig_Man_t *p, int Num, int fVerbose, int fVeryVerbose)
static abctime Abc_Clock()
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
static int Vec_PtrSize(Vec_Ptr_t *p)
int Llb_ManFlowVerifyCut(Aig_Man_t *p, Vec_Ptr_t *vMinCut)
static void Vec_VecFree(Vec_Vec_t *p)
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
static int Aig_ManNodeNum(Aig_Man_t *p)
static int Saig_ObjIsLi(Aig_Man_t *p, Aig_Obj_t *pObj)
void Llb_ManResultPrint(Aig_Man_t *p, Vec_Ptr_t *vResult)
void Aig_ManFanoutStart(Aig_Man_t *p)
FUNCTION DEFINITIONS ///.
Vec_Ptr_t * Llb_ManCutNodes(Aig_Man_t *p, Vec_Ptr_t *vLower, Vec_Ptr_t *vUpper)
DECLARATIONS ///.
void Aig_ManFanoutStop(Aig_Man_t *p)
static ABC_NAMESPACE_IMPL_START int Llb_ObjSetPath(Aig_Obj_t *pObj, Aig_Obj_t *pNext)
DECLARATIONS ///.
Vec_Ptr_t * Llb_ManCutSupps(Aig_Man_t *p, Vec_Ptr_t *vResult)
FUNCTION DEFINITIONS ///.
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
static void Abc_PrintTime(int level, const char *pStr, abctime time)
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
int Llb_ManCutPiNum(Aig_Man_t *p, Vec_Ptr_t *vMinCut)
static int Abc_MinInt(int a, int b)
static Vec_Int_t * Vec_IntStart(int nSize)
static Aig_Obj_t * Llb_ObjGetPath(Aig_Obj_t *pObj)
void Llb_ManCutPrint(Aig_Man_t *p, Vec_Ptr_t *vLower, Vec_Ptr_t *vUpper)
#define Saig_ManForEachLi(p, pObj, i)
void Llb_ManFlowCollectAndMarkCone_rec(Aig_Man_t *p, Aig_Obj_t *pObj, Vec_Ptr_t *vCone)
static int Vec_IntEntry(Vec_Int_t *p, int i)
Aig_Man_t * Aig_ManDupFlopsOnly(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
void Llb_ManFlowCollectAndMarkCone(Aig_Man_t *p, Vec_Ptr_t *vStarts, Vec_Ptr_t *vCone)
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
int Llb_ManCutVolume(Aig_Man_t *p, Vec_Ptr_t *vLower, Vec_Ptr_t *vUpper)
Vec_Ptr_t * Llb_ManCutRange(Aig_Man_t *p, Vec_Ptr_t *vLower, Vec_Ptr_t *vUpper)
void Llb_ManFlowUpdateCut(Aig_Man_t *p, Vec_Ptr_t *vMinCut)
Vec_Ptr_t * Llb_ManCutMap(Aig_Man_t *p, Vec_Ptr_t *vResult, Vec_Ptr_t *vSupps)
void Llb_ManFlowLabelTfi_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
void Llb_ManMinCutTest(Aig_Man_t *pAig, int Num)
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
static int Aig_ManObjNumMax(Aig_Man_t *p)
void Llb_ManFlowCleanMarkB_rec(Aig_Obj_t *pObj)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
int Llb_ManFlowBwdPath2_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
static int Aig_ManRegNum(Aig_Man_t *p)
Vec_Ptr_t * Llb_ManFlowFindBestCut(Aig_Man_t *p, Vec_Ptr_t *vLower, Vec_Ptr_t *vUpper, int Num)
Vec_Ptr_t * Llb_ManComputeCutLo(Aig_Man_t *p)
#define Aig_ManForEachObj(p, pObj, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
int Llb_CoreExperiment(Aig_Man_t *pInit, Aig_Man_t *pAig, Gia_ParLlb_t *pPars, Vec_Ptr_t *vResult, abctime TimeTarget)
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
int Llb_ManCutLiNum(Aig_Man_t *p, Vec_Ptr_t *vMinCut)
void Aig_ManCleanMarkAB(Aig_Man_t *p)
void Llb_ManFlowUnmarkCone(Aig_Man_t *p, Vec_Ptr_t *vCone)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
void Llb_ManFlowGetObjSet(Aig_Man_t *p, Vec_Ptr_t *vLower, int iStart, int nSize, Vec_Ptr_t *vSet)
static void Vec_PtrClear(Vec_Ptr_t *p)
void Llb_ManFlowSetMarkA_rec(Aig_Obj_t *pObj)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
Vec_Ptr_t * Llb_ManCutSupp(Aig_Man_t *p, Vec_Ptr_t *vLower, Vec_Ptr_t *vUpper)
Vec_Ptr_t * Llb_ManComputeCutLi(Aig_Man_t *p)
void Aig_ManCleanData(Aig_Man_t *p)
static int Saig_ObjIsPi(Aig_Man_t *p, Aig_Obj_t *pObj)
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
static int Aig_ObjCioId(Aig_Obj_t *pObj)
static void Vec_PtrFree(Vec_Ptr_t *p)
#define Saig_ManForEachPi(p, pObj, i)