Add 32-bit ARM Neon SIMD support
[alexxy/gromacs.git] / src / config.h.cmakein
index 891ca3324ea4238918c50c804bd80d256b0af39d..31e700c7606815f29473606661ae11d3c68d2c19 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2009,2010,2011,2012,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.
  *
  * GROMACS is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-/* Manually created from config.h.in to work with cmake */
-
-/* Disable warnings about double-to-float conversion accuracy loss on MSVC */
-#ifdef _MSC_VER
-#pragma warning (disable : 4305)
-#pragma warning (disable : 4244)
-#pragma warning (disable : 4101)
-#pragma warning (disable : 4996)
-#pragma warning (disable : 4267)
-#pragma warning (disable : 4090)
-#endif
-
-#include "gmx_header_config.h"
+/*! \libinternal \file
+ * \brief
+ * Include file for configuration macros from the build system.
+ *
+ * This header is not installed, so headers must not reference macros defined
+ * here.
+ *
+ * \inlibraryapi
+ */
+#ifndef GMX_CONFIG_H
+#define GMX_CONFIG_H
 
-/* Name of package (translate from cmake to autoconf macro name) */
-#define PACKAGE  "@PROJECT_NAME@"
+#include "gromacs/utility/gmx_header_config.h"
 
-/* Version number of package (translate from cmake to autoconf macro name) */
-#define VERSION  "@PROJECT_VERSION@"
+/* TODO: For now, disable Doxygen warnings from here */
+/*! \cond */
 
-/* Use the version string from generated version.h */
-#cmakedefine USE_VERSION_H
+/* Default location of data files */
+#define GMXLIB_SEARCH_DIR "@GMXLIB_SEARCH_DIR@"
 
 /* Default location of data files */
-#define GMXLIBDIR "@GMXLIBDIR@"
+#define GMXLIB_FALLBACK "@GMXLIB_FALLBACK@"
+
+/* Binary suffix for the created binaries */
+#define GMX_BINARY_SUFFIX "@GMX_BINARY_SUFFIX@"
 
-/* Turn off water-water neighborlist optimization only - not used right now */
-#cmakedefine DISABLE_WATERWATER_NLIST
+/* Source directory for the build */
+#cmakedefine CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@"
 
-/* Turn off all water neighborlist optimization - not used right now */
-#cmakedefine DISABLE_WATER_NLIST
+/* Binary directory for the build */
+#cmakedefine CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@"
 
 /* IEEE754 floating-point format. Memory layout is defined by macros
  * GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER and GMX_IEEE754_BIG_ENDIAN_WORD_ORDER. 
 /* Work around broken calloc() */
 #cmakedefine GMX_BROKEN_CALLOC
 
-/* Enable special hacks for Cray XT3 */
-#cmakedefine GMX_CRAY_XT3
-
 /* Do not optimize FFTW setups (not needed with SSE FFT kernels) */
 #cmakedefine GMX_DISABLE_FFTW_MEASURE
 
-/* Compile in double precision */
-#cmakedefine GMX_DOUBLE
-
 /* Use Built-in FFTPACK FFT library */
 #cmakedefine GMX_FFT_FFTPACK
 
 /* Use Intel MKL FFT library */
 #cmakedefine GMX_FFT_MKL
 
-/* Use AMD core math library */
-#cmakedefine GMX_FFT_ACML
-
-/* SSE2 instructions available */
-#cmakedefine GMX_X86_SSE2
+/* Target platform is x86 or x86_64 */
+#cmakedefine GMX_TARGET_X86
 
-/* SSE4.1 instructions available */
-#cmakedefine GMX_X86_SSE4_1
+/* Target platform is BlueGene/Q */
+#cmakedefine GMX_TARGET_BGQ
 
-/* AVX 128-bit FMA instructions available */
-#cmakedefine GMX_X86_AVX_128_FMA
+/** Define if we are building for Cygwin */
+#cmakedefine GMX_CYGWIN
 
