From 97ee0d30cbaebdc639a87f8d8dbb71c79a5f8ad6 Mon Sep 17 00:00:00 2001 From: Wesley Maxey Date: Mon, 16 Aug 2021 15:02:58 -0700 Subject: [PATCH 1/2] Add inline and constexpr qualifiers to __cxx_is_atomic_lock_free --- libcxx/include/support/atomic/atomic_cuda.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libcxx/include/support/atomic/atomic_cuda.h b/libcxx/include/support/atomic/atomic_cuda.h index 0842d3c81f..241083cba6 100644 --- a/libcxx/include/support/atomic/atomic_cuda.h +++ b/libcxx/include/support/atomic/atomic_cuda.h @@ -106,6 +106,7 @@ namespace __host { #include "atomic_cuda_derived.h" _LIBCUDACXX_INLINE_VISIBILITY +inline constexpr bool __cxx_atomic_is_lock_free(size_t __x) { return __x <= 8; } From 5b28baef6574b08bfe6a2f4a17805b56b72254bc Mon Sep 17 00:00:00 2001 From: Wesley Maxey Date: Mon, 16 Aug 2021 15:41:52 -0700 Subject: [PATCH 2/2] Add inline to signal and thread fence --- libcxx/include/support/atomic/atomic_cuda.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libcxx/include/support/atomic/atomic_cuda.h b/libcxx/include/support/atomic/atomic_cuda.h index 241083cba6..f3d77e4551 100644 --- a/libcxx/include/support/atomic/atomic_cuda.h +++ b/libcxx/include/support/atomic/atomic_cuda.h @@ -105,13 +105,13 @@ namespace __host { #include "atomic_cuda_generated.h" #include "atomic_cuda_derived.h" -_LIBCUDACXX_INLINE_VISIBILITY -inline constexpr +_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR bool __cxx_atomic_is_lock_free(size_t __x) { return __x <= 8; } _LIBCUDACXX_INLINE_VISIBILITY +inline void __cxx_atomic_thread_fence(memory_order __order) { NV_DISPATCH_TARGET( NV_IS_DEVICE, ( @@ -124,6 +124,7 @@ _LIBCUDACXX_INLINE_VISIBILITY } _LIBCUDACXX_INLINE_VISIBILITY +inline void __cxx_atomic_signal_fence(memory_order __order) { NV_DISPATCH_TARGET( NV_IS_DEVICE, (