Skip to content

Commit

Permalink
Add Trunc, Modulus, SignBit functions (WASM ARM)
Browse files Browse the repository at this point in the history
  • Loading branch information
Auburn committed Dec 2, 2024
1 parent c665d1f commit 6c748a8
Show file tree
Hide file tree
Showing 3 changed files with 13 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 @@ -176,6 +176,12 @@ namespace FS
{
return vrndpq_f32( a.native );
}

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

template<FastSIMD::FeatureSet SIMD, typename = EnableIfNative<f32<4, SIMD>>>
FS_FORCEINLINE f32<4, SIMD> Min( const f32<4, SIMD>& a, const f32<4, SIMD>& b )
Expand Down
1 change: 1 addition & 0 deletions include/FastSIMD/ToolSet/Generic/Functions.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <algorithm>
#include <limits>

#include "Register.h"

Expand Down
6 changes: 6 additions & 0 deletions include/FastSIMD/ToolSet/WASM/128/f32x4.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ namespace FS
return wasm_f32x4_floor( a.native );
}

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

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

0 comments on commit 6c748a8

Please sign in to comment.