[Openmp-commits] [PATCH] D44260: [OpenMP][libomptarget] Add global memory data sharing support for master-worker sharing.

Gheorghe-Teodor Bercea via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Mar 8 11:17:44 PST 2018


gtbercea marked 7 inline comments as done.
gtbercea added inline comments.


================
Comment at: libomptarget/deviceRTLs/nvptx/src/data_sharing.cu:459
+EXTERN void __kmpc_begin_sharing_variables(void ***GlobalArgs, size_t nArgs) {
+  // Ensure length of 100 args to force global memory usage.
+  omptarget_nvptx_globalArgs.EnsureSize(nArgs);
----------------
grokos wrote:
> where does 100 come from?
Removed it, was a leftover.


================
Comment at: libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:99-100
+  void **args;
+  // starts off as MAX_SHARED_ARGS but can increase in size.
+  uint32_t nArgs;
+};
----------------
grokos wrote:
> `Init()` is never called throughout the code, so `nArgs` is never initialized to `MAX_SHARED_ARGS`. Add a constructor to this class which will call `Init()`.
Added the call in the stack initialization function.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D44260





More information about the Openmp-commits mailing list