summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaAbsVta.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-01-29 21:22:54 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2012-01-29 21:22:54 -0800
commit7ea40494eb637c5c717c3fa80529bfbbec897f83 (patch)
treeb5f2502ec6dbad3dff161ce525901200229841e1 /src/aig/gia/giaAbsVta.c
parente511b872370f8f9928b08381ff53f2b8a3669ba7 (diff)
downloadabc-7ea40494eb637c5c717c3fa80529bfbbec897f83.tar.gz
abc-7ea40494eb637c5c717c3fa80529bfbbec897f83.tar.bz2
abc-7ea40494eb637c5c717c3fa80529bfbbec897f83.zip
Graph isomorphism checking code.
Diffstat (limited to 'src/aig/gia/giaAbsVta.c')
-rw-r--r--src/aig/gia/giaAbsVta.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/aig/gia/giaAbsVta.c b/src/aig/gia/giaAbsVta.c
index 472257b2..e4741b29 100644
--- a/src/aig/gia/giaAbsVta.c
+++ b/src/aig/gia/giaAbsVta.c
@@ -342,7 +342,6 @@ int Vec_IntDoubleWidth( Vec_Int_t * p, int nWords )
-
/**Function*************************************************************
Synopsis []
@@ -377,14 +376,25 @@ static inline Vta_Obj_t * Vga_ManFind( Vta_Man_t * p, int iObj, int iFrame )
static inline Vta_Obj_t * Vga_ManFindOrAdd( Vta_Man_t * p, int iObj, int iFrame )
{
Vta_Obj_t * pThis;
- int * pPlace;
+ int i, * pPlace;
assert( iObj >= 0 && iFrame >= -1 );
if ( p->nObjs == p->nObjsAlloc )
{
+ // resize objects
p->pObjs = ABC_REALLOC( Vta_Obj_t, p->pObjs, 2 * p->nObjsAlloc );
memset( p->pObjs + p->nObjsAlloc, 0, p->nObjsAlloc * sizeof(Vta_Obj_t) );
p->nObjsAlloc *= 2;
// rehash entries in the table
+ ABC_FREE( p->pBins );
+ p->nBins = Abc_PrimeCudd( 2 * p->nBins );
+ p->pBins = ABC_CALLOC( int, p->nBins );
+ Vta_ManForEachObj( p, pThis, i )
+ {
+ pThis->iNext = 0;
+ pPlace = Vga_ManLookup( p, pThis->iObj, pThis->iFrame );
+ assert( *pPlace == 0 );
+ *pPlace = i;
+ }
}
pPlace = Vga_ManLookup( p, iObj, iFrame );
if ( *pPlace )