1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-08-03 21:27:07 +01:00

SIMD improvements for mac and madd use in complex for avx, sse

This commit is contained in:
Peter Boyle
2015-10-09 00:38:52 +02:00
parent af89c40462
commit 814c79f38d
7 changed files with 100 additions and 3 deletions

View File

@@ -171,6 +171,15 @@ namespace Optimization {
};
struct Mult{
inline void mac(__m128 &a, __m128 b, __m128 c){
a= _mm128_add_ps(_mm128_mul_ps(b,c),a);
}
inline void mac(__m128d &a, __m128d b, __m128d c){
a= _mm128_add_pd(_mm128_mul_pd(b,c),a);
}
// Real float
inline __m128 operator()(__m128 a, __m128 b){
return _mm_mul_ps(a,b);