diff options
author | Jason Ekstrand <[email protected]> | 2019-05-10 13:50:56 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-05-13 14:43:47 +0000 |
commit | bab08c791de323f021bcedbd93aee04343637482 (patch) | |
tree | 4a1e17f9cded00757c177d13f99c66cf8344894d /src/util/set.h | |
parent | abb450870e8a8fc590e53b21f3ff2a4db42536dd (diff) |
util/set: Add a helper to resize a set
Often times you don't know how big a set will be and you want the code
to just grow it as needed. However, sometimes you do know and you can
avoid a lot of rehashing if you just specify a size up-front.
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Thomas Helland <[email protected]>
Diffstat (limited to 'src/util/set.h')
-rw-r--r-- | src/util/set.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/set.h b/src/util/set.h index 7d277c59f8b..5742c311a77 100644 --- a/src/util/set.h +++ b/src/util/set.h @@ -65,6 +65,8 @@ void _mesa_set_destroy(struct set *set, void (*delete_function)(struct set_entry *entry)); void +_mesa_set_resize(struct set *set, uint32_t entries); +void _mesa_set_clear(struct set *set, void (*delete_function)(struct set_entry *entry)); |