Skip to content

Commit

Permalink
Sqrt for ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
Auburn committed Apr 27, 2024
1 parent 6fe19bb commit f542be7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/FastSIMD/ToolSet/ARM/128/f32x4.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ namespace FS
return vmulq_f32( rsqrt, vrsqrtsq_f32( vmulq_f32( a.native, rsqrt ), rsqrt ) );
}

template<FastSIMD::FeatureSet SIMD, typename = EnableIfNative<f32<4, SIMD>>>
FS_FORCEINLINE f32<4, SIMD> Sqrt( const f32<4, SIMD>& a )
{
return vsqrtq_f32( a.native );
}

template<FastSIMD::FeatureSet SIMD, typename = EnableIfNative<f32<4, SIMD>>, typename = EnableIfRelaxed<SIMD>>
FS_FORCEINLINE f32<4, SIMD> FMulAdd( const f32<4, SIMD>& a, const f32<4, SIMD>& b, const f32<4, SIMD>& c )
{
Expand Down

0 comments on commit f542be7

Please sign in to comment.