Make DeviceStream into a class
[alexxy/gromacs.git] / src / gromacs / mdlib / update_constrain_gpu_impl.h
index dd46010e93015920529d7100fce04579ddcca594..8aacc28a610d5d84fa1203578749519b875cf359 100644 (file)
@@ -65,7 +65,7 @@ class UpdateConstrainGpu::Impl
 public:
     /*! \brief Create Update-Constrain object.
      *
-     * The constructor is given a non-nullptr \p commandStream, in which all the update and constrain
+     * The constructor is given a non-nullptr \p deviceStream, in which all the update and constrain
      * routines are executed. \p xUpdatedOnDevice should mark the completion of all kernels that modify
      * coordinates. The event is maintained outside this class and also passed to all (if any) consumers
      * of the updated coordinates. The \p xUpdatedOnDevice also can not be a nullptr because the
@@ -76,13 +76,13 @@ public:
      * \param[in] mtop              Topology of the system: SETTLE gets the masses for O and H atoms
      *                              and target O-H and H-H distances from this object.
      * \param[in] deviceContext     GPU device context.
-     * \param[in] commandStream     GPU stream to use. Can be nullptr.
+     * \param[in] deviceStream      GPU stream to use.
      * \param[in] xUpdatedOnDevice  The event synchronizer to use to mark that update is done on the GPU.
      */
     Impl(const t_inputrec&     ir,
          const gmx_mtop_t&     mtop,
          const DeviceContext&  deviceContext,
-         const void*           commandStream,
+         const DeviceStream&   deviceStream,
          GpuEventSynchronizer* xUpdatedOnDevice);
 
     ~Impl();
@@ -171,7 +171,7 @@ private:
     //! GPU context object
     const DeviceContext& deviceContext_;
     //! GPU stream
-    CommandStream commandStream_ = nullptr;
+    const DeviceStream& deviceStream_;
     //! GPU kernel launch config
     KernelLaunchConfig coordinateScalingKernelLaunchConfig_;