14#ifndef OR_TOOLS_BASE_THOROUGH_HASH_H_
15#define OR_TOOLS_BASE_THOROUGH_HASH_H_
22 const uint64_t kMul1 = 0xc6a4a7935bd1e995ULL;
23 const uint64_t kMul2 = 0x228876a7198b743ULL;
24 uint64_t
a = fp1 * kMul1 + fp2 * kMul2;
28 return a + (~a >> 47);
35 uint64_t fp = 0xa5b85c5e198ed849ULL;
36 const char*
end = bytes + len;
37 while (bytes + 8 <=
end) {
38 fp =
MixTwoUInt64(fp, *(
reinterpret_cast<const uint64_t*
>(bytes)));
43 uint64_t last_bytes = 0;
Collection of objects used to extend the Constraint Solver library.
uint64_t MixTwoUInt64(uint64_t fp1, uint64_t fp2)
uint64_t ThoroughHash(const char *bytes, size_t len)
std::optional< int64_t > end