| 583 | // This does not seem to be required for GetMinMaxSpaced(). |
| 584 | template <> |
| 585 | std::pair<int32_t, int32_t> |
| 586 | TypedComparatorImpl</*is_signed=*/false, Int32Type>::GetMinMax(const int32_t* values, |
| 587 | int64_t length) const { |
| 588 | DCHECK_GT(length, 0); |
| 589 | |
| 590 | const uint32_t* unsigned_values = reinterpret_cast<const uint32_t*>(values); |
| 591 | uint32_t min = std::numeric_limits<uint32_t>::max(); |
| 592 | uint32_t max = std::numeric_limits<uint32_t>::lowest(); |
| 593 | |
| 594 | for (int64_t i = 0; i < length; i++) { |
| 595 | const auto val = unsigned_values[i]; |
| 596 | min = std::min<uint32_t>(min, val); |
| 597 | max = std::max<uint32_t>(max, val); |
| 598 | } |
| 599 | |
| 600 | return {SafeCopy<int32_t>(min), SafeCopy<int32_t>(max)}; |
| 601 | } |
| 602 | |
| 603 | template <bool is_signed> |
| 604 | std::pair<ByteArray, ByteArray> GetMinMaxBinaryHelper( |