[Openmp-commits] [PATCH] D65001: [OpenMP][libomptarget] Add support for unified memory for regular maps

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 1 09:15:41 PDT 2019


Hahnfeld requested changes to this revision.
Hahnfeld added a comment.
This revision now requires changes to proceed.

There's still no call to `__tgt_register_requires` in the two tests, so I guess they won't pass with older versions of Clang.



================
Comment at: libomptarget/src/device.cpp:238
+    IsHostPtr = true;
+    rc = (void *)(uintptr_t)HstPtrBegin;
+  } else {
----------------
Hehe, casting a `void *` to `uintptr_t` and back to `void *`? Please remove :D


================
Comment at: libomptarget/src/omptarget.cpp:545-548
+        if (Device.RTLRequiresFlags & OMP_REQ_UNIFIED_SHARED_MEMORY &&
+            TgtPtrBegin == HstPtrBegin)
+          rt = OFFLOAD_SUCCESS;
+        else
----------------
This can never happen, the loop will `continue` above (currently line 493).


================
Comment at: libomptarget/test/unified_shared_memory/shared_update.c:20
+
+  for(int i=0; i<N; ++i){
+    alloc[i] = 10;
----------------
This test isn't formatted either.


Repository:
  rOMP OpenMP

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

https://reviews.llvm.org/D65001





More information about the Openmp-commits mailing list