HSum(4) for M1, FlatArray!=

This commit is contained in:
Joachim Schoeberl 2022-02-04 17:01:22 +01:00
parent 087b0e7b6a
commit 1222356cf4
2 changed files with 14 additions and 2 deletions

View File

@ -658,7 +658,13 @@ namespace ngcore
return true;
}
template <class T1, class T2>
inline bool operator!= (const FlatArray<T1> & a1,
const FlatArray<T2> & a2)
{
return !(a1==a2);
}
/**
Dynamic array container.

View File

@ -117,9 +117,15 @@ namespace ngcore
{
// return SIMD<double,2> (a[0]+a[1], b[0]+b[1]);
return vpaddq_f64(a.Data(), b.Data());
}
NETGEN_INLINE SIMD<double,4> HSum(SIMD<double,2> a, SIMD<double,2> b, SIMD<double,2> c, SIMD<double,2> d)
{
return SIMD<double,4> (HSum(a,b), HSum(c,d));
}
// a*b+c
NETGEN_INLINE SIMD<double,2> FMA (SIMD<double,2> a, SIMD<double,2> b, SIMD<double,2> c)
{