RsBundle  Diff

Differences From Artifact [7446e76ed2]:

  • File src/solver/sync.rs — part of check-in [316d024643] at 2022-06-13 07:08:30 on branch solver-state — sync: add `num_iterations` method (user: fifr size: 32231)

To Artifact [9c80700875]:

  • File src/solver/sync.rs — part of check-in [21b66facda] at 2022-06-13 08:53:26 on branch solver-state — sync: add error result to `new_with_state` (user: fifr size: 32250)

430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
            start_time: Instant::now(),
        }
    }

    pub fn new_with_state(
        problem: P,
        state: SyncSolverState<<M::MasterProblem as MasterProblem<<P as FirstOrderProblem>::Minorant>>::State>,
    ) -> Self
    where
        M: Default,
    {
        let mut solver = Self::new(problem);
        solver.set_state(state);
        solver
    }

    /// Return the underlying threadpool.
    ///
    /// In order to use the same threadpool for concurrent processes,
    /// just clone the returned `ThreadPool`.
    pub fn threadpool(&self) -> &ThreadPool {







|




|
|







430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
            start_time: Instant::now(),
        }
    }

    pub fn new_with_state(
        problem: P,
        state: SyncSolverState<<M::MasterProblem as MasterProblem<<P as FirstOrderProblem>::Minorant>>::State>,
    ) -> Result<Self, P, M>
    where
        M: Default,
    {
        let mut solver = Self::new(problem);
        solver.set_state(state)?;
        Ok(solver)
    }

    /// Return the underlying threadpool.
    ///
    /// In order to use the same threadpool for concurrent processes,
    /// just clone the returned `ThreadPool`.
    pub fn threadpool(&self) -> &ThreadPool {