@@ -30,10 +30,10 @@ static void fix_cluster_port_after_moving(const ClusterBlockId clb_index);
30
30
31
31
static void fix_cluster_net_after_moving (const t_pack_molecule* molecule,
32
32
int molecule_size,
33
- const ClusterBlockId& old_clb,
34
- const ClusterBlockId& new_clb);
33
+ ClusterBlockId old_clb,
34
+ ClusterBlockId new_clb);
35
35
36
- static void rebuild_cluster_placement_stats (const ClusterBlockId& clb_index,
36
+ static void rebuild_cluster_placement_stats (ClusterBlockId clb_index,
37
37
const std::unordered_set<AtomBlockId>& clb_atoms);
38
38
39
39
static void update_cluster_pb_stats (const t_pack_molecule* molecule,
@@ -42,7 +42,7 @@ static void update_cluster_pb_stats(const t_pack_molecule* molecule,
42
42
bool is_added);
43
43
44
44
/* **************** API functions ***********************/
45
- ClusterBlockId atom_to_cluster (const AtomBlockId& atom) {
45
+ ClusterBlockId atom_to_cluster (AtomBlockId atom) {
46
46
auto & atom_ctx = g_vpr_ctx.atom ();
47
47
return (atom_ctx.lookup .atom_clb (atom));
48
48
}
@@ -76,8 +76,8 @@ void remove_mol_from_cluster(const t_pack_molecule* molecule,
76
76
update_cluster_pb_stats (molecule, molecule_size, old_clb, false );
77
77
}
78
78
79
- void commit_mol_move (const ClusterBlockId& old_clb,
80
- const ClusterBlockId& new_clb,
79
+ void commit_mol_move (ClusterBlockId old_clb,
80
+ ClusterBlockId new_clb,
81
81
bool during_packing,
82
82
bool new_clb_created) {
83
83
auto & device_ctx = g_vpr_ctx.device ();
@@ -93,7 +93,7 @@ void commit_mol_move(const ClusterBlockId& old_clb,
93
93
}
94
94
95
95
t_lb_router_data* lb_load_router_data (std::vector<t_lb_type_rr_node>* lb_type_rr_graphs,
96
- const ClusterBlockId& clb_index,
96
+ ClusterBlockId clb_index,
97
97
const std::unordered_set<AtomBlockId>& clb_atoms) {
98
98
// build data structures used by intra-logic block router
99
99
auto & cluster_ctx = g_vpr_ctx.clustering ();
@@ -202,7 +202,7 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
202
202
203
203
bool pack_mol_in_existing_cluster (t_pack_molecule* molecule,
204
204
int molecule_size,
205
- const ClusterBlockId& new_clb,
205
+ ClusterBlockId new_clb,
206
206
std::unordered_set<AtomBlockId>& new_clb_atoms,
207
207
bool during_packing,
208
208
t_clustering_data& clustering_data,
@@ -271,13 +271,13 @@ bool pack_mol_in_existing_cluster(t_pack_molecule* molecule,
271
271
272
272
void fix_clustered_netlist (t_pack_molecule* molecule,
273
273
int molecule_size,
274
- const ClusterBlockId& old_clb,
275
- const ClusterBlockId& new_clb) {
274
+ ClusterBlockId old_clb,
275
+ ClusterBlockId new_clb) {
276
276
fix_cluster_port_after_moving (new_clb);
277
277
fix_cluster_net_after_moving (molecule, molecule_size, old_clb, new_clb);
278
278
}
279
279
280
- void revert_mol_move (const ClusterBlockId& old_clb,
280
+ void revert_mol_move (ClusterBlockId old_clb,
281
281
t_pack_molecule* molecule,
282
282
t_lb_router_data*& old_router_data,
283
283
bool during_packing,
@@ -323,8 +323,8 @@ void revert_mol_move(const ClusterBlockId& old_clb,
323
323
324
324
static void fix_cluster_net_after_moving (const t_pack_molecule* molecule,
325
325
int molecule_size,
326
- const ClusterBlockId& old_clb,
327
- const ClusterBlockId& new_clb) {
326
+ ClusterBlockId old_clb,
327
+ ClusterBlockId new_clb) {
328
328
auto & cluster_ctx = g_vpr_ctx.mutable_clustering ();
329
329
auto & atom_ctx = g_vpr_ctx.mutable_atom ();
330
330
@@ -634,7 +634,7 @@ static bool count_children_pbs(const t_pb* pb) {
634
634
}
635
635
#endif
636
636
637
- static void rebuild_cluster_placement_stats (const ClusterBlockId& clb_index,
637
+ static void rebuild_cluster_placement_stats (ClusterBlockId clb_index,
638
638
const std::unordered_set<AtomBlockId>& clb_atoms) {
639
639
auto & helper_ctx = g_vpr_ctx.mutable_cl_helper ();
640
640
auto & cluster_ctx = g_vpr_ctx.clustering ();
@@ -656,7 +656,7 @@ bool is_cluster_legal(t_lb_router_data*& router_data) {
656
656
657
657
void commit_mol_removal (const t_pack_molecule* molecule,
658
658
const int & molecule_size,
659
- const ClusterBlockId& old_clb,
659
+ ClusterBlockId old_clb,
660
660
bool during_packing,
661
661
t_lb_router_data*& router_data,
662
662
t_clustering_data& clustering_data) {
@@ -677,12 +677,13 @@ void commit_mol_removal(const t_pack_molecule* molecule,
677
677
router_data->saved_lb_nets = nullptr ;
678
678
} else {
679
679
cluster_ctx.clb_nlist .block_pb (old_clb)->pb_route .clear ();
680
- cluster_ctx.clb_nlist .block_pb (old_clb)->pb_route = alloc_and_load_pb_route (router_data->saved_lb_nets , cluster_ctx.clb_nlist .block_pb (old_clb)->pb_graph_node );
680
+ cluster_ctx.clb_nlist .block_pb (old_clb)->pb_route = alloc_and_load_pb_route (router_data->saved_lb_nets ,
681
+ cluster_ctx.clb_nlist .block_pb (old_clb)->pb_graph_node );
681
682
}
682
683
}
683
684
684
- bool check_type_and_mode_compitability ( const ClusterBlockId& old_clb,
685
- const ClusterBlockId& new_clb,
685
+ bool check_type_and_mode_compatibility ( ClusterBlockId old_clb,
686
+ ClusterBlockId new_clb,
686
687
int verbosity) {
687
688
auto & cluster_ctx = g_vpr_ctx.clustering ();
688
689
0 commit comments