Line data Source code
1 : #include "utils/strong_hash.hpp" 2 : 3 : using namespace std; 4 : 5 0 : size_t utils::strong_hash<long>::operator()(long x) const { 6 : // From: 7 : // - https://stackoverflow.com/a/12996028/12283316 8 0 : x = (x ^ (x >> 30)) * (long)(0xbf58476d1ce4e5b9); 9 0 : x = (x ^ (x >> 27)) * (long)(0x94d049bb133111eb); 10 0 : x = x ^ (x >> 31); 11 0 : return x; 12 : }