| 784 | } |
| 785 | |
| 786 | uint64 AttrDefHash(const OpDef::AttrDef& a) { |
| 787 | uint64 h = Hash64(a.name()); |
| 788 | h = Hash64(a.type().data(), a.type().size(), h); |
| 789 | h = Hash64Combine(AttrValueHash(a.default_value()), h); |
| 790 | h = Hash64(a.description().data(), a.description().size(), h); |
| 791 | h = Hash64Combine(static_cast<uint64>(a.has_minimum()), h); |
| 792 | h = Hash64Combine(static_cast<uint64>(a.minimum()), h); |
| 793 | h = Hash64Combine(AttrValueHash(a.allowed_values()), h); |
| 794 | return h; |
| 795 | } |
| 796 | |
| 797 | bool RepeatedAttrDefEqual( |
| 798 | const protobuf::RepeatedPtrField<OpDef::AttrDef>& a1, |