hash: change default mix function to murmur2 mix
This commit is contained in:
parent
86f6611f61
commit
36120319bc
6
hash.hpp
6
hash.hpp
@ -17,14 +17,14 @@
|
|||||||
#ifndef __UTIL_HASH_HPP
|
#ifndef __UTIL_HASH_HPP
|
||||||
#define __UTIL_HASH_HPP
|
#define __UTIL_HASH_HPP
|
||||||
|
|
||||||
#include "hash/wang.hpp"
|
#include "hash/murmur/murmur2.hpp"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
namespace util::hash {
|
namespace util::hash {
|
||||||
uint32_t mix (uint32_t v) { return wang (v); }
|
constexpr std::uint32_t mix (std::uint32_t a, std::uint32_t b) { return murmur2::mix (a, b); }
|
||||||
uint64_t mix (uint64_t v) { return wang (v); }
|
constexpr std::uint64_t mix (std::uint64_t a, std::uint64_t b) { return murmur2::mix (a, b); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user