aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/hash_primes.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/generic/hash_primes.h
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/hash_primes.h')
-rw-r--r--util/generic/hash_primes.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/util/generic/hash_primes.h b/util/generic/hash_primes.h
index 4dc2da0b8f..26b6073d4e 100644
--- a/util/generic/hash_primes.h
+++ b/util/generic/hash_primes.h
@@ -4,7 +4,7 @@
#include <util/system/types.h>
#if defined(_MSC_VER) && defined(_M_X64)
- #include <intrin.h>
+ #include <intrin.h>
#endif
/**
@@ -16,7 +16,7 @@
* greater or equal to `elementCount`.
*/
Y_CONST_FUNCTION
-unsigned long HashBucketCount(unsigned long elementCount);
+unsigned long HashBucketCount(unsigned long elementCount);
namespace NPrivate {
@@ -25,7 +25,7 @@ namespace NPrivate {
template <typename TDivisor, typename TDividend, typename MulUnsignedUpper>
class TReciprocalDivisor {
static_assert(sizeof(TDivisor) <= sizeof(TDividend), "TDivisor and TDividend should have the same size");
-
+
public:
constexpr TReciprocalDivisor() noexcept = default;
@@ -80,9 +80,9 @@ namespace NPrivate {
#if defined(_32_)
using THashDivisor = ::NPrivate::TReciprocalDivisor<ui32, ui32, TMulUnsignedUpper<ui32, ui64, 32>>;
#else
- #if defined(Y_HAVE_INT128)
+ #if defined(Y_HAVE_INT128)
using THashDivisor = ::NPrivate::TReciprocalDivisor<ui32, ui64, TMulUnsignedUpper<ui64, unsigned __int128, 64>>;
- #elif defined(_MSC_VER) && defined(_M_X64)
+ #elif defined(_MSC_VER) && defined(_M_X64)
struct TMulUnsignedUpperVCIntrin {
/// Return the high 64 bits of the product of two 64-bit unsigned integers.
Y_FORCE_INLINE ui64 operator()(ui64 a, ui64 b) const noexcept {
@@ -90,7 +90,7 @@ namespace NPrivate {
}
};
using THashDivisor = ::NPrivate::TReciprocalDivisor<ui32, ui64, TMulUnsignedUpperVCIntrin>;
- #else
+ #else
template <typename TDivisor, typename TDividend>
class TNaiveDivisor {
public:
@@ -127,7 +127,7 @@ namespace NPrivate {
};
using THashDivisor = ::NPrivate::TNaiveDivisor<ui32, ui64>;
- #endif
+ #endif
#endif
}