Lines Matching defs:size
84 uint32_t max_entries, size, rehash;
87 #define ENTRY(max_entries, size, rehash) \
88 { max_entries, size, rehash, \
89 REMAINDER_MAGIC(size), REMAINDER_MAGIC(rehash) }
156 ht->size = hash_sizes[ht->size_index].size;
163 ht->table = rzalloc_array(mem_ctx, struct hash_entry, ht->size);
225 ht->table = ralloc_array(ht, struct hash_entry, ht->size);
231 memcpy(ht->table, src->table, ht->size * sizeof(struct hash_entry));
260 memset(ht->table, 0, sizeof(struct hash_entry) * hash_sizes[ht->size_index].size);
280 for (entry = ht->table; entry != ht->table + ht->size; entry++) {
313 uint32_t size = ht->size;
314 uint32_t start_hash_address = util_fast_urem32(hash, size, ht->size_magic);
331 if (hash_address >= size)
332 hash_address -= size;
367 uint32_t size = ht->size;
368 uint32_t start_hash_address = util_fast_urem32(hash, size, ht->size_magic);
383 if (hash_address >= size)
384 hash_address -= size;
404 hash_sizes[new_size_index].size);
412 ht->size = hash_sizes[ht->size_index].size;
443 uint32_t size = ht->size;
444 uint32_t start_hash_address = util_fast_urem32(hash, size, ht->size_magic);
479 if (hash_address >= size)
480 hash_address -= size;
562 if (entry != ht->table + ht->size)
583 for (; entry != ht->table + ht->size; entry++) {
605 uint32_t i = rand() % ht->size;
610 for (entry = ht->table + i; entry != ht->table + ht->size; entry++) {
629 _mesa_hash_data(const void *data, size_t size)
631 return XXH32(data, size, 0);
635 _mesa_hash_data_with_seed(const void *data, size_t size, uint32_t seed)
637 return XXH32(data, size, seed);
732 _mesa_hash_table_reserve(struct hash_table *ht, unsigned size)
734 if (size < ht->max_entries)
737 if (hash_sizes[i].max_entries >= size) {
742 return ht->max_entries >= size;