Skip to content

Commit

Permalink
Added AVX2, some rework and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed May 28, 2024
1 parent b8cd9a5 commit 95c63d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sse_math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ use std::arch::x86::*;
#[inline]
#[allow(dead_code)]
pub unsafe fn _mm_prefer_fma_ps(a: __m128, b: __m128, c: __m128) -> __m128 {
return _mm_fmadd_ps(b, c, a);
return _mm_add_ps(_mm_mul_ps(b, c), a);
}

#[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
#[cfg(target_feature = "fma")]
#[inline]
#[allow(dead_code)]
pub unsafe fn _mm_prefer_fma_ps(a: __m128, b: __m128, c: __m128) -> __m128 {
return _mm_add_ps(_mm_mul_ps(b, c), a);
return _mm_fmadd_ps(b, c, a);
}

#[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
Expand Down

0 comments on commit 95c63d5

Please sign in to comment.