14#include "arcane/utils/HashFunction.h"
15#include "arcane/utils/String.h"
33 uint64_t _MurmurHash64A(
const void* key, uint64_t len,
unsigned int seed)
35 const uint64_t m = 0xc6a4a7935bd1e995;
38 uint64_t h = seed ^ (
len * m);
40 const uint64_t* data = (
const uint64_t*)key;
41 const uint64_t* end = data + (
len / 8);
54 const unsigned char* data2 = (
const unsigned char*)data;
58 h ^= uint64_t(data2[6]) << 48;
61 h ^= uint64_t(data2[5]) << 40;
64 h ^= uint64_t(data2[4]) << 32;
67 h ^= uint64_t(data2[3]) << 24;
70 h ^= uint64_t(data2[2]) << 16;
73 h ^= uint64_t(data2[1]) << 8;
76 h ^= uint64_t(data2[0]);
91Int64 IntegerHashFunctionT<StringView>::
92hashfunc(StringView str)
94 Span<const Byte> bytes(str.bytes());
95 return _MurmurHash64A(bytes.data(), bytes.size(), 0x424);
Integer len(const char *s)
Retourne la longueur de la chaîne s.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-