[Openmp-commits] [PATCH] D136103: OpenMP asynchronous memory copy support

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Oct 21 17:41:35 PDT 2022


jdoerfert added a comment.

Looks good from my end. Thanks for the updates, I hope they make sense in the end.

Some minor style comments below. @tianshilei1992 Should accept once the header concerns are resolved.



================
Comment at: openmp/libomptarget/src/api.cpp:256-257
+    // Task allocation failed, delete the argument object
+    if (Args != nullptr)
+      delete Args;
+
----------------
You can delete a nullptr.


================
Comment at: openmp/libomptarget/src/api.cpp:267-272
+  if (DepObjCount > 0) {
+    for (int i = 0; i < DepObjCount; i++) {
+      omp_depend_t DepObj = DepObjList[i];
+      DepObjs.push_back(*((kmp_depend_info_t *)DepObj));
+    }
+  }
----------------



================
Comment at: openmp/libomptarget/src/api.cpp:274-276
+  int Rc = OFFLOAD_SUCCESS;
+  // Launch the helper task
+  Rc = __kmpc_omp_task_with_deps(nullptr, Gtid, Ptr, DepObjCount,
----------------



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

https://reviews.llvm.org/D136103



More information about the Openmp-commits mailing list