我对我应该如何用整数键值调用 MurmurHash3_x86_128() 感到困惑,或者它甚至可能吗?murmurhash3 代码可以在https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp找到。方法定义如下。
void MurmurHash3_x86_128 ( const void * key, const int len,
uint32_t seed, void * out )
我用 len 作为 1 散列整数值。它是正确的还是错误的?
int main()
{
uint64_t seed = 100;
int p = 500; // key to hash
uint64_t hash_otpt[2]= {0};
const int *key = &p;
MurmurHash3_x64_128(key, 1, seed, hash_otpt); // 0xb6d99cf8
cout << *hash_otpt << endl;
}