Skip to main content

ParallelGraphAlgorithm

Trait ParallelGraphAlgorithm 

Source
pub trait ParallelGraphAlgorithm: GraphAlgorithm {
    // Required method
    fn execute_parallel(
        &self,
        store: &LpgStore,
        params: &Parameters,
        num_threads: usize,
    ) -> Result<AlgorithmResult>;

    // Provided method
    fn parallel_threshold(&self) -> usize { ... }
}
Expand description

A graph algorithm that supports parallel execution.

Algorithms implementing this trait can automatically switch between sequential and parallel execution based on graph size.

Required Methods§

Source

fn execute_parallel( &self, store: &LpgStore, params: &Parameters, num_threads: usize, ) -> Result<AlgorithmResult>

Executes the algorithm with explicit parallelism control.

Provided Methods§

Source

fn parallel_threshold(&self) -> usize

Minimum node count to trigger parallelization.

Below this threshold, sequential execution is used to avoid parallelization overhead.

Implementors§