feat: fixed step

This commit is contained in:
tqcq 2024-10-24 06:23:50 +00:00
parent df5ff455a4
commit ff60cdabac

View File

@ -327,14 +327,14 @@ find_row_mask(std::vector<set_t> &sets,
std::vector<std::thread> workers;
auto thread_num = cpu == 0 ? std::thread::hardware_concurrency() : cpu;
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;
for (uint64_t i = row_mask; i < last_mask; ++step) { i = next_bit_permutation(i); }
fprintf(stderr, "total_step: %ld", step);
step /= thread_num;
fprintf(stderr, "worker_step: %ld", step);
if (!step) { ++step; }
uint64_t step = 1 << 20;
// for (uint64_t i = row_mask; i < last_mask; ++step) { i = next_bit_permutation(i); }
// fprintf(stderr, "total_step: %ld\n", step);
// step /= thread_num;
// if (!step) { ++step; }
fprintf(stderr, "worker_step: %ld\n", step);
for (int i = 0; i < thread_num; ++i) {
workers.emplace_back([&] {