Skip to content

Commit 08507dc

Browse files
pragma once instead header guards
1 parent 44dbc4f commit 08507dc

13 files changed

+22
-49
lines changed

vpr/src/route/router_lookahead/router_lookahead.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef VPR_ROUTER_LOOKAHEAD_H
2-
#define VPR_ROUTER_LOOKAHEAD_H
1+
#pragma once
2+
33
#include <memory>
44
#include "vpr_types.h"
55
#include "vpr_error.h"
@@ -176,5 +176,3 @@ class NoOpLookahead : public RouterLookahead {
176176
return -1.;
177177
}
178178
};
179-
180-
#endif

vpr/src/route/rr_graph_generation/build_switchblocks.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef BUILD_SWITCHBLOCKS_H
2-
#define BUILD_SWITCHBLOCKS_H
1+
#pragma once
32

43
#include <unordered_map>
54
#include <vector>
@@ -131,5 +130,3 @@ t_sb_connection_map* alloc_and_load_switchblock_permutations(const t_chan_detail
131130
* @param sb_conns switch block permutation map
132131
*/
133132
void free_switchblock_permutations(t_sb_connection_map* sb_conns);
134-
135-
#endif

vpr/src/route/rr_graph_generation/cb_metrics.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef CB_METRICS_H
2-
#define CB_METRICS_H
1+
#pragma once
32

43
#include <vector>
54
#include <set>
@@ -99,5 +98,3 @@ void analyze_conn_blocks(const int***** opin_cb, const int***** ipin_cb, const t
9998
void make_poor_cb_pattern(const e_pin_type pin_type, const t_physical_tile_type_ptr block_type, const int* Fc_array, const t_chan_width* chan_width_inf, int***** cb);
10099

101100
/**** END EXPERIMENTAL ****/
102-
103-
#endif /*CB_METRICS_H*/

vpr/src/route/rr_graph_generation/clock_connection_builders.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef CLOCK_CONNECTION_BUILDERS_H
2-
#define CLOCK_CONNECTION_BUILDERS_H
1+
#pragma once
32

43
#include <string>
54

@@ -113,5 +112,3 @@ class ClockToPinsConnection : public ClockConnection {
113112
void create_switches(const ClockRRGraphBuilder& clock_graph, t_rr_edge_info_set* rr_edges_to_create) override;
114113
size_t estimate_additional_nodes() override;
115114
};
116-
117-
#endif
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
#ifndef CLOCK_FWD
2-
#define CLOCK_FWD
1+
#pragma once
32

43
struct Coordinates {
54
int x = -1;
65
int y = -1;
76
int layer = -1;
87
};
9-
10-
#endif

vpr/src/route/rr_graph_generation/clock_network_builders.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef CLOCK_NETWORK_BUILDERS_H
2-
#define CLOCK_NETWORK_BUILDERS_H
1+
#pragma once
32

43
#include <string>
54
#include <vector>
@@ -281,5 +280,3 @@ class ClockHTree : private ClockNetwork {
281280
int num_segments_x) override;
282281
size_t estimate_additional_nodes(const DeviceGrid& grid) override;
283282
};
284-
285-
#endif

vpr/src/route/rr_graph_generation/rr_graph.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef RR_GRAPH_H
2-
#define RR_GRAPH_H
1+
#pragma once
32

43
/* Include track buffers or not. Track buffers isolate the tracks from the
54
* input connection block. However, they are difficult to lay out in practice,
@@ -62,5 +61,3 @@ bool pins_connected(t_block_loc cluster_loc,
6261
t_logical_block_type_ptr logical_block,
6362
int from_pin_logical_num,
6463
int to_pin_logical_num);
65-
66-
#endif
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef RR_GRAPH_AREA_H
2-
#define RR_GRAPH_AREA_H
1+
#pragma once
32

43
void count_routing_transistors(enum e_directionality directionality,
54
int num_switch,
@@ -10,5 +9,3 @@ void count_routing_transistors(enum e_directionality directionality,
109
bool is_flat);
1110

1211
float trans_per_buf(float Rbuf, float R_minW_nmos, float R_minW_pmos);
13-
14-
#endif

vpr/src/route/rr_graph_generation/rr_graph_clock.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef RR_GRAPH_CLOCK_H
2-
#define RR_GRAPH_CLOCK_H
1+
#pragma once
32

43
#include <string>
54
#include <vector>
@@ -156,5 +155,3 @@ class ClockRRGraphBuilder {
156155
int chanx_ptc_idx_;
157156
int chany_ptc_idx_;
158157
};
159-
160-
#endif
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
#ifndef RR_GRAPH_INDEXED_DATA_H
2-
#define RR_GRAPH_INDEXED_DATA_H
1+
#pragma once
2+
33
#include "physical_types.h"
44
#include "alloc_and_load_rr_indexed_data.h"
55

66
void load_rr_index_segments(const int num_segment);
7-
8-
#endif

vpr/src/route/rr_graph_generation/rr_graph_sbox.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef RR_GRAPH_SBOX_H
2-
#define RR_GRAPH_SBOX_H
1+
#pragma once
32

43
#include <vector>
54

@@ -16,6 +15,9 @@ vtr::NdMatrix<std::vector<int>, 3> alloc_and_load_switch_block_conn(t_chan_width
1615
enum e_switch_block_type switch_block_type,
1716
int Fs);
1817

19-
int get_simple_switch_block_track(enum e_side from_side, enum e_side to_side, int from_track, enum e_switch_block_type switch_block_type, const int from_chan_width, const int to_chan_width);
20-
21-
#endif
18+
int get_simple_switch_block_track(enum e_side from_side,
19+
enum e_side to_side,
20+
int from_track,
21+
enum e_switch_block_type switch_block_type,
22+
const int from_chan_width,
23+
const int to_chan_width);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#pragma once
2+
13
void add_rr_graph_C_from_switches(float C_ipin_cblock);

vpr/src/route/rr_graph_generation/rr_types.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef RR_TYPES_H
2-
#define RR_TYPES_H
1+
#pragma once
32

43
#include <vector>
54
#include "vtr_ndmatrix.h"
@@ -182,5 +181,3 @@ typedef vtr::NdMatrix<t_chan_seg_details, 3> t_chan_details;
182181
* [0..3 (To side)][0...max_chan_width][0..3 (to_mux,to_trac,alt_mux,alt_track)]
183182
* originally initialized to UN_SET until alloc_and_load_sb is called */
184183
typedef vtr::NdMatrix<short, 6> t_sblock_pattern;
185-
186-
#endif

0 commit comments

Comments
 (0)