aboutsummaryrefslogtreecommitdiffstats
path: root/util/digest/murmur.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/digest/murmur.h
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/digest/murmur.h')
-rw-r--r--util/digest/murmur.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/util/digest/murmur.h b/util/digest/murmur.h
index 6b519b430a..4715a2378d 100644
--- a/util/digest/murmur.h
+++ b/util/digest/murmur.h
@@ -1,20 +1,20 @@
#pragma once
-
+
#include <util/system/defaults.h>
#include <util/generic/array_ref.h>
-
+
/*
* murmur2 from http://murmurhash.googlepages.com/
*
- */
+ */
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;
+ 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> { \
@@ -27,19 +27,19 @@ namespace NMurmurPrivate {
DEF_MUR(64)
#undef DEF_MUR
-}
-
-template <class T>
+}
+
+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);
-}
-
-template <class T>
+}
+
+template <class T>
static inline T MurmurHash(const void* buf, size_t len) noexcept {
return MurmurHash<T>(buf, len, (T)0);
-}
-
-//non-inline version
+}
+
+//non-inline version
size_t MurmurHashSizeT(const char* buf, size_t len) noexcept;
template <typename TOut = size_t>