mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 12:09:22 +00:00
Merge pull request #2641 from SChernykh/dev
AstroBWT: fixed rare incorrect hashes
This commit is contained in:
commit
f8f73b0cd7
1 changed files with 5 additions and 5 deletions
|
@ -307,15 +307,15 @@ void sort_indices2(uint32_t N, const uint8_t* v, uint64_t* indices, uint64_t* tm
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ITER(X) { \
|
#define ITER(X) { \
|
||||||
const uint64_t k = tmp_indices[j + X]; \
|
const uint64_t k = tmp_indices[j - X]; \
|
||||||
const uint32_t index = counters[(k >> (64 - COUNTING_SORT_BITS * 2)) & ((1 << COUNTING_SORT_BITS) - 1)]--; \
|
const uint32_t index = counters[(k >> (64 - COUNTING_SORT_BITS * 2)) & ((1 << COUNTING_SORT_BITS) - 1)]--; \
|
||||||
indices[prev_i + index] = k; \
|
indices[prev_i + index] = k; \
|
||||||
}
|
}
|
||||||
for (j = 0; j < n8; j += 8) {
|
for (j = n; j >= 8; j -= 8) {
|
||||||
ITER(0); ITER(1); ITER(2); ITER(3); ITER(4); ITER(5); ITER(6); ITER(7);
|
ITER(1); ITER(2); ITER(3); ITER(4); ITER(5); ITER(6); ITER(7); ITER(8);
|
||||||
}
|
}
|
||||||
for (; j < n; ++j) {
|
for (; j > 0; --j) {
|
||||||
ITER(0);
|
ITER(1);
|
||||||
}
|
}
|
||||||
#undef ITER
|
#undef ITER
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue