Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ARM Neon compilation and MulAdd implementation #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/FastSIMD/ToolSet/ARM/128/f32x4.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ namespace FS
template<FastSIMD::FeatureSet SIMD, typename = EnableIfNative<f32<4, SIMD>>, typename = std::enable_if_t<SIMD & FastSIMD::FeatureFlag::FMA>>
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<FastSIMD::FeatureSet SIMD, typename = EnableIfNative<f32<4, SIMD>>, typename = std::enable_if_t<SIMD & FastSIMD::FeatureFlag::FMA>>
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 );
}
}
3 changes: 1 addition & 2 deletions include/FastSIMD/ToolSet/ARM/128/m32x4.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ namespace FS

FS_FORCEINLINE Register() = default;

template<typename T = NativeType>
FS_FORCEINLINE Register( std::enable_if_t<OPTIMISE_FLOAT, T> v ) : native( v ) { }
FS_FORCEINLINE Register( NativeType v ) : native( v ) { }

template<typename T = Register<Mask<32, false>, 4, SIMD>>
FS_FORCEINLINE Register( const std::enable_if_t<OPTIMISE_FLOAT, T>& v ) : native( v.native ) { }
Expand Down