Skip to content

Commit 1a600e8

Browse files
committed
Added integral transformation u8 SSE
1 parent 65ba6a1 commit 1a600e8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lib/gaussian/sse/horiz_one_approx.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ use std::arch::x86::*;
3434
#[cfg(target_arch = "x86_64")]
3535
use std::arch::x86_64::*;
3636

37+
#[inline]
38+
#[target_feature(enable = "sse4.1")]
39+
#[cfg(target_arch = "x86")]
40+
pub unsafe fn _mm_loadu_si16(mem_addr: *const u8) -> __m128i {
41+
let item = (mem_addr as *const i16).read_unaligned();
42+
_mm_set1_epi16(item)
43+
}
44+
3745
#[inline]
3846
#[target_feature(enable = "sse4.1")]
3947
pub unsafe fn _mm_sum_clamp(v: __m128i) -> i32 {

0 commit comments

Comments
 (0)