@@ -30,10 +30,10 @@ static void fix_cluster_port_after_moving(const ClusterBlockId clb_index);
3030
3131static void fix_cluster_net_after_moving (const t_pack_molecule* molecule,
3232 int molecule_size,
33- const ClusterBlockId& old_clb,
34- const ClusterBlockId& new_clb);
33+ ClusterBlockId old_clb,
34+ ClusterBlockId new_clb);
3535
36- static void rebuild_cluster_placement_stats (const ClusterBlockId& clb_index,
36+ static void rebuild_cluster_placement_stats (ClusterBlockId clb_index,
3737 const std::unordered_set<AtomBlockId>& clb_atoms);
3838
3939static 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,
4242 bool is_added);
4343
4444/* **************** API functions ***********************/
45- ClusterBlockId atom_to_cluster (const AtomBlockId& atom) {
45+ ClusterBlockId atom_to_cluster (AtomBlockId atom) {
4646 auto & atom_ctx = g_vpr_ctx.atom ();
4747 return (atom_ctx.lookup .atom_clb (atom));
4848}
@@ -76,8 +76,8 @@ void remove_mol_from_cluster(const t_pack_molecule* molecule,
7676 update_cluster_pb_stats (molecule, molecule_size, old_clb, false );
7777}
7878
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,
8181 bool during_packing,
8282 bool new_clb_created) {
8383 auto & device_ctx = g_vpr_ctx.device ();
@@ -93,7 +93,7 @@ void commit_mol_move(const ClusterBlockId& old_clb,
9393}
9494
9595t_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,
9797 const std::unordered_set<AtomBlockId>& clb_atoms) {
9898 // build data structures used by intra-logic block router
9999 auto & cluster_ctx = g_vpr_ctx.clustering ();
@@ -202,7 +202,7 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
202202
203203bool pack_mol_in_existing_cluster (t_pack_molecule* molecule,
204204 int molecule_size,
205- const ClusterBlockId& new_clb,
205+ ClusterBlockId new_clb,
206206 std::unordered_set<AtomBlockId>& new_clb_atoms,
207207 bool during_packing,
208208 t_clustering_data& clustering_data,
@@ -271,13 +271,13 @@ bool pack_mol_in_existing_cluster(t_pack_molecule* molecule,
271271
272272void fix_clustered_netlist (t_pack_molecule* molecule,
273273 int molecule_size,
274- const ClusterBlockId& old_clb,
275- const ClusterBlockId& new_clb) {
274+ ClusterBlockId old_clb,
275+ ClusterBlockId new_clb) {
276276 fix_cluster_port_after_moving (new_clb);
277277 fix_cluster_net_after_moving (molecule, molecule_size, old_clb, new_clb);
278278}
279279
280- void revert_mol_move (const ClusterBlockId& old_clb,
280+ void revert_mol_move (ClusterBlockId old_clb,
281281 t_pack_molecule* molecule,
282282 t_lb_router_data*& old_router_data,
283283 bool during_packing,
@@ -323,8 +323,8 @@ void revert_mol_move(const ClusterBlockId& old_clb,
323323
324324static void fix_cluster_net_after_moving (const t_pack_molecule* molecule,
325325 int molecule_size,
326- const ClusterBlockId& old_clb,
327- const ClusterBlockId& new_clb) {
326+ ClusterBlockId old_clb,
327+ ClusterBlockId new_clb) {
328328 auto & cluster_ctx = g_vpr_ctx.mutable_clustering ();
329329 auto & atom_ctx = g_vpr_ctx.mutable_atom ();
330330
@@ -634,7 +634,7 @@ static bool count_children_pbs(const t_pb* pb) {
634634}
635635#endif
636636
637- static void rebuild_cluster_placement_stats (const ClusterBlockId& clb_index,
637+ static void rebuild_cluster_placement_stats (ClusterBlockId clb_index,
638638 const std::unordered_set<AtomBlockId>& clb_atoms) {
639639 auto & helper_ctx = g_vpr_ctx.mutable_cl_helper ();
640640 auto & cluster_ctx = g_vpr_ctx.clustering ();
@@ -656,7 +656,7 @@ bool is_cluster_legal(t_lb_router_data*& router_data) {
656656
657657void commit_mol_removal (const t_pack_molecule* molecule,
658658 const int & molecule_size,
659- const ClusterBlockId& old_clb,
659+ ClusterBlockId old_clb,
660660 bool during_packing,
661661 t_lb_router_data*& router_data,
662662 t_clustering_data& clustering_data) {
@@ -677,12 +677,13 @@ void commit_mol_removal(const t_pack_molecule* molecule,
677677 router_data->saved_lb_nets = nullptr ;
678678 } else {
679679 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 );
681682 }
682683}
683684
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,
686687 int verbosity) {
687688 auto & cluster_ctx = g_vpr_ctx.clustering ();
688689
0 commit comments