GHash: add BLI_ghashutil_uinthash_v4 for hashing 4 ints at once
[blender.git] / source / blender / blenlib / BLI_ghash.h
index 1e51bd9afea64283037603083cfcc97b6519011a..d762876a55a3a0e8025207ccfbb591ab5943d983 100644 (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);