Fix bugs in double AVX(2)_256 Simd4
authorBerk Hess <hess@kth.se>
Fri, 21 Apr 2017 13:59:37 +0000 (15:59 +0200)
committerBerk Hess <hess@kth.se>
Fri, 21 Apr 2017 16:37:38 +0000 (18:37 +0200)
The double precision version of reduce() and dotProduct()
returned a float with AVX_256 and AVX2_256.
Only reduce() is used in double, in the PME force gather.

Fixes #2162.

Change-Id: Iaa44921215e726726b2da223f3677c8637bc65ae

src/gromacs/simd/impl_x86_avx_256/impl_x86_avx_256_simd4_double.h

index 917a7883a8d9a9ef2f72177291de47dce19c09a2..70d312f744b467b7631a1c4d0d6689d154c9c753 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017, 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.
@@ -258,7 +258,7 @@ trunc(Simd4Double x)
     };
 }
 
-static inline float gmx_simdcall
+static inline double gmx_simdcall
 dotProduct(Simd4Double a, Simd4Double b)
 {
     __m128d tmp1, tmp2;
@@ -361,7 +361,7 @@ blend(Simd4Double a, Simd4Double b, Simd4DBool sel)
     };
 }
 
-static inline float gmx_simdcall
+static inline double gmx_simdcall
 reduce(Simd4Double a)
 {
     __m128d a0, a1;