Take over management of OpenCL context from PME and NBNXM
[alexxy/gromacs.git] / src / gromacs / listed_forces / gpubonded_impl.h
index 0532b40315a0b893c6ec4457d5a4714690f7cac6..a0da918893fa0340fc2b78bc81967c80e528b20f 100644 (file)
@@ -126,7 +126,7 @@ class GpuBonded::Impl
 {
 public:
     //! Constructor
-    Impl(const gmx_ffparams_t& ffparams, void* streamPtr, gmx_wallcycle* wcycle);
+    Impl(const gmx_ffparams_t& ffparams, const DeviceContext& deviceContext, void* streamPtr, gmx_wallcycle* wcycle);
     /*! \brief Destructor, non-default needed for freeing
      * device-side buffers */
     ~Impl();
@@ -180,8 +180,8 @@ private:
     //! \brief Device-side total virial
     float* d_vTot_ = nullptr;
 
-    //! Dummy GPU context object
-    const DeviceContext deviceContext_;
+    //! GPU context object
+    const DeviceContext& deviceContext_;
     //! \brief Bonded GPU stream, not owned by this module
     CommandStream stream_;