| 78 | } |
| 79 | |
| 80 | uint64 RepeatedNodeDefHash(const protobuf::RepeatedPtrField<NodeDef>& ndefs, |
| 81 | const EqualGraphDefOptions& options) { |
| 82 | uint64 h = 0xDECAFCAFFE; |
| 83 | // Insert NodeDefs into map to deterministically sort by name |
| 84 | std::map<string, const NodeDef*> nodes; |
| 85 | for (const NodeDef& node : ndefs) { |
| 86 | nodes[node.name()] = &node; |
| 87 | } |
| 88 | for (const auto& pair : nodes) { |
| 89 | h = Hash64(pair.first.data(), pair.first.size(), h); |
| 90 | h = Hash64Combine(NodeDefHash(*pair.second, options), h); |
| 91 | } |
| 92 | return h; |
| 93 | } |
| 94 | |
| 95 | namespace { |
| 96 |
no test coverage detected