Skip to content

Commit

Permalink
Added integral transformation u8 SSE
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed Sep 2, 2024
1 parent 65ba6a1 commit 1a600e8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib/gaussian/sse/horiz_one_approx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ use std::arch::x86::*;
#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*;

#[inline]
#[target_feature(enable = "sse4.1")]
#[cfg(target_arch = "x86")]
pub unsafe fn _mm_loadu_si16(mem_addr: *const u8) -> __m128i {
let item = (mem_addr as *const i16).read_unaligned();
_mm_set1_epi16(item)
}

#[inline]
#[target_feature(enable = "sse4.1")]
pub unsafe fn _mm_sum_clamp(v: __m128i) -> i32 {
Expand Down

0 comments on commit 1a600e8

Please sign in to comment.