Lines Matching refs:NumBuckets
209 static void **GetBucketFor(unsigned Hash, void **Buckets, unsigned NumBuckets) {
210 // NumBuckets is always a power of 2.
211 unsigned BucketNum = Hash & (NumBuckets-1);
216 static void **AllocateBuckets(unsigned NumBuckets) {
217 void **Buckets = static_cast<void**>(calloc(NumBuckets+1, sizeof(void*)));
219 Buckets[NumBuckets] = reinterpret_cast<void*>(-1);
231 NumBuckets = 1 << Log2InitSize;
232 Buckets = AllocateBuckets(NumBuckets);
237 : Buckets(Arg.Buckets), NumBuckets(Arg.NumBuckets), NumNodes(Arg.NumNodes) {
239 Arg.NumBuckets = 0;
246 NumBuckets = RHS.NumBuckets;
249 RHS.NumBuckets = 0;
260 memset(Buckets, 0, NumBuckets*sizeof(void*));
263 Buckets[NumBuckets] = reinterpret_cast<void*>(-1);
273 unsigned OldNumBuckets = NumBuckets;
274 NumBuckets <<= 1;
277 Buckets = AllocateBuckets(NumBuckets);
293 Buckets, NumBuckets));
308 void **Bucket = GetBucketFor(IDHash, Buckets, NumBuckets);
333 if (NumNodes+1 > NumBuckets*2) {
336 InsertPos = GetBucketFor(ComputeNodeHash(N, TempID), Buckets, NumBuckets);