aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/AVX
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2019-08-30 14:03:29 -0700
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2019-08-30 14:03:29 -0700
commitf6c51d9209ccc04d28c39f4c8059e7d3e74d6e07 (patch)
tree7d28a815d307368a6175b9ed6dc5f78df00bf684 /Eigen/src/Core/arch/AVX
parentbc40d4522c56fdf861fcdab28f4b7db609d8065e (diff)
Fix missing header inclusion and colliding definitions for half type casting, which broke
build with -march=native on Haswell/Skylake.
Diffstat (limited to 'Eigen/src/Core/arch/AVX')
-rw-r--r--Eigen/src/Core/arch/AVX/TypeCasting.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Eigen/src/Core/arch/AVX/TypeCasting.h b/Eigen/src/Core/arch/AVX/TypeCasting.h
index 910fc06ca..181043588 100644
--- a/Eigen/src/Core/arch/AVX/TypeCasting.h
+++ b/Eigen/src/Core/arch/AVX/TypeCasting.h
@@ -52,6 +52,7 @@ template<> EIGEN_STRONG_INLINE Packet8f preinterpret<Packet8f,Packet8i>(const Pa
return _mm256_castsi256_ps(a);
}
+#ifndef EIGEN_VECTORIZE_AVX512
template <>
struct type_casting_traits<Eigen::half, float> {
@@ -75,6 +76,8 @@ struct type_casting_traits<float, Eigen::half> {
};
};
+#endif // EIGEN_VECTORIZE_AVX512
+
template<> EIGEN_STRONG_INLINE Packet8h pcast<Packet8f, Packet8h>(const Packet8f& a) {
return float2half(a);
}