summaryrefslogtreecommitdiffstats
path: root/src/aig/hop/hop.h
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2007-03-17 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2007-03-17 08:01:00 -0700
commitdd5531caf916d526551049b59151990adaef575d (patch)
tree8520c4dee3ec65f1bd3c44104f4d80ff9df0caab /src/aig/hop/hop.h
parent2696cf05e568f7a928f32b01534d106bf626ef8a (diff)
downloadabc-dd5531caf916d526551049b59151990adaef575d.tar.gz
abc-dd5531caf916d526551049b59151990adaef575d.tar.bz2
abc-dd5531caf916d526551049b59151990adaef575d.zip
Version abc70317
Diffstat (limited to 'src/aig/hop/hop.h')
-rw-r--r--src/aig/hop/hop.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/aig/hop/hop.h b/src/aig/hop/hop.h
index 34124599..44f5ac8e 100644
--- a/src/aig/hop/hop.h
+++ b/src/aig/hop/hop.h
@@ -81,7 +81,7 @@ struct Hop_Man_t_
// AIG nodes
Vec_Ptr_t * vPis; // the array of PIs
Vec_Ptr_t * vPos; // the array of POs
- Vec_Ptr_t * vNodes; // the array of all nodes (optional)
+ Vec_Ptr_t * vObjs; // the array of all nodes (optional)
Hop_Obj_t * pConst1; // the constant 1 node
Hop_Obj_t Ghost; // the ghost node
// AIG node counters
@@ -131,6 +131,8 @@ static inline Hop_Obj_t * Hop_ManConst0( Hop_Man_t * p ) { return Hop_N
static inline Hop_Obj_t * Hop_ManConst1( Hop_Man_t * p ) { return p->pConst1; }
static inline Hop_Obj_t * Hop_ManGhost( Hop_Man_t * p ) { return &p->Ghost; }
static inline Hop_Obj_t * Hop_ManPi( Hop_Man_t * p, int i ) { return (Hop_Obj_t *)Vec_PtrEntry(p->vPis, i); }
+static inline Hop_Obj_t * Hop_ManPo( Hop_Man_t * p, int i ) { return (Hop_Obj_t *)Vec_PtrEntry(p->vPos, i); }
+static inline Hop_Obj_t * Hop_ManObj( Hop_Man_t * p, int i ) { return p->vObjs ? (Hop_Obj_t *)Vec_PtrEntry(p->vObjs, i) : NULL; }
static inline Hop_Edge_t Hop_EdgeCreate( int Id, int fCompl ) { return (Id << 1) | fCompl; }
static inline int Hop_EdgeId( Hop_Edge_t Edge ) { return Edge >> 1; }
@@ -223,10 +225,10 @@ static inline Hop_Obj_t * Hop_ManFetchMemory( Hop_Man_t * p )
pTemp = p->pListFree;
p->pListFree = *((Hop_Obj_t **)pTemp);
memset( pTemp, 0, sizeof(Hop_Obj_t) );
- if ( p->vNodes )
+ if ( p->vObjs )
{
- assert( p->nCreated == Vec_PtrSize(p->vNodes) );
- Vec_PtrPush( p->vNodes, pTemp );
+ assert( p->nCreated == Vec_PtrSize(p->vObjs) );
+ Vec_PtrPush( p->vObjs, pTemp );
}
pTemp->Id = p->nCreated++;
return pTemp;