Fix simd-test
authorRoland Schulz <roland.schulz@intel.com>
Sun, 19 Aug 2018 00:56:15 +0000 (17:56 -0700)
committerMark Abraham <mark.j.abraham@gmail.com>
Sun, 19 Aug 2018 18:47:12 +0000 (20:47 +0200)
Having the data constants as expressions makes it more likely for the
compiler to reorder expressions and thus get results outside of
the tight ulp checks.

Also fix compiler error with GMX_OPENMP_MAX_THREADS=128.

Change-Id: Iacdcb8d4f6536e69bedd5b028d5150e73db0c764

src/gromacs/listed-forces/manage-threading.cpp
src/gromacs/simd/tests/data.h

index b62ac48a98094fe0cb67d27bfa7f15c7d6cf8504..e9d770612746bcd79d90571041be671925d2cc77 100644 (file)
@@ -453,7 +453,6 @@ void setup_bonded_threading(bonded_threading_t *bt,
                 std::string flags = gmx::formatString("%lx", *mask);
 #else
                 std::string flags = gmx::formatAndJoin(*mask,
-                                                       *mask+BITMASK_ALEN,
                                                        "", gmx::StringFormatter("%x"));
 #endif
                 fprintf(debug, "block %d flags %s count %d\n",
index c1074ebac6528f60356a354768ab624f89daaf46..c6c21a6e0728759ae6b3e011cc62f25a99dac7e2 100644 (file)
@@ -61,16 +61,16 @@ namespace test
 /*! \cond internal */
 /*! \addtogroup module_simd */
 /*! \{ */
-constexpr real czero = 0.0;             //!< zero
-constexpr real c0    = 0.0 + 1.0/3.0;   //!< test constant
-constexpr real c1    = 1.0 + 5.0/7.0;   //!< test constant
-constexpr real c2    = 2.0 + 9.0/13.0;  //!< test constant
-constexpr real c3    = 3.0 + 17.0/19.0; //!< test constant
-constexpr real c4    = 4.0 + 23.0/29.0; //!< test constant
-constexpr real c5    = 5.0 + 31.0/37.0; //!< test constant
-constexpr real c6    = 6.0 + 41.0/43.0; //!< test constant
-constexpr real c7    = 7.0 + 47.0/53.0; //!< test constant
-constexpr real c8    = 8.0 + 59.0/61.0; //!< test constant
+constexpr real czero = 0.0;                //!< zero
+constexpr real c0    = 0.3333333333333333; //!< test constant 0.0 + 1.0/3.0
+constexpr real c1    = 1.7142857142857144; //!< test constant 1.0 + 5.0/7.0
+constexpr real c2    = 2.6923076923076925; //!< test constant 2.0 + 9.0/13.0
+constexpr real c3    = 3.8947368421052633; //!< test constant 3.0 + 17.0/19.0
+constexpr real c4    = 4.793103448275862;  //!< test constant 4.0 + 23.0/29.0
+constexpr real c5    = 5.837837837837838;  //!< test constant 5.0 + 31.0/37.0
+constexpr real c6    = 6.953488372093023;  //!< test constant 6.0 + 41.0/43.0
+constexpr real c7    = 7.886792452830189;  //!< test constant 7.0 + 47.0/53.0
+constexpr real c8    = 8.967213114754099;  //!< test constant 8.0 + 59.0/61.0
 
 /*! \} */
 /*! \endcond */