-/* AVX 256-bit instructions available */
-#cmakedefine GMX_X86_AVX_256
+/** Define if we have sufficient C++11 support */
+#cmakedefine GMX_CXX11
 
 /* GCC bug in AVX maskload/maskstore arguments - worked around internally */
-#cmakedefine GMX_X86_AVX_GCC_MASKLOAD_BUG
+#cmakedefine GMX_SIMD_X86_AVX_GCC_MASKLOAD_BUG
 
-/* SSE2 was selected as CPU acceleration level */
-#cmakedefine GMX_CPU_ACCELERATION_X86_SSE2
+/* SSE2 was selected for SIMD instruction set level */
+#cmakedefine GMX_SIMD_X86_SSE2
 
-/* SSE4.1 was selected as CPU acceleration level */
-#cmakedefine GMX_CPU_ACCELERATION_X86_SSE4_1
+/* SSE4.1 was selected as SIMD instructions */
+#cmakedefine GMX_SIMD_X86_SSE4_1
 
-/* AVX 128-bit FMA was selected as CPU acceleration level */
-#cmakedefine GMX_CPU_ACCELERATION_X86_AVX_128_FMA
+/* AVX 128-bit FMA was selected as SIMD instructions */
+#cmakedefine GMX_SIMD_X86_AVX_128_FMA
 
-/* AVX 256-bit was selected as CPU acceleration level */
-#cmakedefine GMX_CPU_ACCELERATION_X86_AVX_256
+/* AVX 256-bit was selected as SIMD instructions */
+#cmakedefine GMX_SIMD_X86_AVX_256
 
-/* IBM QPX was selected as CPU acceleration type (e.g. BlueGene/Q) */
-#cmakedefine GMX_CPU_ACCELERATION_IBM_QPX
+/* AVX2 256-bit SIMD instruction set level was selected */
+#cmakedefine GMX_SIMD_X86_AVX2_256
 
-/* String for CPU acceleration choice (for writing to log files and stdout) */
-#define GMX_CPU_ACCELERATION_STRING "@GMX_CPU_ACCELERATION@"
+/* 32-bit ARM NEON SIMD instruction set level was selected */
+#cmakedefine GMX_SIMD_ARM_NEON
+
+/* IBM QPX was selected as SIMD instructions (e.g. BlueGene/Q) */
+#cmakedefine GMX_SIMD_IBM_QPX
+
+/* Fujitsu Sparc64 HPC-ACE SIMD acceleration */
+#cmakedefine GMX_SIMD_SPARC64_HPC_ACE
+
+/* Reference SIMD implementation for testing */
+#cmakedefine GMX_SIMD_REFERENCE
+
+/* String for SIMD instruction choice (for writing to log files and stdout) */
+#define GMX_SIMD_STRING "@GMX_SIMD@"
+
+/* Calling convention string (if any) for routines with SIMD variable args */
+#define gmx_simdcall @GMX_SIMD_CALLING_CONVENTION@
 
 /* Integer byte order is big endian. */
-#cmakedefine GMX_INTEGER_BIG_ENDIAN 
+#cmakedefine GMX_INTEGER_BIG_ENDIAN
 
 /* Use our own instead of system XDR libraries */
 #cmakedefine GMX_INTERNAL_XDR
 
+/* Compile to use TNG library */
+#cmakedefine GMX_USE_TNG
+
+/* Add support for tracing using Extrae */
+#cmakedefine HAVE_EXTRAE
+
 /* Use MPI (with mpicc) for parallelization */
 #cmakedefine GMX_LIB_MPI
 
 /* MPI_IN_PLACE exists for collective operations */
 #cmakedefine MPI_IN_PLACE_EXISTS
 
-/* Make a parallel version of GROMACS using message passing 
+/* Make a parallel version of GROMACS using message passing
    (MPI or thread_mpi) */
 #cmakedefine GMX_MPI
 
 /* Ignore calls to nice(3) */
 #cmakedefine GMX_NO_NICE
 
