[Openmp-commits] [PATCH] D124652: [OpenMP] [OMPT] [amdgpu] [5/8] Implemented device init/fini/load callbacks

Jan-Patrick Lehr via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Dec 1 08:59:59 PST 2022


jplehr added inline comments.


================
Comment at: openmp/libomptarget/include/ompt_device_callbacks.h:18
+#include <atomic>
+#include <string.h>
+
----------------
Should this be rather <string> or <cstring>?


================
Comment at: openmp/libomptarget/plugins/amdgpu/src/ompt_callback.cpp:30
+void OmptDeviceCallbacksTy::resize(int NumDevices) {
+  devices = new OmptDeviceTy[NumDevices];
+}
----------------
I'm not sure about this line. I understand it as it may leak memory, and invalidate all OmptDeviceTy pointers that may have been acquired. At least if this is executed more than once (for whatever reason).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124652



More information about the Openmp-commits mailing list