Reduced usage of typdefs.h
authorRoland Schulz <roland@utk.edu>
Mon, 21 Apr 2014 00:57:32 +0000 (20:57 -0400)
committerRoland Schulz <roland@utk.edu>
Mon, 28 Apr 2014 02:24:17 +0000 (22:24 -0400)
Preliminary step to move types out of legacyheader.

Renamed parameter called "matrix" because cppcheck gets
confused if a parameter is called the same as a type.

Part of #1415

Change-Id: I9207a7b8de7f092bab890da128abbb48a8d97b79

43 files changed:
src/gromacs/fft/parallel_3dfft.h
src/gromacs/fileio/confio.h
src/gromacs/fileio/enxio.h
src/gromacs/fileio/filenm.h
src/gromacs/fileio/gmxfio.h
src/gromacs/fileio/matio.cpp
src/gromacs/fileio/matio.h
src/gromacs/fileio/pdbio.h
src/gromacs/fileio/tpxio.h
src/gromacs/fileio/trajectory_writing.c
src/gromacs/fileio/trajectory_writing.h
src/gromacs/fileio/trnio.h
src/gromacs/fileio/trxio.h
src/gromacs/fileio/xvgr.cpp
src/gromacs/gmxana/edittop.c
src/gromacs/gmxana/nsfactor.h
src/gromacs/gmxlib/atomprop.c
src/gromacs/gmxpreprocess/read-conformation.cpp
src/gromacs/imd/imd.h
src/gromacs/legacyheaders/domdec.h
src/gromacs/legacyheaders/force.h
src/gromacs/legacyheaders/index.h
src/gromacs/legacyheaders/md_support.h
src/gromacs/legacyheaders/mdrun.h
src/gromacs/legacyheaders/pme.h
src/gromacs/legacyheaders/shellfc.h
src/gromacs/legacyheaders/sim_util.h
src/gromacs/legacyheaders/symtab.h
src/gromacs/legacyheaders/typedefs.h
src/gromacs/legacyheaders/types/commrec_fwd.h [new file with mode: 0644]
src/gromacs/legacyheaders/types/energy.h
src/gromacs/legacyheaders/types/matrix.h
src/gromacs/legacyheaders/types/nrnb.h
src/gromacs/legacyheaders/update.h
src/gromacs/mdlib/force.c
src/gromacs/mdlib/md_support.c
src/gromacs/mdlib/minimize.c
src/gromacs/mdlib/pme.c
src/gromacs/mdlib/sim_util.c
src/gromacs/mdlib/tpi.c
src/gromacs/timing/CMakeLists.txt
src/gromacs/timing/wallcycle.c
src/gromacs/timing/wallcycle.h

index 0af3b8221f870b8b3df6786de8275231223524c2..2a3fe97d5fa49ee8a410cf382b9341b465e4fd28 100644 (file)
@@ -37,8 +37,8 @@
 #ifndef GMX_FFT_PARALLEL_3DFFT_H
 #define GMX_FFT_PARALLEL_3DFFT_H
 
-#include "../legacyheaders/types/nrnb.h"
 #include "../math/gmxcomplex.h"
+#include "../timing/wallcycle.h"
 #include "../utility/basedefinitions.h"
 #include "../utility/gmxmpi.h"
 #include "../utility/real.h"
index b1d37770d8d43bfab0b6ed8a7be8d4b6961b24c1..85b6f9f55260b4c346eddb577f2472c280d014ec 100644 (file)
@@ -2,8 +2,8 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #ifndef GMX_FILEIO_CONFIO_H
 #define GMX_FILEIO_CONFIO_H
 
+#include <stdio.h>
 
