Grindstone Game Engine
v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
Hash.hpp
1
#pragma once
2
3
#include "IntTypes.hpp"
4
5
namespace
Grindstone {
6
using
HashValue = Uint64;
7
8
namespace
Hash {
9
constexpr
HashValue MurmurOAAT64(
const
wchar_t
* key);
10
};
11
12
constexpr
HashValue Hash::MurmurOAAT64(
const
wchar_t
* key) {
13
HashValue h(525201411107845655ull);
14
for
(; *key; ++key) {
15
h ^= *key;
16
h *= 0x5bd1e9955bd1e995;
17
h ^= h >> 47;
18
}
19
return
h;
20
}
21
}
sources
code
Common
Hash.hpp
Generated by
1.12.0