[Openmp-commits] [PATCH] D73076: [libomptarget] Implement hip atomic functions in terms of intrinsics

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 21 17:44:10 PST 2020


jdoerfert added a comment.

I like this better. Interestingly, we could even think about sharing the clang builtin versions across targets. I'm fine with us keeping it this way for now. What do u think?



================
Comment at: openmp/libomptarget/deviceRTLs/amdgcn/src/hip_atomics.h:27
+template <typename T> DEVICE T atomicMax(volatile T *address, T val) {
+  return __opencl_atomic_fetch_max((_Atomic volatile T *)address, val,
+                                   __ATOMIC_SEQ_CST,
----------------
Add a TODO where we want different builtins later on.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73076/new/

https://reviews.llvm.org/D73076





More information about the Openmp-commits mailing list