feat: fixed step
This commit is contained in:
parent
df5ff455a4
commit
ff60cdabac
@ -327,14 +327,14 @@ find_row_mask(std::vector<set_t> &sets,
|
|||||||
std::vector<std::thread> workers;
|
std::vector<std::thread> workers;
|
||||||
auto thread_num = cpu == 0 ? std::thread::hardware_concurrency() : cpu;
|
auto thread_num = cpu == 0 ? std::thread::hardware_concurrency() : cpu;
|
||||||
if (thread_num > 2) { thread_num -= 2; }
|
if (thread_num > 2) { thread_num -= 2; }
|
||||||
fprintf(stderr, "thread_num: %ld", thread_num);
|
fprintf(stderr, "thread_num: %ld\n", thread_num);
|
||||||
|
|
||||||
uint64_t step = 0;
|
uint64_t step = 1 << 20;
|
||||||
for (uint64_t i = row_mask; i < last_mask; ++step) { i = next_bit_permutation(i); }
|
// for (uint64_t i = row_mask; i < last_mask; ++step) { i = next_bit_permutation(i); }
|
||||||
fprintf(stderr, "total_step: %ld", step);
|
// fprintf(stderr, "total_step: %ld\n", step);
|
||||||
step /= thread_num;
|
// step /= thread_num;
|
||||||
fprintf(stderr, "worker_step: %ld", step);
|
// if (!step) { ++step; }
|
||||||
if (!step) { ++step; }
|
fprintf(stderr, "worker_step: %ld\n", step);
|
||||||
|
|
||||||
for (int i = 0; i < thread_num; ++i) {
|
for (int i = 0; i < thread_num; ++i) {
|
||||||
workers.emplace_back([&] {
|
workers.emplace_back([&] {
|
||||||
|
Loading…
Reference in New Issue
Block a user