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

Gheorghe-Teodor Bercea via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 2 11:47:03 PDT 2019


gtbercea marked an inline comment as done.
gtbercea added inline comments.


================
Comment at: libomptarget/src/device.cpp:174
+  if (RTLRequiresFlags & OMP_REQ_UNIFIED_SHARED_MEMORY &&
+      (IsImplicit || !lr.Flags.IsContained || Size)) {
+    DP("Return HstPtrBegin " DPxMOD " Size=%ld RefCount=%s\n",
----------------
grokos wrote:
> I still don't understand this condition (even in the simplified form). Can you explain what we are testing?
The condition comes from the 1st and 3rd if conditions. I have updated the condition to its more explicit version.

But, from what I can tell, IsContained can never be true in this case, ExtendesBefore/After I think cannot be true either.

IsImplicit can vary, Size also.

So I would reduce the condition to:

(IsImplicit || Size)

Does this now make sense?




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