Use libcpuid for detect optimal threads count.

This commit is contained in:
XMRig 2017-05-03 13:48:08 +03:00
parent 0a6d70c499
commit f329410940
9 changed files with 180 additions and 87 deletions

View file

@ -244,7 +244,7 @@ static void parse_arg(int key, char *arg) {
case 1020: /* --cpu-affinity */
p = strstr(arg, "0x");
ul = p ? strtoul(p, NULL, 16) : atol(arg);
if (ul > (1UL << cpu_info.count) -1) {
if (ul > (1UL << cpu_info.total_logical_cpus) -1) {
ul = -1;
}