| 730 | |
| 731 | template <typename T, typename U> |
| 732 | void validate_min_max_loc(const MinMaxLocationValues<T> &target, const MinMaxLocationValues<U> &reference) |
| 733 | { |
| 734 | if (framework::Framework::get().configure_only() && framework::Framework::get().new_fixture_call()) |
| 735 | { |
| 736 | return; |
| 737 | } |
| 738 | |
| 739 | ARM_COMPUTE_EXPECT_EQUAL(target.min, reference.min, framework::LogLevel::ERRORS); |
| 740 | ARM_COMPUTE_EXPECT_EQUAL(target.max, reference.max, framework::LogLevel::ERRORS); |
| 741 | |
| 742 | ARM_COMPUTE_EXPECT_EQUAL(target.min_loc.size(), reference.min_loc.size(), framework::LogLevel::ERRORS); |
| 743 | ARM_COMPUTE_EXPECT_EQUAL(target.max_loc.size(), reference.max_loc.size(), framework::LogLevel::ERRORS); |
| 744 | |
| 745 | for (uint32_t i = 0; i < target.min_loc.size(); ++i) |
| 746 | { |
| 747 | const auto same_coords = |
| 748 | std::find_if(reference.min_loc.begin(), reference.min_loc.end(), |
| 749 | [&target, i](Coordinates2D coord) |
| 750 | { return coord.x == target.min_loc.at(i).x && coord.y == target.min_loc.at(i).y; }); |
| 751 | |
| 752 | ARM_COMPUTE_EXPECT(same_coords != reference.min_loc.end(), framework::LogLevel::ERRORS); |
| 753 | } |
| 754 | |
| 755 | for (uint32_t i = 0; i < target.max_loc.size(); ++i) |
| 756 | { |
| 757 | const auto same_coords = |
| 758 | std::find_if(reference.max_loc.begin(), reference.max_loc.end(), |
| 759 | [&target, i](Coordinates2D coord) |
| 760 | { return coord.x == target.max_loc.at(i).x && coord.y == target.max_loc.at(i).y; }); |
| 761 | |
| 762 | ARM_COMPUTE_EXPECT(same_coords != reference.max_loc.end(), framework::LogLevel::ERRORS); |
| 763 | } |
| 764 | } |
| 765 | } // namespace validation |
| 766 | } // namespace test |
| 767 | } // namespace arm_compute |
nothing calls this directly
no test coverage detected