From 1222356cf4aca90033d4392affe4ec5baae1b305 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Fri, 4 Feb 2022 17:01:22 +0100 Subject: [PATCH] HSum(4) for M1, FlatArray!= --- libsrc/core/array.hpp | 8 +++++++- libsrc/core/simd_arm64.hpp | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/libsrc/core/array.hpp b/libsrc/core/array.hpp index 20139061..138d615f 100644 --- a/libsrc/core/array.hpp +++ b/libsrc/core/array.hpp @@ -658,7 +658,13 @@ namespace ngcore return true; } - + template + inline bool operator!= (const FlatArray & a1, + const FlatArray & a2) + { + return !(a1==a2); + } + /** Dynamic array container. diff --git a/libsrc/core/simd_arm64.hpp b/libsrc/core/simd_arm64.hpp index f2572d34..f5bf694f 100644 --- a/libsrc/core/simd_arm64.hpp +++ b/libsrc/core/simd_arm64.hpp @@ -117,9 +117,15 @@ namespace ngcore { // return SIMD (a[0]+a[1], b[0]+b[1]); return vpaddq_f64(a.Data(), b.Data()); - } + NETGEN_INLINE SIMD HSum(SIMD a, SIMD b, SIMD c, SIMD d) + { + return SIMD (HSum(a,b), HSum(c,d)); + } + + + // a*b+c NETGEN_INLINE SIMD FMA (SIMD a, SIMD b, SIMD c) {