Skip to content

Commit

Permalink
Change rotl function
Browse files Browse the repository at this point in the history
Implement rotl function instead of using the function from immintrin.h
  • Loading branch information
alexandrsmirn committed Oct 23, 2023
1 parent 00850a2 commit 8881f10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/algorithms/ind/faida/hashing/hashing.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
namespace algos::faida::hashing {

inline size_t __attribute__((always_inline)) rotl(size_t hash, int num_bits) {
return __rolq(hash, num_bits);
num_bits &= 63;
return (hash << num_bits) | (hash >> (-num_bits & 63));
}

inline size_t __attribute__((always_inline)) CalcMurmurHash(std::string const& str) {
Expand Down

0 comments on commit 8881f10

Please sign in to comment.