@@ -138,15 +138,12 @@ void t_rr_graph_storage::init_fan_in() {
138138}
139139
140140
141- // Functor for sorting edges according to destination node's ID.
141+ // / Functor for sorting edges according to destination node's ID.
142142class edge_compare_dest_node {
143143public:
144144 edge_compare_dest_node (const t_rr_graph_storage& rr_graph_storage) : rr_graph_storage_(rr_graph_storage) {}
145145
146- bool operator ()(size_t lhs_idx, size_t rhs_idx) const {
147- RREdgeId lhs = RREdgeId (lhs_idx);
148- RREdgeId rhs = RREdgeId (rhs_idx);
149-
146+ bool operator ()(RREdgeId lhs, RREdgeId rhs) const {
150147 RRNodeId lhs_dest_node = rr_graph_storage_.edge_sink_node (lhs);
151148 RRNodeId rhs_dest_node = rr_graph_storage_.edge_sink_node (rhs);
152149
@@ -262,26 +259,24 @@ void t_rr_graph_storage::mark_edges_as_rr_switch_ids() {
262259 remapped_edges_ = true ;
263260}
264261
265- // Functor for sorting edges according to source node, with configurable edges coming first
262+ // / Functor for sorting edges according to source node, with configurable edges coming first
266263class edge_compare_src_node_and_configurable_first {
267264 public:
268265 edge_compare_src_node_and_configurable_first (const vtr::vector<RRSwitchId, t_rr_switch_inf>& rr_switch_inf, const t_rr_graph_storage& rr_graph_storage)
269266 : rr_switch_inf_(rr_switch_inf),
270267 rr_graph_storage_ (rr_graph_storage) {}
271268
272- bool operator ()(size_t lhs_idx, size_t rhs_idx) const {
273- RREdgeId lhs = RREdgeId (lhs_idx);
274- RREdgeId rhs = RREdgeId (rhs_idx);
269+ bool operator ()(RREdgeId lhs, RREdgeId rhs) const {
275270
276271 RRNodeId lhs_dest_node = rr_graph_storage_.edge_sink_node (lhs);
277272 RRNodeId lhs_src_node = rr_graph_storage_.edge_source_node (lhs);
278273 RRSwitchId lhs_switch_type = RRSwitchId (rr_graph_storage_.edge_switch (lhs));
279- bool lhs_is_configurable = rr_switch_inf_[RRSwitchId ( lhs_switch_type) ].configurable ();
274+ bool lhs_is_configurable = rr_switch_inf_[lhs_switch_type].configurable ();
280275
281276 RRNodeId rhs_dest_node = rr_graph_storage_.edge_sink_node (rhs);
282277 RRNodeId rhs_src_node = rr_graph_storage_.edge_source_node (rhs);
283278 RRSwitchId rhs_switch_type = RRSwitchId (rr_graph_storage_.edge_switch (rhs));
284- bool rhs_is_configurable = rr_switch_inf_[RRSwitchId ( rhs_switch_type) ].configurable ();
279+ bool rhs_is_configurable = rr_switch_inf_[rhs_switch_type].configurable ();
285280
286281 return std::make_tuple (lhs_src_node, !lhs_is_configurable, lhs_dest_node, lhs_switch_type) < std::make_tuple (rhs_src_node, !rhs_is_configurable, rhs_dest_node, rhs_switch_type);
287282 }
0 commit comments