Skip to content

Commit

Permalink
fix compilation on nightly, bump ver
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerindividual committed Jun 2, 2023
1 parent c3021a1 commit 14f61f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "fath"
authors = [ "burgerindividual", "duplexsystem" ]
version = "0.2.0"
version = "0.2.1"
edition = "2021"
license = "LGPL-3.0"
repository = "https://github.com/burgerindividual/fath"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(core_intrinsics, portable_simd, array_zip)]
#![feature(core_intrinsics, portable_simd)]
#![cfg_attr(not(test), no_std)]

mod scalar;
Expand Down
9 changes: 4 additions & 5 deletions src/simd/float.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::shared::float::*;
use core::array;
use core::simd::*;

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

#[inline(always)]
unsafe fn log_fast_approx<const PRECISION: usize>(self, base: Self) -> Self {
Simd::from_array(
self.to_array()
.zip(base.to_array())
.map(|(self_elem, base_elem)| log_fast_approx::<PRECISION>(self_elem, base_elem)),
)
Simd::from_array(array::from_fn(|i| {
log_fast_approx::<PRECISION>(self[i], base[i])
}))
}
}

0 comments on commit 14f61f2

Please sign in to comment.