From 554032e781e602d1c80f110ad68c642772c8bc62 Mon Sep 17 00:00:00 2001 From: Damien L-G Date: Thu, 2 Mar 2023 15:44:45 -0500 Subject: [PATCH] Desul atomics: prefer __CLANG_RDC__ macro --- tpls/desul/include/desul/atomics/Lock_Array_HIP.hpp | 8 ++++---- tpls/desul/src/Lock_Array_HIP.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tpls/desul/include/desul/atomics/Lock_Array_HIP.hpp b/tpls/desul/include/desul/atomics/Lock_Array_HIP.hpp index 9290aea2b3..53144fbc4c 100644 --- a/tpls/desul/include/desul/atomics/Lock_Array_HIP.hpp +++ b/tpls/desul/include/desul/atomics/Lock_Array_HIP.hpp @@ -63,12 +63,12 @@ void finalize_lock_arrays_hip(); * will use it. That is the purpose of the * ensure_hip_lock_arrays_on_device function. */ -#ifdef DESUL_HIP_RDC +#ifdef __CLANG_RDC__ extern #endif __device__ __constant__ int32_t* HIP_SPACE_ATOMIC_LOCKS_DEVICE; -#ifdef DESUL_HIP_RDC +#ifdef __CLANG_RDC__ extern #endif __device__ __constant__ int32_t* HIP_SPACE_ATOMIC_LOCKS_NODE; @@ -120,7 +120,7 @@ namespace { static int lock_array_copied = 0; } // namespace -#ifdef DESUL_HIP_RDC +#ifdef __CLANG_RDC__ inline #else inline static @@ -139,7 +139,7 @@ inline static } } // namespace Impl -#if defined(DESUL_HIP_RDC) +#if defined(__CLANG_RDC__) inline void ensure_hip_lock_arrays_on_device() {} #else static inline void ensure_hip_lock_arrays_on_device() { diff --git a/tpls/desul/src/Lock_Array_HIP.cpp b/tpls/desul/src/Lock_Array_HIP.cpp index 6191fe81e2..0611c85aeb 100644 --- a/tpls/desul/src/Lock_Array_HIP.cpp +++ b/tpls/desul/src/Lock_Array_HIP.cpp @@ -11,7 +11,7 @@ SPDX-License-Identifier: (BSD-3-Clause) #include #include -#ifdef DESUL_HIP_RDC +#ifdef __CLANG_RDC__ namespace desul { namespace Impl { __device__ __constant__ int32_t* HIP_SPACE_ATOMIC_LOCKS_DEVICE = nullptr; @@ -87,7 +87,7 @@ void finalize_lock_arrays_hip() { check_error_and_throw_hip(error_free2, "finalize_lock_arrays_hip: free host locks"); HIP_SPACE_ATOMIC_LOCKS_DEVICE_h = nullptr; HIP_SPACE_ATOMIC_LOCKS_NODE_h = nullptr; -#ifdef DESUL_HIP_RDC +#ifdef __CLANG_RDC__ copy_hip_lock_arrays_to_device(); #endif }