diff --git a/Cargo.lock b/Cargo.lock index 90063e4d..0cd2b614 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,6 +133,7 @@ dependencies = [ "console", "number_prefix", "portable-atomic", + "rayon", "unicode-width", ] diff --git a/common/route/awooter/rust/Cargo.toml b/common/route/awooter/rust/Cargo.toml index 6b7abb08..a959c311 100644 --- a/common/route/awooter/rust/Cargo.toml +++ b/common/route/awooter/rust/Cargo.toml @@ -12,6 +12,6 @@ crate-type = ["staticlib"] [dependencies] libc = "0.2" -indicatif = "0.17" +indicatif = { version = "0.17", features = ["rayon"] } rayon = "1.6" colored = "2" \ No newline at end of file diff --git a/common/route/awooter/rust/src/lib.rs b/common/route/awooter/rust/src/lib.rs index 4f8dd8c4..4c985d6d 100644 --- a/common/route/awooter/rust/src/lib.rs +++ b/common/route/awooter/rust/src/lib.rs @@ -5,7 +5,7 @@ use std::{ }; use colored::Colorize; -use indicatif::{ProgressBar, ProgressStyle}; +use indicatif::{ProgressBar, ProgressStyle, ParallelProgressIterator}; use rayon::prelude::*; use crate::npnr::PortRef; @@ -287,6 +287,7 @@ fn partition_nets( let arcs = dereffed_nets .into_par_iter() + .progress_with(progress) .filter(|(_, net)| !net.is_global()) .filter_map(|(name, net)| { let source = unsafe { net.driver().as_ref().unwrap() }; @@ -547,8 +548,6 @@ fn partition_nets( } } - progress.finish_and_clear(); - log_info!( " {} pips explored\n", explored_pips.get_mut().to_string().bold()