90 if ( pTemp == pFanin )
111 if ( pTemp == pFanout )
129 return pObj->nFanins + pObj->nFanouts == pObj->nFanioAlloc;
148 memmove( pObj->pFanio, pFanioOld, pObj->nFanioAlloc *
sizeof(
Nwk_Obj_t *) );
149 pObj->nFanioAlloc *= 2;
150 pObj->pMan->nRealloced++;
168 assert( pObj->pMan == pFanin->pMan );
169 assert( pObj->Id >= 0 && pFanin->Id >= 0 );
174 for ( i = pObj->nFanins + pObj->nFanouts; i > pObj->nFanins; i-- )
175 pObj->pFanio[i] = pObj->pFanio[i-1];
176 pObj->pFanio[pObj->nFanins++] = pFanin;
177 pFanin->pFanio[pFanin->nFanins + pFanin->nFanouts++] = pObj;
194 int i, k, Limit, fFound;
196 Limit = pObj->nFanins + pObj->nFanouts;
198 for ( k = i = 0; i < Limit; i++ )
199 if ( fFound || pObj->pFanio[i] != pFanin )
200 pObj->pFanio[k++] = pObj->pFanio[i];
206 Limit = pFanin->nFanins + pFanin->nFanouts;
208 for ( k = i = pFanin->nFanins; i < Limit; i++ )
209 if ( fFound || pFanin->pFanio[i] != pObj )
210 pFanin->pFanio[k++] = pFanin->pFanio[i];
233 int i, k, iFanin, Limit;
234 assert( pFaninOld != pFaninNew );
235 assert( pObj != pFaninOld );
236 assert( pObj != pFaninNew );
237 assert( pObj->pMan == pFaninOld->pMan );
238 assert( pObj->pMan == pFaninNew->pMan );
243 printf(
"Nwk_ObjPatchFanin(); Error! Node %d is not among", pFaninOld->Id );
244 printf(
" the fanins of node %d...\n", pObj->Id );
247 pObj->pFanio[iFanin] = pFaninNew;
249 Limit = pFaninOld->nFanins + pFaninOld->nFanouts;
250 for ( k = i = pFaninOld->nFanins; i < Limit; i++ )
251 if ( pFaninOld->pFanio[i] != pObj )
252 pFaninOld->pFanio[k++] = pFaninOld->pFanio[i];
253 pFaninOld->nFanouts--;
257 pFaninNew->pFanio[pFaninNew->nFanins + pFaninNew->nFanouts++] = pObj;
274 Vec_Ptr_t * vFanouts = pNodeFrom->pMan->vTemp;
278 assert( pNodeFrom->pMan == pNodeTo->pMan );
279 assert( pNodeFrom != pNodeTo );
304 assert( pNodeOld->pMan == pNodeNew->pMan );
305 assert( pNodeOld != pNodeNew );
static Nwk_Obj_t * Nwk_ManReallocNode(Nwk_Obj_t *pObj)
void Nwk_ObjReplace(Nwk_Obj_t *pNodeOld, Nwk_Obj_t *pNodeNew)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
ABC_DLL void Nwk_ManDeleteNode_rec(Nwk_Obj_t *pObj)
int Nwk_ObjFindFanin(Nwk_Obj_t *pObj, Nwk_Obj_t *pFanin)
static int Nwk_ObjFanoutNum(Nwk_Obj_t *p)
typedefABC_NAMESPACE_HEADER_START struct Nwk_Obj_t_ Nwk_Obj_t
INCLUDES ///.
void Nwk_ObjAddFanin(Nwk_Obj_t *pObj, Nwk_Obj_t *pFanin)
char * Aig_MmFlexEntryFetch(Aig_MmFlex_t *p, int nBytes)
#define Nwk_ObjForEachFanout(pObj, pFanout, i)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static int Abc_MaxInt(int a, int b)
static int Vec_PtrSize(Vec_Ptr_t *p)
int Nwk_ObjFindFanout(Nwk_Obj_t *pObj, Nwk_Obj_t *pFanout)
static int Nwk_ObjIsCo(Nwk_Obj_t *p)
ABC_NAMESPACE_IMPL_START void Nwk_ObjCollectFanins(Nwk_Obj_t *pNode, Vec_Ptr_t *vNodes)
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_END
void Nwk_ObjCollectFanouts(Nwk_Obj_t *pNode, Vec_Ptr_t *vNodes)
static int Nwk_ObjIsNode(Nwk_Obj_t *p)
#define ABC_NAMESPACE_IMPL_START
void Nwk_ObjPatchFanin(Nwk_Obj_t *pObj, Nwk_Obj_t *pFaninOld, Nwk_Obj_t *pFaninNew)
#define Nwk_ObjForEachFanin(pObj, pFanin, i)
void Nwk_ObjDeleteFanin(Nwk_Obj_t *pObj, Nwk_Obj_t *pFanin)
static void Vec_PtrClear(Vec_Ptr_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
void Nwk_ObjTransferFanout(Nwk_Obj_t *pNodeFrom, Nwk_Obj_t *pNodeTo)
static int Nwk_ObjReallocIsNeeded(Nwk_Obj_t *pObj)