diff options
Diffstat (limited to 'openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h')
-rw-r--r-- | openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h index 1045db9c51d4..a91ea81183c2 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h @@ -70,17 +70,15 @@ struct AsyncInfoWrapperTy { /// Indicate whether there is queue. bool hasQueue() const { return (AsyncInfoPtr->Queue != nullptr); } - // Get a reference to the error associated with the asycnhronous operations - // related to the async info wrapper. - Error &getError() { return Err; } - /// Synchronize with the __tgt_async_info's pending operations if it's the - /// internal async info and return the error associated with the async - /// operations. This function must be called before destroying the object. - Error finalize(); + /// internal async info. The error associated to the aysnchronous operations + /// issued in this queue must be provided in \p Err. This function will update + /// the error parameter with the result of the synchronization if it was + /// actually executed. This function must be called before destroying the + /// object and only once. + void finalize(Error &Err); private: - Error Err; GenericDeviceTy &Device; __tgt_async_info LocalAsyncInfo; __tgt_async_info *AsyncInfoPtr; |