[llvm] [offload][openMP] Add omp_get_device_ptr_if_present api to offload (PR #153146)

Michael Klemm via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 14 01:22:50 PDT 2025


================
@@ -683,3 +683,20 @@ EXTERN void *omp_get_mapped_ptr(const void *Ptr, int DeviceNum) {
 
   return TPR.TargetPointer;
 }
+
+EXTERN void *omp_get_device_ptr_if_present(void *Ptr, int DeviceNum) {
----------------
mjklemm wrote:

This routine is not part of the OpenMP API.  Please use a different prefix.  If the routine only is only to be called from generated code, it may be prudent to prefix it with `__` to put into the compiler's "namespace".

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


More information about the llvm-commits mailing list