aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/pop_count
diff options
context:
space:
mode:
authordanlark <danlark@yandex-team.ru>2022-02-10 16:46:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:08 +0300
commit3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (patch)
tree26154e1e9990f1bb4525d3e3fb5b6dac2c2c1da2 /library/cpp/pop_count
parentcb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff)
downloadydb-3426a9bc7f169ae9da54cef557ad2a33f6e8eee0.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/pop_count')
-rw-r--r--library/cpp/pop_count/popcount.h62
1 files changed, 31 insertions, 31 deletions
diff --git a/library/cpp/pop_count/popcount.h b/library/cpp/pop_count/popcount.h
index 3d67737ed2..c398f3fae7 100644
--- a/library/cpp/pop_count/popcount.h
+++ b/library/cpp/pop_count/popcount.h
@@ -11,17 +11,17 @@
#endif
static inline ui32 PopCountImpl(ui8 n) {
-#if defined(_ppc64_)
- ui32 r;
- __asm__("popcntb %0, %1"
- : "=r"(r)
- : "r"(n)
- :);
- return r;
-#else
+#if defined(_ppc64_)
+ ui32 r;
+ __asm__("popcntb %0, %1"
+ : "=r"(r)
+ : "r"(n)
+ :);
+ return r;
+#else
extern ui8 const* PopCountLUT8;
return PopCountLUT8[n];
-#endif
+#endif
}
static inline ui32 PopCountImpl(ui16 n) {
@@ -48,18 +48,18 @@ static inline ui32 PopCountImpl(ui32 n) {
return r;
}
-#else
-#if defined(_ppc64_)
- ui32 r;
-
- __asm__("popcntw %0, %1"
- : "=r"(r)
- : "r"(n)
- :);
-
- return r;
-#endif
+#else
+#if defined(_ppc64_)
+ ui32 r;
+
+ __asm__("popcntw %0, %1"
+ : "=r"(r)
+ : "r"(n)
+ :);
+
+ return r;
#endif
+#endif
return PopCountImpl((ui16)Lo16(n)) + PopCountImpl((ui16)Hi16(n));
#endif
@@ -80,18 +80,18 @@ static inline ui32 PopCountImpl(ui64 n) {
return r;
}
-#else
-#if defined(_ppc64_)
- ui32 r;
-
- __asm__("popcntd %0, %1"
- : "=r"(r)
- : "r"(n)
- :);
-
- return r;
-#endif
+#else
+#if defined(_ppc64_)
+ ui32 r;
+
+ __asm__("popcntd %0, %1"
+ : "=r"(r)
+ : "r"(n)
+ :);
+
+ return r;
#endif
+#endif
return PopCountImpl((ui32)Lo32(n)) + PopCountImpl((ui32)Hi32(n));
#endif