From 81848b5c940843e14dbb1a78f69b7ae64fc0db83 Mon Sep 17 00:00:00 2001 From: tqcq Date: Thu, 24 Oct 2024 05:34:16 +0000 Subject: [PATCH] feat: calc step --- drama/src/rev-mc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drama/src/rev-mc.c b/drama/src/rev-mc.c index f3bf53d..96b9e40 100644 --- a/drama/src/rev-mc.c +++ b/drama/src/rev-mc.c @@ -328,7 +328,8 @@ find_row_mask(std::vector &sets, std::vector 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([&] {