struct set {
void *mem_ctx;
struct set_entry *table;
+ uint32_t (*key_hash_function)(const void *key);
bool (*key_equals_function)(const void *a, const void *b);
uint32_t size;
uint32_t rehash;
struct set *
_mesa_set_create(void *mem_ctx,
+ uint32_t (*key_hash_function)(const void *key),
bool (*key_equals_function)(const void *a,
const void *b));
void
void (*delete_function)(struct set_entry *entry));
struct set_entry *
-_mesa_set_add(struct set *set, uint32_t hash, const void *key);
+_mesa_set_add(struct set *set, const void *key);
+struct set_entry *
+_mesa_set_add_pre_hashed(struct set *set, uint32_t hash, const void *key);
struct set_entry *
-_mesa_set_search(const struct set *set, uint32_t hash,
- const void *key);
+_mesa_set_search(const struct set *set, const void *key);
+struct set_entry *
+_mesa_set_search_pre_hashed(const struct set *set, uint32_t hash,
+ const void *key);
void
_mesa_set_remove(struct set *set, struct set_entry *entry);