]> pd.if.org Git - nbds/blobdiff - include/murmur.h
all structures now support arbitrary type keys with a fast path for integers
[nbds] / include / murmur.h
index fcb4cb642a9f08285d968135ca67f59712270e8e..84d713580015d474a5c2d3a035b7f8cf3c9b4013 100644 (file)
@@ -61,3 +61,8 @@ static inline unsigned int murmur32 (const char *key, int len)
 
        return h;
 } 
+
+static inline unsigned int murmur32_8b (uint64_t key)
+{
+    return murmur32((char *)&key, 8);
+}