98 pEnt = p1, p1 = p2, p2 = pEnt;
102 if ( pEnt->
p1 == p1 && pEnt->
p2 == p2 )
117 p->
pBins[Key] = pEnt;
175 p->
pBins[Key] = pNode;
219 p->
pBins[Key] = pNode;
243 p->
pBins[Key] = pNode;
275 for ( i = 0; i < p->
nBins; i++ )
279 pEnt->
pNextS = pBinsNew[Key];
280 pBinsNew[Key] = pEnt;
319 for ( i = 0; i < p->
nBins; i++ )
323 Key = pEnt->
uHashR % nBinsNew;
325 Key = pEnt->
uHashD % nBinsNew;
326 pEnt->
pNextF = pBinsNew[Key];
327 pBinsNew[Key] = pEnt;
362 for ( i = 0; i < iWordLast; i++ )
372 for ( i = 0; i < iWordLast; i++ )
396 fCompl ^= pNode1->
fInv;
397 fCompl ^= pNode2->
fInv;
403 for ( i = 0; i < iWordLast; i++ )
405 for ( v = 0; v < 32; v++ )
406 if ( (pNode1->
puSimR[i] ^ ~pNode2->
puSimR[i]) & (1 << v) )
411 for ( i = 0; i < iWordLast; i++ )
413 for ( v = 0; v < 32; v++ )
414 if ( (pNode1->
puSimD[i] ^ ~pNode2->
puSimD[i]) & (1 << v) )
422 for ( i = 0; i < iWordLast; i++ )
424 for ( v = 0; v < 32; v++ )
425 if ( (pNode1->
puSimR[i] ^ pNode2->
puSimR[i]) & (1 << v) )
430 for ( i = 0; i < iWordLast; i++ )
432 for ( v = 0; v < 32; v++ )
433 if ( (pNode1->
puSimD[i] ^ pNode2->
puSimD[i]) & (1 << v) )
453 unsigned * pSims1, * pSims2;
461 for ( i = 0; i < iWordLast; i++ )
462 if ( (pSims1[i] & puMask[i]) != (pSims2[i] & puMask[i]) )
480 unsigned * pSims1, * pSims2;
488 for ( i = 0; i < iWordLast; i++ )
489 puMask[i] = ( pSims1[i] ^ pSims2[i] );
510 printf(
"Structural table. Table size = %d. Number of entries = %d.\n", pT->
nBins, pT->
nEntries );
511 for ( i = 0; i < pT->
nBins; i++ )
518 printf(
"%d ", Counter );
520 printf(
"{%d} ", i );
543 printf(
"Functional table. Table size = %d. Number of entries = %d.\n", pT->
nBins, pT->
nEntries );
544 for ( i = 0; i < pT->
nBins; i++ )
550 printf(
"{%d} ", Counter );
572 printf(
"Zero-node table. Table size = %d. Number of entries = %d.\n", pT->
nBins, pT->
nEntries );
573 for ( i = 0; i < pT->
nBins; i++ )
608 Fraig_Node_t * pEntF, * pEntF2, * pEnt, * pEntD2, * pEntN;
620 for ( i = 0; i < pT->
nBins; i++ )
646 pEnt->
pNextF = pBinsNew[Key];
647 pBinsNew[Key] = pEnt;
654 pT->
pBins = pBinsNew;
#define Fraig_TableBinForEachEntrySafeF(pBin, pEnt, pEnt2)
static void Fraig_TableResizeF(Fraig_HashTable_t *p, int fUseSimR)
void Fraig_CollectXors(Fraig_Node_t *pNode1, Fraig_Node_t *pNode2, int iWordLast, int fUseRand, unsigned *puMask)
static int Abc_PrimeCudd(unsigned int p)
typedefABC_NAMESPACE_HEADER_START struct Fraig_ManStruct_t_ Fraig_Man_t
INCLUDES ///.
void Fraig_HashTableInsertF0(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
#define Fraig_TableBinForEachEntryS(pBin, pEnt)
Fraig_Node_t * Fraig_NodeCreate(Fraig_Man_t *p, Fraig_Node_t *p1, Fraig_Node_t *p2)
int Fraig_CompareSimInfo(Fraig_Node_t *pNode1, Fraig_Node_t *pNode2, int iWordLast, int fUseRand)
int Fraig_TableRehashF0(Fraig_Man_t *pMan, int fLinkEquiv)
Fraig_Node_t * Fraig_HashTableLookupF0(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
#define ABC_ALLOC(type, num)
void Fraig_TablePrintStatsS(Fraig_Man_t *pMan)
static abctime Abc_Clock()
int Fraig_FindFirstDiff(Fraig_Node_t *pNode1, Fraig_Node_t *pNode2, int fCompl, int iWordLast, int fUseRand)
#define Fraig_TableBinForEachEntryD(pBin, pEnt)
void Fraig_HashTableFree(Fraig_HashTable_t *p)
#define Fraig_TableBinForEachEntryF(pBin, pEnt)
Fraig_Node_t * Fraig_HashTableLookupF(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
#define Fraig_TableBinForEachEntrySafeD(pBin, pEnt, pEnt2)
#define ABC_NAMESPACE_IMPL_END
#define Fraig_TableBinForEachEntrySafeS(pBin, pEnt, pEnt2)
int Fraig_HashTableLookupS(Fraig_Man_t *pMan, Fraig_Node_t *p1, Fraig_Node_t *p2, Fraig_Node_t **ppNodeRes)
Fraig_HashTable_t * Fraig_HashTableCreate(int nSize)
FUNCTION DEFINITIONS ///.
void Fraig_TablePrintStatsF0(Fraig_Man_t *pMan)
#define Fraig_IsComplement(p)
GLOBAL VARIABLES ///.
void Fraig_TablePrintStatsF(Fraig_Man_t *pMan)
#define Fraig_HashKey2(a, b, TSIZE)
#define ABC_NAMESPACE_IMPL_START
static ABC_NAMESPACE_IMPL_START void Fraig_TableResizeS(Fraig_HashTable_t *p)
DECLARATIONS ///.
int Fraig_CompareSimInfoUnderMask(Fraig_Node_t *pNode1, Fraig_Node_t *pNode2, int iWordLast, int fUseRand, unsigned *puMask)