aboutsummaryrefslogtreecommitdiffstats
path: root/util/digest/murmur.h
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:39 +0300
commita6a92afe03e02795227d2641b49819b687f088f8 (patch)
treef6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /util/digest/murmur.h
parentc6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff)
downloadydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 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 6b519b430a..eec9bcc171 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>