[Openmp-commits] [PATCH] D82245: [libomptarget] Add support for target update non-contiguous

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Aug 4 12:19:07 PDT 2020


grokos added inline comments.


================
Comment at: openmp/libomptarget/include/omptarget.h:53
+  // descriptor for non-contiguous target-update
+  OMP_TGT_MAPTYPE_DESCRIPTOR      = 0x100000000000,
   // member of struct, member given by [16 MSBs] - 1
----------------
Maybe use a more descriptive name for the flag? Like `OMP_TGT_MAPTYPE_NON_CONTIG`?


================
Comment at: openmp/libomptarget/src/omptarget.cpp:571
+                                  __tgt_target_non_contig *non_contig,
+                                  uint64_t size, int64_t arg_type, int dim,
+                                  int dim_size, uint64_t offset) {
----------------
Maybe rename `dim` to `current_dim` - if it wasn't for the comment in the function call in line 629 I wouldn't have figured out what this argument describes.


================
Comment at: openmp/libomptarget/src/omptarget.cpp:579
+      // we only need to transfer the first element for the last dimension
+      // since we've alreay got a contiguous peice.
+      if (dim != dim_size - 1 || i == 0) {
----------------
alreay --> already
peice --> piece



================
Comment at: openmp/libomptarget/src/omptarget.cpp:584
+                                   dim + 1, dim_size, offset + cur_offset);
+        // Stop the whole process if any contiguous piece return anything
+        // other than OFFLOAD_SUCCESS.
----------------
return --> returns


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82245



More information about the Openmp-commits mailing list