[Openmp-commits] [openmp] [Libomptarget][NFCI] Move logic out of PluginAdaptorTy (PR #86971)

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Wed Apr 17 07:06:54 PDT 2024


================
@@ -195,6 +167,15 @@ struct PluginManager {
   // List of all plugin adaptors, in use or not.
   llvm::SmallVector<std::unique_ptr<PluginAdaptorTy>> PluginAdaptors;
 
+  // Mapping of plugin adaptors to offsets in the device table.
+  llvm::DenseMap<const PluginAdaptorTy *, int32_t> DeviceOffsets;
+
+  // Mapping of plugin adaptors to the number of used devices.
+  llvm::DenseMap<const PluginAdaptorTy *, int32_t> DeviceUsed;
----------------
jdoerfert wrote:

We always look them up together, use a single map.

https://github.com/llvm/llvm-project/pull/86971


More information about the Openmp-commits mailing list