GHash: add BLI_ghashutil_uinthash_v4 for hashing 4 ints at once

This commit is contained in:
2014-04-15 14:39:23 +10:00
parent cad4bfe653
commit aa10cf7f5c
3 changed files with 24 additions and 7 deletions

View File

@@ -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);