Use unique_ptr in nonbonded_verlet_t
[alexxy/gromacs.git] / src / gromacs / nbnxm / gpu_data_mgmt.h
index f578cf5cb99f12da5084357b8f6ca33c035440d0..c1a19b7f635d554a9a67d65ade04fd560e94ea2f 100644 (file)
@@ -44,6 +44,8 @@
 #ifndef GMX_NBNXN_GPU_DATA_MGMT_H
 #define GMX_NBNXN_GPU_DATA_MGMT_H
 
+#include <memory>
+
 #include "gromacs/gpu_utils/gpu_macros.h"
 #include "gromacs/mdtypes/interaction_const.h"
 
@@ -63,14 +65,14 @@ namespace Nbnxm
 
 /** Initializes the data structures related to GPU nonbonded calculations. */
 GPU_FUNC_QUALIFIER
-void gpu_init(gmx_nbnxn_gpu_t gmx_unused            **p_nb,
-              const gmx_device_info_t gmx_unused     *deviceInfo,
-              const interaction_const_t gmx_unused   *ic,
-              const NbnxnListParameters gmx_unused   *listParams,
-              const nbnxn_atomdata_t gmx_unused      *nbat,
-              int gmx_unused                          rank,
-              /* true if both local and non-local are done on GPU */
-              gmx_bool gmx_unused                     bLocalAndNonlocal) GPU_FUNC_TERM
+gmx_nbnxn_gpu_t *
+gpu_init(const gmx_device_info_t gmx_unused     *deviceInfo,
+         const interaction_const_t gmx_unused   *ic,
+         const NbnxnListParameters gmx_unused   *listParams,
+         const nbnxn_atomdata_t gmx_unused      *nbat,
+         int gmx_unused                          rank,
+         /* true if both local and non-local are done on GPU */
+         gmx_bool gmx_unused                     bLocalAndNonlocal) GPU_FUNC_TERM_WITH_RETURN(nullptr)
 
 /** Initializes pair-list data for GPU, called at every pair search step. */
 GPU_FUNC_QUALIFIER
@@ -115,7 +117,7 @@ void gpu_reset_timings(struct nonbonded_verlet_t gmx_unused *nbv) GPU_FUNC_TERM
 
 /** Calculates the minimum size of proximity lists to improve SM load balance
  *  with GPU non-bonded kernels. */
-     GPU_FUNC_QUALIFIER
+    GPU_FUNC_QUALIFIER
 int gpu_min_ci_balanced(gmx_nbnxn_gpu_t gmx_unused *nb) GPU_FUNC_TERM_WITH_RETURN(-1)
 
 /** Returns if analytical Ewald GPU kernels are used. */
@@ -145,7 +147,7 @@ void *gpu_get_f(gmx_nbnxn_gpu_t gmx_unused *nb) CUDA_FUNC_TERM_WITH_RETURN(nullp
  *  Note: CUDA only.
  */
 CUDA_FUNC_QUALIFIER
-     rvec *gpu_get_fshift(gmx_nbnxn_gpu_t gmx_unused *nb) CUDA_FUNC_TERM_WITH_RETURN(nullptr)
+    rvec *gpu_get_fshift(gmx_nbnxn_gpu_t gmx_unused *nb) CUDA_FUNC_TERM_WITH_RETURN(nullptr)
 
 } // namespace Nbnxm