diff --git a/Cargo.toml b/Cargo.toml index ff3407fe..7e7df5b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ libm = [ "simba/libm" ] libm-force = [ "simba/libm_force" ] macros = [ "nalgebra-macros" ] cuda = [ "cust_core", "simba/cuda" ] -rayon-par = [ "std", "rayon" ] +rayon = [ "std", "dep:rayon" ] # Conversion convert-mint = [ "mint" ] diff --git a/src/base/iter.rs b/src/base/iter.rs index b3f66d81..4e1dc21a 100644 --- a/src/base/iter.rs +++ b/src/base/iter.rs @@ -447,7 +447,7 @@ mod parallel { impl<'a, T, R: Dim, Cols: Dim, S: RawStorage> Producer for ColumnIter<'a, T, R, Cols, S> where - T: Send + Sync + Scalar, + T: Send + Sync + Scalar, S: Sync, { type Item = MatrixSlice<'a, T, R, U1, S::RStride, S::CStride>; diff --git a/src/base/par_iter.rs b/src/base/par_iter.rs index 589f7b81..8aaad348 100644 --- a/src/base/par_iter.rs +++ b/src/base/par_iter.rs @@ -1,9 +1,9 @@ -//! this module implements parallelators to make matrices work with -//! the rayon crate seamlessly +//! Parallel iterators for matrices compatible with rayon. use crate::{ iter::{ColumnIter, ColumnIterMut}, - Dim, Matrix, MatrixSlice, MatrixSliceMut, RawStorage, RawStorageMut, U1, Scalar,}; + Dim, Matrix, MatrixSlice, MatrixSliceMut, RawStorage, RawStorageMut, Scalar, U1, +}; use rayon::{iter::plumbing::bridge, prelude::*}; /// A rayon parallel iterator over the colums of a matrix diff --git a/tests/core/matrix.rs b/tests/core/matrix.rs index 150eb678..12f5308e 100644 --- a/tests/core/matrix.rs +++ b/tests/core/matrix.rs @@ -1223,7 +1223,7 @@ fn parallel_column_iteration() { #[test] #[cfg(feature = "rayon")] -fn colum_iteration_mut_double_ended() { +fn column_iteration_mut_double_ended() { let dmat = nalgebra::dmatrix![ 13,14,15,16,17; 23,24,25,26,27; diff --git a/tests/lib.rs b/tests/lib.rs index 49384d8a..fb13b3ae 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -10,8 +10,8 @@ compile_error!( ); // make sure to test the parallel iterators for all builds that do not require no_std -#[cfg(all(feature = "std", not(feature = "rayon-par")))] -compile_error!("Please additionally enable the `rayon-par` feature to compile and run the tests"); +#[cfg(all(feature = "std", not(feature = "rayon")))] +compile_error!("Please additionally enable the `rayon` feature to compile and run the tests"); #[cfg(all(feature = "debug", feature = "compare", feature = "rand"))] #[macro_use]