Skip to content

Commit

Permalink
chore(bb): make get_num_cpus_pow2 an upper bound
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad authored Feb 4, 2025
1 parent 1778867 commit 025e89f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion barretenberg/cpp/src/barretenberg/common/thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inline size_t get_num_cpus()
// For algorithms that need to be divided amongst power of 2 threads.
inline size_t get_num_cpus_pow2()
{
return static_cast<size_t>(1ULL << numeric::get_msb(get_num_cpus()));
return numeric::round_up_power_2(get_num_cpus());
}

/**
Expand Down

0 comments on commit 025e89f

Please sign in to comment.