30 static inline unsigned *
Cec_ManIsoInfo(
unsigned * pStore,
int nWords,
int Id ) {
return pStore + nWords * Id; }
56 for ( w = 0; w <
nWords; w++ )
57 pInfo[w] = ~(pInfo0[w] | pInfo1[w]);
59 for ( w = 0; w <
nWords; w++ )
60 pInfo[w] = ~pInfo0[w] & pInfo1[w];
65 for ( w = 0; w <
nWords; w++ )
66 pInfo[w] = pInfo0[w] & ~pInfo1[w];
68 for ( w = 0; w <
nWords; w++ )
69 pInfo[w] = pInfo0[w] & pInfo1[w];
89 for ( w = 0; w <
nWords; w++ )
90 pInfo0[w] = pInfo1[w];
109 for ( w = 0; w <
nWords; w++ )
110 if ( pInfo0[w] != pInfo1[w] )
130 for ( w = 0; w <
nWords; w++ )
148 1291, 1699, 1999, 2357, 2953, 3313, 3907, 4177,
149 4831, 5147, 5647, 6343, 6899, 7103, 7873, 8147 };
153 for ( i = 0; i <
nWords; i++ )
154 uHash ^= pInfo0[i] * s_Primes[i & 0xf];
155 return (
int)(uHash % nTableSize);
174 assert( Color == 1 || Color == 2 );
176 for ( Ent = pTable[Key], pTemp = (Ent ?
Gia_ManObj(p, Ent) : NULL); pTemp;
191 pTemp->
Value = pTable[Key];
212 for ( Ent = Bin, pTemp = (Ent ?
Gia_ManObj(p, Ent) : NULL); pTemp;
241 int k0, k1, IdA, IdB;
303 int i, * pIso, * pTable, nTableSize;
329 else if ( pIso[i] < i )
339 for ( i = 0; i < nTableSize; i++ )
348 Counter += (pIso[i] && pIso[i] < i);
360 Abc_Print( 1,
"Computed %d pairs of structurally equivalent nodes.\n", Counter );
static int Abc_PrimeCudd(unsigned int p)
static void Gia_ManIsoMatchNodes(int *pIso, unsigned *pStore, int nWords, Vec_Int_t *vNodesA, Vec_Int_t *vNodesB)
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Gia_ManIsoHashKey(int Id, unsigned *pStore, int nWords, int nTableSize)
void Gia_ManCleanValue(Gia_Man_t *p)
#define ABC_ALLOC(type, num)
static ABC_NAMESPACE_IMPL_START unsigned * Cec_ManIsoInfo(unsigned *pStore, int nWords, int Id)
DECLARATIONS ///.
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
unsigned Gia_ManRandom(int fReset)
FUNCTION DEFINITIONS ///.
static int s_Primes[MAX_PRIMES]
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static void Gia_ManIsoCopy(int IdDest, int IdSour, unsigned *pStore, int nWords)
static void Gia_ManIsoSimulate(Gia_Obj_t *pObj, int Id, unsigned *pStore, int nWords)
FUNCTION DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntPush(Vec_Int_t *p, int Entry)
static void Abc_Print(int level, const char *format,...)
static int Gia_ObjColors(Gia_Man_t *p, int Id)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
static int Vec_IntSize(Vec_Int_t *p)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
static int Gia_ManIsoEqual(int Id0, int Id1, unsigned *pStore, int nWords)
static int Gia_ManIsoExtractClasses(Gia_Man_t *p, int Bin, unsigned *pStore, int nWords, Vec_Int_t *vNodesA, Vec_Int_t *vNodesB)
#define ABC_CALLOC(type, num)
void Cec_ManTransformClasses(Gia_Man_t *p)
int * Cec_ManDetectIsomorphism(Gia_Man_t *p)
#define Gia_ManForEachObj1(p, pObj, i)
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
static void Gia_ManIsoRandom(int Id, unsigned *pStore, int nWords)
static void Vec_IntFree(Vec_Int_t *p)
static void Vec_IntClear(Vec_Int_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
static int Gia_ManObjNum(Gia_Man_t *p)
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
static void Gia_ManIsoTableAdd(Gia_Man_t *p, int Id, unsigned *pStore, int nWords, int *pTable, int nTableSize)