aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-03-12 20:44:15 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-03-12 20:57:55 +0300
commit1337adc7441330a6b558d5c93c513f73d75e8af3 (patch)
tree63fbc74d24174a8e763f54569a4de0c1fb5b5233
parentca9d454141bd138fa48d33abe9e8e5da243db6cb (diff)
downloadydb-1337adc7441330a6b558d5c93c513f73d75e8af3.tar.gz
abseil-cpp-tstring: Remove custom patches for building against old cuda versions
7dac9bf355791b665f26cb14953523df159183a3
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/base/casts.h2
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h6
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_cat.h26
3 files changed, 15 insertions, 19 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/casts.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/casts.h
index 2ea54b10f3..2b121076fd 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/casts.h
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/casts.h
@@ -159,7 +159,7 @@ template <
#endif // !Y_ABSL_HAVE_BUILTIN(__builtin_bit_cast)
,
int>::type = 0>
-#if Y_ABSL_HAVE_BUILTIN(__builtin_bit_cast) && (!defined(__CUDACC__) || CUDA_VERSION >= 11010)
+#if Y_ABSL_HAVE_BUILTIN(__builtin_bit_cast)
inline constexpr Dest bit_cast(const Source& source) {
return __builtin_bit_cast(Dest, source);
}
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h
index 839c271526..ad8b509e7e 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h
@@ -602,8 +602,6 @@ static_assert(Y_ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
// Checks whether C++17 std::string_view is available.
#ifdef Y_ABSL_HAVE_STD_STRING_VIEW
#error "Y_ABSL_HAVE_STD_STRING_VIEW cannot be directly set."
-#elif defined(__NVCC__)
-#define Y_ABSL_HAVE_STD_STRING_VIEW 1
#elif defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L
#define Y_ABSL_HAVE_STD_STRING_VIEW 1
#elif defined(Y_ABSL_INTERNAL_CPLUSPLUS_LANG) && \
@@ -977,9 +975,9 @@ static_assert(Y_ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
#ifdef Y_ABSL_HAVE_CONSTANT_EVALUATED
#error Y_ABSL_HAVE_CONSTANT_EVALUATED cannot be directly set
#endif
-#if defined(__cpp_lib_is_constant_evaluated) && (!defined(__CUDACC__) || CUDA_VERSION >= 11000)
+#ifdef __cpp_lib_is_constant_evaluated
#define Y_ABSL_HAVE_CONSTANT_EVALUATED 1
-#elif Y_ABSL_HAVE_BUILTIN(__builtin_is_constant_evaluated) && (!defined(__CUDACC__) || CUDA_VERSION >= 11000)
+#elif Y_ABSL_HAVE_BUILTIN(__builtin_is_constant_evaluated)
#define Y_ABSL_HAVE_CONSTANT_EVALUATED 1
#endif
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_cat.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_cat.h
index 62f7112d8c..67d117f104 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_cat.h
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_cat.h
@@ -567,7 +567,6 @@ StrAppend(y_absl::Nonnull<String*> result, T i) {
// handled quickly.
// Later we can look into how we can extend this to more general argument
// mixtures without bloating codegen too much, or copying unnecessarily.
-#ifndef __NVCC__
template <typename String, typename... T>
std::enable_if_t<
(sizeof...(T) > 1),
@@ -605,20 +604,19 @@ StrAppend(y_absl::Nonnull<String*> str, T... args) {
ptrdiff_t n; // The length of the current argument
typename String::pointer pos = &(*str)[old_size];
using SomeTrivialEmptyType = std::false_type;
- // Ugly code due to the lack of C++14 fold expression makes us.
- const SomeTrivialEmptyType dummy1;
- for (const SomeTrivialEmptyType& dummy2 :
- {(/* Comma expressions are poor man's C++17 fold expression for C++14 */
- (void)(n = lengths[i]),
- (void)(n < 0 ? (void)(*pos++ = '-'), (n = ~n) : 0),
- (void)y_absl::numbers_internal::FastIntToBufferBackward(
- y_absl::numbers_internal::UnsignedAbsoluteValue(std::move(args)),
- pos += n, static_cast<uint32_t>(n)),
- (void)++i, dummy1)...}) {
- (void)dummy2; // Remove & migrate to fold expressions in C++17
- }
+ const SomeTrivialEmptyType dummy;
+ // Ugly code due to the lack of C++17 fold expressions
+ const SomeTrivialEmptyType dummies[] = {
+ (/* Comma expressions are poor man's C++17 fold expression for C++14 */
+ (void)(n = lengths[i]),
+ (void)(n < 0 ? (void)(*pos++ = '-'), (n = ~n) : 0),
+ (void)y_absl::numbers_internal::FastIntToBufferBackward(
+ y_absl::numbers_internal::UnsignedAbsoluteValue(std::move(args)),
+ pos += n, static_cast<uint32_t>(n)),
+ (void)++i, dummy)...};
+ (void)dummies; // Remove & migrate to fold expressions in C++17
}
-#endif
+
// Helper function for the future StrCat default floating-point format, %.6g
// This is fast.
inline strings_internal::AlphaNumBuffer<