DECLARATIONS ///.
Date [Ver. 1.0. Started - June 30, 2007.]
] FUNCTION DEFINITIONS /// Function*************************************************************
46{
47
50 Vec_Int_t * vSupNew, * vSup, * vSup2, * vTemp;
53 int i, k, nCommon, CountOver, CountQuant;
54 int nTotalSupp, nTotalSupp2, Entry, Largest;
55 double Ratio, R;
57
58 nTotalSupp = 0;
59 nTotalSupp2 = 0;
60 Ratio = 0.0;
61
62
63clk = Abc_Clock();
65ABC_PRT(
"Supports", Abc_Clock() - clk );
66
68 {
69 vSup = Vec_VecEntryInt( vSupps, i );
70 Vec_IntPop( vSup );
71
72
73 }
74
75
76clk = Abc_Clock();
77 vSuppsIn = Vec_VecStart( Aig_ManCiNum(
p) );
79 {
80 vSup = Vec_VecEntryInt( vSupps, i );
82 Vec_VecPush( vSuppsIn, Entry, (void *)(ABC_PTRUINT_T)i );
83 }
84ABC_PRT(
"Inverse ", Abc_Clock() - clk );
85
86clk = Abc_Clock();
87
88 Largest = 0;
89 vSuppsNew = Vec_PtrAlloc( Aig_ManCoNum(
p) );
90 vOverNew = Vec_IntAlloc( Aig_ManCoNum(
p) );
91 vQuantNew = Vec_IntAlloc( Aig_ManCoNum(
p) );
92
94 {
95
96
97 vSup = Vec_VecEntryInt( vSupps, i );
98 if ( Vec_IntSize(vSup) < 2 )
99 continue;
100
101 CountOver = CountQuant = 0;
102 vSupNew = Vec_IntDup( vSup );
103
105
106
107
108 {
109
110
111
112 vSup2 = Vec_VecEntryInt( vSupps, k );
113
114 nCommon = Vec_IntTwoCountCommon(vSup, vSup2);
115 if ( nCommon < 2 )
116 continue;
117 if ( nCommon > nComLim )
118 {
119 vSupNew = Vec_IntTwoMerge( vTemp = vSupNew, vSup2 );
120 Vec_IntFree( vTemp );
121 CountOver++;
122 }
123 else
124 CountQuant++;
125 }
126
127 Vec_PtrPush( vSuppsNew, vSupNew );
128 Vec_IntPush( vOverNew, CountOver );
129 Vec_IntPush( vQuantNew, CountQuant );
130
131 if ( Largest < Vec_IntSize(vSupNew) )
132 Largest = Vec_IntSize(vSupNew);
133
134 nTotalSupp += Vec_IntSize(vSup);
135 nTotalSupp2 += Vec_IntSize(vSupNew);
136 if ( Vec_IntSize(vSup) )
137 R = Vec_IntSize(vSupNew) / Vec_IntSize(vSup);
138 else
139 R = 0;
140 Ratio += R;
141
142 if ( R < 5.0 )
143 continue;
144
145 printf( "%6d : ", i );
146 printf( "S = %5d. ", Vec_IntSize(vSup) );
147 printf( "SNew = %5d. ", Vec_IntSize(vSupNew) );
148 printf( "R = %7.2f. ", R );
149 printf( "Over = %5d. ", CountOver );
150 printf( "Quant = %5d. ", CountQuant );
151 printf( "\n" );
152
153
154
155
156
157 }
158
159ABC_PRT(
"Scanning", Abc_Clock() - clk );
160
161
162 printf( "PIs = %6d. POs = %6d. Lim = %3d. AveS = %3d. SN = %3d. R = %4.2f Max = %5d.\n",
163 Aig_ManCiNum(
p), Aig_ManCoNum(
p), nComLim,
164 nTotalSupp/Aig_ManCoNum(
p), nTotalSupp2/Aig_ManCoNum(
p),
165 Ratio/Aig_ManCoNum(
p), Largest );
166
167 Vec_VecFree( vSupps );
168 Vec_VecFree( vSuppsIn );
170 Vec_IntFree( vOverNew );
171 Vec_IntFree( vQuantNew );
172}
struct Aig_Obj_t_ Aig_Obj_t
#define Aig_ManForEachCo(p, pObj, i)
Vec_Ptr_t * Aig_ManSupports(Aig_Man_t *p)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.