From 20dbd23b001661e9538d980cbf469732fc63a512 Mon Sep 17 00:00:00 2001 From: Rogiel Sulzbach Date: Tue, 26 Dec 2023 15:09:39 -0300 Subject: [PATCH] Fix ARM Neon compilation and MulAdd implementation --- include/FastSIMD/ToolSet/ARM/128/f32x4.h | 4 ++-- include/FastSIMD/ToolSet/ARM/128/m32x4.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/FastSIMD/ToolSet/ARM/128/f32x4.h b/include/FastSIMD/ToolSet/ARM/128/f32x4.h index e40f2d4..a0fffbd 100644 --- a/include/FastSIMD/ToolSet/ARM/128/f32x4.h +++ b/include/FastSIMD/ToolSet/ARM/128/f32x4.h @@ -232,12 +232,12 @@ namespace FS template>, typename = std::enable_if_t> FS_FORCEINLINE f32<4, SIMD> FMulAdd( const f32<4, SIMD>& a, const f32<4, SIMD>& b, const f32<4, SIMD>& c ) { - return vmlaq_f32( b.native, c.native, a.native ); + return vmlaq_f32( c.native, b.native, a.native ); } template>, typename = std::enable_if_t> FS_FORCEINLINE f32<4, SIMD> FNMulAdd( const f32<4, SIMD>& a, const f32<4, SIMD>& b, const f32<4, SIMD>& c ) { - return vmlaq_f32( b.native, c.native, a.native ); + return vmlsq_f32( c.native, b.native, a.native ); } } diff --git a/include/FastSIMD/ToolSet/ARM/128/m32x4.h b/include/FastSIMD/ToolSet/ARM/128/m32x4.h index 239a618..5a49230 100644 --- a/include/FastSIMD/ToolSet/ARM/128/m32x4.h +++ b/include/FastSIMD/ToolSet/ARM/128/m32x4.h @@ -17,8 +17,7 @@ namespace FS FS_FORCEINLINE Register() = default; - template - FS_FORCEINLINE Register( std::enable_if_t v ) : native( v ) { } + FS_FORCEINLINE Register( NativeType v ) : native( v ) { } template, 4, SIMD>> FS_FORCEINLINE Register( const std::enable_if_t& v ) : native( v.native ) { }