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>

source

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.

source

pub fn reduce_column(&self, j: usize)

Reduces the jth 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.

source

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

source

pub fn reduce_dimension(&self, dimension: usize)

Reduce all columns of given dimension in parallel, according to options.

source

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>

§

type Options = LoPhatOptions

A struct of options that you wish to provide to the algorithm.
source§

fn init(options: Option<Self::Options>) -> Self

Initialise the algorithm with the options provided and an empty input matrix
source§

fn add_cols(self, cols: impl Iterator<Item = C>) -> Self

Push the provided columns onto the end of the matrix
source§

fn add_entries(self, entries: impl Iterator<Item = (usize, usize)>) -> Self

Add the provided (row, column) entries to the matrix. If the column has not already been pushed via add_cols then panic!()
§

type Decomposition = LockFreeDecomposition<C>

Return tupe of decompose – should carry sufficient information to query columns of the resulting decomposition.
source§

fn decompose(self) -> Self::Decomposition

Decomposes the built-up matrix (D) into an R=DV decomposition, following the relevant algorithm and provided options.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Ungil for T
where T: Send,