Lines Matching refs:NumBuckets
209 static void **GetBucketFor(unsigned Hash, void **Buckets, unsigned NumBuckets) { in GetBucketFor() argument
211 unsigned BucketNum = Hash & (NumBuckets-1); in GetBucketFor()
216 static void **AllocateBuckets(unsigned NumBuckets) { in AllocateBuckets() argument
217 void **Buckets = static_cast<void**>(calloc(NumBuckets+1, sizeof(void*))); in AllocateBuckets()
219 Buckets[NumBuckets] = reinterpret_cast<void*>(-1); in AllocateBuckets()
231 NumBuckets = 1 << Log2InitSize; in FoldingSetImpl()
232 Buckets = AllocateBuckets(NumBuckets); in FoldingSetImpl()
237 : Buckets(Arg.Buckets), NumBuckets(Arg.NumBuckets), NumNodes(Arg.NumNodes) { in FoldingSetImpl()
239 Arg.NumBuckets = 0; in FoldingSetImpl()
246 NumBuckets = RHS.NumBuckets; in operator =()
249 RHS.NumBuckets = 0; in operator =()
260 memset(Buckets, 0, NumBuckets*sizeof(void*)); in clear()
263 Buckets[NumBuckets] = reinterpret_cast<void*>(-1); in clear()
270 assert((NewBucketCount > NumBuckets) && "Can't shrink a folding set with GrowBucketCount"); in GrowBucketCount()
273 unsigned OldNumBuckets = NumBuckets; in GrowBucketCount()
274 NumBuckets = NewBucketCount; in GrowBucketCount()
277 Buckets = AllocateBuckets(NumBuckets); in GrowBucketCount()
293 Buckets, NumBuckets)); in GrowBucketCount()
304 GrowBucketCount(NumBuckets * 2); in GrowHashTable()
323 void **Bucket = GetBucketFor(IDHash, Buckets, NumBuckets); in FindNodeOrInsertPos()
351 InsertPos = GetBucketFor(ComputeNodeHash(N, TempID), Buckets, NumBuckets); in InsertNode()