-#include "../legacyheaders/typedefs.h"
+#include "../legacyheaders/types/atoms.h"
+#include "../legacyheaders/types/simple.h"
+#include "../legacyheaders/types/topology.h"
+
+#include "trx.h"
 
 /* For reading coordinate files it is assumed that enough memory
  * has been allocated beforehand.
index 922467a0cc3d40756fc45127fb5511438bb35333..e7421fb8aab36b65e0cab994f51f7f883d8c10f8 100644 (file)
@@ -2,8 +2,8 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -37,8 +37,9 @@
 #ifndef GMX_FILEIO_ENXIO_H
 #define GMX_FILEIO_ENXIO_H
 
-#include "../legacyheaders/typedefs.h"
 #include "../legacyheaders/pbc.h"
+#include "../legacyheaders/types/energy.h"
+#include "../legacyheaders/types/topology.h"
 #include "gmxfio.h"
 #include "xdr_datatype.h"
 
index 12933f6315fd18cd71645fa0f367a9f934d9ebd9..0463c54a34fac52afec7c04d906f2d36f2f09397 100644 (file)
@@ -38,7 +38,8 @@
 #ifndef GMX_FILEIO_FILENM_H
 #define GMX_FILEIO_FILENM_H
 
-#include "../legacyheaders/typedefs.h"
+#include "../legacyheaders/types/commrec_fwd.h"
+#include "../utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
index 93f0d7bf76ef6bf3146124a18ddc68df3c14287d..076d0c334105ee46869ae54cd63b7f2f302a9b43 100644 (file)
 
 #include <stdio.h>
 
-#include "../legacyheaders/typedefs.h"
 #include "../utility/cstringutil.h"
 #include "../utility/futil.h"
+#include "../utility/real.h"
+#include "../math/vectypes.h"
 
 #ifdef __cplusplus
 extern "C" {
index 04625c407099a1616db3b07f0d299cf9f07013fb..e77a48758c9aedd297a6edea38eee2bea868f147 100644 (file)
@@ -564,7 +564,7 @@ void read_xpm_entry(FILE *in, t_matrix *mm)
     sfree(line_buf);
 }
 
-int read_xpm_matrix(const char *fnm, t_matrix **matrix)
+int read_xpm_matrix(const char *fnm, t_matrix **mat)
 {
     FILE *in;
     char *line = NULL;
@@ -578,8 +578,8 @@ int read_xpm_matrix(const char *fnm, t_matrix **matrix)
     {
         if (strstr(line, "/* XPM */"))
         {
-            srenew(*matrix, nmat+1);
-            read_xpm_entry(in, &(*matrix)[nmat]);
+            srenew(*mat, nmat+1);
+            read_xpm_entry(in, &(*mat)[nmat]);
             nmat++;
         }
     }
@@ -595,15 +595,15 @@ int read_xpm_matrix(const char *fnm, t_matrix **matrix)
     return nmat;
 }
 
-real **matrix2real(t_matrix *matrix, real **mat)
+real **matrix2real(t_matrix *in, real **out)
 {
     t_mapping *map;
     double     tmp;
     real      *rmap;
     int        i, j, nmap;
 
-    nmap = matrix->nmap;
-    map  = matrix->map;
+    nmap = in->nmap;
+    map  = in->map;
     snew(rmap, nmap);
 
     for (i = 0; i < nmap; i++)
@@ -619,28 +619,28 @@ real **matrix2real(t_matrix *matrix, real **mat)
         rmap[i] = tmp;
     }
 
-    if (mat == NULL)
+    if (out == NULL)
     {
-        snew(mat, matrix->nx);
-        for (i = 0; i < matrix->nx; i++)
+        snew(out, in->nx);
+        for (i = 0; i < in->nx; i++)
         {
-            snew(mat[i], matrix->ny);
+            snew(out[i], in->ny);
         }
     }
-    for (i = 0; i < matrix->nx; i++)
+    for (i = 0; i < in->nx; i++)
     {
-        for (j = 0; j < matrix->ny; j++)
+        for (j = 0; j < in->ny; j++)
         {
-            mat[i][j] = rmap[matrix->matrix[i][j]];
+            out[i][j] = rmap[in->matrix[i][j]];
         }
     }
 
     sfree(rmap);
 
     fprintf(stderr, "Converted a %dx%d matrix with %d levels to reals\n",
-            matrix->nx, matrix->ny, nmap);
+            in->nx, in->ny, nmap);
 
-    return mat;
+    return out;
 }
 
 void write_xpm_header(FILE *out,
@@ -894,7 +894,7 @@ void write_xpm_axis(FILE *out, const char *axis, gmx_bool bSpatial, int n,
     }
 }
 
