Skip to content

Commit df4552d

Browse files
committed
make format
1 parent 15d69c5 commit df4552d

File tree

5 files changed

+19
-21
lines changed

5 files changed

+19
-21
lines changed

vpr/src/base/read_options.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3301,7 +3301,7 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
33013301
.help("If it set to on, the input pin connections will be generated by the default flow and not from the CRR template")
33023302
.default_value("off")
33033303
.show_in(argparse::ShowIn::HELP_ONLY);
3304-
3304+
33053305
crr_grp.add_argument<bool, ParseOnOff>(args.preserve_output_pin_connections, "--preserve_output_pin_connections")
33063306
.help("If it set to on, the output pin connections will be generated by the default flow and not from the CRR template")
33073307
.default_value("off")
@@ -3311,7 +3311,7 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
33113311
.help("Whether the generated CRR should be annotated with delay")
33123312
.default_value("off")
33133313
.show_in(argparse::ShowIn::HELP_ONLY);
3314-
3314+
33153315
crr_grp.add_argument<bool, ParseOnOff>(args.remove_dangling_nodes, "--remove_dangling_nodes")
33163316
.help("Whether the generated CRR should remove CHANX and CHANY nodes that have no fan-in")
33173317
.default_value("off")

vpr/src/route/rr_graph_generation/rr_graph.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,11 +1129,11 @@ static void build_rr_graph(e_graph_type graph_type,
11291129
device_ctx.chan_width = nodes_per_chan;
11301130

11311131
rr_graph_externals(segment_inf,
1132-
segment_inf_x,
1133-
segment_inf_y,
1134-
segment_inf_z,
1135-
wire_to_rr_ipin_switch,
1136-
base_cost_type);
1132+
segment_inf_x,
1133+
segment_inf_y,
1134+
segment_inf_z,
1135+
wire_to_rr_ipin_switch,
1136+
base_cost_type);
11371137

11381138
const VibDeviceGrid vib_grid;
11391139
check_rr_graph(device_ctx.rr_graph,

vpr/src/route/rr_graph_generation/tileable_rr_graph/crr_generator/data_frame_processor.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ DataFrame DataFrameProcessor::read_csv(const std::string& filename) {
162162
for (size_t row = 0; row < num_rows; ++row) {
163163
std::vector<std::string> tokens = parse_csv_line(lines[row]);
164164
VTR_ASSERT_DEBUG(tokens.size() <= num_cols);
165-
165+
166166
for (size_t col = 0; col < tokens.size(); ++col) {
167167
df.at(row, col) = parse_csv_cell(tokens[col]);
168168
cells_read++;
@@ -191,30 +191,29 @@ DataFrame DataFrameProcessor::read_csv(const std::string& filename) {
191191
}
192192
}
193193

194-
195194
size_t DataFrameProcessor::count_csv_columns(const std::string& line) {
196195
size_t count = 1;
197196
bool in_quotes = false;
198-
197+
199198
for (char c : line) {
200199
if (c == '"') {
201200
in_quotes = !in_quotes;
202201
} else if (c == ',' && !in_quotes) {
203202
count++;
204203
}
205204
}
206-
205+
207206
return count;
208207
}
209208

210209
std::vector<std::string> DataFrameProcessor::parse_csv_line(const std::string& line) {
211210
std::vector<std::string> tokens;
212211
std::string current;
213212
bool in_quotes = false;
214-
213+
215214
for (size_t i = 0; i < line.size(); ++i) {
216215
char c = line[i];
217-
216+
218217
if (c == '"') {
219218
// Handle escaped quotes ("")
220219
if (in_quotes && i + 1 < line.size() && line[i + 1] == '"') {
@@ -230,7 +229,7 @@ std::vector<std::string> DataFrameProcessor::parse_csv_line(const std::string& l
230229
current += c;
231230
}
232231
}
233-
232+
234233
tokens.push_back(current); // Add last token
235234
return tokens;
236235
}
@@ -291,11 +290,11 @@ Cell DataFrameProcessor::parse_csv_cell(const std::string& value) {
291290
std::string trimmed = value;
292291
trimmed.erase(0, trimmed.find_first_not_of(" \t\r\n"));
293292
trimmed.erase(trimmed.find_last_not_of(" \t\r\n") + 1);
294-
293+
295294
if (trimmed.empty()) {
296295
return Cell(); // Empty cell
297296
}
298-
297+
299298
// Check if all characters are digits
300299
bool is_integer = true;
301300
for (char c : trimmed) {
@@ -304,11 +303,11 @@ Cell DataFrameProcessor::parse_csv_cell(const std::string& value) {
304303
break;
305304
}
306305
}
307-
306+
308307
if (is_integer) {
309308
return Cell(std::stoi(trimmed));
310309
}
311-
310+
312311
return Cell(trimmed);
313312
}
314313

vpr/src/route/rr_graph_generation/tileable_rr_graph/tileable_rr_graph_builder.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,7 @@ static void remove_dangling_chan_nodes(const DeviceGrid& grid,
361361
RRNodeId node = RRNodeId(node_index);
362362
// Set track numbers as a node may have multiple ptc
363363
if (rr_graph_builder.node_contain_multiple_ptc(node)) {
364-
if (rr_nodes.node_type(node) == e_rr_type::CHANX ||
365-
rr_nodes.node_type(node) == e_rr_type::CHANY) {
364+
if (rr_nodes.node_type(node) == e_rr_type::CHANX || rr_nodes.node_type(node) == e_rr_type::CHANY) {
366365
rr_graph_builder.add_track_node_to_lookup(node);
367366
}
368367
} else {

vpr/src/route/rr_graph_generation/tileable_rr_graph/tileable_rr_graph_edge_builder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ void build_rr_graph_regular_edges(const RRGraphView& rr_graph,
350350

351351
t_track2pin_map track2ipin_map; /* [0..track_gsb_side][0..num_tracks][ipin_indices] */
352352
t_pin2track_map opin2track_map; /* [0..gsb_side][0..num_opin_node][track_indices] */
353-
353+
354354
/* adapt the track_to_ipin_lookup for the GSB nodes */
355355
if (!build_crr_edges || crr_opts.preserve_input_pin_connections) {
356356
track2ipin_map = build_gsb_track_to_ipin_map(rr_graph, rr_gsb, grids, segment_inf, Fc_in);

0 commit comments

Comments
 (0)