diff options
author | kmosienko <kmosienko@yandex-team.ru> | 2022-02-10 16:46:53 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:53 +0300 |
commit | b5a9a2b99dd4fa6005304f0f60f4005137f18cb3 (patch) | |
tree | d3e39606b032fa188ddbfb604e71fe8a5059bd12 /library/cpp | |
parent | 469afdc4e2587bf62ecdd096b75a0baa444c4012 (diff) | |
download | ydb-b5a9a2b99dd4fa6005304f0f60f4005137f18cb3.tar.gz |
Restoring authorship annotation for <kmosienko@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/ipv6_address/ipv6_address.cpp | 4 | ||||
-rw-r--r-- | library/cpp/mime/types/mime.cpp | 4 | ||||
-rw-r--r-- | library/cpp/mime/types/mime.h | 2 | ||||
-rw-r--r-- | library/cpp/pop_count/popcount.cpp | 8 | ||||
-rw-r--r-- | library/cpp/pop_count/popcount.h | 38 |
5 files changed, 28 insertions, 28 deletions
diff --git a/library/cpp/ipv6_address/ipv6_address.cpp b/library/cpp/ipv6_address/ipv6_address.cpp index be8fcbae13..cea86f2e6c 100644 --- a/library/cpp/ipv6_address/ipv6_address.cpp +++ b/library/cpp/ipv6_address/ipv6_address.cpp @@ -1,9 +1,9 @@ #include "ipv6_address.h" #include "ipv6_address_p.h" -#ifdef _unix_ +#ifdef _unix_ #include <netinet/in.h> -#endif +#endif #include <util/network/address.h> #include <util/network/init.h> diff --git a/library/cpp/mime/types/mime.cpp b/library/cpp/mime/types/mime.cpp index 706d776b24..b9b7515a1d 100644 --- a/library/cpp/mime/types/mime.cpp +++ b/library/cpp/mime/types/mime.cpp @@ -88,7 +88,7 @@ const TMimeTypes::TRecord TMimeTypes::Records[] = { {MIME_APK, "application/vnd.android.package-archive\0", "apk\0"}, {MIME_CSS, "text/css\0", "css\0"}, {MIME_IMAGE_WEBP, "image/webp\0", "webp\0"}, - {MIME_DJVU, "image/vnd.djvu\0image/x-djvu\0", "djvu\0djv\0"}, + {MIME_DJVU, "image/vnd.djvu\0image/x-djvu\0", "djvu\0djv\0"}, {MIME_CHM, "application/x-chm\0application/vnd.ms-htmlhelp\0", "chm\0"}, {MIME_FB2ZIP, "application/zip\0", "fb2zip\0"}, {MIME_IMAGE_TIFF, "image/tiff\0image/tiff-fx\0", "tif\0tiff\0"}, @@ -239,7 +239,7 @@ const char* MimeNames[MIME_MAX] = { "apk", // MIME_APK // 33 "css", // MIME_CSS // 34 "webp", // MIME_IMAGE_WEBP // 35 - "djvu", // MIME_DJVU // 36 + "djvu", // MIME_DJVU // 36 "chm", // MIME_CHM // 37 "fb2zip", // MIME_FB2ZIP // 38 "tiff", // MIME_IMAGE_TIFF // 39 diff --git a/library/cpp/mime/types/mime.h b/library/cpp/mime/types/mime.h index 05da389ea9..64b5b035a9 100644 --- a/library/cpp/mime/types/mime.h +++ b/library/cpp/mime/types/mime.h @@ -47,7 +47,7 @@ enum MimeTypes { MIME_APK = 33, MIME_CSS = 34, MIME_IMAGE_WEBP = 35, - MIME_DJVU = 36, + MIME_DJVU = 36, MIME_CHM = 37, MIME_FB2ZIP = 38, MIME_IMAGE_TIFF = 39, diff --git a/library/cpp/pop_count/popcount.cpp b/library/cpp/pop_count/popcount.cpp index 49276424be..4d34575ffb 100644 --- a/library/cpp/pop_count/popcount.cpp +++ b/library/cpp/pop_count/popcount.cpp @@ -1,8 +1,8 @@ #include "popcount.h" -#include <util/system/defaults.h> +#include <util/system/defaults.h> #include <util/system/yassert.h> - + #include <string.h> static const ui8 PopCountLUT8Impl[1 << 8] = { @@ -10,7 +10,7 @@ static const ui8 PopCountLUT8Impl[1 << 8] = { #define B4(n) B2(n), B2(n + 1), B2(n + 1), B2(n + 2) #define B6(n) B4(n), B4(n + 1), B4(n + 1), B4(n + 2) B6(0), B6(1), B6(1), B6(2)}; - + ui8 const* PopCountLUT8 = PopCountLUT8Impl; #if !defined(_MSC_VER) @@ -25,6 +25,6 @@ static const ui8 PopCountLUT16Impl[1 << 16] = { #define B12(n) B10(n), B10(n + 1), B10(n + 1), B10(n + 2) #define B14(n) B12(n), B12(n + 1), B12(n + 1), B12(n + 2) B14(0), B14(1), B14(1), B14(2)}; - + ui8 const* PopCountLUT16 = PopCountLUT16Impl; #endif diff --git a/library/cpp/pop_count/popcount.h b/library/cpp/pop_count/popcount.h index 3d67737ed2..d6f12d7a19 100644 --- a/library/cpp/pop_count/popcount.h +++ b/library/cpp/pop_count/popcount.h @@ -1,15 +1,15 @@ -#pragma once - +#pragma once + #include <util/generic/typelist.h> #include <util/system/cpu_id.h> -#include <util/system/defaults.h> +#include <util/system/defaults.h> #include <util/system/hi_lo.h> -#include <util/system/platform.h> - +#include <util/system/platform.h> + #if defined(_MSC_VER) #include <intrin.h> -#endif - +#endif + static inline ui32 PopCountImpl(ui8 n) { #if defined(_ppc64_) ui32 r; @@ -23,20 +23,20 @@ static inline ui32 PopCountImpl(ui8 n) { return PopCountLUT8[n]; #endif } - + static inline ui32 PopCountImpl(ui16 n) { #if defined(_MSC_VER) return __popcnt16(n); -#else +#else extern ui8 const* PopCountLUT16; return PopCountLUT16[n]; -#endif +#endif } - + static inline ui32 PopCountImpl(ui32 n) { #if defined(_MSC_VER) return __popcnt(n); -#else +#else #if defined(_x86_64_) if (NX86::CachedHavePOPCNT()) { ui32 r; @@ -62,13 +62,13 @@ static inline ui32 PopCountImpl(ui32 n) { #endif return PopCountImpl((ui16)Lo16(n)) + PopCountImpl((ui16)Hi16(n)); -#endif +#endif } - + static inline ui32 PopCountImpl(ui64 n) { #if defined(_MSC_VER) && !defined(_i386_) return __popcnt64(n); -#else +#else #if defined(_x86_64_) if (NX86::CachedHavePOPCNT()) { ui64 r; @@ -94,12 +94,12 @@ static inline ui32 PopCountImpl(ui64 n) { #endif return PopCountImpl((ui32)Lo32(n)) + PopCountImpl((ui32)Hi32(n)); -#endif +#endif } - + template <class T> static inline ui32 PopCount(T n) { using TCvt = TFixedWidthUnsignedInt<T>; - + return PopCountImpl((TCvt)n); -} +} |