Skip to content

Commit 14f61f2

Browse files
fix compilation on nightly, bump ver
1 parent c3021a1 commit 14f61f2

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "fath"
33
authors = [ "burgerindividual", "duplexsystem" ]
4-
version = "0.2.0"
4+
version = "0.2.1"
55
edition = "2021"
66
license = "LGPL-3.0"
77
repository = "https://github.com/burgerindividual/fath"

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(core_intrinsics, portable_simd, array_zip)]
1+
#![feature(core_intrinsics, portable_simd)]
22
#![cfg_attr(not(test), no_std)]
33

44
mod scalar;

src/simd/float.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use crate::shared::float::*;
2+
use core::array;
23
use core::simd::*;
34

45
impl<const LANES: usize> FastApproxFloat for Simd<f32, LANES>
@@ -54,10 +55,8 @@ where
5455

5556
#[inline(always)]
5657
unsafe fn log_fast_approx<const PRECISION: usize>(self, base: Self) -> Self {
57-
Simd::from_array(
58-
self.to_array()
59-
.zip(base.to_array())
60-
.map(|(self_elem, base_elem)| log_fast_approx::<PRECISION>(self_elem, base_elem)),
61-
)
58+
Simd::from_array(array::from_fn(|i| {
59+
log_fast_approx::<PRECISION>(self[i], base[i])
60+
}))
6261
}
6362
}

0 commit comments

Comments
 (0)