Compute the hash of a TfLiteIntArray.
| 346 | |
| 347 | // Compute the hash of a TfLiteIntArray. |
| 348 | uint64_t GetHash(const TfLiteIntArray* int_array) { |
| 349 | constexpr auto kHashConst = 0x9e3779b97f4a7800ULL; |
| 350 | uint64_t result = 0; |
| 351 | for (auto i : TfLiteIntArrayView(int_array)) { |
| 352 | result = result ^ (i + kHashConst + (result << 10) + (result >> 4)); |
| 353 | } |
| 354 | return result; |
| 355 | } |
| 356 | |
| 357 | bool HasZeroes(TfLiteIntArrayView array) { |
| 358 | for (auto value : array) { |