1 /* 2 * Utilities for working with hash values. 3 * 4 * Portions Copyright (c) 2017, PostgreSQL Global Development Group 5 */ 6 7 #ifndef HASHUTILS_H 8 #define HASHUTILS_H 9 10 /* 11 * Simple inline murmur hash implementation hashing a 32 bit ingeger, for 12 * performance. 13 */ 14 static inline uint32 murmurhash32(uint32 data)15murmurhash32(uint32 data) 16 { 17 uint32 h = data; 18 19 h ^= h >> 16; 20 h *= 0x85ebca6b; 21 h ^= h >> 13; 22 h *= 0xc2b2ae35; 23 h ^= h >> 16; 24 return h; 25 } 26 27 #endif /* HASHUTILS_H */ 28