+/* Use if can't rename checkpoints */
+#cmakedefine GMX_NO_RENAME
+
 /* Ignore calls to system(3) */
 #cmakedefine GMX_NO_SYSTEM
 
 /* Use (modified) Mopac 7 for QM-MM calculations */
 #cmakedefine GMX_QMMM_MOPAC
 
+/* Use ORCA for QM-MM calculations */
+#cmakedefine GMX_QMMM_ORCA
+
 /* Use the GROMACS software 1/sqrt(x) */
 #cmakedefine GMX_SOFTWARE_INVSQRT
 
 /* Define when Windows threads are used */
 #cmakedefine THREAD_WINDOWS
 
-/* Define when thread-MPI atomic operations are available */
+/* Define native atomic operations are found */
 #cmakedefine TMPI_ATOMICS
 
 /* Define for busy wait option  */
+/* See gmxpre-config.h.cmakein for explanation for the #ifdef */
+#ifndef TMPI_WAIT_FOR_NO_ONE
 #cmakedefine TMPI_WAIT_FOR_NO_ONE
+#endif
 
 /* Define for copy buffer option */
 #cmakedefine TMPI_COPY_BUFFER
 
+/* Define for tmpi warnings option */
+#cmakedefine TMPI_WARNINGS
+
 /* Define for profiling option */
 #cmakedefine TMPI_PROFILE
 
-/* Define for Linux pthread_setaffinity */
+/* Define for Linux pthread_setaffinity_np */
 #cmakedefine HAVE_PTHREAD_SETAFFINITY
 
-/* Define for Windows NUMA-aware allocator functions*/
-#cmakedefine TMPI_WINDOWS_NUMA_API
-
-/* Define for sysconf() */
-#cmakedefine HAVE_SYSCONF
-
-/* Define for GetSystemInfo() */
-#cmakedefine HAVE_SYSTEM_INFO
+/* Define for X-Windows */
+#cmakedefine GMX_X11
 
 /* Enable x86 gcc inline assembly */
 #cmakedefine GMX_X86_GCC_INLINE_ASM
 /* Use GPU native acceleration */
 #cmakedefine GMX_GPU
 
-/* Define to 1 if the system has the type gmx_bool. */
-#cmakedefine HAVE_BOOL
-
 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
 #cmakedefine HAVE_FSEEKO
 
 /* Define to 1 if _fseeki64 (and presumably _fseeki64) exists and is declared. */
 #cmakedefine HAVE__FSEEKI64
 
-/* Define to 1 if you have the m library (-lm). */
-#cmakedefine HAVE_LIBM
-
-/* Define to 1 if you have the mkl library (-lmkl). */
-#cmakedefine HAVE_LIBMKL
-
-/* Define to 1 if you have the gsl library (-lgsl). */
-#cmakedefine HAVE_LIBGSL
-
-/* Define to 1 if you have the dl library (-ldl). */
-#cmakedefine HAVE_LIBDL
-
 /* Have io.h (windows)*/
 #cmakedefine HAVE_IO_H
 
-/* Define to 1 if you have the strcasecmp() function. */
-#cmakedefine HAVE_STRCASECMP
-
-/* Define to 1 if you have the strdup() function. */
-#cmakedefine HAVE_STRDUP
-
-/* Define to 1 if you have the vfprintf() function. */
-#cmakedefine HAVE_VFPRINTF
-
-/* Define to 1 if you have the memcmp() function. */
-#cmakedefine HAVE_MEMCMP
-
 /* Define to 1 if you have the posix_memalign() function. */
 #cmakedefine HAVE_POSIX_MEMALIGN
 
 /* Define to 1 if you have the MSVC _aligned_malloc() function. */
 #cmakedefine HAVE__ALIGNED_MALLOC
 
+/* Define to 1 if you have the clock_gettime() function. */
+#cmakedefine HAVE_CLOCK_GETTIME
+
 /* Define to 1 if you have the gettimeofday() function. */
 #cmakedefine HAVE_GETTIMEOFDAY
 
