From f5f16fcac7319f5c2644ef88aeae8302749c09dd Mon Sep 17 00:00:00 2001 From: tqcq Date: Sat, 26 Oct 2024 10:01:58 +0000 Subject: [PATCH] feat: update --- drama/src/rev-mc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drama/src/rev-mc.c b/drama/src/rev-mc.c index da21620..cdc1873 100644 --- a/drama/src/rev-mc.c +++ b/drama/src/rev-mc.c @@ -370,10 +370,10 @@ find_row_mask(std::vector &sets, } } - for (int i = 0; i < step && cur_mask < last_mask; ++i) { - if (!found.load(std::memory_order_relaxed) && resolve(cur_mask)) { - std::lock_guard _(lock); + for (int i = 0; i < step && cur_mask < last_mask && !found.load(std::memory_order_relaxed); ++i) { + if (resolve(cur_mask)) { if (!found.exchange(true)) { + std::lock_guard _(lock); row_mask = cur_mask; break; }