From d9f0d9eb766e863c55129c7cc6fcc6ad192294f4 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Fri, 16 Oct 2020 16:20:32 -0700 Subject: [PATCH] Fix missing `pfirst` for MSVC. It was only defined under one `#ifdef` case. This fixes the `packetmath_14` test for MSVC. --- Eigen/src/Core/arch/SSE/PacketMath.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/arch/SSE/PacketMath.h b/Eigen/src/Core/arch/SSE/PacketMath.h index bd354c407..c39c0a06e 100755 --- a/Eigen/src/Core/arch/SSE/PacketMath.h +++ b/Eigen/src/Core/arch/SSE/PacketMath.h @@ -691,7 +691,7 @@ template<> EIGEN_DEVICE_FUNC inline Packet16b pgather(const boo from[11*stride], from[10*stride], from[9*stride], from[8*stride], from[7*stride], from[6*stride], from[5*stride], from[4*stride], from[3*stride], from[2*stride], from[1*stride], from[0*stride]); - } +} template<> EIGEN_DEVICE_FUNC inline void pscatter(float* to, const Packet4f& from, Index stride) { @@ -761,8 +761,8 @@ template<> EIGEN_STRONG_INLINE int pfirst(const Packet4i& a) { int template<> EIGEN_STRONG_INLINE float pfirst(const Packet4f& a) { return _mm_cvtss_f32(a); } template<> EIGEN_STRONG_INLINE double pfirst(const Packet2d& a) { return _mm_cvtsd_f64(a); } template<> EIGEN_STRONG_INLINE int pfirst(const Packet4i& a) { return _mm_cvtsi128_si32(a); } -template<> EIGEN_STRONG_INLINE bool pfirst(const Packet16b& a) { int x = _mm_cvtsi128_si32(a); return static_cast(x & 1); } #endif +template<> EIGEN_STRONG_INLINE bool pfirst(const Packet16b& a) { int x = _mm_cvtsi128_si32(a); return static_cast(x & 1); } template<> EIGEN_STRONG_INLINE Packet4f preverse(const Packet4f& a) { return _mm_shuffle_ps(a,a,0x1B); } template<> EIGEN_STRONG_INLINE Packet2d preverse(const Packet2d& a) { return _mm_shuffle_pd(a,a,0x1); }