Skip to content

Commit

Permalink
mem hash tune
Browse files Browse the repository at this point in the history
  • Loading branch information
madMAx43v3r committed Mar 16, 2024
1 parent 83b23ea commit 481e14a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pos/mem_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void calc_mem_hash(uint32_t* mem, uint8_t* hash, const int num_iter)
for(int i = 0; i < N; ++i) {
sum += rotl_32(state[i], i % 32);
}
const uint32_t dir = sum + rotl_32(sum, 11) + rotl_32(sum, 22);
const uint32_t dir = sum + (sum << 11) + (sum << 22);

const uint32_t bits = (dir >> 22) % 32u;
const uint32_t offset = (dir >> 27);
Expand Down

0 comments on commit 481e14a

Please sign in to comment.