diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-15 08:39:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-15 08:40:33 +0400 |
commit | aa10cf7f5cc3b2acdc0fd79b0eecccae029afcfa (patch) | |
tree | bc1b692349a746590eb3ec1cba89a3bfe675e0ab /source/blender/blenlib/BLI_ghash.h | |
parent | cad4bfe653e12bb4c6178b7a83d35806d10ee9b0 (diff) |
GHash: add BLI_ghashutil_uinthash_v4 for hashing 4 ints at once
Diffstat (limited to 'source/blender/blenlib/BLI_ghash.h')
-rw-r--r-- | source/blender/blenlib/BLI_ghash.h | 6 |
1 files changed, 6 insertions, 0 deletions
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); |