feat: calc step

This commit is contained in:
tqcq 2024-10-24 05:34:16 +00:00
parent 4304baebbb
commit 81848b5c94

View File

@ -328,7 +328,8 @@ find_row_mask(std::vector<set_t> &sets,
std::vector<std::thread> workers;
auto thread_num = std::thread::hardware_concurrency();
if (thread_num > 2) { thread_num -= 2; }
const uint64_t step = (last_mask - row_mask) / thread_num;
uint64_t step = 0;
for (uint64_t i = row_mask; i < last_mask; ++step) { i = next_bit_permutation(i); }
for (int i = 0; i < thread_num; ++i) {
workers.emplace_back([&] {