Skip to content

Commit e164548

Browse files
committed
format
1 parent 5570e39 commit e164548

File tree

5 files changed

+16
-20
lines changed

5 files changed

+16
-20
lines changed

vpr/src/draw/draw.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ static void draw_main_canvas(ezgl::renderer* g);
8484
*/
8585
static void on_stage_change_setup(ezgl::application* app, bool is_new_window);
8686

87-
8887
static void setup_default_ezgl_callbacks(ezgl::application* app);
8988
static void set_force_pause(GtkWidget* /*widget*/, gint /*response_id*/, gpointer /*data*/);
9089
static void set_block_outline(GtkWidget* widget, gint /*response_id*/, gpointer /*data*/);
@@ -180,7 +179,7 @@ static void draw_main_canvas(ezgl::renderer* g) {
180179
drawplace(g);
181180
draw_internal_draw_subblk(g);
182181

183-
if(draw_state->pic_on_screen == ROUTING) { // ROUTING on screen
182+
if (draw_state->pic_on_screen == ROUTING) { // ROUTING on screen
184183

185184
draw_rr(g);
186185

@@ -242,11 +241,10 @@ static void draw_main_canvas(ezgl::renderer* g) {
242241
}
243242
}
244243

245-
246244
static void on_stage_change_setup(ezgl::application* app, bool is_new_window) {
247-
245+
248246
// default setup for new window
249-
if(is_new_window) {
247+
if (is_new_window) {
250248
basic_button_setup(app);
251249
net_button_setup(app);
252250
block_button_setup(app);
@@ -267,9 +265,8 @@ static void on_stage_change_setup(ezgl::application* app, bool is_new_window) {
267265
show_widget("RoutingMenuButton", app);
268266

269267
draw_state->save_graphics_file_base = "vpr_routing";
270-
271268
}
272-
269+
273270
// show/hide critical path routing UI elements
274271
hide_crit_path_routing(app);
275272

vpr/src/draw/draw_basic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ void draw_partial_route(const std::vector<RRNodeId>& rr_nodes_to_draw, ezgl::ren
614614

615615
bool inter_cluster_node = is_inter_cluster_node(rr_graph, inode);
616616

617-
if(!(draw_state->draw_rr_node[inode].node_highlighted && draw_state->highlight_fan_in_fan_out)){
617+
if (!(draw_state->draw_rr_node[inode].node_highlighted && draw_state->highlight_fan_in_fan_out)) {
618618
// skip drawing INTER-cluster nets if the user has disabled them
619619
if (inter_cluster_node && !draw_state->draw_inter_cluster_nets) {
620620
continue;
@@ -636,7 +636,7 @@ void draw_partial_route(const std::vector<RRNodeId>& rr_nodes_to_draw, ezgl::ren
636636
bool inter_cluster_node = is_inter_cluster_node(rr_graph, inode);
637637
bool prev_inter_cluster_node = is_inter_cluster_node(rr_graph, prev_node);
638638

639-
if(!(draw_state->draw_rr_node[inode].node_highlighted && draw_state->highlight_fan_in_fan_out)){
639+
if (!(draw_state->draw_rr_node[inode].node_highlighted && draw_state->highlight_fan_in_fan_out)) {
640640
// If this is an edge between two inter-cluster nodes, draw only if the user has enabled inter-cluster nets
641641
if ((inter_cluster_node && prev_inter_cluster_node) && !draw_state->draw_inter_cluster_nets) {
642642
continue;

vpr/src/draw/draw_searchbar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void draw_highlight_blocks_color(t_logical_block_type_ptr type,
8585

8686
// Convert to atom net id if flat routing is enabled
8787
ParentNetId net_id = cluster_net_id;
88-
if (draw_state->is_flat){
88+
if (draw_state->is_flat) {
8989
net_id = atom_lookup.atom_net(cluster_net_id);
9090
}
9191

vpr/src/draw/draw_types.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ enum e_draw_noc {
124124

125125
/// Different types of edges in the routing resource graph. Used to determine color of edges when drawn.
126126
enum class e_edge_type {
127-
PIN_TO_OPIN, // any pin to output pin
128-
PIN_TO_IPIN, // any pin to input pin
127+
PIN_TO_OPIN, // any pin to output pin
128+
PIN_TO_IPIN, // any pin to input pin
129129
OPIN_TO_CHAN, // output pin to channel
130130
CHAN_TO_IPIN, // channel to input pin
131131
CHAN_TO_CHAN, // channel to channel
@@ -137,10 +137,9 @@ enum class e_edge_type {
137137
*/
138138
typedef struct {
139139
ezgl::application* app; // Pointer to the ezgl application instance
140-
bool* toggle_state; // Pointer to the boolean variable that will be toggled
140+
bool* toggle_state; // Pointer to the boolean variable that will be toggled
141141
} t_checkbox_data;
142142

143-
144143
/**
145144
* @brief Structure used to store the state information of an rr_node.
146145
* Used to control drawing each rr_node when ROUTING is on screen.

vpr/src/draw/ui_setup.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,30 +270,30 @@ void hide_crit_path_routing(ezgl::application* app) {
270270

271271
// Enable the option to show critical path only when timing info is available
272272
if (!draw_state->setup_timing_info || draw_state->pic_on_screen != ROUTING) {
273-
if(crit_path_item_index != -1) {
273+
if (crit_path_item_index != -1) {
274274
gtk_combo_box_text_remove(toggle_crit_path, crit_path_item_index);
275275
gtk_combo_box_text_remove(toggle_crit_path, crit_path_item_index + 1);
276276
}
277277
} else {
278-
if(crit_path_item_index == -1){
278+
if (crit_path_item_index == -1) {
279279
gtk_combo_box_text_insert_text(toggle_crit_path, 3, "Crit Path Routing");
280280
gtk_combo_box_text_insert_text(toggle_crit_path, 4, "Crit Path Routing Delays");
281-
}
281+
}
282282
}
283283
}
284284

285285
void hide_draw_routing(ezgl::application* app) {
286286
t_draw_state* draw_state = get_draw_state_vars();
287287
GtkComboBoxText* toggle_nets = GTK_COMBO_BOX_TEXT(app->get_object("ToggleNetType"));
288-
288+
289289
// Enable the option to draw routing only during the routing stage
290290
int route_item_index = get_item_index_by_text(toggle_nets, "Routing");
291-
if(draw_state->pic_on_screen == PLACEMENT){
291+
if (draw_state->pic_on_screen == PLACEMENT) {
292292
if (route_item_index != -1) {
293293
gtk_combo_box_text_remove(toggle_nets, route_item_index);
294294
}
295295
} else {
296-
if(route_item_index == -1){
296+
if (route_item_index == -1) {
297297
gtk_combo_box_text_append(toggle_nets, "2", "Routing");
298298
}
299299
}

0 commit comments

Comments
 (0)