History log of /external/mesa3d/src/util/tests/hash_table/replacement.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3d8f9570cdd8a467d76cfffb5f998977dbab8682 10-Feb-2015 Ian Romanick <ian.d.romanick@intel.com> util/hash: Silence unused parameter warnings in tests

delete_and_lookup.c:37:21: warning: unused parameter ‘key’ [-Wunused-parameter]
badhash(const void *key)
^
delete_and_lookup.c:43:10: warning: unused parameter ‘argc’ [-Wunused-parameter]
main(int argc, char **argv)
^
delete_and_lookup.c:43:23: warning: unused parameter ‘argv’ [-Wunused-parameter]
main(int argc, char **argv)
^
collision.c:34:10: warning: unused parameter ‘argc’ [-Wunused-parameter]
main(int argc, char **argv)
^
collision.c:34:23: warning: unused parameter ‘argv’ [-Wunused-parameter]
main(int argc, char **argv)
^
destroy_callback.c:50:10: warning: unused parameter ‘argc’ [-Wunused-parameter]
main(int argc, char **argv)
^
destroy_callback.c:50:23: warning: unused parameter ‘argv’ [-Wunused-parameter]
main(int argc, char **argv)
^
insert_many.c:46:10: warning: unused parameter ‘argc’ [-Wunused-parameter]
main(int argc, char **argv)
^
insert_many.c:46:23: warning: unused parameter ‘argv’ [-Wunused-parameter]
main(int argc, char **argv)
^
insert_and_lookup.c:34:10: warning: unused parameter ‘argc’ [-Wunused-parameter]
main(int argc, char **argv)
^
insert_and_lookup.c:34:23: warning: unused parameter ‘argv’ [-Wunused-parameter]
main(int argc, char **argv)
^
null_destroy.c:32:10: warning: unused parameter ‘argc’ [-Wunused-parameter]
main(int argc, char **argv)
^
null_destroy.c:32:23: warning: unused parameter ‘argv’ [-Wunused-parameter]
main(int argc, char **argv)
^
random_entry.c:52:10: warning: unused parameter ‘argc’ [-Wunused-parameter]
main(int argc, char **argv)
^
random_entry.c:52:23: warning: unused parameter ‘argv’ [-Wunused-parameter]
main(int argc, char **argv)
^
remove_null.c:34:10: warning: unused parameter ‘argc’ [-Wunused-parameter]
main(int argc, char **argv)
^
remove_null.c:34:23: warning: unused parameter ‘argv’ [-Wunused-parameter]
main(int argc, char **argv)
^
replacement.c:34:10: warning: unused parameter ‘argc’ [-Wunused-parameter]
main(int argc, char **argv)
^
replacement.c:34:23: warning: unused parameter ‘argv’ [-Wunused-parameter]
main(int argc, char **argv)
^

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/util/tests/hash_table/replacement.c
94303a0750f9eaae3fcf598b7bf1320e521898fb 25-Nov-2014 Jason Ekstrand <jason@jlekstrand.net> 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>
/external/mesa3d/src/util/tests/hash_table/replacement.c
72e55bb6888ff4d6b69b10d9c58573e4c3d492ec 25-Feb-2014 Kenneth Graunke <kenneth@whitecape.org> util: Move the open-addressing linear-probing hash_table to src/util.

This hash table is used in core Mesa, the GLSL compiler, and the i965
driver, which makes it a good candidate for the new src/util module.

It's much faster than program/hash_table.[ch] (see commit 6991c2922f5
for data), and José's u_hash_table.c has a comment saying Gallium should
probably consider switching to a linear probing hash table at some point.
So this seems like the best candidate for a shared data structure.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>

v2 (Jason Ekstrand): Pick up another hash_table use and patch up scons

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/util/tests/hash_table/replacement.c