* Implement --max-cpu-usage.
* Fix L2 cache size detect. * Add test for get_optimal_threads_count.
This commit is contained in:
parent
719601f92b
commit
c4bccf410b
8 changed files with 201 additions and 14 deletions
|
@ -101,7 +101,7 @@ void cpu_init_common() {
|
|||
}
|
||||
|
||||
|
||||
int get_optimal_threads_count() {
|
||||
int get_optimal_threads_count(int algo, bool double_hash, int max_cpu_usage) {
|
||||
int count = cpu_info.total_logical_cpus / 2;
|
||||
return count < 1 ? 1 : count;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue