From 248145bbf098db391a0db7b5df4e7dcc45055808 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Mon, 14 Dec 2020 12:47:45 +0100 Subject: [PATCH] fix wrong simd operators --- libsrc/core/simd_generic.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsrc/core/simd_generic.hpp b/libsrc/core/simd_generic.hpp index 027b0f14..4fc47c33 100644 --- a/libsrc/core/simd_generic.hpp +++ b/libsrc/core/simd_generic.hpp @@ -338,7 +338,7 @@ namespace ngcore template NETGEN_INLINE SIMD operator- (SIMD a, SIMD b) { if constexpr(N==1) return a.Data()-b.Data(); - else return { a.Lo()-b.Lo(), a.Hi()+b.Hi() }; + else return { a.Lo()-b.Lo(), a.Hi()-b.Hi() }; } template NETGEN_INLINE SIMD operator- (SIMD a) { @@ -349,13 +349,13 @@ namespace ngcore template NETGEN_INLINE SIMD operator* (SIMD a, SIMD b) { if constexpr(N==1) return a.Data()*b.Data(); - else return { a.Lo()*b.Lo(), a.Hi()+b.Hi() }; + else return { a.Lo()*b.Lo(), a.Hi()*b.Hi() }; } template NETGEN_INLINE SIMD operator/ (SIMD a, SIMD b) { if constexpr(N==1) return a.Data()/b.Data(); - else return { a.Lo()/b.Lo(), a.Hi()+b.Hi() }; + else return { a.Lo()/b.Lo(), a.Hi()/b.Hi() }; } template