From 25685c90ad95cfa49bad37b4bd3af5d61794c515 Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Tue, 18 Apr 2023 17:46:23 +0000 Subject: [PATCH] Fix incorrect packet type for unsigned int version of pfirst() in MSVC workaround in PacketMath.h. --- Eigen/src/Core/arch/SSE/PacketMath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/arch/SSE/PacketMath.h b/Eigen/src/Core/arch/SSE/PacketMath.h index 027bd82f7..95b2d1257 100644 --- a/Eigen/src/Core/arch/SSE/PacketMath.h +++ b/Eigen/src/Core/arch/SSE/PacketMath.h @@ -1070,7 +1070,7 @@ template<> EIGEN_STRONG_INLINE void prefetch(const uint32_t* add template<> EIGEN_STRONG_INLINE float pfirst(const Packet4f& a) { return a.m128_f32[0]; } template<> EIGEN_STRONG_INLINE double pfirst(const Packet2d& a) { return a.m128d_f64[0]; } template<> EIGEN_STRONG_INLINE int pfirst(const Packet4i& a) { int x = _mm_cvtsi128_si32(a); return x; } -template<> EIGEN_STRONG_INLINE uint32_t pfirst(const Packet4i& a) { uint32_t x = numext::bit_cast(_mm_cvtsi128_si32(a)); return x; } +template<> EIGEN_STRONG_INLINE uint32_t pfirst(const Packet4ui& a) { uint32_t x = numext::bit_cast(_mm_cvtsi128_si32(a)); return x; } #elif EIGEN_COMP_MSVC_STRICT // The temporary variable fixes an internal compilation error in vs <= 2008 and a wrong-result bug in vs 2010 template<> EIGEN_STRONG_INLINE float pfirst(const Packet4f& a) { float x = _mm_cvtss_f32(a); return x; }