aboutsummaryrefslogtreecommitdiffstats
path: root/util/digest/murmur.h
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:40 +0300
commit5d50718e66d9c037dc587a0211110b7d25a66185 (patch)
treee98df59de24d2ef7c77baed9f41e4875a2fef972 /util/digest/murmur.h
parenta6a92afe03e02795227d2641b49819b687f088f8 (diff)
downloadydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/digest/murmur.h')
-rw-r--r--util/digest/murmur.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/util/digest/murmur.h b/util/digest/murmur.h
index eec9bcc171..6b519b430a 100644
--- a/util/digest/murmur.h
+++ b/util/digest/murmur.h
@@ -3,35 +3,35 @@
#include <util/system/defaults.h>
#include <util/generic/array_ref.h>
-/*
- * murmur2 from http://murmurhash.googlepages.com/
- *
+/*
+ * murmur2 from http://murmurhash.googlepages.com/
+ *
*/
-namespace NMurmurPrivate {
+namespace NMurmurPrivate {
Y_PURE_FUNCTION ui32 MurmurHash32(const void* key, size_t len, ui32 seed) noexcept;
Y_PURE_FUNCTION ui64 MurmurHash64(const void* key, size_t len, ui64 seed) noexcept;
- template <unsigned N>
- struct TMurHelper;
-
-#define DEF_MUR(t) \
- template <> \
- struct TMurHelper<t> { \
- static inline ui##t MurmurHash(const void* buf, size_t len, ui##t init) noexcept { \
- return MurmurHash##t(buf, len, init); \
- } \
- };
-
- DEF_MUR(32)
- DEF_MUR(64)
-
-#undef DEF_MUR
+ template <unsigned N>
+ struct TMurHelper;
+
+#define DEF_MUR(t) \
+ template <> \
+ struct TMurHelper<t> { \
+ static inline ui##t MurmurHash(const void* buf, size_t len, ui##t init) noexcept { \
+ return MurmurHash##t(buf, len, init); \
+ } \
+ };
+
+ DEF_MUR(32)
+ DEF_MUR(64)
+
+#undef DEF_MUR
}
template <class T>
-static inline T MurmurHash(const void* buf, size_t len, T init) noexcept {
- return (T)NMurmurPrivate::TMurHelper<8 * sizeof(T)>::MurmurHash(buf, len, init);
+static inline T MurmurHash(const void* buf, size_t len, T init) noexcept {
+ return (T)NMurmurPrivate::TMurHelper<8 * sizeof(T)>::MurmurHash(buf, len, init);
}
template <class T>