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

View File

@ -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<T, R, Cols>> {
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
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<T, R, Cols>> IndexedParallelIterator
for ParColumnIter<'a, T, R, Cols, S>
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>
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<T, R, Cols, S>,
}
#[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<T, R: Dim, Cols: Dim, S: RawStorage<T, R, Cols> + RawStorageMut<T, R, Cols>>
Matrix<T, R, Cols, S>
where