[OpenMP][libomptarget] Add hasQueue() function in NextGen plugin's AsyncInfoWrapperTy
authorKevin Sala <kevin.sala@bsc.es>
Sun, 4 Dec 2022 00:40:39 +0000 (01:40 +0100)
committerKevin Sala <kevin.sala@bsc.es>
Sun, 4 Dec 2022 12:24:40 +0000 (13:24 +0100)
This patch prepares the PluginInterface for the new AMDGPU NextGen plugin.

Differential Revision: https://reviews.llvm.org/D139263

openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h

index 827d600..4882755 100644 (file)
@@ -65,6 +65,9 @@ struct AsyncInfoWrapperTy {
     return reinterpret_cast<Ty &>(AsyncInfoPtr->Queue);
   }
 
+  /// Indicate whether there is queue.
+  bool hasQueue() const { return (AsyncInfoPtr->Queue != nullptr); }
+
 private:
   Error &Err;
   ErrorAsOutParameter ErrOutParam;