Skip to content

Commit

Permalink
fix compile issue on arm cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
hyb committed Jan 27, 2025
1 parent 1635534 commit 3ba9abd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hash_table5.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "wyhash.h"
#endif

#ifdef EMH_KEY
#ifdef EMH_NEW
#undef EMH_KEY
#undef EMH_VAL
#undef EMH_PKV
Expand Down
5 changes: 4 additions & 1 deletion hash_table8.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
#include <iterator>
#include <algorithm>
#include <memory>

#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__x86_64__)
#include <xmmintrin.h>
#endif

#undef EMH_NEW
#undef EMH_EMPTY
Expand Down Expand Up @@ -1242,7 +1245,7 @@ class HashMap
{
// Prefetch the heap-allocated memory region to resolve potential TLB
// misses. This is intended to overlap with execution of calculating the hash for a key.
#if defined(__GNUC__) || defined(__linux__)
#if defined(__GNUC__) || defined(__clang__)
__builtin_prefetch(static_cast<const void*>(ctrl));
#elif _WIN32
_mm_prefetch((const char*)ctrl, _MM_HINT_T0);
Expand Down

0 comments on commit 3ba9abd

Please # to comment.