[Openmp-commits] [PATCH] D56100: [OPENMP][NVPTX]Fixed initialization of the data-sharing interface.

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Dec 27 16:21:54 PST 2018


grokos accepted this revision.
grokos added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libomptarget/deviceRTLs/nvptx/src/data_sharing.cu:449
+  ((int *)&FrameP)[0] = __SHFL_SYNC(CurActive, ((int *)&FrameP)[0], 0);
+  if (sizeof(FrameP) == 8)
+    ((int *)&FrameP)[1] = __SHFL_SYNC(CurActive, ((int *)&FrameP)[1], 0);
----------------
ABataev wrote:
> grokos wrote:
> > Isn't `FrameP` always 8-bytes long?
> What if the architecture is 32 bits?
That would be true if we compiled the RTL on a 32-bit host system, but - at least at the moment - only 64-bit hosts are supported by libomptarget (x86_64, ppc64, aarch64). So the 32-bit case is unreachable, although admittedly it doesn't hurt to have this discrimination here as a safeguard for the future. On the other hand, how probable is it that we will ever support 32-bit systems? Anyway, the patch looks good, I'm leaving it up to you to decide whether the 32-bit scenario should be considered here.


Repository:
  rOMP OpenMP

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

https://reviews.llvm.org/D56100





More information about the Openmp-commits mailing list