aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorspreis <spreis@yandex-team.ru>2022-02-10 16:47:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:13 +0300
commitb49848d6e361b76904f094b7d5e10d6edea75afe (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp
parentbcd1126cbd5d445cd0665d295198aa39c6ab8cbe (diff)
downloadydb-b49848d6e361b76904f094b7d5e10d6edea75afe.tar.gz
Restoring authorship annotation for <spreis@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/binsaver/bin_saver.h32
-rw-r--r--library/cpp/build_info/ya.make6
-rw-r--r--library/cpp/cpuid_check/README.md24
-rw-r--r--library/cpp/cpuid_check/cpu_id_check.cpp128
-rw-r--r--library/cpp/cpuid_check/ya.make14
-rw-r--r--library/cpp/execprofile/ya.make4
-rw-r--r--library/cpp/lcs/ut/ya.make4
-rw-r--r--library/cpp/lwtrace/tests/ya.make4
-rw-r--r--library/cpp/pop_count/benchmark/ya.make4
-rw-r--r--library/cpp/retry/retry.h2
-rw-r--r--library/cpp/sse/sse.h18
-rw-r--r--library/cpp/svnversion/test/ya.make4
-rw-r--r--library/cpp/svnversion/ya.make4
13 files changed, 124 insertions, 124 deletions
diff --git a/library/cpp/binsaver/bin_saver.h b/library/cpp/binsaver/bin_saver.h
index 69da5ad127..412424889f 100644
--- a/library/cpp/binsaver/bin_saver.h
+++ b/library/cpp/binsaver/bin_saver.h
@@ -30,18 +30,18 @@ enum ESaverMode {
SAVER_MODE_WRITE_COMPRESSED = 3,
};
-namespace NBinSaverInternals {
- // This lets explicitly control the overload resolution priority
- // The higher P means higher priority in overload resolution order
- template <int P>
- struct TOverloadPriority : TOverloadPriority <P-1> {
- };
-
- template <>
- struct TOverloadPriority<0> {
- };
-}
-
+namespace NBinSaverInternals {
+ // This lets explicitly control the overload resolution priority
+ // The higher P means higher priority in overload resolution order
+ template <int P>
+ struct TOverloadPriority : TOverloadPriority <P-1> {
+ };
+
+ template <>
+ struct TOverloadPriority<0> {
+ };
+}
+
//////////////////////////////////////////////////////////////////////////
struct IBinSaver {
public:
@@ -63,18 +63,18 @@ private:
// }
// };
template <class T, typename = decltype(std::declval<T*>()->T::operator&(std::declval<IBinSaver&>()))>
- void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<2>) { // highest priority - will be resolved first if enabled
+ void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<2>) { // highest priority - will be resolved first if enabled
// Note: p->operator &(*this) would lead to infinite recursion
p->T::operator&(*this);
}
template <class T, typename = decltype(std::declval<T&>() & std::declval<IBinSaver&>())>
- void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<1>) { // lower priority - will be resolved second if enabled
+ void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<1>) { // lower priority - will be resolved second if enabled
(*p) & (*this);
}
template <class T>
- void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<0>) { // lower priority - will be resolved last
+ void CallObjectSerialize(T* p, NBinSaverInternals::TOverloadPriority<0>) { // lower priority - will be resolved last
#if (!defined(_MSC_VER))
// In MSVC __has_trivial_copy returns false to enums, primitive types and arrays.
static_assert(__has_trivial_copy(T), "Class is nontrivial copyable, you must define operator&, see");
@@ -294,7 +294,7 @@ public:
// return type of Add() is used to detect specialized serializer (see HasNonTrivialSerializer below)
template <class T>
char Add(const chunk_id, T* p) {
- CallObjectSerialize(p, NBinSaverInternals::TOverloadPriority<2>());
+ CallObjectSerialize(p, NBinSaverInternals::TOverloadPriority<2>());
return 0;
}
int Add(const chunk_id, std::string* pStr) {
diff --git a/library/cpp/build_info/ya.make b/library/cpp/build_info/ya.make
index 007bcbec54..99886a8893 100644
--- a/library/cpp/build_info/ya.make
+++ b/library/cpp/build_info/ya.make
@@ -6,9 +6,9 @@ OWNER(
heretic
)
-DEFAULT(SANDBOX_TASK_ID 0)
-DEFAULT(KOSHER_SVN_VERSION "")
-
+DEFAULT(SANDBOX_TASK_ID 0)
+DEFAULT(KOSHER_SVN_VERSION "")
+
CREATE_BUILDINFO_FOR(buildinfo_data.h)
PEERDIR(
diff --git a/library/cpp/cpuid_check/README.md b/library/cpp/cpuid_check/README.md
index a97ee09f58..9c0e8dfa59 100644
--- a/library/cpp/cpuid_check/README.md
+++ b/library/cpp/cpuid_check/README.md
@@ -1,13 +1,13 @@
-Simple utility to check base target x86 SIMD exensions at startup.
-
-Program may be built with some SIMD extension enabled (e.g. `-msse4.2`). `PEERDIR` to this library adds statrup check that machine where the program is running supports SIMD extension the program is built for.
-
-Currently supported check are: sse4.2, pclmul, aes, avx, avx2 and fma.
-
-**Note:** the library depends on `util`.
-**Note:** the library adds stratup code and so if `PEERDIR`-ed from `LIBRARY` will do so for all `PROGRAM`-s that (transitively) use the `LIBRARY`. Don't do this!
-
+Simple utility to check base target x86 SIMD exensions at startup.
+
+Program may be built with some SIMD extension enabled (e.g. `-msse4.2`). `PEERDIR` to this library adds statrup check that machine where the program is running supports SIMD extension the program is built for.
+
+Currently supported check are: sse4.2, pclmul, aes, avx, avx2 and fma.
+
+**Note:** the library depends on `util`.
+**Note:** the library adds stratup code and so if `PEERDIR`-ed from `LIBRARY` will do so for all `PROGRAM`-s that (transitively) use the `LIBRARY`. Don't do this!
+
You normally don't need to `PEERDIR` this library at all. Since making sse4 in Arcadia default this library is used implicitly. It is `PEERDIR`-ed from all `PROGRAM`-s and derived modules (e.g. `PY2_PROGRAM`, but not `GO_PROGRAM` or `JAVA_PROGRAM`).
-It is also not applied to `PROGRAM`-s where `NO_UTIL()`, `NO_PLATFORM()` or `ALLOCATOR(FAKE)` set to avoid undesired dependencied. To disable this implicit check use `NO_CPU_CHECK()` macro or `-DCPU_CHECK=no` ya make flag.
-
-
+It is also not applied to `PROGRAM`-s where `NO_UTIL()`, `NO_PLATFORM()` or `ALLOCATOR(FAKE)` set to avoid undesired dependencied. To disable this implicit check use `NO_CPU_CHECK()` macro or `-DCPU_CHECK=no` ya make flag.
+
+
diff --git a/library/cpp/cpuid_check/cpu_id_check.cpp b/library/cpp/cpuid_check/cpu_id_check.cpp
index dd20443dbf..f19a573567 100644
--- a/library/cpp/cpuid_check/cpu_id_check.cpp
+++ b/library/cpp/cpuid_check/cpu_id_check.cpp
@@ -1,64 +1,64 @@
-#include <util/system/compat.h>
-#include <util/system/compiler.h>
-#include <util/system/cpu_id.h>
-#include <util/system/platform.h>
-
-#define Y_CPU_ID_ENUMERATE_STARTUP_CHECKS(F) \
- F(SSE42) \
- F(PCLMUL) \
- F(AES) \
- F(AVX) \
- F(AVX2) \
- F(FMA)
-
-namespace {
- [[noreturn]] void ReportISAError(const char* isa) {
- err(-1, "This program was compiled for %s which is not supported on your system, exiting...", isa);
- }
-
-#define Y_DEF_NAME(X) \
- void Assert##X() noexcept { \
- if (!NX86::Have##X()) { \
- ReportISAError(#X); \
- } \
- }
-
- Y_CPU_ID_ENUMERATE_STARTUP_CHECKS(Y_DEF_NAME)
-#undef Y_DEF_NAME
-
- class TBuildCpuChecker {
- public:
- TBuildCpuChecker() {
- Check();
- }
-
- private:
- void Check() const noexcept {
-#if defined(_fma_)
- AssertFMA();
-#elif defined(_avx2_)
- AssertAVX2();
-#elif defined(_avx_)
- AssertAVX();
-#elif defined(_aes_)
- AssertAES();
-#elif defined(_pclmul_)
- AssertPCLMUL();
-#elif defined(_sse4_2_)
- AssertSSE42();
-#endif
-
-#define Y_DEF_NAME(X) Y_UNUSED(Assert##X);
- Y_CPU_ID_ENUMERATE_STARTUP_CHECKS(Y_DEF_NAME)
-#undef Y_DEF_NAME
- }
- };
-}
-
-#if defined(_x86_) && !defined(_MSC_VER)
-#define INIT_PRIORITY(x) __attribute__((init_priority(x)))
-#else
-#define INIT_PRIORITY(x)
-#endif
-
-const static TBuildCpuChecker CheckCpuWeAreRunningOn INIT_PRIORITY(101) ;
+#include <util/system/compat.h>
+#include <util/system/compiler.h>
+#include <util/system/cpu_id.h>
+#include <util/system/platform.h>
+
+#define Y_CPU_ID_ENUMERATE_STARTUP_CHECKS(F) \
+ F(SSE42) \
+ F(PCLMUL) \
+ F(AES) \
+ F(AVX) \
+ F(AVX2) \
+ F(FMA)
+
+namespace {
+ [[noreturn]] void ReportISAError(const char* isa) {
+ err(-1, "This program was compiled for %s which is not supported on your system, exiting...", isa);
+ }
+
+#define Y_DEF_NAME(X) \
+ void Assert##X() noexcept { \
+ if (!NX86::Have##X()) { \
+ ReportISAError(#X); \
+ } \
+ }
+
+ Y_CPU_ID_ENUMERATE_STARTUP_CHECKS(Y_DEF_NAME)
+#undef Y_DEF_NAME
+
+ class TBuildCpuChecker {
+ public:
+ TBuildCpuChecker() {
+ Check();
+ }
+
+ private:
+ void Check() const noexcept {
+#if defined(_fma_)
+ AssertFMA();
+#elif defined(_avx2_)
+ AssertAVX2();
+#elif defined(_avx_)
+ AssertAVX();
+#elif defined(_aes_)
+ AssertAES();
+#elif defined(_pclmul_)
+ AssertPCLMUL();
+#elif defined(_sse4_2_)
+ AssertSSE42();
+#endif
+
+#define Y_DEF_NAME(X) Y_UNUSED(Assert##X);
+ Y_CPU_ID_ENUMERATE_STARTUP_CHECKS(Y_DEF_NAME)
+#undef Y_DEF_NAME
+ }
+ };
+}
+
+#if defined(_x86_) && !defined(_MSC_VER)
+#define INIT_PRIORITY(x) __attribute__((init_priority(x)))
+#else
+#define INIT_PRIORITY(x)
+#endif
+
+const static TBuildCpuChecker CheckCpuWeAreRunningOn INIT_PRIORITY(101) ;
diff --git a/library/cpp/cpuid_check/ya.make b/library/cpp/cpuid_check/ya.make
index 359c2cc1a4..9d794f3edc 100644
--- a/library/cpp/cpuid_check/ya.make
+++ b/library/cpp/cpuid_check/ya.make
@@ -1,7 +1,7 @@
-LIBRARY()
-
-OWNER(g:util g:ymake)
-
-SRCS(GLOBAL cpu_id_check.cpp)
-
-END()
+LIBRARY()
+
+OWNER(g:util g:ymake)
+
+SRCS(GLOBAL cpu_id_check.cpp)
+
+END()
diff --git a/library/cpp/execprofile/ya.make b/library/cpp/execprofile/ya.make
index b11251f68e..9d202ac4eb 100644
--- a/library/cpp/execprofile/ya.make
+++ b/library/cpp/execprofile/ya.make
@@ -1,5 +1,5 @@
-OWNER(g:cpp-contrib)
-
+OWNER(g:cpp-contrib)
+
LIBRARY()
SRCS(
diff --git a/library/cpp/lcs/ut/ya.make b/library/cpp/lcs/ut/ya.make
index 09432f80c7..3d12898788 100644
--- a/library/cpp/lcs/ut/ya.make
+++ b/library/cpp/lcs/ut/ya.make
@@ -1,5 +1,5 @@
-OWNER(velavokr)
-
+OWNER(velavokr)
+
UNITTEST()
PEERDIR(
diff --git a/library/cpp/lwtrace/tests/ya.make b/library/cpp/lwtrace/tests/ya.make
index a6d223f206..6225ab1fa0 100644
--- a/library/cpp/lwtrace/tests/ya.make
+++ b/library/cpp/lwtrace/tests/ya.make
@@ -1,5 +1,5 @@
-OWNER(serxa)
-
+OWNER(serxa)
+
PROGRAM()
SRCS(
diff --git a/library/cpp/pop_count/benchmark/ya.make b/library/cpp/pop_count/benchmark/ya.make
index 6d68dfec60..7fb54a519a 100644
--- a/library/cpp/pop_count/benchmark/ya.make
+++ b/library/cpp/pop_count/benchmark/ya.make
@@ -1,5 +1,5 @@
-OWNER(g:util)
-
+OWNER(g:util)
+
Y_BENCHMARK()
PEERDIR(
diff --git a/library/cpp/retry/retry.h b/library/cpp/retry/retry.h
index a47bbf2a14..c47ff5070f 100644
--- a/library/cpp/retry/retry.h
+++ b/library/cpp/retry/retry.h
@@ -107,7 +107,7 @@ TMaybe<TResult> DoWithRetry(std::function<TResult()> func, TRetryOptions retryOp
}
template <typename TException = yexception>
-bool DoWithRetry(std::function<void()> func, std::function<void(const TException&)> onFail, TRetryOptions retryOptions, bool throwLast) {
+bool DoWithRetry(std::function<void()> func, std::function<void(const TException&)> onFail, TRetryOptions retryOptions, bool throwLast) {
auto f = [&]() {
func();
return nullptr;
diff --git a/library/cpp/sse/sse.h b/library/cpp/sse/sse.h
index 04bd1352ee..19bac17de0 100644
--- a/library/cpp/sse/sse.h
+++ b/library/cpp/sse/sse.h
@@ -15,15 +15,15 @@
#include <emmintrin.h>
#include <pmmintrin.h>
#define ARCADIA_SSE
-#if defined(_ssse3_)
-#include <tmmintrin.h>
-#endif
-#if defined(_sse4_1_)
-#include <smmintrin.h>
-#endif
-#if defined(_sse4_2_)
-#include <nmmintrin.h>
-#endif
+#if defined(_ssse3_)
+#include <tmmintrin.h>
+#endif
+#if defined(_sse4_1_)
+#include <smmintrin.h>
+#endif
+#if defined(_sse4_2_)
+#include <nmmintrin.h>
+#endif
#elif defined(_arm64_)
#include "sse2neon.h"
#define ARCADIA_SSE
diff --git a/library/cpp/svnversion/test/ya.make b/library/cpp/svnversion/test/ya.make
index cf476ed37d..59c0a2d970 100644
--- a/library/cpp/svnversion/test/ya.make
+++ b/library/cpp/svnversion/test/ya.make
@@ -1,5 +1,5 @@
-OWNER(g:cpp-contrib)
-
+OWNER(g:cpp-contrib)
+
PROGRAM()
PEERDIR(library/cpp/svnversion)
SRCS(main.cpp)
diff --git a/library/cpp/svnversion/ya.make b/library/cpp/svnversion/ya.make
index ced57cf6c5..04e1a4c4fd 100644
--- a/library/cpp/svnversion/ya.make
+++ b/library/cpp/svnversion/ya.make
@@ -1,5 +1,5 @@
-OWNER(g:cpp-contrib)
-
+OWNER(g:cpp-contrib)
+
LIBRARY()
SRCS(