From 63dea024d461e503148c3d775fe9db8537614714 Mon Sep 17 00:00:00 2001 From: Markus Wick Date: Thu, 15 Oct 2026 15:17:43 +0200 Subject: [PATCH] Fix SSE2 build on MSVC by renaming a variable. It was broken if you include some windows headers before xsimd. Come on, MS, why do you define "small" as "char"... --- include/xsimd/arch/xsimd_sse2.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/xsimd/arch/xsimd_sse2.hpp b/include/xsimd/arch/xsimd_sse2.hpp index 26e858d9c..544fdfc59 100644 --- a/include/xsimd/arch/xsimd_sse2.hpp +++ b/include/xsimd/arch/xsimd_sse2.hpp @@ -2275,8 +2275,8 @@ namespace xsimd __m128d d = _mm_sub_pd(d0, t2n); d = _mm_sub_pd(d, _mm_and_pd(_mm_cmpgt_pd(d, v), _mm_set1_pd(1.))); // floor(|self|) d = _mm_andnot_pd(signmask, d); // roundTowardNegative makes 2^52 - 2^52 negative - __m128d small = _mm_cmplt_pd(v, t2n); - return _mm_or_pd(s, _mm_or_pd(_mm_and_pd(small, d), _mm_andnot_pd(small, v))); + __m128d is_small = _mm_cmplt_pd(v, t2n); + return _mm_or_pd(s, _mm_or_pd(_mm_and_pd(is_small, d), _mm_andnot_pd(is_small, v))); } // zip_hi