feat: add log
This commit is contained in:
parent
9b95b11f4d
commit
a53cedd6d5
@ -341,6 +341,7 @@ find_row_mask(std::vector<set_t> &sets,
|
||||
// if (!step) { ++step; }
|
||||
fprintf(stderr, "worker_step: %ld\n", step);
|
||||
|
||||
std::atomic<uint64_t> cnt{0};
|
||||
for (int i = 0; i < thread_num; ++i) {
|
||||
workers.emplace_back([&] {
|
||||
while (!found) {
|
||||
@ -357,6 +358,9 @@ find_row_mask(std::vector<set_t> &sets,
|
||||
while (cur_mask < last_mask && step_count > 0 && !found.load(std::memory_order_relaxed)) {
|
||||
for (int i = std::min(step_count, step); i > 0 && cur_mask < last_mask; --i) {
|
||||
cur_mask = next_bit_permutation(cur_mask);
|
||||
if (cnt.fetch_add(1) % 10000 == 0) {
|
||||
fprintf(stderr, "cnt : %5ld\n", cnt.load(std::memory_order_relaxed));
|
||||
}
|
||||
}
|
||||
step_count -= std::min(step_count, step);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user