[Openmp-commits] [PATCH] D95300: [OpenMP][deviceRTLs] Separate declaration of target dependent functions from `target_impl.h`

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 26 08:32:52 PST 2021


tianshilei1992 added inline comments.


================
Comment at: openmp/libomptarget/deviceRTLs/common/omptarget.h:333
 
+INLINE DEVICE uint32_t __kmpc_impl_ffs(uint32_t x) { return __builtin_ffs(x); }
+
----------------
JonChesterfield wrote:
> Just INLINE?
otherwise?


================
Comment at: openmp/libomptarget/deviceRTLs/target_interface.h:27
+// Atomics
+extern DEVICE uint32_t __kmpc_atomic_add(uint32_t *, uint32_t);
+extern DEVICE uint32_t __kmpc_atomic_inc(uint32_t *, uint32_t);
----------------
JonChesterfield wrote:
> I guess these should be EXTERN, not extern DEVICE
They're C++ functions, so cannot use `EXTERN` directly which is expanded to `extern "C" DEVICE`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95300



More information about the Openmp-commits mailing list