diff --git a/src/base/par_iter.rs b/src/base/par_iter.rs index 8aaad348..93796b6a 100644 --- a/src/base/par_iter.rs +++ b/src/base/par_iter.rs @@ -6,7 +6,12 @@ use crate::{ }; 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. It is created +/// using the [`par_column_iter`] method of [`Matrix`]. +/// +/// [`par_column_iter`]: crate::Matrix::par_column_iter +/// [`Matrix`]: crate::Matrix +#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))] pub struct ParColumnIter<'a, T, R: Dim, Cols: Dim, S: RawStorage> { mat: &'a Matrix, } @@ -18,6 +23,7 @@ impl<'a, T, R: Dim, Cols: Dim, S: RawStorage> ParColumnIter<'a, T, R } } +#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))] impl<'a, T, R: Dim, Cols: Dim, S: RawStorage> ParallelIterator for ParColumnIter<'a, T, R, Cols, S> where @@ -38,6 +44,7 @@ where } } +#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))] impl<'a, T, R: Dim, Cols: Dim, S: RawStorage> IndexedParallelIterator for ParColumnIter<'a, T, R, Cols, S> where @@ -61,6 +68,7 @@ where } } +#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))] impl> Matrix where T: Send + Sync + Scalar, @@ -72,6 +80,7 @@ where } } +#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))] /// A rayon parallel iterator through the mutable columns of a matrix pub struct ParColumnIterMut< 'a, @@ -83,6 +92,7 @@ pub struct ParColumnIterMut< mat: &'a mut Matrix, } +#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))] impl<'a, T, R, Cols, S> ParColumnIterMut<'a, T, R, Cols, S> where R: Dim, @@ -95,6 +105,7 @@ where } } +#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))] impl<'a, T, R, Cols, S> ParallelIterator for ParColumnIterMut<'a, T, R, Cols, S> where R: Dim, @@ -116,6 +127,7 @@ where } } +#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))] impl<'a, T, R, Cols, S> IndexedParallelIterator for ParColumnIterMut<'a, T, R, Cols, S> where R: Dim, @@ -141,6 +153,7 @@ where } } +#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))] impl + RawStorageMut> Matrix where