21 #ifndef ABC__misc__vec__vecHsh_h
22 #define ABC__misc__vec__vecHsh_h
139 static int s_Primes[7] = { 4177, 5147, 5647, 6343, 7103, 7873, 8147 };
140 unsigned char * pDataC = (
unsigned char *)pData;
141 int c, nChars = nSize * 4;
143 for ( c = 0; c < nChars; c++ )
144 Key += pDataC[c] * s_Primes[c % 7];
145 return (
int)(Key % nTableSize);
151 for ( ; (pObj =
Hsh_IntObj(p, *pPlace)); pPlace = &pObj->iNext )
166 Hsh_IntObj(p, i)->iNext = *pPlace; *pPlace = i;
198 for ( i = 0; i < nEntries; i++ )
212 for ( i = 0; i < nEntries; i++ )
234 for ( i = 0; i < nEntries; i++ )
312 p->
vTemp.pArray = (
int*)pObj + 2;
333 static unsigned s_Primes[7] = {4177, 5147, 5647, 6343, 7103, 7873, 8147};
337 Key += (unsigned)Entry * s_Primes[i % 7];
338 return (
int)(Key % nTableSize);
343 int i, Ent, * pPlace;
388 for ( i = 0; i < 20; i++ )
static int Hsh_VecManAdd(Hsh_VecMan_t *p, Vec_Int_t *vVec)
static int * Vec_IntArray(Vec_Int_t *p)
static int Abc_PrimeCudd(unsigned int p)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static void Vec_WrdPush(Vec_Wrd_t *p, word Entry)
static int Vec_WrdCap(Vec_Wrd_t *p)
static Vec_Int_t * Vec_IntStartNatural(int nSize)
static int Vec_WrdSize(Vec_Wrd_t *p)
static Vec_Int_t * Vec_IntStartFull(int nSize)
static Vec_Int_t * Hsh_IntManHashArray(Vec_Int_t *vData, int nSize)
static Vec_Int_t * Hsh_WrdManHashArray(Vec_Wrd_t *vDataW, int nSize)
static void Hsh_VecManStop(Hsh_VecMan_t *p)
typedefABC_NAMESPACE_HEADER_START struct Hsh_IntObj_t_ Hsh_IntObj_t
INCLUDES ///.
static Hsh_IntMan_t * Hsh_WrdManHashArrayStart(Vec_Wrd_t *vDataW, int nSize)
static int Hsh_VecManHash(Vec_Int_t *vVec, int nTableSize)
static int s_Primes[MAX_PRIMES]
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int * Hsh_IntManLookup(Hsh_IntMan_t *p, unsigned *pData)
static word Hsh_IntWord(int iData, int iNext)
static int Vec_IntEntry(Vec_Int_t *p, int i)
unsigned __int64 word
DECLARATIONS ///.
static void Hsh_IntManHashArrayTest()
static void Vec_WrdFree(Vec_Wrd_t *p)
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
static Hsh_VecObj_t * Hsh_VecObj(Hsh_VecMan_t *p, int i)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
static void Hsh_IntManStop(Hsh_IntMan_t *p)
#define ABC_NAMESPACE_HEADER_END
static Hsh_VecMan_t * Hsh_VecManStart(int nEntries)
static unsigned * Hsh_IntData(Hsh_IntMan_t *p, int iData)
MACRO DEFINITIONS ///.
static Vec_Wrd_t * Vec_WrdAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Hsh_IntManAdd(Hsh_IntMan_t *p, int iData)
static int Hsh_VecSize(Hsh_VecMan_t *p)
static Hsh_IntObj_t * Hsh_IntObj(Hsh_IntMan_t *p, int iObj)
static int Vec_IntSize(Vec_Int_t *p)
static word * Vec_WrdArray(Vec_Wrd_t *p)
static void Hsh_VecManHashTest()
#define ABC_CALLOC(type, num)
static int Hsh_IntManHash(unsigned *pData, int nSize, int nTableSize)
static int * Vec_IntEntryP(Vec_Int_t *p, int i)
static Vec_Int_t * Hsh_VecReadEntry(Hsh_VecMan_t *p, int i)
static void Vec_IntPrint(Vec_Int_t *vVec)
static void Vec_IntFree(Vec_Int_t *p)
static Hsh_IntMan_t * Hsh_IntManStart(Vec_Int_t *vData, int nSize, int nEntries)
FUNCTION DEFINITIONS ///.
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
static word * Vec_WrdEntryP(Vec_Wrd_t *p, int i)