fix fmaddsub intrinsic calls

This commit is contained in:
Matthias Hochsteger 2022-11-21 11:47:06 +01:00
parent f457009083
commit e09a38d804
2 changed files with 6 additions and 6 deletions

View File

@ -221,13 +221,13 @@ namespace ngcore
#endif
#if defined(__FMA__)
NETGEN_INLINE auto FMAddSub (SIMD<double,4> a, SIMD<double,4> b, SIMD<double,4> c)
NETGEN_INLINE SIMD<double,4> FMAddSub (SIMD<double,4> a, SIMD<double,4> b, SIMD<double,4> c)
{
return _mm256_fmaddsub_pd(a,b,c);
return _mm256_fmaddsub_pd(a.Data(), b.Data(), c.Data());
}
#endif
NETGEN_INLINE auto SwapPairs (SIMD<double,4> a)
NETGEN_INLINE SIMD<double,4> SwapPairs (SIMD<double,4> a)
{
return _mm256_shuffle_pd (a.Data(), a.Data(), 0b0101);
}

View File

@ -259,12 +259,12 @@ namespace ngcore
return _mm512_fnmadd_pd (_mm512_set1_pd(a), b.Data(), c.Data());
}
NETGEN_INLINE auto FMAddSub (SIMD<double,8> a, SIMD<double,8> b, SIMD<double,8> c)
NETGEN_INLINE SIMD<double,8> FMAddSub (SIMD<double,8> a, SIMD<double,8> b, SIMD<double,8> c)
{
return _mm512_fmaddsub_pd(a,b,c);
return _mm512_fmaddsub_pd(a.Data(), b.Data(), c.Data());
}
NETGEN_INLINE auto SwapPairs (SIMD<double,8> a)
NETGEN_INLINE SIMD<double,8> SwapPairs (SIMD<double,8> a)
{
return _mm512_shuffle_pd (a.Data(), a.Data(), 0b01010101);
}