- Timestamp:
- 07/12/21 19:58:18 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/utils.hpp
r1474 r2177 181 181 for(int i = 0; i < sizeVec; ++i) 182 182 { 183 hash ^= i+ 0x9e3779b9 + (hash << 6) + (hash >> 2);183 hash ^= jenkins_hash(vec[i]) + 0x9e3779b9 + (hash << 6) + (hash >> 2); 184 184 } 185 185 return hash; 186 186 } 187 188 static inline size_t hash_combine(size_t seed, const T& value) 189 { 190 seed ^= jenkins_hash(value) + 0x9e3779b9 + (seed << 6) + (seed >> 2); 191 return seed; 192 } 193 187 194 }; 188 195 … … 200 207 return HashAlgorithm<T>::boost_hash(vec); 201 208 } 202 209 210 std::size_t hashCombine(size_t seed, const T& val) 211 { 212 return HashAlgorithm<T>::hash_combine(seed, val); 213 } 203 214 private: 204 215 size_t hash_value(const T& val, Int2Type<0>)
Note: See TracChangeset
for help on using the changeset viewer.