Pass the new gmx::ForceFlags to the nbnxm module
[alexxy/gromacs.git] / src / gromacs / nbnxm / nbnxm_gpu.h
index 0fbd9e4690a9b68647fa66df0c6cf4b6e5a0727f..08f0aa9f96a36d16f4e80091e95ee86d79d29008 100644 (file)
@@ -59,6 +59,7 @@ enum class GpuTaskCompletion;
 namespace gmx
 {
 class GpuBonded;
+class ForceFlags;
 }
 
 namespace Nbnxm
@@ -92,9 +93,9 @@ void gpu_copy_xq_to_gpu(gmx_nbnxn_gpu_t gmx_unused               *nb,
  *
  */
 GPU_FUNC_QUALIFIER
-void gpu_launch_kernel(gmx_nbnxn_gpu_t gmx_unused     *nb,
-                       int gmx_unused                  flags,
-                       InteractionLocality gmx_unused  iloc) GPU_FUNC_TERM;
+void gpu_launch_kernel(gmx_nbnxn_gpu_t gmx_unused      *nb,
+                       const gmx::ForceFlags gmx_unused &forceFlags,
+                       InteractionLocality gmx_unused    iloc) GPU_FUNC_TERM;
 
 /*! \brief
  * Launch asynchronously the nonbonded prune-only kernel.
@@ -141,11 +142,11 @@ void gpu_launch_kernel_pruneonly(gmx_nbnxn_gpu_t gmx_unused     *nb,
  * (and energies/shift forces if required).
  */
 GPU_FUNC_QUALIFIER
-void gpu_launch_cpyback(gmx_nbnxn_gpu_t  gmx_unused *nb,
-                        nbnxn_atomdata_t gmx_unused *nbatom,
-                        int              gmx_unused  flags,
-                        AtomLocality     gmx_unused  aloc,
-                        bool             gmx_unused  copyBackNbForce) GPU_FUNC_TERM;
+void gpu_launch_cpyback(gmx_nbnxn_gpu_t       gmx_unused *nb,
+                        nbnxn_atomdata_t      gmx_unused *nbatom,
+                        const gmx::ForceFlags gmx_unused  &forceFlags,
+                        AtomLocality          gmx_unused  aloc,
+                        bool                  gmx_unused  copyBackNbForce) GPU_FUNC_TERM;
 
 /*! \brief Attempts to complete nonbonded GPU task.
  *
@@ -174,25 +175,25 @@ void gpu_launch_cpyback(gmx_nbnxn_gpu_t  gmx_unused *nb,
  *  force buffer (instead of that being passed only to nbnxn_gpu_launch_cpyback()) and by returning
  *  the energy and Fshift contributions for some external/centralized reduction.
  *
- * \param[in]  nb     The nonbonded data GPU structure
- * \param[in]  flags  Force flags
- * \param[in]  aloc   Atom locality identifier
- * \param[out] e_lj   Pointer to the LJ energy output to accumulate into
- * \param[out] e_el   Pointer to the electrostatics energy output to accumulate into
+ * \param[in]  nb             The nonbonded data GPU structure
+ * \param[in]  forceFlags     Force schedule flags
+ * \param[in]  aloc           Atom locality identifier
+ * \param[out] e_lj           Pointer to the LJ energy output to accumulate into
+ * \param[out] e_el           Pointer to the electrostatics energy output to accumulate into
  * \param[out] shiftForces    Shift forces buffer to accumulate into
  * \param[in]  completionKind Indicates whether nnbonded task completion should only be checked rather than waited for
- * \param[out] wcycle Pointer to wallcycle data structure
- * \returns              True if the nonbonded tasks associated with \p aloc locality have completed
+ * \param[out] wcycle         Pointer to wallcycle data structure
+ * \returns                   True if the nonbonded tasks associated with \p aloc locality have completed
  */
 GPU_FUNC_QUALIFIER
-bool gpu_try_finish_task(gmx_nbnxn_gpu_t gmx_unused  *nb,
-                         int             gmx_unused   flags,
-                         AtomLocality    gmx_unused   aloc,
-                         real            gmx_unused  *e_lj,
-                         real            gmx_unused  *e_el,
+bool gpu_try_finish_task(gmx_nbnxn_gpu_t gmx_unused           *nb,
+                         const gmx::ForceFlags gmx_unused     &forceFlags,
+                         AtomLocality    gmx_unused           aloc,
+                         real            gmx_unused          *e_lj,
+                         real            gmx_unused          *e_el,
                          gmx::ArrayRef<gmx::RVec> gmx_unused  shiftForces,
-                         GpuTaskCompletion gmx_unused completionKind,
-                         gmx_wallcycle    gmx_unused  *wcycle) GPU_FUNC_TERM_WITH_RETURN(false);
+                         GpuTaskCompletion gmx_unused         completionKind,
+                         gmx_wallcycle    gmx_unused         *wcycle) GPU_FUNC_TERM_WITH_RETURN(false);
 
 /*! \brief  Completes the nonbonded GPU task blocking until GPU tasks and data
  * transfers to finish.
@@ -202,7 +203,7 @@ bool gpu_try_finish_task(gmx_nbnxn_gpu_t gmx_unused  *nb,
  * pruning flags.
  *
  * \param[in] nb The nonbonded data GPU structure
- * \param[in] flags Force flags
+ * \param[in]  forceFlags     Force schedule flags
  * \param[in] aloc Atom locality identifier
  * \param[out] e_lj Pointer to the LJ energy output to accumulate into
  * \param[out] e_el Pointer to the electrostatics energy output to accumulate into
@@ -210,12 +211,12 @@ bool gpu_try_finish_task(gmx_nbnxn_gpu_t gmx_unused  *nb,
  */
 GPU_FUNC_QUALIFIER
 float gpu_wait_finish_task(gmx_nbnxn_gpu_t          gmx_unused *nb,
-                           int             gmx_unused  flags,
-                           AtomLocality    gmx_unused  aloc,
-                           real            gmx_unused *e_lj,
-                           real            gmx_unused *e_el,
-                           gmx::ArrayRef<gmx::RVec> gmx_unused shiftForces,
-                           gmx_wallcycle    gmx_unused  *wcycle) GPU_FUNC_TERM_WITH_RETURN(0.0);
+                           const gmx::ForceFlags    gmx_unused &forceFlags,
+                           AtomLocality             gmx_unused  aloc,
+                           real                     gmx_unused *e_lj,
+                           real                     gmx_unused *e_el,
+                           gmx::ArrayRef<gmx::RVec> gmx_unused  shiftForces,
+                           gmx_wallcycle            gmx_unused  *wcycle) GPU_FUNC_TERM_WITH_RETURN(0.0);
 
 /*! \brief Selects the Ewald kernel type, analytical or tabulated, single or twin cut-off. */
 GPU_FUNC_QUALIFIER