fix: auto adjust thread num
This commit is contained in:
parent
81f156be08
commit
6374c128af
@ -329,7 +329,7 @@ find_row_mask(std::vector<set_t> &sets,
|
||||
|
||||
std::vector<std::thread> workers;
|
||||
int thread_num = cpu == 0 ? std::thread::hardware_concurrency() : cpu;
|
||||
if (thread_num > 4) { thread_num = 4; }
|
||||
if (cpu == 0 && thread_num > 4) { thread_num -= 4; }
|
||||
fprintf(stderr, "thread_num: %d\n", thread_num);
|
||||
|
||||
uint64_t step = 1000;
|
||||
|
Loading…
Reference in New Issue
Block a user