From 5a70b84cb66fb8c7a3fce0e3f2e4b61e0b2ea9d4 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 27 Dec 2011 19:56:43 -0500 Subject: util: add murmurhash3 hash function --- src/util/murmurhash3.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/util/murmurhash3.h (limited to 'src/util/murmurhash3.h') diff --git a/src/util/murmurhash3.h b/src/util/murmurhash3.h new file mode 100644 index 000000000..9174554b9 --- /dev/null +++ b/src/util/murmurhash3.h @@ -0,0 +1,10 @@ +/* This file is based on the public domain MurmurHash3 from Austin Appleby: + * http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp + * + * We use only the 32 bit variant because the 2 produce different result while + * we need to produce the same result regardless of the architecture as + * clients can be both 64 or 32 bit at the same time. + */ + +uint32_t murmurhash3(const char *key, int len, uint32_t seed); + -- cgit