Skip to content

Commit 03307ec

Browse files
committed
[vpr][route][rr_graph] change comparator-based range to projection-based
1 parent b531af8 commit 03307ec

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

vpr/src/route/rr_graph_generation/rr_graph_area.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,7 @@ static void count_bidir_routing_transistors(int num_switch, float R_minW_nmos, f
290290
/* Now add in the input connection block transistors. */
291291

292292
// Get most frequent ipin switch
293-
auto most_frequent_ipin_switch_it = std::ranges::max_element(
294-
ipin_switch_count,
295-
[](const auto& a, const auto& b) noexcept { return a.second < b.second; });
293+
auto most_frequent_ipin_switch_it = std::ranges::max_element(ipin_switch_count, {}, [](const auto& p) noexcept { return p.second; });
296294
VTR_ASSERT(most_frequent_ipin_switch_it != ipin_switch_count.end());
297295
RRSwitchId most_frequent_ipin_switch = most_frequent_ipin_switch_it->first;
298296

@@ -491,9 +489,7 @@ static void count_unidir_routing_transistors(std::vector<t_segment_inf>& /*segme
491489
/* Now add in the input connection block transistors. */
492490

493491
// Get most frequent ipin switch
494-
auto most_frequent_ipin_switch_it = std::ranges::max_element(
495-
ipin_switch_count,
496-
[](const auto& a, const auto& b) noexcept { return a.second < b.second; });
492+
auto most_frequent_ipin_switch_it = std::ranges::max_element(ipin_switch_count, {}, [](const auto& p) noexcept { return p.second; });
497493
VTR_ASSERT(most_frequent_ipin_switch_it != ipin_switch_count.end());
498494
RRSwitchId most_frequent_ipin_switch = most_frequent_ipin_switch_it->first;
499495

0 commit comments

Comments
 (0)