start expanding docs(not done)

This commit is contained in:
geo-ant 2022-11-12 19:01:28 +01:00 committed by Sébastien Crozet
parent 324e686fe6
commit 83c2e27d6d
1 changed files with 14 additions and 1 deletions

View File

@ -6,7 +6,12 @@ use crate::{
}; };
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. 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<T, R, Cols>> { pub struct ParColumnIter<'a, T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols>> {
mat: &'a Matrix<T, R, Cols, S>, mat: &'a Matrix<T, R, Cols, S>,
} }
@ -18,6 +23,7 @@ impl<'a, T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols>> ParColumnIter<'a, T, R
} }
} }
#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))]
impl<'a, T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols>> ParallelIterator impl<'a, T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols>> ParallelIterator
for ParColumnIter<'a, T, R, Cols, S> for ParColumnIter<'a, T, R, Cols, S>
where where
@ -38,6 +44,7 @@ where
} }
} }
#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))]
impl<'a, T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols>> IndexedParallelIterator impl<'a, T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols>> IndexedParallelIterator
for ParColumnIter<'a, T, R, Cols, S> for ParColumnIter<'a, T, R, Cols, S>
where where
@ -61,6 +68,7 @@ where
} }
} }
#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))]
impl<T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols>> Matrix<T, R, Cols, S> impl<T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols>> Matrix<T, R, Cols, S>
where where
T: Send + Sync + Scalar, 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 /// A rayon parallel iterator through the mutable columns of a matrix
pub struct ParColumnIterMut< pub struct ParColumnIterMut<
'a, 'a,
@ -83,6 +92,7 @@ pub struct ParColumnIterMut<
mat: &'a mut Matrix<T, R, Cols, S>, mat: &'a mut Matrix<T, R, Cols, S>,
} }
#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))]
impl<'a, T, R, Cols, S> ParColumnIterMut<'a, T, R, Cols, S> impl<'a, T, R, Cols, S> ParColumnIterMut<'a, T, R, Cols, S>
where where
R: Dim, 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> impl<'a, T, R, Cols, S> ParallelIterator for ParColumnIterMut<'a, T, R, Cols, S>
where where
R: Dim, 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> impl<'a, T, R, Cols, S> IndexedParallelIterator for ParColumnIterMut<'a, T, R, Cols, S>
where where
R: Dim, R: Dim,
@ -141,6 +153,7 @@ where
} }
} }
#[cfg_attr(doc_cfg, doc(cfg(feature = "rayon")))]
impl<T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols> + RawStorageMut<T, R, Cols>> impl<T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols> + RawStorageMut<T, R, Cols>>
Matrix<T, R, Cols, S> Matrix<T, R, Cols, S>
where where