Fixed compile errors on non-x86 architectures.

This commit is contained in:
Kirill Kuzminykh
2021-12-14 00:31:23 +03:00
parent d76faadd2b
commit 9ad6ae4851
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ Environment:
- RAM: DDR4 3000 MHz
- Ubuntu 20.04 (linux 5.11)
- Rust 1.57.0
- fast_image_resize = "0.5.2"
- fast_image_resize = "0.5.3"
- glassbench = "0.3.1"
- `rustflags = ["-C", "llvm-args=-x86-branches-within-32B-boundaries"]`
+3
View File
@@ -3,6 +3,7 @@ use crate::image_view::{TypedImageView, TypedImageViewMut};
use crate::pixels::U8x3;
use crate::CpuExtensions;
#[cfg(target_arch = "x86_64")]
mod avx2;
mod native;
#[cfg(target_arch = "x86_64")]
@@ -19,6 +20,7 @@ impl Convolution for U8x3 {
match cpu_extensions {
#[cfg(target_arch = "x86_64")]
CpuExtensions::Avx2 => avx2::horiz_convolution(src_image, dst_image, offset, coeffs),
#[cfg(target_arch = "x86_64")]
CpuExtensions::Sse4_1 => unsafe {
sse4::horiz_convolution(src_image, dst_image, offset, coeffs)
},
@@ -35,6 +37,7 @@ impl Convolution for U8x3 {
match cpu_extensions {
#[cfg(target_arch = "x86_64")]
CpuExtensions::Avx2 => avx2::vert_convolution(src_image, dst_image, coeffs),
#[cfg(target_arch = "x86_64")]
CpuExtensions::Sse4_1 => unsafe {
sse4::vert_convolution(src_image, dst_image, coeffs)
},