feat: remove check
This commit is contained in:
parent
1e56190df7
commit
df5ff455a4
@ -305,11 +305,9 @@ find_row_mask(std::vector<set_t> &sets,
|
|||||||
const uint64_t last_mask = (row_mask << (40 - 16));
|
const uint64_t last_mask = (row_mask << (40 - 16));
|
||||||
row_mask <<= CL_SHIFT;// skip the lowest 6 bits since they're used for CL addressing
|
row_mask <<= CL_SHIFT;// skip the lowest 6 bits since they're used for CL addressing
|
||||||
|
|
||||||
auto resolve = [=](uint64_t row_mask, std::atomic<bool> &stopped) -> bool {
|
auto resolve = [=](uint64_t row_mask) -> bool {
|
||||||
if (row_mask & LS_BITMASK(CL_SHIFT)) { return false; }
|
if (row_mask & LS_BITMASK(CL_SHIFT)) { return false; }
|
||||||
for (auto addr_pool : same_row_sets) {
|
for (auto addr_pool : same_row_sets) {
|
||||||
if (stopped.load(std::memory_order_relaxed)) { return false; }
|
|
||||||
|
|
||||||
addr_tuple base_addr = addr_pool[0];
|
addr_tuple base_addr = addr_pool[0];
|
||||||
for (int i = 1; i < addr_pool.size(); i++) {
|
for (int i = 1; i < addr_pool.size(); i++) {
|
||||||
addr_tuple tmp = addr_pool[i];
|
addr_tuple tmp = addr_pool[i];
|
||||||
@ -352,7 +350,7 @@ find_row_mask(std::vector<set_t> &sets,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < step && cur_mask < last_mask; ++i) {
|
for (int i = 0; i < step && cur_mask < last_mask; ++i) {
|
||||||
if (resolve(cur_mask, found)) {
|
if (!found.load(std::memory_order_relaxed) && resolve(cur_mask)) {
|
||||||
std::lock_guard<std::mutex> _(lock);
|
std::lock_guard<std::mutex> _(lock);
|
||||||
if (!found.exchange(true)) {
|
if (!found.exchange(true)) {
|
||||||
row_mask = cur_mask;
|
row_mask = cur_mask;
|
||||||
|
Loading…
Reference in New Issue
Block a user