From 78110352943f20bc6e0c9dfe77b169575bde899a Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Thu, 30 Jan 2025 09:38:44 +0100 Subject: [PATCH] Try to always include the definition of barrier_native_handle when needed (#3556) --- libcudacxx/include/cuda/__barrier/barrier_native_handle.h | 4 ++++ .../include/cuda/__memcpy_async/try_get_barrier_handle.h | 1 + libcudacxx/include/cuda/barrier | 1 + 3 files changed, 6 insertions(+) diff --git a/libcudacxx/include/cuda/__barrier/barrier_native_handle.h b/libcudacxx/include/cuda/__barrier/barrier_native_handle.h index 29879c71edf..a685c832723 100644 --- a/libcudacxx/include/cuda/__barrier/barrier_native_handle.h +++ b/libcudacxx/include/cuda/__barrier/barrier_native_handle.h @@ -25,6 +25,8 @@ #include #include +#if _CCCL_HAS_CUDA_COMPILER + _LIBCUDACXX_BEGIN_NAMESPACE_CUDA_DEVICE _CCCL_DEVICE inline _CUDA_VSTD::uint64_t* barrier_native_handle(barrier& __b) @@ -34,4 +36,6 @@ _CCCL_DEVICE inline _CUDA_VSTD::uint64_t* barrier_native_handle(barrier +#include #include #include #include diff --git a/libcudacxx/include/cuda/barrier b/libcudacxx/include/cuda/barrier index 0d65d4bf344..bcc2999cb31 100644 --- a/libcudacxx/include/cuda/barrier +++ b/libcudacxx/include/cuda/barrier @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include