Include config.h directly if used
authorTeemu Murtola <teemu.murtola@gmail.com>
Tue, 19 Aug 2014 03:42:16 +0000 (06:42 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Thu, 4 Sep 2014 16:17:22 +0000 (18:17 +0200)
Include config.h directly in files that use definitions from there.
Only gmx_blas/gmx_lapack are exceptions, where the header does the
inclusion for simplicity.  There is also one of the kernel inner loop
files in nbnxn kernels that relies on the source file including
config.h.

Change-Id: Ibea7d3fafb0e7de5ee3d40e52c68fef5646edf37

12 files changed:
src/gromacs/commandline/cmdlineinit.cpp
src/gromacs/gmxana/gmx_pme_error.cpp
src/gromacs/gmxlib/nonbonded/nb_kernel_avx_128_fma_single/kernelutil_x86_avx_128_fma_single.h
src/gromacs/gmxlib/nonbonded/nb_kernel_avx_256_single/kernelutil_x86_avx_256_single.h
src/gromacs/imd/imd.h
src/gromacs/imd/imdsocket.h
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_utils.h
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_common.h
src/gromacs/mdlib/nbnxn_search_simd_4xn.h
src/gromacs/selection/parser_internal.h
src/programs/mdrun/tests/replicaexchange.cpp

index 017f2b31c87fd52a690088281b8092b6b5f34143..853901386c8bc495de91d6a608ec38b749633515 100644 (file)
@@ -58,6 +58,8 @@
 #include "gromacs/utility/programcontext.h"
 #include "gromacs/utility/smalloc.h"
 
+#include "config.h"
+
 namespace gmx
 {
 
index 0d33fa3d702ada433c85a0e16b7d6b0de42c0117..b132b6b2b16ad4641a4d06492e91f8dda5d75f25 100644 (file)
@@ -58,6 +58,8 @@
 
 #include "gromacs/utility/fatalerror.h"
 
+#include "config.h"
+
 /* We use the same defines as in mvdata.c here */
 #define  block_bc(cr,   d) gmx_bcast(     sizeof(d),     &(d), (cr))
 #define nblock_bc(cr, nr, d) gmx_bcast((nr)*sizeof((d)[0]), (d), (cr))
index 319ad63efa49a51665eaa0aaf9037bd2dd918fbe..1715f97cbc0d28939b0109262860937bfcb25bb7 100644 (file)
@@ -35,6 +35,7 @@
 #ifndef _kernelutil_x86_avx_128_fma_single_h_
 #define _kernelutil_x86_avx_128_fma_single_h_
 
+#include "config.h"
 
 #include <math.h>
 #include <immintrin.h>
index 171e1653ecbc0c36e4857d3d394d316bc66614e9..eacf202462a7a6d4dd1fe1cd63ee3bb170ce35e7 100644 (file)
@@ -35,6 +35,8 @@
 #ifndef _kernelutil_x86_avx_256_single_h_
 #define _kernelutil_x86_avx_256_single_h_
 
+#include "config.h"
+
 #define gmx_mm_castsi128_ps(a) _mm_castsi128_ps(a)
 
 static gmx_inline __m256 gmx_simdcall
index 212ea954bfd4e590df9a9d403bcdb387ff347fa1..f6f26f2c3bd15404dd46e7575b40a568c2982103 100644 (file)
@@ -64,6 +64,8 @@
 #include "../fileio/filenm.h"
 #include "../timing/wallcycle.h"
 
+#include "config.h"
+
 #ifdef GMX_NATIVE_WINDOWS
 #include <Windows.h>
 #define NOFLAGS 0
index 5903db3cacecf627f22335f66029412f0b2a821e..d7f0ce95482b4d4ba3f0938a8f56b0adc2d6dcfc 100644 (file)
@@ -51,6 +51,8 @@
 #ifndef GMX_IMD_IMDSOCKET_H
 #define GMX_IMD_IMDSOCKET_H
 
+#include "config.h"
+
 /* Check if we can/should use winsock or standard UNIX sockets. */
 #ifdef GMX_NATIVE_WINDOWS
   #ifdef GMX_HAVE_WINSOCK
index a600fdf1bbe80642ac5acd714cfa3a195a39dea8..b3c34e9a446f10ab32cc6e823d4653d0f130faad 100644 (file)
@@ -41,6 +41,8 @@
 #include "gromacs/legacyheaders/types/nbnxn_cuda_types_ext.h"
 #include "gromacs/legacyheaders/types/hw_info.h"
 
+#include "config.h"
+
 #ifdef GMX_GPU
 #define FUNC_TERM ;
 #define FUNC_QUALIFIER
index 6eb97445b02e3fb40632135e91b18c0de54b7181..5d081738f85d0359fa21ece0c35ce7eb69a8b11c 100644 (file)
@@ -37,6 +37,8 @@
 
 #include "gromacs/legacyheaders/types/simple.h"
 
+#include "config.h"
+
 /*! \brief Provides hardware-specific utility routines for the SIMD kernels.
  *
  * Defines all functions, typedefs, constants and macros that have
index 32d5554e87bbe797bb616f63c03c08f2c31dd1eb..9216457430e57b278fdd7818fc5202fa2cd03bda 100644 (file)
@@ -41,6 +41,8 @@
 #include "gromacs/math/utilities.h"
 #endif
 
+#include "config.h"
+
 #ifndef GMX_SIMD_J_UNROLL_SIZE
 #error "Need to define GMX_SIMD_J_UNROLL_SIZE before including the 4xn kernel common header file"
 #endif
index ab98088ae48860fee506f734ddce0a6b70ba5a57..33a307b58456ab8080b37e6c0309915d0f148217 100644 (file)
@@ -33,6 +33,7 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
+#include "config.h"
 
 #if GMX_SIMD_REAL_WIDTH >= NBNXN_CPU_CLUSTER_I_SIZE
 #define STRIDE_S  (GMX_SIMD_REAL_WIDTH)
index a9482fa856b07d40abf2b3fdb8e5a9d8873d069d..b74ce1a313c3e07be49b2d1298c1694003b9b515 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
@@ -57,6 +57,8 @@
 
 #include "scanner.h"
 
+#include "config.h"
+
 //! Error handler needed by Bison.
 static void
 yyerror(yyscan_t scanner, char const *s)
index d972b859da38df2a9c5eac0fbc79c04ad1a214e4..ea8a7b20c64e4b2f7ac1f6a8768c702b8f2797ea 100644 (file)
@@ -59,6 +59,8 @@
 
 #include "testutils/cmdlinetest.h"
 
+#include "config.h"
+
 namespace
 {