summaryrefslogtreecommitdiffhomepage
path: root/hash/hash-impl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'hash/hash-impl.hpp')
-rw-r--r--hash/hash-impl.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/hash/hash-impl.hpp b/hash/hash-impl.hpp
index 3e33b38b..f752a889 100644
--- a/hash/hash-impl.hpp
+++ b/hash/hash-impl.hpp
@@ -1,4 +1,20 @@
#pragma once
+#include "compat/defs.hpp"
+
+#if (defined __x86_64__ || defined __i386__ || defined _M_AMD64 || defined _M_IX86) && \
+ (defined __AES__ || defined _MSC_VER && defined __AVX__)
+#define FM_HASH_HAVE_MEOWHASH 1
+#else
+#define FM_HASH_HAVE_MEOWHASH 0
+#endif
+
+#if FM_HASH_HAVE_MEOWHASH
+namespace floormat::meow_hash {
+size_t hash_buf(const void* __restrict buf, size_t size) noexcept;
+size_t hash_int(uint32_t x) noexcept;
+size_t hash_int(uint64_t x) noexcept;
+} // namespace floormat::meow_hash
+#endif
namespace floormat::xxHash {
size_t hash_buf(const void* __restrict buf, size_t size) noexcept;