-/* Define to 1 if you have the cbrt() function. */
-#cmakedefine HAVE_CBRT
-
-/* Define to 1 if you have the isnan() function. */
-#cmakedefine HAVE_ISNAN
-
-/* Define to 1 if you have the _isnan() function. */
-#cmakedefine HAVE__ISNAN
+/* Define to 1 if you have the rdtscp instruction. */
+#cmakedefine HAVE_RDTSCP
 
 /* Define to 1 if you have the isfinite() function. */
 #cmakedefine HAVE_ISFINITE
 /* Define to 1 if you have the sqrtf() function. */
 #cmakedefine HAVE_SQRTF
 
-/* Define to 1 if you have the <string.h> header file. */
-#cmakedefine HAVE_STRING_H
-
-/* Define to 1 if yo have the <math.h> header file. */
-#cmakedefine HAVE_MATH_H
-
-/* Define to 1 if yo have the <limits.h> header file. */
-#cmakedefine HAVE_LIMITS_H
-
-/* Define to 1 if yo have the <memory.h> header file. */
-#cmakedefine HAVE_MEMORY_H
-
 /* Define to 1 if yo have the <unistd.h> header file. */
 #cmakedefine HAVE_UNISTD_H
 
-/* Define to 1 if yo have the <direct.h> header file. */
-#cmakedefine HAVE_DIRECT_H
-
 /* Define to 1 if yo have the <pwd.h> header file. */
 #cmakedefine HAVE_PWD_H
 
-/* Define to 1 if yo have the <stdint.h> header file. */
-#cmakedefine HAVE_STDINT_H
-
-/* Define to 1 if yo have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H
-
-/* Define to 1 if yo have the <pthread.h> header file. */
-#cmakedefine HAVE_PTHREAD_H
-
 /* Define to 1 if yo have the <dirent.h> header file. */
 #cmakedefine HAVE_DIRENT_H
 
-/* Define to 1 if yo have the <inttypes.h> header file. */
-#cmakedefine HAVE_INTTYPES_H
-
-/* Define to 1 if yo have the <regex.h> header file. */
-#cmakedefine HAVE_REGEX_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#cmakedefine HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#cmakedefine HAVE_SYS_STAT_H
-
 /* Define to 1 if you have the <sys/time.h> header file. */
 #cmakedefine HAVE_SYS_TIME_H
 
-/* Define to 1 if you have the <rpc/rpc.h> header file. */
-#cmakedefine HAVE_RPC_RPC_H
-
-/* Define to 1 if you have the <rpc/xdr.h> header file. */
-#cmakedefine HAVE_RPC_XDR_H
-
 /* Define to 1 if you have the <x86intrin.h> header file */
 #cmakedefine HAVE_X86INTRIN_H
 
 /* Define to 1 if you have the <sched.h> header */
 #cmakedefine HAVE_SCHED_H
 
-/* Define to 1 if you have the vprintf() function. */
-#cmakedefine HAVE_VPRINTF
+/* Define to 1 if you have the POSIX <regex.h> header file. */
+#cmakedefine HAVE_POSIX_REGEX
+
+/* Define to 1 if you have the C++11 <regex> header file. */
+#cmakedefine HAVE_CXX11_REGEX
 
 /* Define to 1 if you have the sysconf() function */
 #cmakedefine HAVE_SYSCONF
 
-/* Define to 1 if you have the sched_getaffinity() function */
-#cmakedefine HAVE_SCHED_GETAFFINITY
-
-/* Define to 1 if you have the sched_setaffinity() function */
-#cmakedefine HAVE_SCHED_SETAFFINITY
+/* Define to 1 if you have the all the affinity functions in sched.h */
+#cmakedefine HAVE_SCHED_AFFINITY
 
 /* Bytes in IEEE fp word are in big-endian order if set, little-endian if not.
    Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
 /* Define if SIGUSR1 is present */
 #cmakedefine HAVE_SIGUSR1
 
