Re-enabled FMA for AVX-128-FMA
authorBerk Hess <hess@kth.se>
Tue, 28 Apr 2015 10:12:40 +0000 (12:12 +0200)
committerBerk Hess <hess@kth.se>
Tue, 28 Apr 2015 11:08:55 +0000 (13:08 +0200)
All FMA instructions for AVX-128-FMA were not renamed during a SIMD
macro name change, which effectively removed FMA support for AMD.
Fixes #1719.

Change-Id: I855a379d29742d37c586794a191606a360a89c5f

src/gromacs/simd/impl_x86_avx_128_fma/impl_x86_avx_128_fma.h

index 5b3096bee322f5fe367c39da2165a030ea6b1db7..0c2429cd1c773a099f4578c91a78ab4e3b5538cb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014, by the GROMACS development team, led by
+ * Copyright (c) 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.
 #define GMX_SIMD4_HAVE_DOUBLE  /* We can use 256-bit operations for this */
 
 /* SINGLE */
-#undef  gmx_simd_fmadd_ps
-#define gmx_simd_fmadd_ps           _mm_macc_ps
-#undef  gmx_simd_fmsub_ps
-#define gmx_simd_fmsub_ps(a, b, c)    _mm_msub_ps
-#undef  gmx_simd_fnmadd_ps
-#define gmx_simd_fnmadd_ps(a, b, c)   _mm_nmacc_ps
-#undef  gmx_simd_fnmsub_ps
-#define gmx_simd_fnmsub_ps(a, b, c)   _mm_nmsub_ps
+#undef  gmx_simd_fmadd_f
+#define gmx_simd_fmadd_f                 _mm_macc_ps
+#undef  gmx_simd_fmsub_f
+#define gmx_simd_fmsub_f                 _mm_msub_ps
+#undef  gmx_simd_fnmadd_f
+#define gmx_simd_fnmadd_f                _mm_nmacc_ps
+#undef  gmx_simd_fnmsub_f
+#define gmx_simd_fnmsub_f                _mm_nmsub_ps
 #undef  gmx_simd_fraction_f
-#define gmx_simd_fraction_f         _mm_frcz_ps
+#define gmx_simd_fraction_f              _mm_frcz_ps
 
 /* DOUBLE */
-#undef  gmx_simd_fmadd_pd
-#define gmx_simd_fmadd_pd            _mm_macc_pd
-#undef  gmx_simd_fmsub_pd
-#define gmx_simd_fmsub_pd(a, b, c)     _mm_msub_pd
-#undef  gmx_simd_fnmadd_pd
-#define gmx_simd_fnmadd_pd(a, b, c)    _mm_nmacc_pd
-#undef  gmx_simd_fnmsub_pd
-#define gmx_simd_fnmsub_pd(a, b, c)    _mm_nmsub_pd
+#undef  gmx_simd_fmadd_d
+#define gmx_simd_fmadd_d                 _mm_macc_pd
+#undef  gmx_simd_fmsub_d
+#define gmx_simd_fmsub_d                 _mm_msub_pd
+#undef  gmx_simd_fnmadd_d
+#define gmx_simd_fnmadd_d                _mm_nmacc_pd
+#undef  gmx_simd_fnmsub_d
+#define gmx_simd_fnmsub_d                _mm_nmsub_pd
 #undef  gmx_simd_fraction_d
-#define gmx_simd_fraction_d          _mm_frcz_pd
+#define gmx_simd_fraction_d              _mm_frcz_pd
 
 /* Even if the _main_ SIMD implementation for this architecture file corresponds
  * to 128-bit AVX (since it will be faster), the 256-bit operations will always