* Implement --max-cpu-usage.

* Fix L2 cache size detect.
* Add test for get_optimal_threads_count.
This commit is contained in:
XMRig 2017-05-10 19:38:35 +03:00
parent 719601f92b
commit c4bccf410b
8 changed files with 201 additions and 14 deletions

View file

@ -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;
}