Skip to content

Commit

Permalink
Fix no-std builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Lynnesbian committed Sep 17, 2024
1 parent 6d33a11 commit b956608
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,14 @@ unsafe fn avx2_support_no_cache_x86() -> bool {
#[cfg(target_arch = "aarch64")]
#[cold]
fn vectorization_support_no_cache_arm() -> Vectorization {
#[cfg(target_arch = "aarch64")]
#[cfg(feature = "std")]
if std::arch::is_aarch64_feature_detected!("neon") {
return Vectorization::Neon;
}
#[cfg(target_feature = "neon")]
return Vectorization::Neon;

#[allow(unreachable_code)]
Vectorization::None
}

Expand Down

0 comments on commit b956608

Please sign in to comment.