File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ class edge_compare_src_node_and_configurable_first {
254
254
const std::vector<t_rr_switch_inf>& rr_switch_inf_;
255
255
};
256
256
257
- void t_rr_graph_storage::assign_edges () {
257
+ void t_rr_graph_storage::assign_first_edges () {
258
258
VTR_ASSERT (first_edge_.empty ());
259
259
260
260
// Last element is a dummy element
@@ -418,14 +418,19 @@ void t_rr_graph_storage::partition_edges() {
418
418
VTR_ASSERT (remapped_edges_);
419
419
420
420
const auto & device_ctx = g_vpr_ctx.device ();
421
+ // This sort ensures two things:
422
+ // - Edges are stored in ascending source node order. This is required
423
+ // by assign_first_edges()
424
+ // - Edges within a source node have the configurable edges before the
425
+ // non-configurable edges.
421
426
std::stable_sort (
422
427
edge_sort_iterator (this , 0 ),
423
428
edge_sort_iterator (this , edge_src_node_.size ()),
424
429
edge_compare_src_node_and_configurable_first (device_ctx.rr_switch_inf ));
425
430
426
431
partitioned_ = true ;
427
432
428
- assign_edges ();
433
+ assign_first_edges ();
429
434
430
435
VTR_ASSERT_SAFE (validate ());
431
436
}
Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ class t_rr_graph_storage {
340
340
341
341
// Take allocated edges in edge_src_node_/ edge_dest_node_ / edge_switch_
342
342
// sort, and assign the first edge for each
343
- void assign_edges ();
343
+ void assign_first_edges ();
344
344
345
345
// Verify that first_edge_ array correctly partitions rr edge data.
346
346
bool verify_first_edges () const ;
You can’t perform that action at this time.
0 commit comments