Deleted Added
sdiff udiff text old ( 286866 ) new ( 296221 )
full compact
1/*
2 * The following hash function is based on MurmurHash3, placed into the public
3 * domain by Austin Appleby. See http://code.google.com/p/smhasher/ for
4 * details.
5 */
6/******************************************************************************/
7#ifdef JEMALLOC_H_TYPES
8
9#endif /* JEMALLOC_H_TYPES */
10/******************************************************************************/
11#ifdef JEMALLOC_H_STRUCTS

--- 32 unchanged lines hidden (view full) ---

44
45 return ((x << r) | (x >> (64 - r)));
46}
47
48JEMALLOC_INLINE uint32_t
49hash_get_block_32(const uint32_t *p, int i)
50{
51
52 return (p[i]);
53}
54
55JEMALLOC_INLINE uint64_t
56hash_get_block_64(const uint64_t *p, int i)
57{
58
59 return (p[i]);
60}
61
62JEMALLOC_INLINE uint32_t
63hash_fmix_32(uint32_t h)
64{
65
66 h ^= h >> 16;

--- 249 unchanged lines hidden (view full) ---

316 r_out[1] = h2;
317}
318
319/******************************************************************************/
320/* API. */
321JEMALLOC_INLINE void
322hash(const void *key, size_t len, const uint32_t seed, size_t r_hash[2])
323{
324#if (LG_SIZEOF_PTR == 3 && !defined(JEMALLOC_BIG_ENDIAN))
325 hash_x64_128(key, len, seed, (uint64_t *)r_hash);
326#else
327 uint64_t hashes[2];
328 hash_x86_128(key, len, seed, hashes);
329 r_hash[0] = (size_t)hashes[0];
330 r_hash[1] = (size_t)hashes[1];
331#endif
332}
333#endif
334
335#endif /* JEMALLOC_H_INLINES */
336/******************************************************************************/