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

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 9 13:20:45 PST 2018


grokos added inline comments.


================
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;
+};
----------------
gtbercea wrote:
> 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.
No, that's not a good idea. Initialization of the class members should be handled automatically via a constructor. If someone ever wants to reuse this class without having a constructor then they will need to keep in mind that `Init()` must be called explicitly - not a good style.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D44260





More information about the Openmp-commits mailing list