aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h
diff options
context:
space:
mode:
authorheretic <heretic@yandex-team.ru>2022-02-10 16:45:43 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:43 +0300
commit397cbe258b9e064f49c4ca575279f02f39fef76e (patch)
treea0b0eb3cca6a14e4e8ea715393637672fa651284 /contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h
parent43f5a35593ebc9f6bcea619bb170394ea7ae468e (diff)
downloadydb-397cbe258b9e064f49c4ca575279f02f39fef76e.tar.gz
Restoring authorship annotation for <heretic@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h')
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h b/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h
index b54d614ce9..d5b8ff3a66 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/numeric/int128.h
@@ -799,14 +799,14 @@ constexpr bool operator==(uint128 lhs, uint128 rhs) {
constexpr bool operator!=(uint128 lhs, uint128 rhs) { return !(lhs == rhs); }
constexpr bool operator<(uint128 lhs, uint128 rhs) {
-#ifdef ABSL_HAVE_INTRINSIC_INT128
- return static_cast<unsigned __int128>(lhs) <
- static_cast<unsigned __int128>(rhs);
-#else
+#ifdef ABSL_HAVE_INTRINSIC_INT128
+ return static_cast<unsigned __int128>(lhs) <
+ static_cast<unsigned __int128>(rhs);
+#else
return (Uint128High64(lhs) == Uint128High64(rhs))
? (Uint128Low64(lhs) < Uint128Low64(rhs))
: (Uint128High64(lhs) < Uint128High64(rhs));
-#endif
+#endif
}
constexpr bool operator>(uint128 lhs, uint128 rhs) { return rhs < lhs; }
@@ -901,9 +901,9 @@ inline uint128& uint128::operator^=(uint128 other) {
// Arithmetic operators.
constexpr uint128 operator<<(uint128 lhs, int amount) {
-#ifdef ABSL_HAVE_INTRINSIC_INT128
- return static_cast<unsigned __int128>(lhs) << amount;
-#else
+#ifdef ABSL_HAVE_INTRINSIC_INT128
+ return static_cast<unsigned __int128>(lhs) << amount;
+#else
// uint64_t shifts of >= 64 are undefined, so we will need some
// special-casing.
return amount >= 64 ? MakeUint128(Uint128Low64(lhs) << (amount - 64), 0)
@@ -911,13 +911,13 @@ constexpr uint128 operator<<(uint128 lhs, int amount) {
: MakeUint128((Uint128High64(lhs) << amount) |
(Uint128Low64(lhs) >> (64 - amount)),
Uint128Low64(lhs) << amount);
-#endif
+#endif
}
constexpr uint128 operator>>(uint128 lhs, int amount) {
-#ifdef ABSL_HAVE_INTRINSIC_INT128
- return static_cast<unsigned __int128>(lhs) >> amount;
-#else
+#ifdef ABSL_HAVE_INTRINSIC_INT128
+ return static_cast<unsigned __int128>(lhs) >> amount;
+#else
// uint64_t shifts of >= 64 are undefined, so we will need some
// special-casing.
return amount >= 64 ? MakeUint128(0, Uint128High64(lhs) >> (amount - 64))
@@ -925,7 +925,7 @@ constexpr uint128 operator>>(uint128 lhs, int amount) {
: MakeUint128(Uint128High64(lhs) >> amount,
(Uint128Low64(lhs) >> amount) |
(Uint128High64(lhs) << (64 - amount)));
-#endif
+#endif
}
#if !defined(ABSL_HAVE_INTRINSIC_INT128)