-void write_xpm_data(FILE *out, int n_x, int n_y, real **matrix,
+void write_xpm_data(FILE *out, int n_x, int n_y, real **mat,
                     real lo, real hi, int nlevels)
 {
     int  i, j, c;
@@ -910,7 +910,7 @@ void write_xpm_data(FILE *out, int n_x, int n_y, real **matrix,
         fprintf(out, "\"");
         for (i = 0; (i < n_x); i++)
         {
-            c = gmx_nint((matrix[i][j]-lo)*invlevel);
+            c = gmx_nint((mat[i][j]-lo)*invlevel);
             if (c < 0)
             {
                 c = 0;
@@ -939,7 +939,7 @@ void write_xpm_data(FILE *out, int n_x, int n_y, real **matrix,
     }
 }
 
-void write_xpm_data3(FILE *out, int n_x, int n_y, real **matrix,
+void write_xpm_data3(FILE *out, int n_x, int n_y, real **mat,
                      real lo, real mid, real hi, int nlevels)
 {
     int  i, j, c = 0, nmid;
@@ -958,13 +958,13 @@ void write_xpm_data3(FILE *out, int n_x, int n_y, real **matrix,
         fprintf(out, "\"");
         for (i = 0; (i < n_x); i++)
         {
-            if (matrix[i][j] >= mid)
+            if (mat[i][j] >= mid)
             {
-                c = nmid+gmx_nint((matrix[i][j]-mid)*invlev_hi);
+                c = nmid+gmx_nint((mat[i][j]-mid)*invlev_hi);
             }
-            else if (matrix[i][j] >= lo)
+            else if (mat[i][j] >= lo)
             {
-                c = gmx_nint((matrix[i][j]-lo)*invlev_lo);
+                c = gmx_nint((mat[i][j]-lo)*invlev_lo);
             }
             else
             {
@@ -999,7 +999,7 @@ void write_xpm_data3(FILE *out, int n_x, int n_y, real **matrix,
     }
 }
 
-void write_xpm_data_split(FILE *out, int n_x, int n_y, real **matrix,
+void write_xpm_data_split(FILE *out, int n_x, int n_y, real **mat,
                           real lo_top, real hi_top, int nlevel_top,
                           real lo_bot, real hi_bot, int nlevel_bot)
 {
@@ -1020,18 +1020,18 @@ void write_xpm_data_split(FILE *out, int n_x, int n_y, real **matrix,
         {
             if (i < j)
             {
-                c = nlevel_bot+round((matrix[i][j]-lo_top)*invlev_top);
+                c = nlevel_bot+round((mat[i][j]-lo_top)*invlev_top);
                 if ((c < nlevel_bot) || (c >= nlevel_bot+nlevel_top))
                 {
-                    gmx_fatal(FARGS, "Range checking i = %d, j = %d, c = %d, bot = %d, top = %d matrix[i,j] = %f", i, j, c, nlevel_bot, nlevel_top, matrix[i][j]);
+                    gmx_fatal(FARGS, "Range checking i = %d, j = %d, c = %d, bot = %d, top = %d matrix[i,j] = %f", i, j, c, nlevel_bot, nlevel_top, mat[i][j]);
                 }
             }
             else if (i > j)
             {
-                c = round((matrix[i][j]-lo_bot)*invlev_bot);
+                c = round((mat[i][j]-lo_bot)*invlev_bot);
                 if ((c < 0) || (c >= nlevel_bot+nlevel_bot))
                 {
-                    gmx_fatal(FARGS, "Range checking i = %d, j = %d, c = %d, bot = %d, top = %d matrix[i,j] = %f", i, j, c, nlevel_bot, nlevel_top, matrix[i][j]);
+                    gmx_fatal(FARGS, "Range checking i = %d, j = %d, c = %d, bot = %d, top = %d matrix[i,j] = %f", i, j, c, nlevel_bot, nlevel_top, mat[i][j]);
                 }
             }
             else
@@ -1113,7 +1113,7 @@ void write_xpm3(FILE *out, unsigned int flags,
                 const char *title, const char *legend,
                 const char *label_x, const char *label_y,
                 int n_x, int n_y, real axis_x[], real axis_y[],
-                real *matrix[], real lo, real mid, real hi,
+                real *mat[], real lo, real mid, real hi,
                 t_rgb rlo, t_rgb rmid, t_rgb rhi, int *nlevels)
 {
     /* See write_xpm.
@@ -1129,14 +1129,14 @@ void write_xpm3(FILE *out, unsigned int flags,
     write_xpm_map3(out, n_x, n_y, nlevels, lo, mid, hi, rlo, rmid, rhi);
     write_xpm_axis(out, "x", flags & MAT_SPATIAL_X, n_x, axis_x);
     write_xpm_axis(out, "y", flags & MAT_SPATIAL_Y, n_y, axis_y);
-    write_xpm_data3(out, n_x, n_y, matrix, lo, mid, hi, *nlevels);
+    write_xpm_data3(out, n_x, n_y, mat, lo, mid, hi, *nlevels);
 }
 
 void write_xpm_split(FILE *out, unsigned int flags,
                      const char *title, const char *legend,
                      const char *label_x, const char *label_y,
                      int n_x, int n_y, real axis_x[], real axis_y[],
-                     real *matrix[],
+                     real *mat[],
                      real lo_top, real hi_top, int *nlevel_top,
                      t_rgb rlo_top, t_rgb rhi_top,
                      real lo_bot, real hi_bot, int *nlevel_bot,
@@ -1165,7 +1165,7 @@ void write_xpm_split(FILE *out, unsigned int flags,
                         bDiscreteColor, nlevel_bot, lo_bot, hi_bot, rlo_bot, rhi_bot);
     write_xpm_axis(out, "x", flags & MAT_SPATIAL_X, n_x, axis_x);
     write_xpm_axis(out, "y", flags & MAT_SPATIAL_Y, n_y, axis_y);
-    write_xpm_data_split(out, n_x, n_y, matrix, lo_top, hi_top, *nlevel_top,
+    write_xpm_data_split(out, n_x, n_y, mat, lo_top, hi_top, *nlevel_top,
                          lo_bot, hi_bot, *nlevel_bot);
 }
 
@@ -1173,7 +1173,7 @@ void write_xpm(FILE *out, unsigned int flags,
                const char *title, const char *legend,
                const char *label_x, const char *label_y,
                int n_x, int n_y, real axis_x[], real axis_y[],
-               real *matrix[], real lo, real hi,
+               real *mat[], real lo, real hi,
                t_rgb rlo, t_rgb rhi, int *nlevels)
 {
     /* out        xpm file
@@ -1201,5 +1201,5 @@ void write_xpm(FILE *out, unsigned int flags,
     write_xpm_map(out, n_x, n_y, nlevels, lo, hi, rlo, rhi);
     write_xpm_axis(out, "x", flags & MAT_SPATIAL_X, n_x, axis_x);
     write_xpm_axis(out, "y", flags & MAT_SPATIAL_Y, n_y, axis_y);
-    write_xpm_data(out, n_x, n_y, matrix, lo, hi, *nlevels);
+    write_xpm_data(out, n_x, n_y, mat, lo, hi, *nlevels);
 }
index b2547c229d3d05a2014a7349869ecc2898bc5743..da96073b9e55b9e67c6eecbad06465d420d36e41 100644 (file)
@@ -2,8 +2,8 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,7 +38,9 @@
 #ifndef GMX_FILEIO_MATIO_H
 #define GMX_FILEIO_MATIO_H
 
-#include "../legacyheaders/typedefs.h"
+#include <stdio.h>
+
+#include "../legacyheaders/types/matrix.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -63,10 +65,10 @@ void printcmap(FILE *out, int n, t_mapping map[]);
 void writecmap(const char *fn, int n, t_mapping map[]);
 /* print mapping table to fn */
 
-int read_xpm_matrix(const char *fnm, t_matrix **matrix);
+int read_xpm_matrix(const char *fnm, t_matrix **mat);
 /* Reads a number of matrices from .xpm file fnm and returns this number */
 
-real **matrix2real(t_matrix *matrix, real **mat);
+real **matrix2real(t_matrix *in, real **out);
 /* Converts an matrix in a t_matrix struct to a matrix of reals
  * When mat==NULL memory will be allocated
  * Returns NULL when something went wrong
@@ -79,7 +81,7 @@ void write_xpm3(FILE *out, unsigned int flags,
                 const char *title, const char *legend,
                 const char *label_x, const char *label_y,
                 int n_x, int n_y, real axis_x[], real axis_y[],
-                real *matrix[], real lo, real mid, real hi,
+                real *mat[], real lo, real mid, real hi,
                 t_rgb rlo, t_rgb rmid, t_rgb rhi, int *nlevels);
 /* See write_xpm.
  * Writes a colormap varying as rlo -> rmid -> rhi.
@@ -88,7 +90,7 @@ void write_xpm_split(FILE *out, unsigned int flags,
                      const char *title, const char *legend,
                      const char *label_x, const char *label_y,
                      int n_x, int n_y, real axis_x[], real axis_y[],
-                     real *matrix[],
+                     real *mat[],
                      real lo_top, real hi_top, int *nlevel_top,
                      t_rgb rlo_top, t_rgb rhi_top,
                      real lo_bot, real hi_bot, int *nlevel_bot,
@@ -104,7 +106,7 @@ void write_xpm(FILE *out, unsigned int flags,
                const char *title, const char *legend,
                const char *label_x, const char *label_y,
                int n_x, int n_y, real t_x[], real t_y[],
-               real *matrix[], real lo, real hi,
+               real *mat[], real lo, real hi,
                t_rgb rlo, t_rgb rhi, int *nlevels);
 /* out        xpm file
  * flags      flags, defined types/matrix.h
@@ -120,7 +122,7 @@ void write_xpm(FILE *out, unsigned int flags,
  * n_x, n_y   size of the matrix
  * axis_x[]   the x-ticklabels (n_x or n_x+1)
  * axis_y[]   the y-ticklables (n_y or n_y+1)
- * *matrix[]  element x,y is matrix[x][y]
+ * *mat[]     element x,y is mat[x][y]
  * lo         output lower than lo is set to lo
  * hi         output higher than hi is set to hi
  * rlo        rgb value for level lo
index 7b152c6b354dacff7268a167469d142d86eb10f9..0808808f72d9f5767d4297cb6585a096219865d5 100644 (file)
@@ -40,9 +40,9 @@
 
 #include <stdio.h>
 
-#include "../legacyheaders/typedefs.h"
-#include "../legacyheaders/symtab.h"
 #include "../legacyheaders/atomprop.h"
+#include "../legacyheaders/symtab.h"
+#include "../legacyheaders/types/topology.h"
 
 #ifdef __cplusplus
 extern "C" {
index 0e64f3b0706231e29e9f3c0c2982490cc0fecb07..50f6a7b7a7a9d1586c4f6777e2a69cebd4052f76 100644 (file)
@@ -2,8 +2,8 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -47,7 +47,9 @@
  * can also be used with the routines in gmxfio.h
  *
  **************************************************************/
-#include "../legacyheaders/typedefs.h"
+#include "../legacyheaders/types/inputrec.h"
+#include "../legacyheaders/types/state.h"
+#include "../legacyheaders/types/topology.h"
 #include "gmxfio.h"
 
 #ifdef __cplusplus
index 5a55f8833170988bb59cbbfb6f86af4c35916876..5e8c3602ca374f5b51d4413267b02b799bc9e54a 100644 (file)
@@ -45,6 +45,7 @@
 #include "trajectory_writing.h"
 #include "mdoutf.h"
 
+#include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/timing/wallcycle.h"
 
 void
index 65e8e067ea158162379079872ea76d24852bd7bc..07cb6f4afeea2f1c6db113b61233b51d88b9a79c 100644 (file)
 #define GMX_FILEIO_TRAJECTORY_WRITING_H
 
 #include <stdio.h>
+
+#include "../legacyheaders/types/commrec_fwd.h"
+#include "../legacyheaders/mdebin.h"
+#include "../timing/wallcycle.h"
+
 #include "filenm.h"
 #include "mdoutf.h"
-#include "../legacyheaders/typedefs.h"
-#include "../legacyheaders/mdebin.h"
 
 /*! \brief Wrapper routine for writing trajectories during mdrun
  *
index c5ae63e453790a716eb2d9ce007367ad3e1466d4..8fd25d14d09a42d1b8361cb9d178552345d9a67b 100644 (file)
@@ -2,8 +2,8 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -53,7 +53,6 @@
  *
  **************************************************************/
 
-#include "../legacyheaders/typedefs.h"
 #include "gmxfio.h"
 
 #ifdef __cplusplus
index d3b64a91c87fe2af217e8e3d15c95f0c37b6e146..175e64fbccf324bd6f791c8c984c45f504c842cc 100644 (file)
 #ifndef GMX_FILEIO_TRXIO_H
 #define GMX_FILEIO_TRXIO_H
 
-#include "../legacyheaders/typedefs.h"
-#include "filenm.h"
+#include "../legacyheaders/types/topology.h"
 #include "../legacyheaders/readinp.h"
-#include "pdbio.h"
 #include "../legacyheaders/oenv.h"
+
+#include "filenm.h"
 #include "gmxfio.h"
+#include "pdbio.h"
 
 #ifdef __cplusplus
 extern "C" {
index 49081481faba437a3aa46fb7483e8211c691412c..0027b30ccab5a119416f68cf60e362447b9c53e1 100644 (file)
@@ -50,6 +50,7 @@
 
 #include "gromacs/legacyheaders/copyrite.h"
 #include "gromacs/legacyheaders/oenv.h"
+#include "gromacs/legacyheaders/typedefs.h"
 
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/math/vec.h"
index 9295f8c70ea4065e56b9327bc44ce79c5b0de262..736aea2559dd23724b6bca1b39311f6e9650fe80 100644 (file)
 #include <config.h>
 #endif
 
+#include "gromacs/legacyheaders/symtab.h"
+#include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/fatalerror.h"
-#include "symtab.h"
 
 void replace_atom(t_topology *top, int inr, char *anm, char *resnm,
                   real q, real m, int type)
index 8d3a388cf1226f23a754d422e5973912d7aa6577..367aaa1836ac59a99f18723c46ddbeeb8a65f445 100644 (file)
 #ifndef _nsfactor_h
 #define _nsfactor_h
 
-#include "index.h"
-#include "types/simple.h"
-#include "oenv.h"
+#include "gromacs/legacyheaders/index.h"
+#include "gromacs/legacyheaders/oenv.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/legacyheaders/types/topology.h"
 
 #ifdef __cplusplus
 extern "C" {
index aeba61ce9b4b5673fa04b551e84f5173e255b39e..0b359886e5026b86eb2c4e9f758545110fc35d48 100644 (file)
 #include <ctype.h>
 #include <string.h>
 
-#include "gromacs/utility/smalloc.h"
+#include "gromacs/fileio/strdb.h"
+#include "gromacs/legacyheaders/atomprop.h"
+#include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/index.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/math/utilities.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
-#include "atomprop.h"
-#include "macros.h"
-#include "index.h"
-#include "copyrite.h"
-
 #include "gromacs/utility/futil.h"
-#include "gromacs/fileio/strdb.h"
-#include "gromacs/math/utilities.h"
+#include "gromacs/utility/smalloc.h"
 
 typedef struct {
     gmx_bool    bSet;
index ca9e5248c80729e5d802876d1ac81b6214e6e30c..5007a540fc47285acb8640c3501b7b7b9ac445ea 100644 (file)
  */
 #include "read-conformation.h"
 
-#include "atomprop.h"
-#include "types/simple.h"
-#include "types/atoms.h"
-
 #include "gromacs/fileio/confio.h"
+#include "gromacs/legacyheaders/atomprop.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/legacyheaders/types/atoms.h"
+#include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/smalloc.h"
 
index ea6685c406c6469b395d8b3ea5e882a379e97eb5..67bb76281b61156195a1bca13bd7aa3c1110db5e 100644 (file)
@@ -62,6 +62,7 @@
 
 #include "typedefs.h"
 #include "../fileio/filenm.h"
+#include "../timing/wallcycle.h"
 
 #ifdef GMX_NATIVE_WINDOWS
 #include <Windows.h>
index efeef40614522c918880397a85b0a4b1697f591e..56635e20a402ba603865d6bf319a892cb4f24837 100644 (file)
@@ -40,6 +40,8 @@
 #include "vsite.h"
 #include "genborn.h"
 
+#include "../timing/wallcycle.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index e053a0de3355a2471ccc292de60d0168abed90c3..214fcc9a2265cdda0ea4c2f05db53621138dde5c 100644 (file)
@@ -47,6 +47,7 @@
 #include "vsite.h"
 #include "genborn.h"
 
+#include "../timing/wallcycle.h"
 
 #ifdef __cplusplus
 extern "C" {
index b47267593683d391cdfc5fb7e76504482a3fb478..8d449f1840abe38340de3ffb705b7a0fe0a3a838 100644 (file)
 #ifndef _index_h
 #define _index_h
 
-#include "typedefs.h"
+#include <stdio.h>
+
+#include "types/atoms.h"
+#include "types/block.h"
 
 #ifdef __cplusplus
 extern "C" {
index 3561cce533b951cceee04797318ba81cd986ecad..25b32fd9dc5dc392e2b1c8ccd630b382106dbf9e 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -43,6 +43,8 @@
 #include "sim_util.h"
 #include "vcm.h"
 
+#include "../timing/wallcycle.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index e8cb420bd9034fc29675312127115cc0ead20528..eee859aeab3e4f9ebda71e5ca2542d9577370da8 100644 (file)
@@ -44,7 +44,6 @@
 #include "network.h"
 #include "sim_util.h"
 #include "tgroup.h"
-#include "../fileio/filenm.h"
 #include "mshift.h"
 #include "mdebin.h"
 #include "vcm.h"
@@ -53,6 +52,9 @@
 #include "types/membedt.h"
 #include "types/globsig.h"
 
+#include "../fileio/filenm.h"
+#include "../timing/wallcycle.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index 5f985fe29bfba2e6aee5375cc4fa578b883f5bd6..88a8cd3aecaa5e91b49dacc481a0852cd15543f0 100644 (file)
@@ -41,6 +41,7 @@
 #include <stdio.h>
 #include "typedefs.h"
 #include "../math/gmxcomplex.h"
+#include "../timing/wallcycle.h"
 #include "../timing/walltime_accounting.h"
 #include "../legacyheaders/network.h"
 
index 22cd489e4b30756fb577b5330818248f29929a92..257b0eebbc796801904ce6b96fcfd0df46bd3c70 100644 (file)
@@ -35,6 +35,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
+#include "../timing/wallcycle.h"
+
 #include "typedefs.h"
 #include "vsite.h"
 
index 546038479ee7ceabeca77faf17104f156641d0b7..3eb05b8cf177a1bbaa393a11c8b3b2bcb471bd9d 100644 (file)
@@ -44,6 +44,7 @@
 #include "vcm.h"
 #include "../fileio/enxio.h"
 #include "../fileio/mdoutf.h"
+#include "../timing/wallcycle.h"
 #include "../timing/walltime_accounting.h"
 
 #ifdef __cplusplus
index d0561340c25f3828b56d7ff9d5e36cade0711be1..0c93cc3353562103a4a5d11be2ac40ccf726f47a 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -39,7 +39,7 @@
 #define _symtab_h
 
 #include <stdio.h>
-#include "typedefs.h"
+#include "types/symtab.h"
 
 #ifdef __cplusplus
 extern "C" {
index 92f883b1b6c52cce6e007f4464479b9b1ed2fd8f..c201ff6ac11f0bc6660b3153c01b11b48d93ecca 100644 (file)
@@ -71,6 +71,7 @@
 #include "types/constr.h"
 #include "types/matrix.h"
 #include "types/oenv.h"
+#include "types/commrec_fwd.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -200,13 +201,6 @@ t_atoms *mtop2atoms(gmx_mtop_t *mtop);
 real max_cutoff(real cutoff1, real cutoff2);
 /* Returns the maximum of the cut-off's, taking into account that 0=inf. */
 
-/* Following are forward declarations for structures in commrec.h */
-typedef struct t_commrec t_commrec;
-typedef struct gmx_domdec_t gmx_domdec_t;
-typedef struct gmx_multisim_t gmx_multisim_t;
-typedef struct gmx_domdec_zones_t gmx_domdec_zones_t;
-typedef struct gmx_ddbox_t gmx_ddbox_t;
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/gromacs/legacyheaders/types/commrec_fwd.h b/src/gromacs/legacyheaders/types/commrec_fwd.h
new file mode 100644 (file)
index 0000000..2a0d88b
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+
+#ifndef GMX_TYPES_COMMREC_FWD_H
+#define GMX_TYPES_COMMREC_FWD_H
+
+typedef struct t_commrec t_commrec;
+typedef struct gmx_domdec_t gmx_domdec_t;
+typedef struct gmx_multisim_t gmx_multisim_t;
+typedef struct gmx_domdec_zones_t gmx_domdec_zones_t;
+typedef struct gmx_ddbox_t gmx_ddbox_t;
+
+#endif
index 8fce52bb48b8e07ce9988bee1bb2d429ec465842..f12d8e6eae6f1fb237ca8a5215e2825b6a16431c 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -35,6 +35,9 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
+#ifndef GMX_TYPES_ENERGY_H
+#define GMX_TYPES_ENERGY_H
+
 #include "simple.h"
 
 #ifdef __cplusplus
@@ -50,3 +53,5 @@ typedef struct {
 #ifdef __cplusplus
 }
 #endif
+
+#endif
index 9a9aec7a8acdab67578245ca77cc884017a003a2..9e2e82bec7c88470c5bef9f0cb7be09815231251 100644 (file)
@@ -41,7 +41,8 @@
 extern "C" {
 #endif
 
-#include "simple.h"
+#include "../../utility/basedefinitions.h"
+#include "../../utility/real.h"
 
 typedef struct {
     real r, g, b;
index f0a8fb9e17f067dff6f7d9a868f90f64547b25bd..af83fa4214cb7fca25109fdb140b91c8c1242d5a 100644 (file)
@@ -133,8 +133,6 @@ typedef struct
 t_nrnb;
 
 
-typedef struct gmx_wallcycle *gmx_wallcycle_t;
-
 #ifdef __cplusplus
 }
 #endif
index 6a4679f4f736c22d78d9dcfe09b949fd90159759..69237e26a138ff0876b365915a37592cb1cdd5b6 100644 (file)
@@ -43,6 +43,8 @@
 #include "tgroup.h"
 #include "network.h"
 
+#include "../timing/wallcycle.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index e01c27ee2c99ee1c4167f09929f676c265c489fe..e3e6d4ab72b401181045b3c7d59ad889a8ad9cfa 100644 (file)
@@ -63,6 +63,7 @@
 #include "qmmm.h"
 #include "gmx_omp_nthreads.h"
 
+#include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/fatalerror.h"
index 720a8a8acebb173a0e949a024d493ce8e5549c2b..c8ce7a953287bbbec112a81b615e9f2ab0a32693 100644 (file)
@@ -48,6 +48,7 @@
 #include "md_logging.h"
 #include "md_support.h"
 
+#include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/cstringutil.h"
index af9116e52dbfa8abe896fad6bec539f5b9fd0750..1cdf3d2c533b3c2b138798c267a25454a78b0707 100644 (file)
@@ -72,6 +72,7 @@
 
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/trajectory_writing.h"
+#include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/linearalgebra/mtxio.h"
 #include "gromacs/linearalgebra/sparsematrix.h"
 #include "gromacs/timing/wallcycle.h"
index 2c22d4b76254ed46632ae9be0e982962fe190ef9..d56b2a41e5254587f2d7025735666e1c73b74b50 100644 (file)
@@ -79,6 +79,7 @@
 #include "nrnb.h"
 #include "macros.h"
 
+#include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/fft/parallel_3dfft.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/fileio/pdbio.h"
index a9bcc6878cc470b058e981a757ed8269c4a334f3..5897b0d3cf8b9a73fb54f9cbd61261c7b9c639a3 100644 (file)
@@ -82,6 +82,7 @@
 #include "../gmxlib/nonbonded/nb_kernel.h"
 #include "../gmxlib/nonbonded/nb_free_energy.h"
 
+#include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/timing/walltime_accounting.h"
 #include "gromacs/utility/gmxmpi.h"
index 0bd1e9fddbc395e780be2d378284ea49d92751b4..976dc02d4857be71fc743aa53fa0d156f0391a51 100644 (file)
@@ -71,6 +71,7 @@
 #include "pme.h"
 #include "gromacs/gmxlib/conformation-utilities.h"
 
+#include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/trxio.h"
index e73a1115a948308c939c3146d69b033f571906cb..094cb6f298b50bf4e9453958e22dedd3e2c5d08a 100644 (file)
@@ -36,7 +36,9 @@ file(GLOB TIMING_SOURCES *.cpp *.c)
 set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${TIMING_SOURCES} PARENT_SCOPE)
 
 set(TIMING_PUBLIC_HEADERS
+    wallcycle.h
     walltime_accounting.h)
+
 gmx_install_headers(timing ${TIMING_PUBLIC_HEADERS})
 
 if (BUILD_TESTING)
index ca6e0a88fbc652872fe208d7964e87ef12b44355..58986118bea05ba70a3d92b611553e48ca6cbd16 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#include "md_logging.h"
-
-#include "gromacs/timing/cyclecounter.h"
+#include "gromacs/legacyheaders/md_logging.h"
+#include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxmpi.h"
 #include "gromacs/utility/smalloc.h"
 
+#include "cyclecounter.h"
+
 /* DEBUG_WCYCLE adds consistency checking for the counters.
  * It checks if you stop a counter different from the last
  * one that was opened and if you do nest too deep.
index 45930f441267016930b9c3f66918824de94bf6ab..8cb131f8398a5326ff285c22ddca4c4d0eaf5b81 100644 (file)
 #define GMX_TIMING_WALLCYCLE_H
 
 #include <stdio.h>
-#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/types/commrec.h"
+
+#include "../legacyheaders/types/commrec_fwd.h"
+#include "../legacyheaders/types/nbnxn_cuda_types_ext.h"
+#include "../utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+typedef struct gmx_wallcycle *gmx_wallcycle_t;
+
 enum {
     ewcRUN, ewcSTEP, ewcPPDURINGPME, ewcDOMDEC, ewcDDCOMMLOAD,
     ewcDDCOMMBOUND, ewcVSITECONSTR, ewcPP_PMESENDX, ewcNS, ewcLAUNCH_GPU_NB,