AVX512 GCC 5.3 work-around
authorRoland Schulz <roland.schulz@intel.com>
Fri, 19 Jan 2018 21:23:27 +0000 (14:23 -0700)
committerRoland Schulz <roland.schulz@intel.com>
Fri, 19 Jan 2018 21:39:14 +0000 (13:39 -0800)
GCC 5.3 has bug in overload resolution causing the AVX512
and scalar function to become ambiguous.

Change-Id: I1db4696f19c05c9eb3a97320a8c6c5b41823cca9

src/gromacs/simd/impl_x86_avx_512/impl_x86_avx_512_util_double.h
src/gromacs/simd/impl_x86_avx_512/impl_x86_avx_512_util_float.h

index 22b4ffaae29a1b49461a071e1a2c7cb04ee4ee10..3d938b4c20c5d58bedc1e2ef73d5031c7888cea8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, 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.
@@ -103,23 +103,23 @@ gatherLoadBySimdIntTranspose(const double * base, SimdDInt32 offset, SimdDouble
 
 template <int align, typename ... Targs>
 static inline void gmx_simdcall
-gatherLoadUBySimdIntTranspose(const double *base, SimdDInt32 offset, Targs... Fargs)
+gatherLoadUBySimdIntTranspose(const double *base, SimdDInt32 offset, SimdDouble *v, Targs... Fargs)
 {
-    gatherLoadBySimdIntTranspose<align>(base, offset, Fargs ...);
+    gatherLoadBySimdIntTranspose<align>(base, offset, v, Fargs ...);
 }
 
 template <int align, typename ... Targs>
 static inline void gmx_simdcall
-gatherLoadTranspose(const double *base, const std::int32_t offset[], Targs... Fargs)
+gatherLoadTranspose(const double *base, const std::int32_t offset[], SimdDouble *v, Targs... Fargs)
 {
-    gatherLoadBySimdIntTranspose<align>(base, simdLoad(offset, SimdDInt32Tag()), Fargs ...);
+    gatherLoadBySimdIntTranspose<align>(base, simdLoad(offset, SimdDInt32Tag()), v, Fargs ...);
 }
 
 template <int align, typename ... Targs>
 static inline void gmx_simdcall
-gatherLoadUTranspose(const double *base, const std::int32_t offset[], Targs... Fargs)
+gatherLoadUTranspose(const double *base, const std::int32_t offset[], SimdDouble *v, Targs... Fargs)
 {
-    gatherLoadTranspose<align>(base, offset, Fargs ...);
+    gatherLoadBySimdIntTranspose<align>(base, simdLoad(offset, SimdDInt32Tag()), v, Fargs ...);
 }
 
 template <int align>
index 6f94b981918492e80de572dd773eefd037283e2f..c9e290bc1234e8656eacb5863bb9361d33a7f830 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2016,2017,2018, 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.
@@ -105,23 +105,23 @@ gatherLoadBySimdIntTranspose(const float *base, SimdFInt32 offset, SimdFloat *v,
 
 template <int align, typename ... Targs>
 static inline void gmx_simdcall
-gatherLoadUBySimdIntTranspose(const float *base, SimdFInt32 offset, Targs... Fargs)
+gatherLoadUBySimdIntTranspose(const float *base, SimdFInt32 offset, SimdFloat *v, Targs... Fargs)
 {
-    gatherLoadBySimdIntTranspose<align>(base, offset, Fargs ...);
+    gatherLoadBySimdIntTranspose<align>(base, offset, v, Fargs ...);
 }
 
 template <int align, typename ... Targs>
 static inline void gmx_simdcall
-gatherLoadTranspose(const float *base, const std::int32_t offset[], Targs... Fargs)
+gatherLoadTranspose(const float *base, const std::int32_t offset[], SimdFloat *v, Targs... Fargs)
 {
-    gatherLoadBySimdIntTranspose<align>(base, simdLoad(offset, SimdFInt32Tag()), Fargs ...);
+    gatherLoadBySimdIntTranspose<align>(base, simdLoad(offset, SimdFInt32Tag()), v, Fargs ...);
 }
 
 template <int align, typename ... Targs>
 static inline void gmx_simdcall
-gatherLoadUTranspose(const float *base, const std::int32_t offset[], Targs... Fargs)
+gatherLoadUTranspose(const float *base, const std::int32_t offset[], SimdFloat *v, Targs... Fargs)
 {
-    gatherLoadTranspose<align>(base, offset, Fargs ...);
+    gatherLoadBySimdIntTranspose<align>(base, simdLoad(offset, SimdFInt32Tag()), v, Fargs ...);
 }
 
 template <int align>