-/* The size of int, as computed by sizeof. */
-#cmakedefine SIZEOF_INT @SIZEOF_INT@
-
-/* The size of long int, as computed by sizeof. */
-#cmakedefine SIZEOF_LONG_INT @SIZEOF_LONG_INT@
-
-/* The size of long long int, as computed by sizeof. */
-#cmakedefine SIZEOF_LONG_LONG_INT @SIZEOF_LONG_LONG_INT@
-
-/* The size of off_t, as computed by sizeof. */
-#cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
-
-/* The size of void*, as computed by sizeof. */
-#cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
-
-/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
-#cmakedefine _LARGEFILE_SOURCE
-
-/* Define for large files, on AIX-style hosts. */
-#cmakedefine _LARGE_FILES
-
-/* Some systems requires this to be set to 64 for large file support */
-#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
-
-/* Gromacs shortcut define for fseeko & ftello being present with 64-bit support */
-#cmakedefine GMX_LARGEFILES
-
-/* Define to int if <sys/types.h> does not define. */
-#cmakedefine gid_t int
-
-/* Define to __inline__ or __inline if that is what the C compiler
-   calls it, or to nothing if inline is not supported under any name.
-   Please do NOT remove the gmx_inline keyword from here. The classical
-   C++ inline keyword is merely a recommendation to the compiler, and
-   many compilers support stronger alternatives (e.g. __forceinline)
-   that we might want to use. */
-#define gmx_inline ${INLINE_KEYWORD}
-#ifndef __cplusplus
-#define inline ${INLINE_KEYWORD}
-#endif
-
-/* Define to __restrict__ or __restrict if that is what the C compiler
-   calls it, unless we are on C99 when it is simply called restrict.
-   Since restrict is a reserved key word in C99 we are not allowed to
-   redefine the word itself, so call this gmx_restrict to avoid having
-   to identify the language standard level. If it is not supported, it
-   is still defined to an empty string here. */
-#define gmx_restrict ${RESTRICT_KEYWORD}
-
-#ifndef CPLUSPLUS
-#ifdef __cplusplus
-#define CPLUSPLUS
-#endif
-#endif  
-
-/* Define to long int if <sys/types.h> does not define. */                    
-#cmakedefine off_t int
-
-/* Define to unsigned int if <sys/types.h> does not define. */
-#cmakedefine size_t int
-
-/* Define to int if <sys/types.h> does not define. */
-#cmakedefine uid_t int
-
-/* Build special-purpose mdrun library */
-#cmakedefine GMX_FAHCORE   
-
 /* Enable gromacs quotes */
 #cmakedefine GMX_COOL_QUOTES
 
-#ifdef GMX_FAHCORE
-#define FULLINDIRECT 1
-#define USE_FAH_XDR  1
-#include "swindirect.h"
-#endif
-
 /* default name mangling maybe wrong on exotic plattforms */
 #define F77_FUNC(name,NAME) name ## _
 
 /* Define if we have pipes */
 #cmakedefine HAVE_PIPES
 
+/* Define if we have zlib */
+#cmakedefine HAVE_ZLIB
+
+/*! \endcond */
 
-/* Catch stupid CMake problems on OS X */
-#ifdef __APPLE__
-#  if ((defined(__LP64__) && __LP64__ && defined(SIZEOF_VOIDP) && SIZEOF_VOIDP<8) || ( (!defined(__LP64__) || __LP64__==0) && (defined(SIZEOF_VOIDP) && SIZEOF_VOIDP>4)))
-#    error "Inconsistency between current OS X architecture and the one used to generate original" 
-#    error "CMake configuration. This is probably caused by starting CMake with the default value"
-#    error "for CMAKE_OSX_ARCHITECTURES (blank), and then changing it. In this case all the tests"
-#    error "will have been performed with the original (now incorrect) architecture."
-#    error "To fix this, set CMAKE_OSX_ARCHITECTURES on the _command_line_ before starting CMake,"
-#    error "or create a new such entry with your choice in the GUI _before_ hitting 'configure'."
-#  endif
 #endif