[Openmp-commits] [PATCH] D86307: [OpenMP] Pack first-private arguments to improve efficiency of data transfer
Ye Luo via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Aug 24 10:44:39 PDT 2020
ye-luo added inline comments.
================
Comment at: openmp/libomptarget/src/omptarget.cpp:872
+ int addArg(void *HstPtr, int64_t ArgSize, int64_t ArgOffset,
+ bool IsFirstPrivate, void *&TgtPtr, std::vector<void *> TgtArgs) {
+ // If the argument is not first-private, or its size is greater than a
----------------
tianshilei1992 wrote:
> ye-luo wrote:
> > I think only an index instead of TgtArgs is needed.
> It would be not very straightforward why we need an index here, and there is no difference in terms of performance between an index and a reference.
Without documentation, nothing is straightforward. IndexInTgtArgs is better than TgtArgs. Passing TgtArgs directly open doors to unintended uses.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86307/new/
https://reviews.llvm.org/D86307
More information about the Openmp-commits
mailing list