MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CombineHash

Function CombineHash

tensorflow/core/grappler/graph_analyzer/hash_tools.h:29–31  ·  view source on GitHub ↗

Unfortunately, std::hash provides no way to combine hashes, so everyone is copying boost::hash_combine. This is a version that follows Google's guidelines on the arguments, and contains only the combination, without hashing.

Source from the content-addressed store, hash-verified

27// guidelines on the arguments, and contains only the combination, without
28// hashing.
29inline void CombineHash(size_t from, size_t* to) {
30 *to ^= from + 0x9e3779b9 + (*to << 6) + (*to >> 2);
31}
32
33// Combine two hashes in such a way that the order of combination doesn't matter
34// (so it's really both commutative and associative). The result is not a very

Callers 9

TEST_FFunction · 0.85
TestGraphEveryWayMethod · 0.85
CopyLinksPass2Method · 0.85
ComputeTopoHash0Method · 0.85
ComputeTopoHashMethod · 0.85
FindUniqueHashesMethod · 0.85
HashMethod · 0.85
operator()Method · 0.85
ReHighTopoHashMethod · 0.85

Calls

no outgoing calls

Tested by 2

TEST_FFunction · 0.68
TestGraphEveryWayMethod · 0.68