Skip to content

Commit

Permalink
CLI: fix max inner nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
nhusung committed Jun 3, 2024
1 parent 3703933 commit 977f784
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/oxidd-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,11 @@ fn main() {
sys.refresh_memory();
let mem = sys.available_memory();
let apply_cache_size = 4 * 4 * cli.apply_cache_capacity.next_power_of_two();
inner_node_capacity =
std::cmp::min((mem - apply_cache_size as u64) / (4 * 8), (1 << 32) - 1) as usize;
let terminals = if cli.dd_type == DDType::BCDD { 1 } else { 2 };
inner_node_capacity = std::cmp::min(
(mem - apply_cache_size as u64) / (4 * 8),
(1 << 32) - terminals,
) as usize;
}

println!("inner node capacity: {inner_node_capacity}");
Expand Down

0 comments on commit 977f784

Please sign in to comment.