Add GpuEventSynchronizer::isMarked to SYCL verion
authorAndrey Alekseenko <al42and@gmail.com>
Fri, 9 Apr 2021 10:46:02 +0000 (13:46 +0300)
committerArtem Zhmurov <zhmurov@gmail.com>
Sun, 11 Apr 2021 18:15:21 +0000 (18:15 +0000)
This function is needed to work around #3988 when implementing GPU
update (#3932).

src/gromacs/gpu_utils/gpueventsynchronizer_sycl.h

index 952fedf242ffb2852098e5670fbc6bcbb9f20f66..95614359a5156034bc205db92f7986fa2878fdff 100644 (file)
@@ -143,6 +143,8 @@ public:
     }
     //! Reset the event to unmarked state.
     inline void reset() { event_.reset(); }
+    //! Check if the event is marked. Needed for some workarounds for #3988
+    inline bool isMarked() const { return event_.has_value(); }
 
 private:
     std::optional<cl::sycl::event> event_ = std::nullopt;