forked from M-Labs/nalgebra
address review
This commit is contained in:
parent
e40687d8e6
commit
e9a5705e1a
@ -33,7 +33,7 @@ libm = [ "simba/libm" ]
|
|||||||
libm-force = [ "simba/libm_force" ]
|
libm-force = [ "simba/libm_force" ]
|
||||||
macros = [ "nalgebra-macros" ]
|
macros = [ "nalgebra-macros" ]
|
||||||
cuda = [ "cust_core", "simba/cuda" ]
|
cuda = [ "cust_core", "simba/cuda" ]
|
||||||
rayon-par = [ "std", "rayon" ]
|
rayon = [ "std", "dep:rayon" ]
|
||||||
|
|
||||||
# Conversion
|
# Conversion
|
||||||
convert-mint = [ "mint" ]
|
convert-mint = [ "mint" ]
|
||||||
|
@ -447,7 +447,7 @@ mod parallel {
|
|||||||
|
|
||||||
impl<'a, T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols>> Producer for ColumnIter<'a, T, R, Cols, S>
|
impl<'a, T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols>> Producer for ColumnIter<'a, T, R, Cols, S>
|
||||||
where
|
where
|
||||||
T: Send + Sync + Scalar,
|
T: Send + Sync + Scalar,
|
||||||
S: Sync,
|
S: Sync,
|
||||||
{
|
{
|
||||||
type Item = MatrixSlice<'a, T, R, U1, S::RStride, S::CStride>;
|
type Item = MatrixSlice<'a, T, R, U1, S::RStride, S::CStride>;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
//! this module implements parallelators to make matrices work with
|
//! Parallel iterators for matrices compatible with rayon.
|
||||||
//! the rayon crate seamlessly
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
iter::{ColumnIter, ColumnIterMut},
|
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::*};
|
use rayon::{iter::plumbing::bridge, prelude::*};
|
||||||
|
|
||||||
/// A rayon parallel iterator over the colums of a matrix
|
/// A rayon parallel iterator over the colums of a matrix
|
||||||
|
@ -1223,7 +1223,7 @@ fn parallel_column_iteration() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "rayon")]
|
#[cfg(feature = "rayon")]
|
||||||
fn colum_iteration_mut_double_ended() {
|
fn column_iteration_mut_double_ended() {
|
||||||
let dmat = nalgebra::dmatrix![
|
let dmat = nalgebra::dmatrix![
|
||||||
13,14,15,16,17;
|
13,14,15,16,17;
|
||||||
23,24,25,26,27;
|
23,24,25,26,27;
|
||||||
|
@ -10,8 +10,8 @@ compile_error!(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// make sure to test the parallel iterators for all builds that do not require no_std
|
// make sure to test the parallel iterators for all builds that do not require no_std
|
||||||
#[cfg(all(feature = "std", not(feature = "rayon-par")))]
|
#[cfg(all(feature = "std", not(feature = "rayon")))]
|
||||||
compile_error!("Please additionally enable the `rayon-par` feature to compile and run the tests");
|
compile_error!("Please additionally enable the `rayon` feature to compile and run the tests");
|
||||||
|
|
||||||
#[cfg(all(feature = "debug", feature = "compare", feature = "rand"))]
|
#[cfg(all(feature = "debug", feature = "compare", feature = "rand"))]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
Loading…
Reference in New Issue
Block a user