Move some verlet headers to mdlib
[alexxy/gromacs.git] / src / gromacs / mdlib / nbnxn_cuda / nbnxn_cuda_data_mgmt.cu
index 37679494faa52ce66d6024b401a100f77dc3e5e8..57fd906c10a08e4c13533873805512e024588769 100644 (file)
@@ -44,7 +44,7 @@
 #include "tables.h"
 #include "typedefs.h"
 #include "types/enums.h"
-#include "types/nb_verlet.h"
+#include "gromacs/mdlib/nb_verlet.h"
 #include "types/interaction_const.h"
 #include "types/force_flags.h"
 #include "../nbnxn_consts.h"
@@ -52,7 +52,7 @@
 
 #include "nbnxn_cuda_types.h"
 #include "../../gmxlib/cuda_tools/cudautils.cuh"
-#include "nbnxn_cuda_data_mgmt.h"
+#include "gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.h"
 #include "pmalloc_cuda.h"
 #include "gpu_utils.h"
 
@@ -426,10 +426,15 @@ static void init_nbparam(cu_nbparam_t              *nbp,
 
 /*! Re-generate the GPU Ewald force table, resets rlist, and update the
  *  electrostatic type switching to twin cut-off (or back) if needed. */
-void nbnxn_cuda_pme_loadbal_update_param(nbnxn_cuda_ptr_t           cu_nb,
-                                         const interaction_const_t *ic)
+void nbnxn_cuda_pme_loadbal_update_param(const nonbonded_verlet_t    *nbv,
+                                         const interaction_const_t   *ic)
 {
-    cu_nbparam_t *nbp = cu_nb->nbparam;
+    if (!nbv || nbv->grp[0].kernel_type != nbnxnk8x8x8_CUDA)
+    {
+        return;
+    }
+    nbnxn_cuda_ptr_t cu_nb = nbv->cu_nbv;
+    cu_nbparam_t    *nbp   = cu_nb->nbparam;
 
     set_cutoff_parameters(nbp, ic);
 
@@ -1077,11 +1082,11 @@ wallclock_gpu_t * nbnxn_cuda_get_timings(nbnxn_cuda_ptr_t cu_nb)
     return (cu_nb != NULL && cu_nb->bDoTime) ? cu_nb->timings : NULL;
 }
 
-void nbnxn_cuda_reset_timings(nbnxn_cuda_ptr_t cu_nb)
+void nbnxn_cuda_reset_timings(nonbonded_verlet_t* nbv)
 {
-    if (cu_nb->bDoTime)
+    if (nbv->cu_nbv && nbv->cu_nbv->bDoTime)
     {
-        init_timings(cu_nb->timings);
+        init_timings(nbv->cu_nbv->timings);
     }
 }