Move endian, float format and XDR settings to cmakedefine01
authorErik Lindahl <erik@kth.se>
Mon, 6 Jul 2015 13:19:40 +0000 (15:19 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 8 Jul 2015 10:49:57 +0000 (12:49 +0200)
Also modify gmxtree.py to understand the new protocol

Change-Id: I68f1bfff9528d71d4a683082aaa4d637f8b10a64

docs/doxygen/gmxtree.py
src/config.h.cmakein
src/gromacs/fileio/gmx_system_xdr.c
src/gromacs/fileio/md5.c
src/gromacs/fileio/xdrf.h
src/gromacs/math/utilities.c

index a693fe921a081c1e7372367f6549c1e4e9f74b53..c4126d4bcf0516a9feeb18784b736d0815e3ba5f 100644 (file)
@@ -215,7 +215,7 @@ class File(object):
         """Scan the file contents and initialize information based on it."""
         # TODO: Consider a more robust regex.
         include_re = r'^\s*#\s*include\s+(?P<quote>["<])(?P<path>[^">]*)[">]'
-        define_re = r'^\s*#.*define\s+(\w*)'
+        define_re = r'^\s*#.*define(?:01)?\s+(\w*)'
         current_block = None
         with open(self._abspath, 'r') as scanfile:
             contents = scanfile.read()
index 59993ea72a1a97a9515c8108d06474831b3adc69..971bbd6d7d2ac1ce14a4567304d1295d637fd82a 100644 (file)
@@ -50,7 +50,7 @@
 /* IEEE754 floating-point format. Memory layout is defined by macros
  * GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER and GMX_IEEE754_BIG_ENDIAN_WORD_ORDER. 
  */
-#cmakedefine GMX_FLOAT_FORMAT_IEEE754
+#cmakedefine01 GMX_FLOAT_FORMAT_IEEE754
 
 /* Work around broken calloc() */
 #cmakedefine GMX_BROKEN_CALLOC
 #define GMX_SIMD_ACCURACY_BITS_DOUBLE @GMX_SIMD_ACCURACY_BITS_DOUBLE@
 
 /* Integer byte order is big endian. */
-#cmakedefine GMX_INTEGER_BIG_ENDIAN
+#cmakedefine01 GMX_INTEGER_BIG_ENDIAN
 
 /* Use our own instead of system XDR libraries */
-#cmakedefine GMX_INTERNAL_XDR
+#cmakedefine01 GMX_INTERNAL_XDR
 
 /* Compile to use TNG library */
 #cmakedefine GMX_USE_TNG
 
 /* Bytes in IEEE fp word are in big-endian order if set, little-endian if not.
    Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
-#cmakedefine GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER
+#cmakedefine01 GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER
 
 /* The two words in a double precision variable are in b ig-endian order if
    set, little-endian if not. Do NOT assume this is the same as the byte
    order! Only relevant when FLOAT_FORMAT_IEEE754 is defined. */
-#cmakedefine GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
+#cmakedefine01 GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
 
 /* Define if SIGUSR1 is present */
 #cmakedefine HAVE_SIGUSR1
index 0a86fa9c23f8622eb771487e7d9d8850f35740b6..3a01286733ad3609e9e2ce4d592a627b34ac51b3 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "config.h"
 
-#ifdef GMX_INTERNAL_XDR
+#if GMX_INTERNAL_XDR
 
 
 #include "gmx_system_xdr.h"
index ff74cc68d073b5a4b4c5b73926a7c8424b48e48c..521f37c0906f2f21f7b9c55ea847dfa45d45e7ce 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2014,2015, 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.
@@ -40,7 +40,7 @@
 
 #include "config.h"
 
-#ifdef GMX_INTEGER_BIG_ENDIAN
+#if GMX_INTEGER_BIG_ENDIAN
 #define ARCH_IS_BIG_ENDIAN 1
 #else
 #define ARCH_IS_BIG_ENDIAN 0
index f58ffb9f5556d5aa6c7ad747639b798c7b52538e..258a19b71c9c1f0b4fa3b655bf9e73946c513c75 100644 (file)
@@ -48,7 +48,7 @@
 
 #include "config.h"
 
-#ifdef GMX_INTERNAL_XDR
+#if GMX_INTERNAL_XDR
 #include "gromacs/fileio/gmx_system_xdr.h"
 #else
 #include <rpc/rpc.h>
index 25f24b5beb913c33f738adad63857cdd8f30ff3b..d50bae92932b6f22ad09c790532ded731eb64477 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, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
@@ -177,7 +177,7 @@ static const double
 
 double gmx_erfd(double x)
 {
-#ifdef GMX_FLOAT_FORMAT_IEEE754
+#if GMX_FLOAT_FORMAT_IEEE754
     gmx_int32_t hx, ix, i;
     double      R, S, P, Q, s, y, z, r;
 
@@ -190,7 +190,7 @@ double gmx_erfd(double x)
 
     conv.d = x;
 
-#ifdef GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
+#if GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
     hx = conv.i[0];
 #else
     hx = conv.i[1];
@@ -266,7 +266,7 @@ double gmx_erfd(double x)
 
     conv.d = x;
 
-#ifdef GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
+#if GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
     conv.i[1] = 0;
 #else
     conv.i[0] = 0;
@@ -292,7 +292,7 @@ double gmx_erfd(double x)
 
 double gmx_erfcd(double x)
 {
-#ifdef GMX_FLOAT_FORMAT_IEEE754
+#if GMX_FLOAT_FORMAT_IEEE754
     gmx_int32_t hx, ix;
     double      R, S, P, Q, s, y, z, r;
 
@@ -305,7 +305,7 @@ double gmx_erfcd(double x)
 
     conv.d = x;
 
-#ifdef GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
+#if GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
     hx = conv.i[0];
 #else
     hx = conv.i[1];
@@ -383,7 +383,7 @@ double gmx_erfcd(double x)
 
         conv.d = x;
 
-#ifdef GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
+#if GMX_IEEE754_BIG_ENDIAN_WORD_ORDER
         conv.i[1] = 0;
 #else
         conv.i[0] = 0;