Skip to content

Commit

Permalink
Fix compilation error with simd feature (#1169)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhorstmann authored Jan 14, 2022
1 parent 7449e2c commit 5fb0534
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions arrow/src/compute/kernels/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,11 @@ where
#[cfg(feature = "simd")]
{
let scalar_vector = T::init(scalar);
return simd_unary_math_op(array, |x| x - scalar_vector, |x| x - scalar);
return Ok(simd_unary_math_op(
array,
|x| x - scalar_vector,
|x| x - scalar,
));
}
#[cfg(not(feature = "simd"))]
return Ok(unary(array, |value| value - scalar));
Expand Down Expand Up @@ -706,7 +710,11 @@ where
#[cfg(feature = "simd")]
{
let scalar_vector = T::init(scalar);
return simd_unary_math_op(array, |x| x * scalar_vector, |x| x * scalar);
return Ok(simd_unary_math_op(
array,
|x| x * scalar_vector,
|x| x * scalar,
));
}
#[cfg(not(feature = "simd"))]
return Ok(unary(array, |value| value * scalar));
Expand Down

0 comments on commit 5fb0534

Please sign in to comment.