Minor nbnxm cleanup
authorBerk Hess <hess@kth.se>
Wed, 20 Feb 2019 08:42:00 +0000 (09:42 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 21 Feb 2019 12:01:52 +0000 (13:01 +0100)
Removed typedef nbnxn_search_t and unused alloc/free functions.

Change-Id: I07436fd909867d2db9ff41b741b4ebc218623858

src/gromacs/nbnxm/grid.cpp
src/gromacs/nbnxm/nbnxm.h
src/gromacs/nbnxm/pairlist.cpp
src/gromacs/nbnxm/pairlist.h
src/gromacs/nbnxm/pairlistset.h

index 7ccf6d18c57a64b7ac9d0005123aeda8be12a4ed..4b98d53a3cc32bf9d04075369317144be2891c10 100644 (file)
@@ -1539,7 +1539,7 @@ void nbnxn_put_on_grid_nonlocal(nonbonded_verlet_t              *nbv,
     }
 }
 
-void nbnxn_get_ncells(nbnxn_search_t nbs, int *ncx, int *ncy)
+void nbnxn_get_ncells(const nbnxn_search *nbs, int *ncx, int *ncy)
 {
     *ncx = nbs->grid[0].numCells[XX];
     *ncy = nbs->grid[0].numCells[YY];
@@ -1555,7 +1555,7 @@ gmx::ArrayRef<const int> nbnxn_get_atomorder(const nbnxn_search *nbs)
     return gmx::constArrayRefFromArray(nbs->a.data(), numIndices);
 }
 
-void nbnxn_set_atomorder(nbnxn_search_t nbs)
+void nbnxn_set_atomorder(nbnxn_search *nbs)
 {
     /* Set the atom order for the home cell (index 0) */
     nbnxn_grid_t *grid = &nbs->grid[0];
index 640d782b931d529ef9e092c978ea19fa4ff2ba4b..e0103c849d0b0ea7d386ab9a298f3114fa7619a0 100644 (file)
@@ -118,6 +118,7 @@ struct gmx_hw_info_t;
 struct gmx_mtop_t;
 struct interaction_const_t;
 struct nbnxn_pairlist_set_t;
+struct nbnxn_search;
 struct nonbonded_verlet_t;
 struct t_blocka;
 struct t_commrec;
@@ -352,13 +353,13 @@ void nbnxn_put_on_grid_nonlocal(nonbonded_verlet_t              *nb_verlet,
                                 gmx::ArrayRef<const gmx::RVec>   x);
 
 /*! \brief Returns the number of x and y cells in the local grid */
-void nbnxn_get_ncells(nbnxn_search_t nbs, int *ncx, int *ncy);
+void nbnxn_get_ncells(const nbnxn_search *nbs, int *ncx, int *ncy);
 
 /*! \brief Returns the order indices of the atoms on the pairlist search grid */
 gmx::ArrayRef<const int> nbnxn_get_atomorder(const nbnxn_search* nbs);
 
 /*! \brief Renumbers the atom indices on the grid to consecutive order */
-void nbnxn_set_atomorder(nbnxn_search_t nbs);
+void nbnxn_set_atomorder(nbnxn_search *nbs);
 
 /*! \brief Returns the index position of the atoms on the pairlist search grid */
 gmx::ArrayRef<const int> nbnxn_get_gridindices(const nbnxn_search* nbs);
index 06293a02619b8176166a21b18fbc21691e7dbe82..8365163e24c38c983da38ad89a0195c7310de175 100644 (file)
@@ -332,15 +332,6 @@ nbnxn_search::nbnxn_search(int                       ePBC,
     nbs_cycle_clear(cc);
 }
 
-nbnxn_search *nbnxn_init_search(int                        ePBC,
-                                const ivec                *n_dd_cells,
-                                const gmx_domdec_zones_t  *zones,
-                                gmx_bool                   bFEP,
-                                int                        nthread_max)
-{
-    return new nbnxn_search(ePBC, n_dd_cells, zones, bFEP, nthread_max);
-}
-
 static void init_buffer_flags(nbnxn_buffer_flags_t *flags,
                               int                   natoms)
 {
index 71d90b38830866c1e685b05cb9a958e0f0159b3f..d54708150e3b396dfb493e847b1d86e933dc79cb 100644 (file)
@@ -139,20 +139,6 @@ typedef struct {
     int dummy[16];
 } gmx_cache_protect_t;
 
-/* Abstract type for pair searching data */
-typedef struct nbnxn_search * nbnxn_search_t;
-
-/* Function that should return a pointer *ptr to memory
- * of size nbytes.
- * Error handling should be done within this function.
- */
-typedef void nbnxn_alloc_t (void **ptr, size_t nbytes);
-
-/* Function that should free the memory pointed to by *ptr.
- * NULL should not be passed to this function.
- */
-typedef void nbnxn_free_t (void *ptr);
-
 /* This is the actual cluster-pair list j-entry.
  * cj is the j-cluster.
  * The interaction bits in excl are indexed i-major, j-minor.
index e2da79e853776209a3f7f92958311f9ac633fa86..82bcdef6e1f91f0ec5befd49f854133ea6e09c90 100644 (file)
 
 #include "locality.h"
 
-struct gmx_domdec_zones_t;
-struct gmx_groups_t;
-struct nbnxn_atomdata_t;
 struct nbnxn_pairlist_set_t;
-struct nbnxn_search;
-struct t_blocka;
-struct t_nrnb;
-
-/* Function that should return a pointer *ptr to memory
- * of size nbytes.
- * Error handling should be done within this function.
- */
-typedef void nbnxn_alloc_t (void **ptr, size_t nbytes);
-
-/* Function that should free the memory pointed to by *ptr.
- * NULL should not be passed to this function.
- */
-typedef void nbnxn_free_t (void *ptr);
-
-/* Allocates and initializes a pair search data structure */
-nbnxn_search *nbnxn_init_search(int                        ePBC,
-                                const ivec                *n_dd_cells,
-                                const gmx_domdec_zones_t  *zones,
-                                gmx_bool                   bFEP,
-                                int                        nthread_max);
 
 /* Initializes a set of pair lists stored in nbnxn_pairlist_set_t
  *