From f213a7a5b1b3ab4bd8f5ae4cbb747d14360a15e7 Mon Sep 17 00:00:00 2001 From: mhochsteger Date: Mon, 14 Dec 2020 15:50:27 +0100 Subject: [PATCH] fix fabs for AVX on Windows --- libsrc/core/simd_avx.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/core/simd_avx.hpp b/libsrc/core/simd_avx.hpp index c845ee2c..4e9cc3ba 100644 --- a/libsrc/core/simd_avx.hpp +++ b/libsrc/core/simd_avx.hpp @@ -172,7 +172,7 @@ namespace ngcore NETGEN_INLINE SIMD sqrt (SIMD a) { return _mm256_sqrt_pd(a.Data()); } NETGEN_INLINE SIMD floor (SIMD a) { return _mm256_floor_pd(a.Data()); } NETGEN_INLINE SIMD ceil (SIMD a) { return _mm256_ceil_pd(a.Data()); } - NETGEN_INLINE SIMD fabs (SIMD a) { return _mm256_max_pd(a.Data(), -a.Data()); } + NETGEN_INLINE SIMD fabs (SIMD a) { return _mm256_max_pd(a.Data(), (-a).Data()); } NETGEN_INLINE SIMD operator<= (SIMD a , SIMD b) { return _mm256_cmp_pd (a.Data(), b.Data(), _CMP_LE_OQ); }