aboutsummaryrefslogtreecommitdiffstats
path: root/util/digest
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.ru>2022-02-10 16:45:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:08 +0300
commit4e839db24a3bbc9f1c610c43d6faaaa99824dcca (patch)
tree506dac10f5df94fab310584ee51b24fc5a081c22 /util/digest
parent2d37894b1b037cf24231090eda8589bbb44fb6fc (diff)
downloadydb-4e839db24a3bbc9f1c610c43d6faaaa99824dcca.tar.gz
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/digest')
-rw-r--r--util/digest/benchmark/murmur/main.cpp40
-rw-r--r--util/digest/benchmark/murmur/ya.make14
-rw-r--r--util/digest/benchmark/ya.make6
-rw-r--r--util/digest/murmur_ut.cpp48
-rw-r--r--util/digest/ya.make8
5 files changed, 58 insertions, 58 deletions
diff --git a/util/digest/benchmark/murmur/main.cpp b/util/digest/benchmark/murmur/main.cpp
index 1fe2fdcc21..49f5d891f4 100644
--- a/util/digest/benchmark/murmur/main.cpp
+++ b/util/digest/benchmark/murmur/main.cpp
@@ -1,27 +1,27 @@
-#include <contrib/libs/benchmark/include/benchmark/benchmark.h>
-
-#include <util/digest/murmur.h>
-#include <util/system/types.h>
-
-#include <array>
-
-constexpr auto MakeTestData() {
+#include <contrib/libs/benchmark/include/benchmark/benchmark.h>
+
+#include <util/digest/murmur.h>
+#include <util/system/types.h>
+
+#include <array>
+
+constexpr auto MakeTestData() {
std::array<ui64, 4096> result;
for (ui64 i = 0; i < result.size(); ++i) {
result[i] = i;
}
return result;
-}
-
-constexpr auto TEST_DATA = MakeTestData();
-
-template <typename Result>
-static void BenchmarkMurmurHash(benchmark::State& state) {
+}
+
+constexpr auto TEST_DATA = MakeTestData();
+
+template <typename Result>
+static void BenchmarkMurmurHash(benchmark::State& state) {
for (auto _ : state) {
- Result hash = MurmurHash<Result>(TEST_DATA.data(), sizeof(TEST_DATA));
- Y_DO_NOT_OPTIMIZE_AWAY(hash);
+ Result hash = MurmurHash<Result>(TEST_DATA.data(), sizeof(TEST_DATA));
+ Y_DO_NOT_OPTIMIZE_AWAY(hash);
}
-}
-
-BENCHMARK_TEMPLATE(BenchmarkMurmurHash, ui32);
-BENCHMARK_TEMPLATE(BenchmarkMurmurHash, ui64);
+}
+
+BENCHMARK_TEMPLATE(BenchmarkMurmurHash, ui32);
+BENCHMARK_TEMPLATE(BenchmarkMurmurHash, ui64);
diff --git a/util/digest/benchmark/murmur/ya.make b/util/digest/benchmark/murmur/ya.make
index 39559996ab..30ad603129 100644
--- a/util/digest/benchmark/murmur/ya.make
+++ b/util/digest/benchmark/murmur/ya.make
@@ -1,7 +1,7 @@
-G_BENCHMARK()
-
-SRCS(
- main.cpp
-)
-
-END()
+G_BENCHMARK()
+
+SRCS(
+ main.cpp
+)
+
+END()
diff --git a/util/digest/benchmark/ya.make b/util/digest/benchmark/ya.make
index bfc0faff9e..20a2b40bca 100644
--- a/util/digest/benchmark/ya.make
+++ b/util/digest/benchmark/ya.make
@@ -1,3 +1,3 @@
-RECURSE(
- murmur
-)
+RECURSE(
+ murmur
+)
diff --git a/util/digest/murmur_ut.cpp b/util/digest/murmur_ut.cpp
index 29287668bc..ac3bc60563 100644
--- a/util/digest/murmur_ut.cpp
+++ b/util/digest/murmur_ut.cpp
@@ -6,9 +6,9 @@
class TMurmurHashTest: public TTestBase {
UNIT_TEST_SUITE(TMurmurHashTest);
UNIT_TEST(TestHash32)
- UNIT_TEST(TestUnalignedHash32)
+ UNIT_TEST(TestUnalignedHash32)
UNIT_TEST(TestHash64)
- UNIT_TEST(TestUnalignedHash64)
+ UNIT_TEST(TestUnalignedHash64)
UNIT_TEST(TestWrapperBiggerTypes)
UNIT_TEST_SUITE_END();
@@ -27,17 +27,17 @@ private:
Test<ui32>(buf, 253, 80030810UL);
}
- inline void TestUnalignedHash32() {
- ui8 buf[257];
- ui8* unalignedBuf = buf + 1;
-
- for (size_t i = 0; i < 256; ++i) {
- unalignedBuf[i] = i;
- }
-
- Test<ui32>(unalignedBuf, 256, 2373126550UL);
- }
-
+ inline void TestUnalignedHash32() {
+ ui8 buf[257];
+ ui8* unalignedBuf = buf + 1;
+
+ for (size_t i = 0; i < 256; ++i) {
+ unalignedBuf[i] = i;
+ }
+
+ Test<ui32>(unalignedBuf, 256, 2373126550UL);
+ }
+
inline void TestHash64() {
ui8 buf[256];
@@ -52,17 +52,17 @@ private:
Test<ui64>(buf, 253, ULL(11553864555081396353));
}
- inline void TestUnalignedHash64() {
- ui8 buf[257];
- ui8* unalignedBuf = buf + 1;
-
- for (size_t i = 0; i < 256; ++i) {
- unalignedBuf[i] = i;
- }
-
- Test<ui64>(unalignedBuf, 256, ULL(12604435678857905857));
- }
-
+ inline void TestUnalignedHash64() {
+ ui8 buf[257];
+ ui8* unalignedBuf = buf + 1;
+
+ for (size_t i = 0; i < 256; ++i) {
+ unalignedBuf[i] = i;
+ }
+
+ Test<ui64>(unalignedBuf, 256, ULL(12604435678857905857));
+ }
+
inline void TestWrapperBiggerTypes() {
ui32 buf[] = {24, 42};
TestWrapper<ui32, ui32>({buf, buf + 2}, MurmurHash<ui32>(buf, sizeof(ui32) * 2));
diff --git a/util/digest/ya.make b/util/digest/ya.make
index e378a7e419..7e77fa6ed1 100644
--- a/util/digest/ya.make
+++ b/util/digest/ya.make
@@ -3,10 +3,10 @@ SUBSCRIBER(g:util-subscribers)
PROVIDES(cityhash)
-RECURSE(
- benchmark
-)
-
+RECURSE(
+ benchmark
+)
+
RECURSE_FOR_TESTS(
ut
)