Struct lophat::algorithms::LockFreeAlgorithm
source · pub struct LockFreeAlgorithm<C: Column + 'static> { /* private fields */ }
Expand description
Implements the parallel, lockfree algorithm introduced by Morozov and Nigmetov. Also able to employ the clearing optimisation of Bauer et al..
Implementations§
source§impl<C: Column + 'static> LockFreeAlgorithm<C>
impl<C: Column + 'static> LockFreeAlgorithm<C>
sourcepub fn get_col_with_pivot(
&self,
l: usize
) -> Option<(usize, GuardedRef<(C, Option<C>)>)>
pub fn get_col_with_pivot( &self, l: usize ) -> Option<(usize, GuardedRef<(C, Option<C>)>)>
Return a column with index l
, if one exists.
If found, returns (col_idx, col)
, where col is a tuple consisting of the corresponding column in R and V.
If not maintaining V, second entry of tuple is None
.
sourcepub fn reduce_column(&self, j: usize)
pub fn reduce_column(&self, j: usize)
Reduces the j
th column of the matrix as far as possible.
If a pivot is found to the right of j
(e.g. redued by another thread)
then will switch to reducing that column.
It is safe to reduce all columns in parallel.
sourcepub fn clear_with_column(&self, boudary_idx: usize)
pub fn clear_with_column(&self, boudary_idx: usize)
Uses the boundary built up in column boudary_idx
to clear the column corresponding to its pivot
sourcepub fn reduce_dimension(&self, dimension: usize)
pub fn reduce_dimension(&self, dimension: usize)
Reduce all columns of given dimension in parallel, according to options
.
sourcepub fn clear_dimension(&self, dimension: usize)
pub fn clear_dimension(&self, dimension: usize)
Clear all columns of given dimension in parallel
Trait Implementations§
source§impl<C: Column> DecompositionAlgo<C> for LockFreeAlgorithm<C>
impl<C: Column> DecompositionAlgo<C> for LockFreeAlgorithm<C>
§type Options = LoPhatOptions
type Options = LoPhatOptions
source§fn init(options: Option<Self::Options>) -> Self
fn init(options: Option<Self::Options>) -> Self
source§fn add_cols(self, cols: impl Iterator<Item = C>) -> Self
fn add_cols(self, cols: impl Iterator<Item = C>) -> Self
source§fn add_entries(self, entries: impl Iterator<Item = (usize, usize)>) -> Self
fn add_entries(self, entries: impl Iterator<Item = (usize, usize)>) -> Self
add_cols
then panic!()
§type Decomposition = LockFreeDecomposition<C>
type Decomposition = LockFreeDecomposition<C>
decompose
– should carry sufficient information to query columns of the resulting decomposition.