mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-07 07:55:04 -05:00
* Implement --max-cpu-usage.
* Fix L2 cache size detect. * Add test for get_optimal_threads_count.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user