Changes imported from Abseil "staging" branch:
- f59c2332341d6b1a3e045d61eb0065f7a226f807 Avoid preprocessing '__CUDACC_VER__ >= 70000' on CUDA 9,... by Abseil Team <absl-team@google.com> - 12dd22cf967603e9a12d58abfe877989d61844e3 Internal change. by Greg Falcon <gfalcon@google.com> GitOrigin-RevId: f59c2332341d6b1a3e045d61eb0065f7a226f807 Change-Id: If4f5274e6d638a2ac86f1377e6ac0481dc584f19
This commit is contained in:
parent
6280bddf55
commit
4972c72c5c
13 changed files with 70 additions and 21 deletions
|
|
@ -181,21 +181,21 @@
|
|||
// __SIZEOF_INT128__ but not all versions actually support __int128.
|
||||
#ifdef ABSL_HAVE_INTRINSIC_INT128
|
||||
#error ABSL_HAVE_INTRINSIC_INT128 cannot be directly set
|
||||
#elif (defined(__clang__) && defined(__SIZEOF_INT128__) && \
|
||||
!defined(__aarch64__)) || \
|
||||
(defined(__CUDACC__) && defined(__SIZEOF_INT128__) && \
|
||||
__CUDACC_VER_MAJOR__ >= 9) || \
|
||||
(!defined(__clang__) && !defined(__CUDACC__) && defined(__GNUC__) && \
|
||||
defined(__SIZEOF_INT128__))
|
||||
#elif defined(__SIZEOF_INT128__)
|
||||
#if (defined(__clang__) && !defined(__aarch64__)) || \
|
||||
(defined(__CUDACC__) && __CUDACC_VER_MAJOR__ >= 9) || \
|
||||
(!defined(__clang__) && !defined(__CUDACC__) && defined(__GNUC__))
|
||||
#define ABSL_HAVE_INTRINSIC_INT128 1
|
||||
#elif defined(__CUDACC__)
|
||||
// __CUDACC_VER__ is a full version number before CUDA 9, and is defined to a
|
||||
// std::string explaining that it has been removed starting with CUDA 9. We can't
|
||||
// compare both variants in a single boolean expression because there is no
|
||||
// short-circuiting in the preprocessor.
|
||||
#elif defined(__CUDACC__) && defined(__SIZEOF_INT128__) && \
|
||||
__CUDACC_VER__ >= 7000
|
||||
// std::string explaining that it has been removed starting with CUDA 9. We use
|
||||
// nested #ifs because there is no short-circuiting in the preprocessor.
|
||||
// NOTE: `__CUDACC__` could be undefined while `__CUDACC_VER__` is defined.
|
||||
#if __CUDACC_VER__ >= 70000
|
||||
#define ABSL_HAVE_INTRINSIC_INT128 1
|
||||
#endif
|
||||
#endif // __CUDACC_VER__ >= 70000
|
||||
#endif // defined(__CUDACC__)
|
||||
#endif // ABSL_HAVE_INTRINSIC_INT128
|
||||
|
||||
// ABSL_HAVE_EXCEPTIONS
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue