[Openmp-commits] [PATCH] D116315: [OpenMP][CUDA] Add resource pool for CUevent

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 27 13:02:34 PST 2021


ye-luo added inline comments.


================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:325
   using StreamPoolTy = ResourcePoolTy<CUstream>;
   using StreamAllocatorTy = AllocatorTy<CUstream>;
   std::vector<std::unique_ptr<StreamPoolTy>> StreamPool;
----------------
This line probably can be removed.


================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:329
+  using EventPoolTy = ResourcePoolTy<CUevent>;
+  std::unique_ptr<EventPoolTy> EventPool;
+
----------------
Why this pool needs to be unique_ptr?


================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:567
 
+    EventPool.reset();
+
----------------
Probably ResourcePoolTy::clear() is a method worth being added.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116315



More information about the Openmp-commits mailing list