Skip to content

Commit

Permalink
add single thread flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Aug 29, 2024
1 parent 9445210 commit c61158c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ struct Args {
#[arg(short, long)]
verbose: bool,
#[arg(long)]
single_thread: bool,
#[arg(long)]
max_cycles: Option<u64>,
#[arg(value_name = "BTOR2", index = 1)]
filename: String,
Expand All @@ -49,7 +51,11 @@ fn main() {
simplify_expressions(&mut ctx, &mut sys);

// run testing on multiple cores
let num_threads = std::thread::available_parallelism().unwrap().get() as u64;
let num_threads = if args.single_thread {
1
} else {
std::thread::available_parallelism().unwrap().get() as u64
};
let result = Arc::new(RwLock::new(None));
for seed in 0..num_threads {
let result = result.clone();
Expand Down

0 comments on commit c61158c

Please sign in to comment.