48 for ( i = 0; i < p->nSize; i++ )
49 if ( (0xffff & p->pArray[i]) == (0xffff & Entry) )
50 return p->pArray[i] >> 16;
68 if ( p->nSize == p->nCap )
71 for ( i = p->nSize-2; i >= 0; i-- )
72 if ( (0xffff & p->pArray[i]) > (0xffff & Entry) )
73 p->pArray[i+1] = p->pArray[i];
76 p->pArray[i+1] = Entry;
138 if ( p->nNodes == p->nNodesAlloc )
145 pNode->
Id = p->nNodes++;
168 assert( p->pNodes == NULL );
169 p->nNodesAlloc = 256;
174 p->pNodes->nSuppSize = 1;
202 pNode->
iFan0 = iFan0;
203 pNode->
iFan1 = iFan1;
205 printf(
"Creating node %5d %c : iFan0 = %5d%c iFan1 = %5d%c\n",
206 pNode->
Id, (fXor?
'x':
' '),
212 if ( iFan0 == iFan1 )
222 if ( iFan0 == iFan1 )
250 pNode->
iFan0 = iFan0;
251 pNode->
iFan1 = iFan1;
252 pNode->
iFan2 = iFan2;
254 printf(
"Creating node %5d %c : iFan0 = %5d%c iFan1 = %5d%c iFan2 = %5d%c\n",
281 int ** pRes, * pBuffer;
282 int i, k,
nTotal, nSize, nEntries, Value;
287 pBuffer =
ABC_ALLOC(
int, nSize *
sizeof(
void *) + nEntries );
288 pRes = (
int **)pBuffer;
289 pRes[0] = pBuffer + nSize *
sizeof(
void *);
293 pRes[i] = pRes[0] +
nTotal;
296 printf(
"%d : ", i );
301 printf(
"%d(%d) ", Value&0xffff, Value>>16 );
307 assert( nTotal == nEntries );
int Amap_LibFindNode(Amap_Lib_t *pLib, int iFan0, int iFan1, int fXor)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define ABC_REALLOC(type, obj, num)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define ABC_ALLOC(type, num)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Vec_IntGrow(Vec_Int_t *p, int nCapMin)
static int Abc_LitIsCompl(int Lit)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Vec_IntEntry(Vec_Int_t *p, int i)
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Amap_Nod_t * Amap_LibCreateObj(Amap_Lib_t *p)
int Amap_LibFindMux(Amap_Lib_t *p, int iFan0, int iFan1, int iFan2)
static void Vec_IntPushOrderWithMask(Vec_Int_t *p, int Entry)
#define ABC_NAMESPACE_IMPL_START
int Amap_LibCreateMux(Amap_Lib_t *p, int iFan0, int iFan1, int iFan2)
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static int Vec_IntSize(Vec_Int_t *p)
typedefABC_NAMESPACE_HEADER_START struct Amap_Lib_t_ Amap_Lib_t
INCLUDES ///.
int Amap_LibCreateVar(Amap_Lib_t *p)
static int Abc_Lit2Var(int Lit)
int ** Amap_LibLookupTableAlloc(Vec_Ptr_t *vVec, int fVerbose)
static ABC_NAMESPACE_IMPL_START int Vec_IntCheckWithMask(Vec_Int_t *p, int Entry)
DECLARATIONS ///.
static Amap_Nod_t * Amap_LibNod(Amap_Lib_t *p, int i)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
int Amap_LibCreateNode(Amap_Lib_t *p, int iFan0, int iFan1, int fXor)
int nTotal
DECLARATIONS ///.