Add separate constructor to StatePropagatorDataGpu for PME-only rank / PME tests
[alexxy/gromacs.git] / src / gromacs / mdtypes / state_propagator_data_gpu.h
index 086c43fd4e0023983252032b93ee4a23fa8760c6..96066d0ac3f948cd0b5320de6276a10d9b10be81 100644 (file)
@@ -127,6 +127,27 @@ class StatePropagatorDataGpu
                                const void        *deviceContext,
                                GpuApiCallBehavior transferKind,
                                int                paddingSize);
+
+        /*! \brief Constructor to use in PME-only rank and in tests.
+         *
+         *  This constructor should be used if only a coordinate device buffer should be managed
+         *  using a single stream. Any operation on force or velocity buffer as well as copy of
+         *  non-local coordinates will exit with assertion failure. Note, that the pmeStream can
+         *  not be a nullptr and the constructor will exit with an assertion failure.
+         *
+         *  \todo Currently, unsupported copy operations are blocked by assertion that the stream
+         *        not nullptr. This should be improved.
+         *
+         *  \param[in] pmeStream       Device PME stream, nullptr is not allowed.
+         *  \param[in] deviceContext   Device context, nullptr allowed for non-OpenCL builds.
+         *  \param[in] transferKind    H2D/D2H transfer call behavior (synchronous or not).
+         *  \param[in] paddingSize     Padding size for coordinates buffer.
+         */
+        StatePropagatorDataGpu(const void        *pmeStream,
+                               const void        *deviceContext,
+                               GpuApiCallBehavior transferKind,
+                               int                paddingSize);
+
         //! Move constructor
         StatePropagatorDataGpu(StatePropagatorDataGpu &&other) noexcept;
         //! Move assignment