From ff60cdabac25e31ab18d354fc79e118c99427482 Mon Sep 17 00:00:00 2001 From: tqcq Date: Thu, 24 Oct 2024 06:23:50 +0000 Subject: [PATCH] feat: fixed step --- drama/src/rev-mc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drama/src/rev-mc.c b/drama/src/rev-mc.c index a64150e..8a4ae82 100644 --- a/drama/src/rev-mc.c +++ b/drama/src/rev-mc.c @@ -327,14 +327,14 @@ find_row_mask(std::vector &sets, std::vector 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([&] {