mirror of
https://github.com/Cykooz/fast_image_resize.git
synced 2026-11-29 04:01:35 +00:00
Fixed compat module.
This commit is contained in:
1 parent
afb04d2f42
commit
55f6fbdee9
2 files changed
+21
-17
No files matched your search
+12
-10
@@ -6,18 +6,20 @@ pub use alloc::vec::Vec;
|
||||
// `no_std` feature must be enabled
|
||||
pub use num_traits::Float;
|
||||
|
||||
// `no_std` feature must be enabled
|
||||
cpufeatures::new!(cpuid_sse41, "sse4.1");
|
||||
cpufeatures::new!(cpuid_avx2, "avx2");
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(target_arch = "x86_64")] {
|
||||
// `no_std` feature must be enabled
|
||||
cpufeatures::new!(cpuid_sse41, "sse4.1");
|
||||
cpufeatures::new!(cpuid_avx2, "avx2");
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
pub fn has_avx2() -> bool {
|
||||
cpuid_avx2::get()
|
||||
}
|
||||
pub fn has_sse41() -> bool {
|
||||
cpuid_sse41::get()
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
pub fn has_sse41() -> bool {
|
||||
cpuid_sse41::get()
|
||||
pub fn has_avx2() -> bool {
|
||||
cpuid_avx2::get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
|
||||
@@ -3,14 +3,16 @@ pub use std::boxed::Box;
|
||||
pub use std::vec;
|
||||
pub use std::vec::Vec;
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
pub fn has_avx2() -> bool {
|
||||
std::is_x86_feature_detected!("avx2")
|
||||
}
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(target_arch = "x86_64")] {
|
||||
pub fn has_sse41() -> bool {
|
||||
std::is_x86_feature_detected!("sse4.1")
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
pub fn has_sse41() -> bool {
|
||||
std::is_x86_feature_detected!("sse4.1")
|
||||
pub fn has_avx2() -> bool {
|
||||
std::is_x86_feature_detected!("avx2")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
|
||||
Reference in new issue
Block a user