Expand description
Advanced-parallel algorithms with work-stealing and NUMA-aware optimizations
This module provides state-of-the-art parallel processing implementations optimized for modern multi-core and multi-socket systems. It includes work-stealing algorithms, NUMA-aware memory allocation, and adaptive load balancing for maximum computational throughput.
§Features
- Work-stealing algorithms: Dynamic load balancing across threads
- NUMA-aware processing: Optimized memory access patterns for multi-socket systems
- Adaptive scheduling: Runtime optimization based on workload characteristics
- Lock-free data structures: Minimize synchronization overhead
- Cache-aware partitioning: Optimize data layout for CPU cache hierarchies
- Thread-local optimizations: Reduce inter-thread communication overhead
- Vectorized batch processing: SIMD-optimized parallel algorithms
- Memory-mapped parallel I/O: High-performance data streaming
§Examples
use scirs2_spatial::advanced_parallel::{AdvancedParallelDistanceMatrix, WorkStealingConfig};
use scirs2_core::ndarray::array;
// Configure work-stealing parallel processing
let config = WorkStealingConfig::new()
.with_numa_aware(true)
.with_work_stealing(true)
.with_adaptive_scheduling(true);
// Advanced-parallel distance matrix computation
let points = array![[0.0, 0.0], [1.0, 0.0], [0.0, 1.0], [1.0, 1.0]];
let processor = AdvancedParallelDistanceMatrix::new(config)?;
let distances = processor.compute_parallel(&points.view())?;
println!("Advanced-parallel distance matrix: {:?}", distances.shape());Structs§
- Advanced
Parallel Distance Matrix - Advanced-parallel distance matrix computation
- Advanced
ParallelK Means - Advanced-parallel K-means clustering
- Custom
User Data - User data for custom processing
- Custom
Work Context - Context for custom work
- Distance
Matrix Context - Context for distance matrix computation
- KDTree
Chunk Result - Result of processing a KD-tree chunk
- KDTree
Config - KD-tree configuration for parallel construction
- KDTree
Context - Context for KD-tree construction
- KMeans
Context - Context for K-means clustering
- Nearest
Neighbor Context - Context for nearest neighbor search
- Numa
Topology - NUMA topology information
- Pool
Statistics - Pool statistics for monitoring
- Work
Context - Work context containing shared data for different computation types
- Work
Item - Work item for parallel processing
- Work
Stealing Config - Configuration for advanced-parallel processing
- Work
Stealing Pool - Work-stealing thread pool with NUMA awareness
Enums§
- Memory
Strategy - Memory allocation strategies
- Thread
Affinity Strategy - Thread affinity strategies
- Work
Type - Types of parallel work
Functions§
- get_
numa_ topology - Get NUMA topology information
- global_
work_ stealing_ pool - Get or create the global work-stealing pool
- initialize_
global_ pool - Initialize the global work-stealing pool with configuration
- report_
advanced_ parallel_ capabilities - Report advanced-parallel capabilities