quantrs2_anneal/bayesian_hyperopt/
parallel.rs

1//! Parallel Configuration Types
2
3/// Parallel optimization configuration
4#[derive(Debug, Clone)]
5pub struct ParallelConfig {
6    /// Enable parallel evaluation
7    pub enabled: bool,
8    /// Number of parallel workers
9    pub num_workers: usize,
10    /// Batch size for parallel evaluation
11    pub batch_size: usize,
12    /// Load balancing strategy
13    pub load_balancing: LoadBalancingStrategy,
14}
15
16impl Default for ParallelConfig {
17    fn default() -> Self {
18        Self {
19            enabled: false,
20            num_workers: 4,
21            batch_size: 4,
22            load_balancing: LoadBalancingStrategy::RoundRobin,
23        }
24    }
25}
26
27/// Load balancing strategies
28#[derive(Debug, Clone, PartialEq, Eq)]
29pub enum LoadBalancingStrategy {
30    /// Round-robin assignment
31    RoundRobin,
32    /// Work-stealing approach
33    WorkStealing,
34    /// Dynamic load balancing
35    Dynamic,
36}