Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Lynnesbian committed Sep 23, 2024
1 parent 859221b commit 7f3266e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ pub(crate) fn vectorization_support() -> Vectorization {
return val;
}

#[cfg(all(
target_arch = "aarch64",
target_feature = "neon"
))]
#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
{
// reuse flag code from x86 impl
use core::sync::atomic::{AtomicU8, Ordering};
Expand All @@ -88,7 +85,7 @@ pub(crate) fn vectorization_support() -> Vectorization {
0 => Vectorization::None,
3 => Vectorization::Neon,
_ => unreachable!(),
}
};
}

let val = vectorization_support_no_cache_arm();
Expand Down Expand Up @@ -200,8 +197,7 @@ mod tests {
match vector_support {
Vectorization::Neon => assert!(std::arch::is_aarch64_feature_detected!("neon")),
Vectorization::None => assert!(
!cfg!(target_feature = "neon")
|| !std::arch::is_aarch64_feature_detected!("neon")
!cfg!(target_feature = "neon") || !std::arch::is_aarch64_feature_detected!("neon")
),
_ => unreachable!(),
}
Expand Down

0 comments on commit 7f3266e

Please sign in to comment.