| 528 | // This does not seem to be required for GetMinMaxSpaced(). |
| 529 | template <> |
| 530 | std::pair<int32_t, int32_t> |
| 531 | TypedComparatorImpl</*is_signed=*/false, Int32Type>::GetMinMax(const int32_t* values, |
| 532 | int64_t length) const { |
| 533 | DCHECK_GT(length, 0); |
| 534 | |
| 535 | const uint32_t* unsigned_values = reinterpret_cast<const uint32_t*>(values); |
| 536 | uint32_t min = std::numeric_limits<uint32_t>::max(); |
| 537 | uint32_t max = std::numeric_limits<uint32_t>::lowest(); |
| 538 | |
| 539 | for (int64_t i = 0; i < length; i++) { |
| 540 | const auto val = unsigned_values[i]; |
| 541 | min = std::min<uint32_t>(min, val); |
| 542 | max = std::max<uint32_t>(max, val); |
| 543 | } |
| 544 | |
| 545 | return {SafeCopy<int32_t>(min), SafeCopy<int32_t>(max)}; |
| 546 | } |
| 547 | |
| 548 | template <bool is_signed> |
| 549 | std::pair<ByteArray, ByteArray> GetMinMaxBinaryHelper( |