Clear device force buffer if it was reallocated
[alexxy/gromacs.git] / src / gromacs / mdtypes / state_propagator_data_gpu.h
index a0d9309f6714ec14ad949b613c54441e3a8e98e2..c6ae19c589c0101759ddd7b135f2161f282872e8 100644 (file)
@@ -144,6 +144,8 @@ public:
     ~StatePropagatorDataGpu();
 
     /*! \brief Set the ranges for local and non-local atoms and reallocates buffers.
+     *
+     * Reallocates coordinate, velocities and force buffers on the device.
      *
      * \note
      * The coordinates buffer is (re)allocated, when required by PME, with a padding,
@@ -151,6 +153,10 @@ public:
      * is scheduled in the \p pmeStream_ (unlike the coordinates H2D) as only the PME
      * task uses this padding area.
      *
+     * \note
+     * The force buffer is cleared if its size increases, so that previously unused
+     * memory is cleared before forces are accumulated.
+     *
      *  \param[in] numAtomsLocal  Number of atoms in local domain.
      *  \param[in] numAtomsAll    Total number of atoms to handle.
      */