Skip to content

Commit

Permalink
fix: neon no_std (#141)
Browse files Browse the repository at this point in the history
I accidentally typed `std::mem` out of habit, this wasn't caught in #133 because `neon+no_std` isn't exercised
  • Loading branch information
AaronO authored May 4, 2023
1 parent 1c5faf8 commit 46c9c9b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/simd/neon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ unsafe fn offsetz(x: uint8x16_t) -> u32 {
unsafe fn offsetnz(x: uint8x16_t) -> u32 {
// Extract two u64
let x = vreinterpretq_u64_u8(x);
let low: u64 = std::mem::transmute(vget_low_u64(x));
let high: u64 = std::mem::transmute(vget_high_u64(x));
// Extract to general purpose registers to perform clz
let low: u64 = vgetq_lane_u64::<0>(x);
let high: u64 = vgetq_lane_u64::<1>(x);

#[inline]
fn clz(x: u64) -> u32 {
Expand Down

0 comments on commit 46c9c9b

Please sign in to comment.