diff --git a/src/lib/gaussian/sse/horiz_one_approx.rs b/src/lib/gaussian/sse/horiz_one_approx.rs index 4490f95..70c3fe6 100644 --- a/src/lib/gaussian/sse/horiz_one_approx.rs +++ b/src/lib/gaussian/sse/horiz_one_approx.rs @@ -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 {