2828/* Local Function Declaration */
2929/* ***************************************/
3030
31- static void load_cluster_placement_stats_for_pb_graph_node (t_cluster_placement_stats * cluster_placement_stats,
31+ static void load_cluster_placement_stats_for_pb_graph_node (t_intra_cluster_placement_stats * cluster_placement_stats,
3232 t_pb_graph_node* pb_graph_node);
3333
34- static void reset_cluster_placement_stats (t_cluster_placement_stats * cluster_placement_stats);
34+ static void reset_cluster_placement_stats (t_intra_cluster_placement_stats * cluster_placement_stats);
3535
36- static void set_mode_cluster_placement_stats (t_cluster_placement_stats * cluster_placement_stats,
36+ static void set_mode_cluster_placement_stats (t_intra_cluster_placement_stats * cluster_placement_stats,
3737 const t_pb_graph_node* pb_graph_node,
3838 int mode);
3939
40- static void update_primitive_cost_or_status (t_cluster_placement_stats * cluster_placement_stats,
40+ static void update_primitive_cost_or_status (t_intra_cluster_placement_stats * cluster_placement_stats,
4141 const t_pb_graph_node* pb_graph_node,
4242 float incremental_cost,
4343 bool valid);
4444
45- static float try_place_molecule (t_cluster_placement_stats * cluster_placement_stats,
45+ static float try_place_molecule (t_intra_cluster_placement_stats * cluster_placement_stats,
4646 const t_pack_molecule* molecule,
4747 t_pb_graph_node* root,
4848 t_pb_graph_node** primitives_list);
4949
50- static bool expand_forced_pack_molecule_placement (t_cluster_placement_stats * cluster_placement_stats,
50+ static bool expand_forced_pack_molecule_placement (t_intra_cluster_placement_stats * cluster_placement_stats,
5151 const t_pack_molecule* molecule,
5252 const t_pack_pattern_block* pack_pattern_block,
5353 t_pb_graph_node** primitives_list,
@@ -61,17 +61,17 @@ static t_pb_graph_pin* expand_pack_molecule_pin_edge(int pattern_id,
6161/* Function Definitions */
6262/* ***************************************/
6363
64- void t_cluster_placement_stats ::move_inflight_to_tried () {
64+ void t_intra_cluster_placement_stats ::move_inflight_to_tried () {
6565 tried.insert (*in_flight.begin ());
6666 in_flight.clear ();
6767}
6868
69- void t_cluster_placement_stats ::invalidate_primitive_and_increment_iterator (int pb_type_index, std::unordered_multimap<int , t_cluster_placement_primitive*>::iterator& it) {
69+ void t_intra_cluster_placement_stats ::invalidate_primitive_and_increment_iterator (int pb_type_index, std::unordered_multimap<int , t_cluster_placement_primitive*>::iterator& it) {
7070 invalid.insert (*it);
7171 valid_primitives[pb_type_index].erase (it++);
7272}
7373
74- void t_cluster_placement_stats ::move_primitive_to_inflight (int pb_type_index, std::unordered_multimap<int , t_cluster_placement_primitive*>::iterator& it) {
74+ void t_intra_cluster_placement_stats ::move_primitive_to_inflight (int pb_type_index, std::unordered_multimap<int , t_cluster_placement_primitive*>::iterator& it) {
7575 in_flight.insert (*it);
7676 valid_primitives[pb_type_index].erase (it);
7777}
@@ -81,7 +81,7 @@ void t_cluster_placement_stats::move_primitive_to_inflight(int pb_type_index, st
8181 *
8282 * @note that valid status is not changed because if the primitive is not valid, it will get properly collected later
8383 */
84- void t_cluster_placement_stats ::insert_primitive_in_valid_primitives (std::pair<int , t_cluster_placement_primitive*> cluster_placement_primitive) {
84+ void t_intra_cluster_placement_stats ::insert_primitive_in_valid_primitives (std::pair<int , t_cluster_placement_primitive*> cluster_placement_primitive) {
8585 int i;
8686 bool success = false ;
8787 int null_index = OPEN;
@@ -105,31 +105,31 @@ void t_cluster_placement_stats::insert_primitive_in_valid_primitives(std::pair<i
105105 }
106106}
107107
108- void t_cluster_placement_stats ::flush_queue (std::unordered_multimap<int , t_cluster_placement_primitive*>& queue) {
108+ void t_intra_cluster_placement_stats ::flush_queue (std::unordered_multimap<int , t_cluster_placement_primitive*>& queue) {
109109 for (auto & it : queue) {
110110 insert_primitive_in_valid_primitives (it);
111111 }
112112 queue.clear ();
113113}
114114
115- void t_cluster_placement_stats ::flush_intermediate_queues () {
115+ void t_intra_cluster_placement_stats ::flush_intermediate_queues () {
116116 flush_queue (in_flight);
117117 flush_queue (tried);
118118}
119119
120- void t_cluster_placement_stats ::flush_invalid_queue () {
120+ void t_intra_cluster_placement_stats ::flush_invalid_queue () {
121121 flush_queue (invalid);
122122}
123123
124- bool t_cluster_placement_stats ::in_flight_empty () {
124+ bool t_intra_cluster_placement_stats ::in_flight_empty () {
125125 return in_flight.empty ();
126126}
127127
128- t_pb_type* t_cluster_placement_stats ::in_flight_type () {
128+ t_pb_type* t_intra_cluster_placement_stats ::in_flight_type () {
129129 return in_flight.begin ()->second ->pb_graph_node ->pb_type ;
130130}
131131
132- void t_cluster_placement_stats ::free_primitives () {
132+ void t_intra_cluster_placement_stats ::free_primitives () {
133133 for (auto & primitive : tried)
134134 delete primitive.second ;
135135
@@ -146,10 +146,10 @@ void t_cluster_placement_stats::free_primitives() {
146146 }
147147}
148148
149- t_cluster_placement_stats * alloc_and_load_cluster_placement_stats (t_logical_block_type_ptr cluster_type,
149+ t_intra_cluster_placement_stats * alloc_and_load_cluster_placement_stats (t_logical_block_type_ptr cluster_type,
150150 int cluster_mode) {
151- t_cluster_placement_stats * cluster_placement_stats = new t_cluster_placement_stats ;
152- *cluster_placement_stats = t_cluster_placement_stats ();
151+ t_intra_cluster_placement_stats * cluster_placement_stats = new t_intra_cluster_placement_stats ;
152+ *cluster_placement_stats = t_intra_cluster_placement_stats ();
153153 // TODO: This initialization may be able to be made more efficient.
154154 // The reset and setting the mode can be done while loading the placement
155155 // stats.
@@ -165,14 +165,14 @@ t_cluster_placement_stats* alloc_and_load_cluster_placement_stats(t_logical_bloc
165165 return cluster_placement_stats;
166166}
167167
168- void free_cluster_placement_stats (t_cluster_placement_stats * cluster_placement_stats) {
168+ void free_cluster_placement_stats (t_intra_cluster_placement_stats * cluster_placement_stats) {
169169 if (cluster_placement_stats != nullptr ) {
170170 cluster_placement_stats->free_primitives ();
171171 delete cluster_placement_stats;
172172 }
173173}
174174
175- bool get_next_primitive_list (t_cluster_placement_stats * cluster_placement_stats,
175+ bool get_next_primitive_list (t_intra_cluster_placement_stats * cluster_placement_stats,
176176 const t_pack_molecule* molecule,
177177 t_pb_graph_node** primitives_list,
178178 int force_site) {
@@ -299,7 +299,7 @@ bool get_next_primitive_list(t_cluster_placement_stats* cluster_placement_stats,
299299/* *
300300 * Resets one cluster placement stats by clearing incremental costs and returning all primitives to valid queue
301301 */
302- static void reset_cluster_placement_stats (t_cluster_placement_stats * cluster_placement_stats) {
302+ static void reset_cluster_placement_stats (t_intra_cluster_placement_stats * cluster_placement_stats) {
303303 int i;
304304
305305 /* Requeue primitives */
@@ -321,7 +321,7 @@ static void reset_cluster_placement_stats(t_cluster_placement_stats* cluster_pla
321321 * Add any primitives found in pb_graph_nodes to cluster_placement_stats
322322 * Adds backward link from pb_graph_node to cluster_placement_primitive
323323 */
324- static void load_cluster_placement_stats_for_pb_graph_node (t_cluster_placement_stats * cluster_placement_stats,
324+ static void load_cluster_placement_stats_for_pb_graph_node (t_intra_cluster_placement_stats * cluster_placement_stats,
325325 t_pb_graph_node* pb_graph_node) {
326326 int i, j, k;
327327 t_cluster_placement_primitive* placement_primitive;
@@ -375,7 +375,7 @@ static void load_cluster_placement_stats_for_pb_graph_node(t_cluster_placement_s
375375 }
376376}
377377
378- void commit_primitive (t_cluster_placement_stats * cluster_placement_stats,
378+ void commit_primitive (t_intra_cluster_placement_stats * cluster_placement_stats,
379379 const t_pb_graph_node* primitive) {
380380 t_pb_graph_node *pb_graph_node, *skip;
381381 float incr_cost;
@@ -417,7 +417,7 @@ void commit_primitive(t_cluster_placement_stats* cluster_placement_stats,
417417/* *
418418 * Set mode of cluster
419419 */
420- static void set_mode_cluster_placement_stats (t_cluster_placement_stats * cluster_placement_stats,
420+ static void set_mode_cluster_placement_stats (t_intra_cluster_placement_stats * cluster_placement_stats,
421421 const t_pb_graph_node* pb_graph_node,
422422 int mode) {
423423 int i, j, k;
@@ -440,7 +440,7 @@ static void set_mode_cluster_placement_stats(t_cluster_placement_stats* cluster_
440440 * For modes invalidated by pb_graph_node, invalidate primitive
441441 * int distance is the distance of current pb_graph_node from original
442442 */
443- static void update_primitive_cost_or_status (t_cluster_placement_stats * cluster_placement_stats,
443+ static void update_primitive_cost_or_status (t_intra_cluster_placement_stats * cluster_placement_stats,
444444 const t_pb_graph_node* pb_graph_node,
445445 const float incremental_cost,
446446 const bool valid) {
@@ -470,7 +470,7 @@ static void update_primitive_cost_or_status(t_cluster_placement_stats* cluster_p
470470/* *
471471 * Try place molecule at root location, populate primitives list with locations of placement if successful
472472 */
473- static float try_place_molecule (t_cluster_placement_stats * cluster_placement_stats,
473+ static float try_place_molecule (t_intra_cluster_placement_stats * cluster_placement_stats,
474474 const t_pack_molecule* molecule,
475475 t_pb_graph_node* root,
476476 t_pb_graph_node** primitives_list) {
@@ -516,7 +516,7 @@ static float try_place_molecule(t_cluster_placement_stats* cluster_placement_sta
516516 * Expand molecule at pb_graph_node
517517 * Assumes molecule and pack pattern connections have fan-out 1
518518 */
519- static bool expand_forced_pack_molecule_placement (t_cluster_placement_stats * cluster_placement_stats,
519+ static bool expand_forced_pack_molecule_placement (t_intra_cluster_placement_stats * cluster_placement_stats,
520520 const t_pack_molecule* molecule,
521521 const t_pack_pattern_block* pack_pattern_block,
522522 t_pb_graph_node** primitives_list,
@@ -695,7 +695,7 @@ int get_array_size_of_molecule(const t_pack_molecule* molecule) {
695695}
696696
697697/* Given atom block, determines if a free primitive exists for it */
698- bool exists_free_primitive_for_atom_block (t_cluster_placement_stats * cluster_placement_stats,
698+ bool exists_free_primitive_for_atom_block (t_intra_cluster_placement_stats * cluster_placement_stats,
699699 const AtomBlockId blk_id) {
700700 int i;
701701
@@ -724,6 +724,6 @@ bool exists_free_primitive_for_atom_block(t_cluster_placement_stats* cluster_pla
724724 return false ;
725725}
726726
727- void reset_tried_but_unused_cluster_placements (t_cluster_placement_stats * cluster_placement_stats) {
727+ void reset_tried_but_unused_cluster_placements (t_intra_cluster_placement_stats * cluster_placement_stats) {
728728 cluster_placement_stats->flush_intermediate_queues ();
729729}
0 commit comments