[libc-commits] [libc] [libc] Replace usage of GPU helpers with ones from 'gpuintrin.h' (PR #116454)

Shilei Tian via libc-commits libc-commits at lists.llvm.org
Fri Nov 15 20:16:11 PST 2024


================
@@ -190,28 +198,27 @@ template <bool Invert> struct Process {
     // inlining the current function.
     bool holding_lock = lane_mask != packed;
     if (holding_lock)
-      atomic_thread_fence(cpp::MemoryOrder::ACQUIRE);
+      __atomic_thread_fence(__ATOMIC_ACQUIRE);
     return holding_lock;
   }
 
   /// Unlock the lock at index. We need a lane sync to keep this function
   /// convergent, otherwise the compiler will sink the store and deadlock.
-  [[clang::convergent]] LIBC_INLINE void unlock(uint64_t lane_mask,
-                                                uint32_t index) {
+  LIBC_INLINE void unlock(uint64_t lane_mask, uint32_t index) {
----------------
shiltian wrote:

This PR includes a fair number of cleanups. Idl open a separate PR specifically for those.

https://github.com/llvm/llvm-project/pull/116454


More information about the libc-commits mailing list