Lines Matching defs:bucket

31         // The collision flag indicates that the bucket is part of a collision chain
32 // such that at least two entries both hash to this bucket. When true, we
36 // The present flag indicates that the bucket contains an initialized entry value.
39 // Mask for 30 bits worth of the hash code that are stored within the bucket to
73 const size_t mBucketSize; // number of bytes per bucket including the entry
91 virtual bool compareBucketKey(const Bucket& bucket, const void* __restrict__ key) const = 0;
92 virtual void initializeBucketEntry(Bucket& bucket, const void* __restrict__ entry) const = 0;
93 virtual void destroyBucketEntry(Bucket& bucket) const = 0;
98 // Allocates a bucket array as a SharedBuffer.
101 // Releases a bucket array's associated SharedBuffer.
105 // populated bucket if needed).
109 // for each populated bucket if needed).
113 // Determines the appropriate size of a bucket array to store a certain minimum
118 // Trim a hash code to 30 bits to match what we store in the bucket's cookie.
123 // Returns the index of the first bucket that is in the collision chain
130 // Returns the increment to add to a bucket index to seek to the next bucket
137 // Returns the index of the next bucket that is in the collision chain
332 static inline const TEntry& entryFor(const Bucket& bucket) {
333 return reinterpret_cast<const TEntry&>(bucket.entry);
336 static inline TEntry& entryFor(Bucket& bucket) {
337 return reinterpret_cast<TEntry&>(bucket.entry);
340 virtual bool compareBucketKey(const Bucket& bucket, const void* __restrict__ key) const;
341 virtual void initializeBucketEntry(Bucket& bucket, const void* __restrict__ entry) const;
342 virtual void destroyBucketEntry(Bucket& bucket) const;
369 bool BasicHashtable<TKey, TEntry>::compareBucketKey(const Bucket& bucket,
371 return entryFor(bucket).getKey() == *static_cast<const TKey*>(key);
375 void BasicHashtable<TKey, TEntry>::initializeBucketEntry(Bucket& bucket,
378 new (&entryFor(bucket)) TEntry(*(static_cast<const TEntry*>(entry)));
380 memcpy(&entryFor(bucket), entry, sizeof(TEntry));
385 void BasicHashtable<TKey, TEntry>::destroyBucketEntry(Bucket& bucket) const {
387 entryFor(bucket).~TEntry();