diff options
Diffstat (limited to 'src/common/hash.cpp')
-rw-r--r-- | src/common/hash.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/hash.cpp b/src/common/hash.cpp new file mode 100644 index 00000000..57e5e914 --- /dev/null +++ b/src/common/hash.cpp @@ -0,0 +1,12 @@ +#include <string> + +#include "hash.h" +#include "common/shape.h" + +namespace std { +size_t hash<pair<string, marian::Shape>>::operator()(pair<string, marian::Shape> const& k) const { + size_t seed = hash<string>{}(k.first); + marian::util::hash_combine(seed, k.second.hash()); + return seed; +} +} // namespace std |