From 14f61f2f8dce1063d61422a942ca4629186878b4 Mon Sep 17 00:00:00 2001 From: burgerguy Date: Fri, 2 Jun 2023 17:11:13 -0400 Subject: [PATCH] fix compilation on nightly, bump ver --- Cargo.toml | 2 +- src/lib.rs | 2 +- src/simd/float.rs | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c519192..1d134f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/lib.rs b/src/lib.rs index a4b05ef..2c0beeb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(core_intrinsics, portable_simd, array_zip)] +#![feature(core_intrinsics, portable_simd)] #![cfg_attr(not(test), no_std)] mod scalar; diff --git a/src/simd/float.rs b/src/simd/float.rs index 1a75098..961b631 100644 --- a/src/simd/float.rs +++ b/src/simd/float.rs @@ -1,4 +1,5 @@ use crate::shared::float::*; +use core::array; use core::simd::*; impl FastApproxFloat for Simd @@ -54,10 +55,8 @@ where #[inline(always)] unsafe fn log_fast_approx(self, base: Self) -> Self { - Simd::from_array( - self.to_array() - .zip(base.to_array()) - .map(|(self_elem, base_elem)| log_fast_approx::(self_elem, base_elem)), - ) + Simd::from_array(array::from_fn(|i| { + log_fast_approx::(self[i], base[i]) + })) } }