Skip to content

Commit c1120d8

Browse files
committed
apply changes from code review
1 parent 511e1da commit c1120d8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

cfavml/src/danger/impl_neon.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ impl Hypot<f32> for Neon {
152152
#[inline(always)]
153153
unsafe fn hypot(x: Self::Register, y: Self::Register) -> Self::Register {
154154
// Convert inputs to absolute values
155-
let (x, y) = (vabsq_f32(x), vabsq_f32(y));
155+
let x = vabsq_f32(x);
156+
let y = vabsq_f32(y);
156157

157158
// Find the max and min of the two inputs
158-
let (hi, lo) = (vmaxq_f32(x, y), vminq_f32(x, y));
159+
let hi = vmaxq_f32(x, y);
160+
let lo = vminq_f32(x, y);
159161
let exponent_mask = vdupq_n_u32(EXPONENT_MASK_F32);
160162
let mantissa_mask = vdupq_n_u32(MANTISSA_MASK_F32);
161163

@@ -327,10 +329,12 @@ impl Hypot<f64> for Neon {
327329
#[inline(always)]
328330
unsafe fn hypot(x: Self::Register, y: Self::Register) -> Self::Register {
329331
// Convert inputs to absolute values
330-
let (x, y) = (vabsq_f64(x), vabsq_f64(y));
332+
let x = vabsq_f64(x);
333+
let y = vabsq_f64(y);
331334

332335
// Find the max and min of the two inputs
333-
let (hi, lo) = (vmaxq_f64(x, y), vminq_f64(x, y));
336+
let hi = vmaxq_f64(x, y);
337+
let lo = vminq_f64(x, y);
334338
let exponent_mask = vdupq_n_u64(f64::INFINITY.to_bits());
335339
let mantissa_mask =
336340
vdupq_n_u64((f64::MIN_POSITIVE - mem::transmute::<u64, f64>(1)).to_bits());

0 commit comments

Comments
 (0)