Skip to content

Commit

Permalink
Fix emhash8 compilation for MinGW.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steinar H. Gunderson committed Nov 1, 2024
1 parent d6b70ef commit feaba49
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hash_table8.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
_etail = bucket; \
_index[bucket] = {bucket, _num_filled++ | ((size_type)(key_hash) & ~_mask)}

#if _WIN32 && defined(_M_IX86)
#include <xmmintrin.h>
#endif

namespace emhash8 {

struct DefaultPolicy {
Expand Down Expand Up @@ -1237,7 +1241,7 @@ class HashMap
// misses. This is intended to overlap with execution of calculating the hash for a key.
#if __linux__
__builtin_prefetch(static_cast<const void*>(ctrl));
#elif _WIN32
#elif _WIN32 && defined(_M_IX86)
_mm_prefetch((const char*)ctrl, _MM_HINT_T0);
#endif
}
Expand Down

0 comments on commit feaba49

Please sign in to comment.