Remove gmx_inline
authorMark Abraham <mark.j.abraham@gmail.com>
Wed, 24 Jan 2018 07:49:27 +0000 (08:49 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 24 Jan 2018 14:03:57 +0000 (15:03 +0100)
C++ supports the inline keyword, and we should prefer to
use standard things where possible.

Removed the include of the relevant header in the two places where
that was now possible.

Change-Id: Ia709e3b55d83d01459706580fc337aaa275a6330

30 files changed:
src/gromacs/domdec/domdec_topology.cpp
src/gromacs/essentialdynamics/edsam.cpp
src/gromacs/ewald/pme-gpu-internal.h
src/gromacs/ewald/pme-solve.cpp
src/gromacs/ewald/pme-timings.cu
src/gromacs/gmxana/gmx_cluster.cpp
src/gromacs/gmxana/gmx_hbond.cpp
src/gromacs/gmxana/gmx_sham.cpp
src/gromacs/gmxlib/nonbonded/nb_kernel.h
src/gromacs/imd/imd.cpp
src/gromacs/linearalgebra/nrjac.cpp
src/gromacs/listed-forces/bonded.cpp
src/gromacs/mdlib/nbnxn_atomdata.cpp
src/gromacs/mdlib/nbnxn_internal.h
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_common.h
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_common.h
src/gromacs/mdlib/nbnxn_search.cpp
src/gromacs/mdlib/nbnxn_search_simd_2xnn.h
src/gromacs/mdlib/nbnxn_search_simd_4xn.h
src/gromacs/mdlib/nbnxn_util.h
src/gromacs/mdlib/ns.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/vsite.cpp
src/gromacs/pbcutil/pbc-simd.h
src/gromacs/pulling/pull_rotation.cpp
src/gromacs/simd/impl_arm_neon_asimd/impl_arm_neon_asimd_util_double.h
src/gromacs/timing/cyclecounter.h
src/gromacs/utility/basedefinitions.h
src/gromacs/utility/bitmask.h
src/gromacs/utility/gmxomp.h

index 92ac66d1ac0b1a84f1e713eb7a6e61279ea571d6..262e68951e869f3103e8b040ce642fefdd338743 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018, 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.
@@ -874,7 +874,7 @@ void dd_make_reverse_top(FILE *fplog,
  * confuses static analysis tools unless we fuse the vsite
  * atom-indexing organization code with the ifunc-adding code, so that
  * they can see that nral is the same value. */
-static gmx_inline void
+static inline void
 add_ifunc_for_vsites(t_iatom *tiatoms, gmx_ga2la_t *ga2la,
                      int nral, gmx_bool bHomeA,
                      int a, int a_gl, int a_mol,
@@ -923,7 +923,7 @@ add_ifunc_for_vsites(t_iatom *tiatoms, gmx_ga2la_t *ga2la,
 }
 
 /*! \brief Store a bonded interaction at the end of \p il */
-static gmx_inline void add_ifunc(int nral, t_iatom *tiatoms, t_ilist *il)
+static inline void add_ifunc(int nral, t_iatom *tiatoms, t_ilist *il)
 {
     t_iatom *liatoms;
     int      k;
@@ -1302,7 +1302,7 @@ static void combine_idef(t_idef *dest, const thread_work_t *src, int nsrc,
 
 /*! \brief Check and when available assign bonded interactions for local atom i
  */
-static gmx_inline void
+static inline void
 check_assign_interactions_atom(int i, int i_gl,
                                int mol, int i_mol,
                                const int *index, const int *rtil,
index f1014be513113bdc180d77f5b30f1997c27f8a62..891491b19eb80e9f0d49b12f0271f3e0d13d46bd 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,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, 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.
@@ -1950,7 +1950,7 @@ void dd_make_local_ed_indices(gmx_domdec_t *dd, struct gmx_edsam *ed)
 }
 
 
-static gmx_inline void ed_unshift_single_coord(matrix box, const rvec x, const ivec is, rvec xu)
+static inline void ed_unshift_single_coord(matrix box, const rvec x, const ivec is, rvec xu)
 {
     int tx, ty, tz;
 
index 454a44cfda249c6e82d5be656a71173d3202ee07..baef28566275594ff82001755d77f27ab25fd8fe 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018, 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.
@@ -496,7 +496,7 @@ CUDA_FUNC_QUALIFIER void pme_gpu_gather(PmeGpu                *CUDA_FUNC_ARGUMEN
  * \param[in] pmeGpu         The PME GPU structure.
  * \returns                  True if PME runs on multiple GPUs, false otherwise.
  */
-gmx_inline bool pme_gpu_uses_dd(const PmeGpu *pmeGpu)
+inline bool pme_gpu_uses_dd(const PmeGpu *pmeGpu)
 {
     return !pmeGpu->settings.useDecomposition;
 }
@@ -507,7 +507,7 @@ gmx_inline bool pme_gpu_uses_dd(const PmeGpu *pmeGpu)
  * \param[in] pmeGpu         The PME GPU structure.
  * \returns                  True if the gathering is performed on GPU, false otherwise.
  */
-gmx_inline bool pme_gpu_performs_gather(const PmeGpu *pmeGpu)
+inline bool pme_gpu_performs_gather(const PmeGpu *pmeGpu)
 {
     return pmeGpu->settings.performGPUGather;
 }
@@ -518,7 +518,7 @@ gmx_inline bool pme_gpu_performs_gather(const PmeGpu *pmeGpu)
  * \param[in] pmeGpu         The PME GPU structure.
  * \returns                  True if FFT is performed on GPU, false otherwise.
  */
-gmx_inline bool pme_gpu_performs_FFT(const PmeGpu *pmeGpu)
+inline bool pme_gpu_performs_FFT(const PmeGpu *pmeGpu)
 {
     return pmeGpu->settings.performGPUFFT;
 }
@@ -529,7 +529,7 @@ gmx_inline bool pme_gpu_performs_FFT(const PmeGpu *pmeGpu)
  * \param[in] pmeGpu         The PME GPU structure.
  * \returns                  True if (un-)wrapping is performed on GPU, false otherwise.
  */
-gmx_inline bool pme_gpu_performs_wrapping(const PmeGpu *pmeGpu)
+inline bool pme_gpu_performs_wrapping(const PmeGpu *pmeGpu)
 {
     return pmeGpu->settings.useDecomposition;
 }
@@ -540,7 +540,7 @@ gmx_inline bool pme_gpu_performs_wrapping(const PmeGpu *pmeGpu)
  * \param[in] pmeGpu         The PME GPU structure.
  * \returns                  True if solving is performed on GPU, false otherwise.
  */
-gmx_inline bool pme_gpu_performs_solve(const PmeGpu *pmeGpu)
+inline bool pme_gpu_performs_solve(const PmeGpu *pmeGpu)
 {
     return pmeGpu->settings.performGPUSolve;
 }
@@ -553,7 +553,7 @@ gmx_inline bool pme_gpu_performs_solve(const PmeGpu *pmeGpu)
  * \param[in] pmeGpu             The PME GPU structure.
  * \param[in] testing            Should the testing mode be enabled, or disabled.
  */
-gmx_inline void pme_gpu_set_testing(PmeGpu *pmeGpu, bool testing)
+inline void pme_gpu_set_testing(PmeGpu *pmeGpu, bool testing)
 {
     pmeGpu->settings.copyAllOutputs = testing;
     pmeGpu->settings.transferKind   = testing ? GpuApiCallBehavior::Sync : GpuApiCallBehavior::Async;
@@ -565,7 +565,7 @@ gmx_inline void pme_gpu_set_testing(PmeGpu *pmeGpu, bool testing)
  * \param[in] pmeGpu             The PME GPU structure.
  * \returns                      true if testing mode is enabled, false otherwise.
  */
-gmx_inline bool pme_gpu_is_testing(const PmeGpu *pmeGpu)
+inline bool pme_gpu_is_testing(const PmeGpu *pmeGpu)
 {
     return pmeGpu->settings.copyAllOutputs;
 }
index 28a020ae892ef44836e712ad0a0d95d8ddcf8966..f9cccf78d7a1d4e4e9713a7a50901b9e0d269ce5 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,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, 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.
@@ -220,7 +220,7 @@ void get_pme_ener_vir_lj(struct pme_solve_work_t *work, int nthread,
 
 #if defined PME_SIMD_SOLVE
 /* Calculate exponentials through SIMD */
-gmx_inline static void calc_exponentials_q(int, int, real f, ArrayRef<const SimdReal> d_aligned, ArrayRef<const SimdReal> r_aligned, ArrayRef<SimdReal> e_aligned)
+inline static void calc_exponentials_q(int, int, real f, ArrayRef<const SimdReal> d_aligned, ArrayRef<const SimdReal> r_aligned, ArrayRef<SimdReal> e_aligned)
 {
     {
         SimdReal              f_simd(f);
@@ -243,7 +243,7 @@ gmx_inline static void calc_exponentials_q(int, int, real f, ArrayRef<const Simd
     }
 }
 #else
-gmx_inline static void calc_exponentials_q(int start, int end, real f, ArrayRef<real> d, ArrayRef<real> r, ArrayRef<real> e)
+inline static void calc_exponentials_q(int start, int end, real f, ArrayRef<real> d, ArrayRef<real> r, ArrayRef<real> e)
 {
     GMX_ASSERT(d.size() == r.size(), "d and r must have same size");
     GMX_ASSERT(d.size() == e.size(), "d and e must have same size");
@@ -265,7 +265,7 @@ gmx_inline static void calc_exponentials_q(int start, int end, real f, ArrayRef<
 
 #if defined PME_SIMD_SOLVE
 /* Calculate exponentials through SIMD */
-gmx_inline static void calc_exponentials_lj(int, int, ArrayRef<SimdReal> r_aligned, ArrayRef<SimdReal> factor_aligned, ArrayRef<SimdReal> d_aligned)
+inline static void calc_exponentials_lj(int, int, ArrayRef<SimdReal> r_aligned, ArrayRef<SimdReal> factor_aligned, ArrayRef<SimdReal> d_aligned)
 {
     SimdReal              tmp_r, tmp_d, tmp_fac, d_inv, tmp_mk;
     const SimdReal        sqr_PI = sqrt(SimdReal(M_PI));
@@ -289,7 +289,7 @@ gmx_inline static void calc_exponentials_lj(int, int, ArrayRef<SimdReal> r_align
     }
 }
 #else
-gmx_inline static void calc_exponentials_lj(int start, int end, ArrayRef<real> r, ArrayRef<real> tmp2, ArrayRef<real> d)
+inline static void calc_exponentials_lj(int start, int end, ArrayRef<real> r, ArrayRef<real> tmp2, ArrayRef<real> d)
 {
     int  kx;
     real mk;
index f615530c99758b00a8c32bd58bf3cee1c6c2b1da..f806e803a7069c01f36f7d9527966219de21903d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018, 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,7 @@
  * \param[in] pme            The PME data structure.
  * \returns                  True if timings are enabled, false otherwise.
  */
-gmx_inline bool pme_gpu_timings_enabled(const PmeGpu *pmeGpu)
+inline bool pme_gpu_timings_enabled(const PmeGpu *pmeGpu)
 {
     return pmeGpu->archSpecific->useTiming;
 }
index 9e4838c5bd848c7d595dcd3891f37f192e3b0701..238a5639f23d0a539d60facabe491c77042ff95f 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,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, 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.
@@ -68,7 +68,7 @@
 #include "gromacs/utility/stringutil.h"
 
 /* print to two file pointers at once (i.e. stderr and log) */
-static gmx_inline
+static inline
 void lo_ffprintf(FILE *fp1, FILE *fp2, const char *buf)
 {
     fprintf(fp1, "%s", buf);
@@ -76,14 +76,14 @@ void lo_ffprintf(FILE *fp1, FILE *fp2, const char *buf)
 }
 
 /* just print a prepared buffer to fp1 and fp2 */
-static gmx_inline
+static inline
 void ffprintf(FILE *fp1, FILE *fp2, const char *buf)
 {
     lo_ffprintf(fp1, fp2, buf);
 }
 
 /* prepare buffer with one argument, then print to fp1 and fp2 */
-static gmx_inline
+static inline
 void ffprintf_d(FILE *fp1, FILE *fp2, char *buf, const char *fmt, int arg)
 {
     sprintf(buf, fmt, arg);
@@ -91,7 +91,7 @@ void ffprintf_d(FILE *fp1, FILE *fp2, char *buf, const char *fmt, int arg)
 }
 
 /* prepare buffer with one argument, then print to fp1 and fp2 */
-static gmx_inline
+static inline
 void ffprintf_g(FILE *fp1, FILE *fp2, char *buf, const char *fmt, real arg)
 {
     sprintf(buf, fmt, arg);
@@ -99,7 +99,7 @@ void ffprintf_g(FILE *fp1, FILE *fp2, char *buf, const char *fmt, real arg)
 }
 
 /* prepare buffer with one argument, then print to fp1 and fp2 */
-static gmx_inline
+static inline
 void ffprintf_s(FILE *fp1, FILE *fp2, char *buf, const char *fmt, const char *arg)
 {
     sprintf(buf, fmt, arg);
@@ -107,7 +107,7 @@ void ffprintf_s(FILE *fp1, FILE *fp2, char *buf, const char *fmt, const char *ar
 }
 
 /* prepare buffer with two arguments, then print to fp1 and fp2 */
-static gmx_inline
+static inline
 void ffprintf_dd(FILE *fp1, FILE *fp2, char *buf, const char *fmt, int arg1, int arg2)
 {
     sprintf(buf, fmt, arg1, arg2);
@@ -115,7 +115,7 @@ void ffprintf_dd(FILE *fp1, FILE *fp2, char *buf, const char *fmt, int arg1, int
 }
 
 /* prepare buffer with two arguments, then print to fp1 and fp2 */
-static gmx_inline
+static inline
 void ffprintf_gg(FILE *fp1, FILE *fp2, char *buf, const char *fmt, real arg1, real arg2)
 {
     sprintf(buf, fmt, arg1, arg2);
@@ -123,7 +123,7 @@ void ffprintf_gg(FILE *fp1, FILE *fp2, char *buf, const char *fmt, real arg1, re
 }
 
 /* prepare buffer with two arguments, then print to fp1 and fp2 */
-static gmx_inline
+static inline
 void ffprintf_ss(FILE *fp1, FILE *fp2, char *buf, const char *fmt, const char *arg1, const char *arg2)
 {
     sprintf(buf, fmt, arg1, arg2);
index b04b78898e4e9806ac19cad67be21694575433bf..94e417b2b26f2d553f31e35e96f6f3226bade5cd 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, 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.
@@ -1108,15 +1108,15 @@ static void count_da_grid(ivec ngrid, t_gridcell ***grid, t_icell danr)
  * This could be implemented slightly more efficient, but the code
  * would get much more complicated.
  */
-static gmx_inline gmx_bool grid_loop_begin(int n, int x, gmx_bool bTric, gmx_bool bEdge)
+static inline gmx_bool grid_loop_begin(int n, int x, gmx_bool bTric, gmx_bool bEdge)
 {
     return ((n == 1) ? x : bTric && bEdge ? 0     : (x-1));
 }
-static gmx_inline gmx_bool grid_loop_end(int n, int x, gmx_bool bTric, gmx_bool bEdge)
+static inline gmx_bool grid_loop_end(int n, int x, gmx_bool bTric, gmx_bool bEdge)
 {
     return ((n == 1) ? x : bTric && bEdge ? (n-1) : (x+1));
 }
-static gmx_inline int grid_mod(int j, int n)
+static inline int grid_mod(int j, int n)
 {
     return (j+n) % (n);
 }
index 14f8d1fb6943e5e05ff82d794c38b4cdcc5347bd..6fce2045cd9321ac162a17725e200cbf52d33d36 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,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, 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.
@@ -227,7 +227,7 @@ static int comp_minima(const void *a, const void *b)
     }
 }
 
-static gmx_inline
+static inline
 void print_minimum(FILE *fp, int num, const t_minimum *min)
 {
     fprintf(fp,
@@ -235,7 +235,7 @@ void print_minimum(FILE *fp, int num, const t_minimum *min)
             num, min->index, min->ener);
 }
 
-static gmx_inline
+static inline
 void add_minimum(FILE *fp, int num, const t_minimum *min, t_minimum *mm)
 {
     print_minimum(fp, num, min);
@@ -243,7 +243,7 @@ void add_minimum(FILE *fp, int num, const t_minimum *min, t_minimum *mm)
     mm[num].ener  = min->ener;
 }
 
-static gmx_inline
+static inline
 gmx_bool is_local_minimum_from_below(const t_minimum *this_min,
                                      int              dimension_index,
                                      int              dimension_min,
@@ -256,7 +256,7 @@ gmx_bool is_local_minimum_from_below(const t_minimum *this_min,
     /* Note over/underflow within W cannot occur. */
 }
 
-static gmx_inline
+static inline
 gmx_bool is_local_minimum_from_above(const t_minimum *this_min,
                                      int              dimension_index,
                                      int              dimension_max,
index ba297da51eee0ce29f6769c0ad97a70964ad2920..e85b6a251912c1db7a736d6e8eeba3a6e2fe99f4 100644 (file)
@@ -52,6 +52,22 @@ extern "C" {
 } /* fixes auto-indentation problems */
 #endif
 
+/*! \def gmx_inline
+ * \brief
+ * Keyword to use in C code instead of C99 `inline`.
+ *
+ * Some of the C compilers we support do not recognize the C99 keyword
+ * `inline`.  This macro should be used in C code and in shared C/C++ headers
+ * to indicate a function is inlined.
+ * C++ code should use plain `inline`, as that is already in C++98.
+ */
+#if !defined __cplusplus && defined _MSC_VER
+#define gmx_inline __inline
+#else
+/* C++ or C99 */
+#define gmx_inline inline
+#endif
+
 /* Structure to collect kernel data not available in forcerec or mdatoms structures.
  * This is only used inside the nonbonded module.
  */
index 1d2d157bedc9b753c845f9a80353249ee75297ca..0f7ffb7a31564f50707d542e5686f30aaacccada 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, 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.
@@ -756,7 +756,7 @@ static void keep_old_values(t_gmx_IMD_setup *IMDsetup)
 
 
 /*! \brief Returns TRUE if any component of the two rvecs differs. */
-static gmx_inline gmx_bool rvecs_differ(const rvec v1, const rvec v2)
+static inline gmx_bool rvecs_differ(const rvec v1, const rvec v2)
 {
     int i;
 
index 85e4151eb378c10fc8bf52ba0267eb4f00fda48c..ade866903ed909c8093275b49e818841743dfdcd 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) 2012,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2017,2018, 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.
@@ -44,7 +44,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
-static gmx_inline
+static inline
 void do_rotate(double **a, int i, int j, int k, int l, double tau, double s)
 {
     double g, h;
index ac12d4c8af7eafee846c3106f2f09a254852f40d..c949572a2afc2f2fcedc2b70eee4cf166556f4c7 100644 (file)
@@ -1552,7 +1552,7 @@ real dih_angle(const rvec xi, const rvec xj, const rvec xk, const rvec xl,
  * also calculates the pre-factor required for the dihedral force update.
  * Note that bv and buf should be register aligned.
  */
-static gmx_inline void
+static inline void
 dih_angle_simd(const rvec *x,
                const int *ai, const int *aj, const int *ak, const int *al,
                const real *pbc_simd,
@@ -1774,7 +1774,7 @@ do_dih_fup_noshiftf(int i, int j, int k, int l, real ddphi,
 
 #if GMX_SIMD_HAVE_REAL
 /* As do_dih_fup_noshiftf above, but with SIMD and pre-calculated pre-factors */
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 do_dih_fup_noshiftf_simd(const int *ai, const int *aj, const int *ak, const int *al,
                          SimdReal p, SimdReal q,
                          SimdReal f_i_x,  SimdReal f_i_y,  SimdReal f_i_z,
index 42a5a244142315bb9837a82d77809f1f33d7da58..10c5e89331930ab14eee1b71c4502e6282984bfb 100644 (file)
@@ -1323,7 +1323,7 @@ nbnxn_atomdata_add_nbat_f_to_f_part(const nbnxn_search_t nbs,
     }
 }
 
-static gmx_inline unsigned char reverse_bits(unsigned char b)
+static inline unsigned char reverse_bits(unsigned char b)
 {
     /* http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64BitsDiv */
     return (b * 0x0202020202ULL & 0x010884422010ULL) % 1023;
index 553af256a72303adc3ffeff09efee97cf085084c..927c934343e8d7192a036a7f64f609d9e2563dd5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, 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.
@@ -66,7 +66,7 @@ static const int c_packX8 = 8;
 #define STRIDE_P8         (DIM*c_packX8)
 
 /* Returns the index in a coordinate array corresponding to atom a */
-template<int packSize> static gmx_inline int atom_to_x_index(int a)
+template<int packSize> static inline int atom_to_x_index(int a)
 {
     return DIM*(a & ~(packSize - 1)) + (a & (packSize - 1));
 }
index 8d75fdb2d702486c0f6fd7490e8277f4d94783d8..5baf7f1aedec70a1575823f137734a7674b752b8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2018, 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,7 +37,6 @@
 #include "gromacs/simd/simd.h"
 #include "gromacs/simd/simd_math.h"
 #include "gromacs/simd/vector_operations.h"
-#include "gromacs/utility/basedefinitions.h"
 #ifdef CALC_COUL_EWALD
 #include "gromacs/math/utilities.h"
 #endif
@@ -74,7 +73,7 @@ using namespace gmx;
 /* As add_ener_grp, but for two groups of UNROLLJ/2 stored in
  * a single SIMD register.
  */
-static gmx_inline void
+static inline void
 add_ener_grp_halves(SimdReal e_S, real *v0, real *v1, const int *offset_jj)
 {
     for (int jj = 0; jj < (UNROLLJ/2); jj++)
@@ -92,7 +91,7 @@ typedef SimdReal     SimdBitMask;
 #endif
 
 
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 gmx_load_simd_2xnn_interactions(int                  excl,
                                 SimdBitMask          filter_S0,
                                 SimdBitMask          filter_S2,
index 4b1f3646a20cfd618b1ef164de54b0ef32aef9be..4ed2ae9b493a69b89e7c43647e06c67fbfdc2574 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2017,2018, 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.
@@ -73,7 +73,7 @@ using namespace gmx;
 
 #ifdef UNROLLJ
 /* Add energy register to possibly multiple terms in the energy array */
-static gmx_inline void add_ener_grp(SimdReal e_S, real *v, const int *offset_jj)
+static inline void add_ener_grp(SimdReal e_S, real *v, const int *offset_jj)
 {
     int jj;
 
@@ -97,7 +97,7 @@ typedef SimdInt32    SimdBitMask;
 typedef SimdReal     SimdBitMask;
 #endif
 
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 gmx_load_simd_4xn_interactions(int                               excl,
                                SimdBitMask gmx_unused            filter_S0,
                                SimdBitMask gmx_unused            filter_S1,
index 7429963fea5530699940771a35834df097bafb64..6fd9b660b995350fcc2b62a859a920999e104227 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, 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.
@@ -552,7 +552,7 @@ static void subc_bb_dist2_simd4_xxxx(const float *bb_j,
 
 
 /* Returns if any atom pair from two clusters is within distance sqrt(rlist2) */
-static gmx_inline gmx_bool
+static inline gmx_bool
 clusterpair_in_range(const nbnxn_list_work_t *work,
                      int si,
                      int csj, int stride, const real *x_j,
@@ -1624,7 +1624,7 @@ setExclusionsForSimpleIentry(const nbnxn_search_t  nbs,
 }
 
 /* Add a new i-entry to the FEP list and copy the i-properties */
-static gmx_inline void fep_list_new_nri_copy(t_nblist *nlist)
+static inline void fep_list_new_nri_copy(t_nblist *nlist)
 {
     /* Add a new i-entry */
     nlist->nri++;
@@ -1836,19 +1836,19 @@ static void make_fep_list(const nbnxn_search_t    nbs,
 }
 
 /* Return the index of atom a within a cluster */
-static gmx_inline int cj_mod_cj4(int cj)
+static inline int cj_mod_cj4(int cj)
 {
     return cj & (c_nbnxnGpuJgroupSize - 1);
 }
 
 /* Convert a j-cluster to a cj4 group */
-static gmx_inline int cj_to_cj4(int cj)
+static inline int cj_to_cj4(int cj)
 {
     return cj/c_nbnxnGpuJgroupSize;
 }
 
 /* Return the index of an j-atom within a warp */
-static gmx_inline int a_mod_wj(int a)
+static inline int a_mod_wj(int a)
 {
     return a & (c_nbnxnGpuClusterSize/c_nbnxnGpuClusterpairSplit - 1);
 }
@@ -2428,9 +2428,9 @@ static void clear_pairlist_fep(t_nblist *nl)
 }
 
 /* Sets a simple list i-cell bounding box, including PBC shift */
-static gmx_inline void set_icell_bb_simple(const nbnxn_bb_t *bb, int ci,
-                                           real shx, real shy, real shz,
-                                           nbnxn_bb_t *bb_ci)
+static inline void set_icell_bb_simple(const nbnxn_bb_t *bb, int ci,
+                                       real shx, real shy, real shz,
+                                       nbnxn_bb_t *bb_ci)
 {
     bb_ci->lower[BB_X] = bb[ci].lower[BB_X] + shx;
     bb_ci->lower[BB_Y] = bb[ci].lower[BB_Y] + shy;
index 6d1430584f638d3fe3ff09cc84f38879a3d31672..3d2ec0fbe6274997996aff097e5574fffba48ca2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, 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.
@@ -42,7 +42,7 @@ using namespace gmx; // TODO: Remove when this file is moved into gmx namespace
 #endif
 
 /* Copies PBC shifted i-cell packed atom coordinates to working array */
-static gmx_inline void
+static inline void
 icell_set_x_simd_2xnn(int ci,
                       real shx, real shy, real shz,
                       int gmx_unused stride, const real *x,
@@ -77,7 +77,7 @@ icell_set_x_simd_2xnn(int ci,
  * \param[in]     rbb2                The squared cut-off for putting cluster-pairs in the list based on bounding box distance only
  * \param[in,out] numDistanceChecks   The number of distance checks performed
  */
-static gmx_inline void
+static inline void
 makeClusterListSimd2xnn(const nbnxn_grid_t *      gridj,
                         nbnxn_pairlist_t *        nbl,
                         int                       icluster,
index 5432c3ccfb27b264992ae40660af6093ad4df7a6..36598d33980cdf557c1ed0f21f90114a951602ff 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, 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.
@@ -42,7 +42,7 @@ using namespace gmx; // TODO: Remove when this file is moved into gmx namespace
 #endif
 
 /* Copies PBC shifted i-cell packed atom coordinates to working array */
-static gmx_inline void
+static inline void
 icell_set_x_simd_4xn(int ci,
                      real shx, real shy, real shz,
                      int gmx_unused stride, const real *x,
@@ -83,7 +83,7 @@ icell_set_x_simd_4xn(int ci,
  * \param[in]     rbb2                The squared cut-off for putting cluster-pairs in the list based on bounding box distance only
  * \param[in,out] numDistanceChecks   The number of distance checks performed
  */
-static gmx_inline void
+static inline void
 makeClusterListSimd4xn(const nbnxn_grid_t *      gridj,
                        nbnxn_pairlist_t *        nbl,
                        int                       icluster,
index dd4271c7b105d6317d393d71b56211ca1a24deb9..28bedf67d5aaf40cf13bfe21ecf5888b862be2a6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, 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.
@@ -52,7 +52,7 @@ extern "C" {
 /* Returns the base-2 log of n.
  * Generates a fatal error when n is not an integer power of 2.
  */
-static gmx_inline int get_2log(int n)
+static inline int get_2log(int n)
 {
     int log2;
 
@@ -70,7 +70,7 @@ static gmx_inline int get_2log(int n)
 }
 
 /* Returns the nbnxn i-cluster size in atoms for the nbnxn kernel type */
-static gmx_inline int nbnxn_kernel_to_cluster_i_size(int nb_kernel_type)
+static inline int nbnxn_kernel_to_cluster_i_size(int nb_kernel_type)
 {
     switch (nb_kernel_type)
     {
@@ -93,7 +93,7 @@ static gmx_inline int nbnxn_kernel_to_cluster_i_size(int nb_kernel_type)
 }
 
 /* Returns the nbnxn i-cluster size in atoms for the nbnxn kernel type */
-static gmx_inline int nbnxn_kernel_to_cluster_j_size(int nb_kernel_type)
+static inline int nbnxn_kernel_to_cluster_j_size(int nb_kernel_type)
 {
     int nbnxn_simd_width = 0;
     int cj_size          = 0;
index acefed5c6a3ad87dcf966c62310904806e6b88a6..bf661a252861d3e79eb0b5ff68e9f69bde616c50 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,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, 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.
@@ -342,7 +342,7 @@ static void reset_neighbor_lists(t_forcerec *fr)
 
 
 
-static gmx_inline void new_i_nblist(t_nblist *nlist, int i_atom, int shift, int gid)
+static inline void new_i_nblist(t_nblist *nlist, int i_atom, int shift, int gid)
 {
     int    nri = nlist->nri;
 
@@ -387,7 +387,7 @@ static gmx_inline void new_i_nblist(t_nblist *nlist, int i_atom, int shift, int
     }
 }
 
-static gmx_inline void close_i_nblist(t_nblist *nlist)
+static inline void close_i_nblist(t_nblist *nlist)
 {
     int nri = nlist->nri;
     int len;
@@ -417,7 +417,7 @@ static gmx_inline void close_i_nblist(t_nblist *nlist)
     }
 }
 
-static gmx_inline void close_nblist(t_nblist *nlist)
+static inline void close_nblist(t_nblist *nlist)
 {
     /* Only close this nblist when it has been initialized.
      * Avoid the creation of i-lists with no j-particles.
@@ -439,7 +439,7 @@ static gmx_inline void close_nblist(t_nblist *nlist)
     }
 }
 
-static gmx_inline void close_neighbor_lists(t_forcerec *fr, gmx_bool bMakeQMMMnblist)
+static inline void close_neighbor_lists(t_forcerec *fr, gmx_bool bMakeQMMMnblist)
 {
     int n, i;
 
@@ -458,7 +458,7 @@ static gmx_inline void close_neighbor_lists(t_forcerec *fr, gmx_bool bMakeQMMMnb
 }
 
 
-static gmx_inline void add_j_to_nblist(t_nblist *nlist, int j_atom)
+static inline void add_j_to_nblist(t_nblist *nlist, int j_atom)
 {
     int nrj = nlist->nrj;
 
@@ -479,9 +479,9 @@ static gmx_inline void add_j_to_nblist(t_nblist *nlist, int j_atom)
     nlist->nrj++;
 }
 
-static gmx_inline void add_j_to_nblist_cg(t_nblist *nlist,
-                                          int j_start, int j_end,
-                                          t_excl *bexcl, gmx_bool i_is_j)
+static inline void add_j_to_nblist_cg(t_nblist *nlist,
+                                      int j_start, int j_end,
+                                      t_excl *bexcl, gmx_bool i_is_j)
 {
     int nrj = nlist->nrj;
     int j;
@@ -1540,9 +1540,9 @@ static int ns_simple_core(t_forcerec *fr,
  *
  ************************************************/
 
-static gmx_inline void get_dx_dd(int Nx, real gridx, real rc2, int xgi, real x,
-                                 int ncpddc, int shift_min, int shift_max,
-                                 int *g0, int *g1, real *dcx2)
+static inline void get_dx_dd(int Nx, real gridx, real rc2, int xgi, real x,
+                             int ncpddc, int shift_min, int shift_max,
+                             int *g0, int *g1, real *dcx2)
 {
     real dcx, tmp;
     int  g_min, g_max, shift_home;
index b38c3a8a3e714847db0f78ad00bd847789909a23..5038cb6fc2a29b0e13cbbb68a994729c1ffda29e 100644 (file)
@@ -673,7 +673,7 @@ gmx_bool use_GPU(const nonbonded_verlet_t *nbv)
     return nbv != nullptr && nbv->bUseGPU;
 }
 
-static gmx_inline void clear_rvecs_omp(int n, rvec v[])
+static inline void clear_rvecs_omp(int n, rvec v[])
 {
     int nth = gmx_omp_nthreads_get_simple_rvec_task(emntDefault, n);
 
index 5f1021e87fc088dab3cdba9957cab5927ef82648..fa2a80dd1a0c3d65fab35ed3420dae87407c3281 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,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, 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.
@@ -2106,8 +2106,8 @@ gmx_vsite_t *initVsite(const gmx_mtop_t &mtop,
     return vsite;
 }
 
-static gmx_inline void flagAtom(InterdependentTask *idTask, int atom,
-                                int thread, int nthread, int natperthread)
+static inline void flagAtom(InterdependentTask *idTask, int atom,
+                            int thread, int nthread, int natperthread)
 {
     if (!idTask->use[atom])
     {
index 709901e113f8a0fcf6f38e5f9d3d3d864ef85247..ee7c438cc009be8ba1eee2598281c85440bf2f63 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018, 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.
@@ -83,7 +83,7 @@ void set_pbc_simd(const t_pbc *pbc,
  * without PBC. But on modern processors the overhead of this, often called,
  * routine should be low. On e.g. Intel Haswell/Broadwell it takes 8 cycles.
  */
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 pbc_correct_dx_simd(SimdReal         *dx,
                     SimdReal         *dy,
                     SimdReal         *dz,
@@ -116,7 +116,7 @@ pbc_correct_dx_simd(SimdReal         *dx,
  * when all atoms are in the unit-cell (aiuc).
  * This is the SIMD equivalent of the scalar version declared in pbc.h.
  */
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 pbc_dx_aiuc(const real       *pbc_simd,
             const SimdReal   *x1,
             const SimdReal   *x2,
index d7126ba0f41d34f20e83216760e0185ac12e2412..8f1a4a24d5bae5672d7809175b69cb693d4dcbef 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, 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.
@@ -319,13 +319,13 @@ static real get_fitangle(t_rotgrp *rotg, gmx_enfrotgrp_t erg)
 
 
 /* Reduce potential angle fit data for this group at this time step? */
-static gmx_inline gmx_bool bPotAngle(t_rot *rot, t_rotgrp *rotg, gmx_int64_t step)
+static inline gmx_bool bPotAngle(t_rot *rot, t_rotgrp *rotg, gmx_int64_t step)
 {
     return ( (erotgFitPOT == rotg->eFittype) && (do_per_step(step, rot->nstsout) || do_per_step(step, rot->nstrout)) );
 }
 
 /* Reduce slab torqe data for this group at this time step? */
-static gmx_inline gmx_bool bSlabTau(t_rot *rot, t_rotgrp *rotg, gmx_int64_t step)
+static inline gmx_bool bSlabTau(t_rot *rot, t_rotgrp *rotg, gmx_int64_t step)
 {
     return ( (ISFLEX(rotg)) && do_per_step(step, rot->nstsout) );
 }
@@ -572,13 +572,13 @@ static double calc_beta_max(real min_gaussian, real slab_dist)
 }
 
 
-static gmx_inline real calc_beta(rvec curr_x, t_rotgrp *rotg, int n)
+static inline real calc_beta(rvec curr_x, t_rotgrp *rotg, int n)
 {
     return iprod(curr_x, rotg->vec) - rotg->slab_dist * n;
 }
 
 
-static gmx_inline real gaussian_weight(rvec curr_x, t_rotgrp *rotg, int n)
+static inline real gaussian_weight(rvec curr_x, t_rotgrp *rotg, int n)
 {
     const real norm = GAUSS_NORM;
     real       sigma;
@@ -735,7 +735,7 @@ static void calc_rotmat(
 
 
 /* Calculates torque on the rotation axis tau = position x force */
-static gmx_inline real torque(
+static inline real torque(
         rvec rotvec,  /* rotation vector; MUST be normalized!                 */
         rvec force,   /* force                                                */
         rvec x,       /* position of atom on which the force acts             */
@@ -1612,7 +1612,7 @@ static void flex_fit_angle_perslab(
 
 
 /* Shift x with is */
-static gmx_inline void shift_single_coord(const matrix box, rvec x, const ivec is)
+static inline void shift_single_coord(const matrix box, rvec x, const ivec is)
 {
     int tx, ty, tz;
 
@@ -1639,7 +1639,7 @@ static gmx_inline void shift_single_coord(const matrix box, rvec x, const ivec i
 /* Determine the 'home' slab of this atom which is the
  * slab with the highest Gaussian weight of all */
 #define round(a) (int)(a+0.5)
-static gmx_inline int get_homeslab(
+static inline int get_homeslab(
         rvec curr_x,   /* The position for which the home slab shall be determined */
         rvec rotvec,   /* The rotation vector */
         real slabdist) /* The slab distance */
@@ -2464,7 +2464,7 @@ static void get_firstlast_atom_per_slab(t_rotgrp *rotg)
  * x_last * v - n*Delta_x >= -beta_max
  *
  */
-static gmx_inline int get_first_slab(
+static inline int get_first_slab(
         t_rotgrp *rotg,      /* The rotation group (inputrec data) */
         real      max_beta,  /* The max_beta value, instead of min_gaussian */
         rvec      firstatom) /* First atom after sorting along the rotation vector v */
@@ -2474,7 +2474,7 @@ static gmx_inline int get_first_slab(
 }
 
 
-static gmx_inline int get_last_slab(
+static inline int get_last_slab(
         t_rotgrp *rotg,     /* The rotation group (inputrec data) */
         real      max_beta, /* The max_beta value, instead of min_gaussian */
         rvec      lastatom) /* Last atom along v */
@@ -2637,7 +2637,7 @@ static void angle(t_rotgrp *rotg,
  * dr = dr - (dr.v)v
  * Note that v must be of unit length.
  */
-static gmx_inline void project_onto_plane(rvec dr, const rvec v)
+static inline void project_onto_plane(rvec dr, const rvec v)
 {
     rvec tmp;
 
@@ -3342,7 +3342,7 @@ static void get_firstlast_slab_ref(t_rotgrp *rotg, real mc[], int ref_firstindex
 /* Special version of copy_rvec:
  * During the copy procedure of xcurr to b, the correct PBC image is chosen
  * such that the copied vector ends up near its reference position xref */
-static gmx_inline void copy_correct_pbc_image(
+static inline void copy_correct_pbc_image(
         const rvec   xcurr,  /* copy vector xcurr ...                */
         rvec         b,      /* ... to b ...                         */
         const rvec   xref,   /* choosing the PBC image such that b ends up near xref */
index 2dfb2480a83aaac37faf8f5db6e22eb5df0ae0fa..4377c00618364bfc39f31196d9a737b994c0a717 100644 (file)
 
 #include <arm_neon.h>
 
-#include "gromacs/utility/basedefinitions.h"
-
 #include "impl_arm_neon_asimd_simd_double.h"
 
 namespace gmx
 {
 
 template <int align>
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 gatherLoadTranspose(const double *        base,
                     const std::int32_t    offset[],
                     SimdDouble *          v0,
@@ -77,7 +75,7 @@ gatherLoadTranspose(const double *        base,
 }
 
 template <int align>
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 gatherLoadTranspose(const double *        base,
                     const std::int32_t    offset[],
                     SimdDouble *          v0,
@@ -98,7 +96,7 @@ gatherLoadTranspose(const double *        base,
 static const int c_simdBestPairAlignmentDouble = 2;
 
 template <int align>
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 gatherLoadUTranspose(const double *        base,
                      const std::int32_t    offset[],
                      SimdDouble *          v0,
@@ -120,7 +118,7 @@ gatherLoadUTranspose(const double *        base,
 }
 
 template <int align>
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 transposeScatterStoreU(double *             base,
                        const std::int32_t   offset[],
                        SimdDouble           v0,
@@ -140,7 +138,7 @@ transposeScatterStoreU(double *             base,
 }
 
 template <int align>
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 transposeScatterIncrU(double *             base,
                       const std::int32_t   offset[],
                       SimdDouble           v0,
@@ -173,7 +171,7 @@ transposeScatterIncrU(double *             base,
 }
 
 template <int align>
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 transposeScatterDecrU(double *             base,
                       const std::int32_t   offset[],
                       SimdDouble           v0,
@@ -205,7 +203,7 @@ transposeScatterDecrU(double *             base,
     vst1_f64(base + align * offset[1] + 2, t3);
 }
 
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 expandScalarsToTriplets(SimdDouble    scalar,
                         SimdDouble *  triplets0,
                         SimdDouble *  triplets1,
@@ -217,7 +215,7 @@ expandScalarsToTriplets(SimdDouble    scalar,
 }
 
 template <int align>
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 gatherLoadBySimdIntTranspose(const double *  base,
                              SimdDInt32      offset,
                              SimdDouble *    v0,
@@ -236,7 +234,7 @@ gatherLoadBySimdIntTranspose(const double *  base,
 
 
 template <int align>
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 gatherLoadBySimdIntTranspose(const double *  base,
                              SimdDInt32      offset,
                              SimdDouble *    v0,
@@ -252,7 +250,7 @@ gatherLoadBySimdIntTranspose(const double *  base,
 }
 
 template <int align>
-static gmx_inline void gmx_simdcall
+static inline void gmx_simdcall
 gatherLoadUBySimdIntTranspose(const double *  base,
                               SimdDInt32      offset,
                               SimdDouble *    v0,
@@ -271,7 +269,7 @@ gatherLoadUBySimdIntTranspose(const double *  base,
 }
 
 
-static gmx_inline double gmx_simdcall
+static inline double gmx_simdcall
 reduceIncr4ReturnSum(double *    m,
                      SimdDouble  v0,
                      SimdDouble  v1,
index 41cd2ff908decf1794e8f3dca908e7e72c33ab62..4554cea792d8cdafed89835eb23caa5ab1279c78 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 1991-2006 David van der Spoel, Erik Lindahl, Berk Hess, University of Groningen.
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018, 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.
@@ -63,14 +63,6 @@ extern "C"
 } /* fixes auto-indentation problems */
 #endif
 
-/* Minor implementation note:
- *
- * I like to use these counters in other programs too, so to avoid making
- * it dependent on other Gromacs definitions I use the #ifdef's to set
- * architecture-specific inline macros instead of using gmx_inline from
- * gmx_types.h /Erik 2005-12-10
- */
-
 #if ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__)) && \
     (defined(__i386__) || defined(__x86_64__)))
 /* x86 or x86-64 with GCC inline assembly */
index a43a8d344665022e77fcd1863940d0581689658e..276c6319a254d95dd4f5460980ef3d26a4cc0b4d 100644 (file)
@@ -126,22 +126,6 @@ typedef uint64_t gmx_uint64_t;
 #define GMX_UINT64_MIN UINT64_MIN
 /*! \} */
 
-/*! \def gmx_inline
- * \brief
- * Keyword to use in C code instead of C99 `inline`.
- *
- * Some of the C compilers we support do not recognize the C99 keyword
- * `inline`.  This macro should be used in C code and in shared C/C++ headers
- * to indicate a function is inlined.
- * C++ code should use plain `inline`, as that is already in C++98.
- */
-#if !defined __cplusplus && defined _MSC_VER
-#define gmx_inline __inline
-#else
-/* C++ or C99 */
-#define gmx_inline inline
-#endif
-
 /* ICC, GCC, MSVC, Pathscale, PGI, XLC support __restrict.
  * Any other compiler can be added here. */
 /*! \brief
index ebf3c1f5134883d80d921c32260be83ee1368f63..8db76e5933b0e5f690595985020e191e0d497143 100644 (file)
@@ -67,55 +67,55 @@ typedef gmx_uint64_t gmx_bitmask_t; /**< bitmask type */
 #endif
 
 /*! \brief Initialize all bits to 0 */
-gmx_inline static void bitmask_clear(gmx_bitmask_t* m)
+inline static void bitmask_clear(gmx_bitmask_t* m)
 {
     *m = 0;
 }
 
 /*! \brief Set bit at position b to 1. */
-gmx_inline static void bitmask_set_bit(gmx_bitmask_t* m, int b)
+inline static void bitmask_set_bit(gmx_bitmask_t* m, int b)
 {
     *m |= ((gmx_bitmask_t)1 << b);
 }
 
 /*! \brief Initialize all bits: bit b to 1, others to 0 */
-gmx_inline static void bitmask_init_bit(gmx_bitmask_t* m, int b)
+inline static void bitmask_init_bit(gmx_bitmask_t* m, int b)
 {
     *m = ((gmx_bitmask_t)1 << b);
 }
 
 /*! \brief Initialize all bits: all bits below b to 1, others to 0 */
-gmx_inline static void bitmask_init_low_bits(gmx_bitmask_t* m, int b)
+inline static void bitmask_init_low_bits(gmx_bitmask_t* m, int b)
 {
     *m = ((gmx_bitmask_t)1 << b) - 1;
 }
 
 /*! \brief Test if bit b is set */
-gmx_inline static bool bitmask_is_set(gmx_bitmask_t m, int b)
+inline static bool bitmask_is_set(gmx_bitmask_t m, int b)
 {
     return (m & ((gmx_bitmask_t)1 << b)) != 0;
 }
 
 /*! \brief Test if both bitmasks have no common bits enabled */
-gmx_inline static bool bitmask_is_disjoint(gmx_bitmask_t a, gmx_bitmask_t b)
+inline static bool bitmask_is_disjoint(gmx_bitmask_t a, gmx_bitmask_t b)
 {
     return !(a & b);
 }
 
 /*! \brief Test if both bitmasks are equal */
-gmx_inline static bool bitmask_is_equal(gmx_bitmask_t a, gmx_bitmask_t b)
+inline static bool bitmask_is_equal(gmx_bitmask_t a, gmx_bitmask_t b)
 {
     return a == b;
 }
 
 /*! \brief Test if bitmask has no enabled bits */
-gmx_inline static bool bitmask_is_zero(gmx_bitmask_t m)
+inline static bool bitmask_is_zero(gmx_bitmask_t m)
 {
     return !m;
 }
 
 /*! \brief Set all bits enabled in either mask and write into a */
-gmx_inline static void bitmask_union(gmx_bitmask_t* a, gmx_bitmask_t b)
+inline static void bitmask_union(gmx_bitmask_t* a, gmx_bitmask_t b)
 {
     *a |= b;
 }
@@ -123,35 +123,35 @@ gmx_inline static void bitmask_union(gmx_bitmask_t* a, gmx_bitmask_t b)
 #define BITMASK_ALEN (BITMASK_SIZE/64)
 typedef gmx_uint64_t gmx_bitmask_t[BITMASK_ALEN];
 
-gmx_inline static void bitmask_clear(gmx_bitmask_t* m)
+inline static void bitmask_clear(gmx_bitmask_t* m)
 {
     memset(*m, 0, BITMASK_SIZE/8);
 }
 
-gmx_inline static void bitmask_set_bit(gmx_bitmask_t* m, int b)
+inline static void bitmask_set_bit(gmx_bitmask_t* m, int b)
 {
     (*m)[b/64] |= ((gmx_uint64_t)1 << (b%64));
 }
 
-gmx_inline static void bitmask_init_bit(gmx_bitmask_t* m, int b)
+inline static void bitmask_init_bit(gmx_bitmask_t* m, int b)
 {
     bitmask_clear(m);
     (*m)[b/64] = ((gmx_uint64_t)1 << (b%64));
 }
 
-gmx_inline static void bitmask_init_low_bits(gmx_bitmask_t* m, int b)
+inline static void bitmask_init_low_bits(gmx_bitmask_t* m, int b)
 {
     memset(*m, 255, b/64*8);
     (*m)[b/64] = ((gmx_uint64_t)1 << (b%64)) - 1;
     memset(&(*m)[b/64+1], 0, (BITMASK_ALEN-b/64-1)*8);
 }
 
-gmx_inline static bool bitmask_is_set(gmx_bitmask_t m, int b)
+inline static bool bitmask_is_set(gmx_bitmask_t m, int b)
 {
     return (m[b/64] & ((gmx_uint64_t)1 << (b%64))) != 0;
 }
 
-gmx_inline static bool bitmask_is_disjoint(gmx_bitmask_t a, gmx_bitmask_t b)
+inline static bool bitmask_is_disjoint(gmx_bitmask_t a, gmx_bitmask_t b)
 {
     int      i;
     bool     r = 1;
@@ -162,7 +162,7 @@ gmx_inline static bool bitmask_is_disjoint(gmx_bitmask_t a, gmx_bitmask_t b)
     return r;
 }
 
-gmx_inline static bool bitmask_is_equal(gmx_bitmask_t a, gmx_bitmask_t b)
+inline static bool bitmask_is_equal(gmx_bitmask_t a, gmx_bitmask_t b)
 {
     int      i;
     bool     r = 1;
@@ -173,7 +173,7 @@ gmx_inline static bool bitmask_is_equal(gmx_bitmask_t a, gmx_bitmask_t b)
     return r;
 }
 
-gmx_inline static bool bitmask_is_zero(gmx_bitmask_t m)
+inline static bool bitmask_is_zero(gmx_bitmask_t m)
 {
     int      i;
     bool     r = 1;
@@ -184,7 +184,7 @@ gmx_inline static bool bitmask_is_zero(gmx_bitmask_t m)
     return r;
 }
 
-gmx_inline static void bitmask_union(gmx_bitmask_t* a, gmx_bitmask_t b)
+inline static void bitmask_union(gmx_bitmask_t* a, gmx_bitmask_t b)
 {
     int i;
     for (i = 0; i < BITMASK_ALEN; i++)
index 471563307b22db6aff1a9ffe8ac8b0797a6700cf..82206a8279b1639825f605d20078f6ea4013684a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2018, 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.
@@ -129,7 +129,7 @@ gmx_bool gmx_omp_check_thread_affinity(char **message);
 /*! \brief
  * Pause for use in a spin-wait loop.
  */
-static gmx_inline void gmx_pause()
+static inline void gmx_pause()
 {
 #ifndef _MSC_VER
     /* Ugly hack because the openmp implementation below hacks into the SIMD