mesa/src/util
Jason Ekstrand 94303a0750 util/hash_table: Rework the API to know about hashing
Previously, the hash_table API required the user to do all of the hashing
of keys as it passed them in.  Since the hashing function is intrinsically
tied to the comparison function, it makes sense for the hash table to know
about it.  Also, it makes for a somewhat clumsy API as the user is
constantly calling hashing functions many of which have long names.  This
is especially bad when the standard call looks something like

_mesa_hash_table_insert(ht, _mesa_pointer_hash(key), key, data);

In the above case, there is no reason why the hash table shouldn't do the
hashing for you.  We leave the option for you to do your own hashing if
it's more efficient, but it's no longer needed.  Also, if you do do your
own hashing, the hash table will assert that your hash matches what it
expects out of the hashing function.  This should make it harder to mess up
your hashing.

v2: change to call the old entrypoint "pre_hashed" rather than
    "with_hash", like cworth's equivalent change upstream (change by
    anholt, acked-in-general by Jason).

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-12-14 19:32:53 -08:00
..
tests/hash_table util/hash_table: Rework the API to know about hashing 2014-12-14 19:32:53 -08:00
.gitignore
Android.mk util: Include in Android builds 2014-10-03 01:25:28 +01:00
format_srgb.h
format_srgb.py
hash_table.c util/hash_table: Rework the API to know about hashing 2014-12-14 19:32:53 -08:00
hash_table.h util/hash_table: Rework the API to know about hashing 2014-12-14 19:32:53 -08:00
macros.h util: Implement assume() for clang. 2014-11-24 14:09:23 -08:00
Makefile.am util: Wire up u_atomic_test. 2014-12-12 12:11:50 -08:00
Makefile.sources util: Add headers and python scripts for distribution. 2014-12-12 12:11:45 -08:00
ralloc.c
ralloc.h ralloc: Mark ralloc functions with gcc's malloc attribute. 2014-09-25 13:52:55 -07:00
register_allocate.c ra: Don't use regs as the ralloc context. 2014-12-01 11:32:54 -08:00
register_allocate.h
rgtc.c
rgtc.h
SConscript util/u_atomic: Add a simple test. 2014-12-01 11:28:45 -08:00
strtod.cpp util: initialize locale_t with a static object 2014-10-30 02:26:19 -07:00
strtod.h util: add _mesa_strtod and _mesa_strtof 2014-10-30 02:26:19 -07:00
texcompress_rgtc_tmp.h
u_atomic.h util/u_atomic: Fix the unlocked implementation. 2014-12-01 11:28:45 -08:00
u_atomic_test.c util/u_atomic: Add a simple test. 2014-12-01 11:28:45 -08:00