From aa10cf7f5cc3b2acdc0fd79b0eecccae029afcfa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Apr 2014 14:39:23 +1000 Subject: GHash: add BLI_ghashutil_uinthash_v4 for hashing 4 ints at once --- source/blender/blenlib/BLI_ghash.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/blenlib/BLI_ghash.h') diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h index 1e51bd9afea..d762876a55a 100644 --- a/source/blender/blenlib/BLI_ghash.h +++ b/source/blender/blenlib/BLI_ghash.h @@ -132,6 +132,12 @@ int BLI_ghashutil_strcmp(const void *a, const void *b); CHECK_TYPE_INLINE(key, int), \ BLI_ghashutil_uinthash((unsigned int)key)) unsigned int BLI_ghashutil_uinthash(unsigned int key); +#define BLI_ghashutil_inthash_v4(key) ( \ + CHECK_TYPE_INLINE(key, int *), \ + BLI_ghashutil_uinthash_v4((const unsigned int *)key)) +unsigned int BLI_ghashutil_uinthash_v4(const unsigned int key[4]); +#define BLI_ghashutil_inthash_v4_p \ + ((GSetHashFP)BLI_ghashutil_uinthash_v4) unsigned int BLI_ghashutil_inthash_p(const void *ptr); int BLI_ghashutil_intcmp(const void *a, const void *b); -- cgit v1.2.3