| 67 | } |
| 68 | |
| 69 | static inline uintptr_t get_hash_ptr_bits(const struct htable *ht, |
| 70 | size_t hash) |
| 71 | { |
| 72 | /* Shuffling the extra bits (as specified in mask) down the |
| 73 | * end is quite expensive. But the lower bits are redundant, so |
| 74 | * we fold the value first. */ |
| 75 | return (hash ^ (hash >> ht->bits)) |
| 76 | & ht->common_mask & ~ht_perfect_mask(ht); |
| 77 | } |
| 78 | |
| 79 | void htable_init(struct htable *ht, |
| 80 | size_t (*rehash)(const void *elem, void *priv), void *priv) |
no test coverage detected