diff --git a/include/cuda/std/barrier b/include/cuda/std/barrier index d24b2a7838..e7af6f138c 100644 --- a/include/cuda/std/barrier +++ b/include/cuda/std/barrier @@ -87,7 +87,7 @@ public: using arrival_token = typename __barrier_base::arrival_token; _LIBCUDACXX_INLINE_VISIBILITY - bool try_wait(arrival_token __phase) const { + bool __try_wait(arrival_token __phase) const { #if __CUDA_ARCH__ >= 800 if (__isShared(&__barrier)) { int __ready = 0; @@ -220,6 +220,11 @@ public: _CUDA_VSTD::__libcpp_thread_poll_with_backoff(std::__barrier_poll_tester(this, _CUDA_VSTD::move(__phase))); } + _LIBCUDACXX_INLINE_VISIBILITY + bool try_wait(arrival_token __phase) const { + return __try_wait(_CUDA_VSTD::move(__phase)); + } + inline _LIBCUDACXX_INLINE_VISIBILITY bool try_wait_parity(bool __parity) const { diff --git a/libcxx/include/barrier b/libcxx/include/barrier index 83abb95697..d8be55452c 100644 --- a/libcxx/include/barrier +++ b/libcxx/include/barrier @@ -362,6 +362,12 @@ public: __barrier_base(__barrier_base const&) = delete; __barrier_base& operator=(__barrier_base const&) = delete; + _LIBCUDACXX_INLINE_VISIBILITY + bool __try_wait(arrival_token __old) const + { + return __try_wait_phase(__old & __phase_bit); + } + _LIBCUDACXX_INLINE_VISIBILITY bool try_wait_parity(bool __parity) const { @@ -370,7 +376,7 @@ public: _LIBCUDACXX_INLINE_VISIBILITY bool try_wait(arrival_token __old) const { - return __try_wait_phase(__old & __phase_bit); + return __try_wait(__old); } _LIBCUDACXX_NODISCARD_ATTRIBUTE inline _LIBCUDACXX_INLINE_VISIBILITY