From bb1909c2a82e19de67e7231f1ed00cf16ad27594 Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Tue, 5 Jul 2022 19:51:48 +0200 Subject: [PATCH] Use StdFloat to fix compile error --- sbp/Cargo.toml | 1 + sbp/src/operators/algos.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sbp/Cargo.toml b/sbp/Cargo.toml index 2429918..24f704e 100644 --- a/sbp/Cargo.toml +++ b/sbp/Cargo.toml @@ -13,6 +13,7 @@ num-traits = "0.2.14" float = { path = "../utils/float" } constmatrix = { path = "../utils/constmatrix" } core_simd = { git = "https://github.com/rust-lang/portable-simd" } +std_float = { git = "https://github.com/rust-lang/portable-simd" } [features] # Use f32 as precision, default is f64 diff --git a/sbp/src/operators/algos.rs b/sbp/src/operators/algos.rs index 73f877a..2be31ca 100644 --- a/sbp/src/operators/algos.rs +++ b/sbp/src/operators/algos.rs @@ -2,6 +2,7 @@ use super::*; use ndarray::s; use num_traits::Zero; use std::convert::TryInto; +use std_float::StdFloat; pub(crate) use constmatrix::{ColVector, Matrix, RowVector}; @@ -442,7 +443,7 @@ pub(crate) fn diff_op_2d_sliceable_y_simd