@@ -161,7 +161,7 @@ static void count_bidir_routing_transistors(int num_switch, float R_minW_nmos, f
161161
162162 sharable_switch_trans = alloc_and_load_sharable_switch_trans (num_switch,
163163 R_minW_nmos, R_minW_pmos);
164-
164+
165165 std::unordered_map<RRSwitchId, size_t > ipin_switch_count;
166166
167167 for (const RRNodeId from_rr_node : device_ctx.rr_graph .nodes ()) {
@@ -293,8 +293,9 @@ static void count_bidir_routing_transistors(int num_switch, float R_minW_nmos, f
293293 RRSwitchId most_frequent_ipin_switch = std::max_element (ipin_switch_count.begin (),
294294 ipin_switch_count.end (),
295295 [](const auto & a, const auto & b) {
296- return a.second < b.second ;
297- })->first ;
296+ return a.second < b.second ;
297+ })
298+ ->first ;
298299 input_cblock_trans = get_cblock_trans (num_inputs_to_cblock,
299300 most_frequent_ipin_switch,
300301 max_inputs_to_cblock,
@@ -491,8 +492,8 @@ static void count_unidir_routing_transistors(std::vector<t_segment_inf>& /*segme
491492
492493 // Get most frequent ipin switch
493494 RRSwitchId most_frequent_ipin_switch = std::max_element (ipin_switch_count.begin (), ipin_switch_count.end (), [](const auto & a, const auto & b) {
494- return a.second < b.second ;
495- })->first ;
495+ return a.second < b.second ;
496+ })->first ;
496497
497498 input_cblock_trans = get_cblock_trans (num_inputs_to_cblock,
498499 most_frequent_ipin_switch,
0 commit comments