Skip to content

Commit 903ecce

Browse files
make format
1 parent bfaa5eb commit 903ecce

23 files changed

+89
-102
lines changed

libs/libarchfpga/src/device_grid.h

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ class DeviceGrid {
9393
return root_loc;
9494
}
9595

96-
9796
///@brief Returns a rectangle which represents the bounding box of the tile at the given location.
9897
inline vtr::Rect<int> get_tile_bb(const t_physical_tile_loc& tile_loc) const {
9998
t_physical_tile_type_ptr tile_type = get_physical_type(tile_loc);
@@ -108,7 +107,7 @@ class DeviceGrid {
108107

109108
// Forward const-iterator over (layer, x, y)
110109
class loc_const_iterator {
111-
public:
110+
public:
112111
using value_type = t_physical_tile_loc;
113112
using difference_type = std::ptrdiff_t;
114113
using iterator_category = std::forward_iterator_tag;
@@ -139,26 +138,25 @@ class DeviceGrid {
139138

140139
bool operator==(const loc_const_iterator& o) const {
141140
return g_ == o.g_
142-
&& loc_.layer_num == o.loc_.layer_num
143-
&& loc_.x == o.loc_.x
144-
&& loc_.y == o.loc_.y;
141+
&& loc_.layer_num == o.loc_.layer_num
142+
&& loc_.x == o.loc_.x
143+
&& loc_.y == o.loc_.y;
145144
}
146145
bool operator!=(const loc_const_iterator& o) const { return !(*this == o); }
147146

148-
private:
147+
private:
149148
const DeviceGrid* g_ = nullptr;
150149
t_physical_tile_loc loc_{0, 0, 0};
151150
};
152151

153152
/// Iterate every (layer, x, y) location
154153
inline auto all_locations() const {
155154
return vtr::make_range(
156-
loc_const_iterator(this, /*layer*/0, /*x*/0, /*y*/0),
157-
loc_const_iterator(this, /*layer*/get_num_layers(), /*x*/0, /*y*/0) // end sentinel
155+
loc_const_iterator(this, /*layer*/ 0, /*x*/ 0, /*y*/ 0),
156+
loc_const_iterator(this, /*layer*/ get_num_layers(), /*x*/ 0, /*y*/ 0) // end sentinel
158157
);
159158
}
160159

161-
162160
///@brief Return the metadata of the tile at the specified location
163161
inline const t_metadata_dict* get_metadata(const t_physical_tile_loc& tile_loc) const {
164162
return grid_[tile_loc.layer_num][tile_loc.x][tile_loc.y].meta;

libs/libvtrutil/src/vtr_math.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ ResultTy median(Container c) {
8383
///@brief Returns the median of a whole container, assuming that it is already
8484
/// sorted.
8585
template<typename ResultTy = double, typename Container>
86-
ResultTy median_presorted(const Container &c) {
86+
ResultTy median_presorted(const Container& c) {
8787
return median_presorted<ResultTy>(std::begin(c), std::end(c));
8888
}
8989

@@ -116,7 +116,7 @@ double geomean(const InputIterator first, const InputIterator last, double init
116116

117117
///@brief Returns the geometric mean of a whole container
118118
template<typename Container>
119-
double geomean(const Container &c) {
119+
double geomean(const Container& c) {
120120
return geomean(std::begin(c), std::end(c));
121121
}
122122

@@ -139,7 +139,7 @@ double arithmean(const InputIterator first, const InputIterator last, double ini
139139

140140
///@brief Returns the aritmatic mean of a whole container
141141
template<typename Container>
142-
double arithmean(const Container &c) {
142+
double arithmean(const Container& c) {
143143
return arithmean(std::begin(c), std::end(c));
144144
}
145145

vpr/src/analytical_place/analytical_placement_flow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ static void convert_flat_to_partial_placement(const FlatPlacementInfo& flat_plac
111111
} else {
112112
if (current_loc_x != -1 && current_loc_y != -1) {
113113
atom_loc_x = std::clamp(current_loc_x, 0.0f,
114-
static_cast<float>(g_vpr_ctx.device().grid.width() -1));
114+
static_cast<float>(g_vpr_ctx.device().grid.width() - 1));
115115
atom_loc_y = std::clamp(current_loc_y, 0.0f,
116-
static_cast<float>(g_vpr_ctx.device().grid.height() -1));
116+
static_cast<float>(g_vpr_ctx.device().grid.height() - 1));
117117
// If current_loc_layer or current_loc_sub_tile are unset (-1), default to layer 0 and sub_tile 0.
118118
if (current_loc_layer == -1)
119119
current_loc_layer = 0;
@@ -155,7 +155,7 @@ static void convert_flat_to_partial_placement(const FlatPlacementInfo& flat_plac
155155
}
156156
}
157157
VTR_LOG("%zu of %zu molecules placed at device center (no atoms of these molecules found in flat placement).\n",
158-
num_mols_assigned_to_center, ap_netlist.blocks().size());
158+
num_mols_assigned_to_center, ap_netlist.blocks().size());
159159
}
160160

161161
/**

vpr/src/analytical_place/full_legalizer.cpp

Lines changed: 53 additions & 54 deletions
Large diffs are not rendered by default.

vpr/src/base/load_flat_place.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ void log_flat_placement_reconstruction_info(
259259
VTR_ASSERT(flat_placement_info.blk_layer[atom_blk_id] != FlatPlacementInfo::UNDEFINED_POS);
260260
VTR_ASSERT(flat_placement_info.blk_sub_tile[atom_blk_id] != FlatPlacementInfo::UNDEFINED_SUB_TILE);
261261

262-
// Get the (x, y, layer) position of the block.
262+
// Get the (x, y, layer) position of the block.
263263
float blk_x = flat_placement_info.blk_x_pos[atom_blk_id];
264264
float blk_y = flat_placement_info.blk_y_pos[atom_blk_id];
265265
float blk_layer = flat_placement_info.blk_layer[atom_blk_id];

vpr/src/base/netlist_writer.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ typedef std::pair<DelayTriple, std::string> sequential_port_delay_pair;
177177
* @brief Information needed to describe a delay on a port in an SDF file.
178178
*/
179179
struct PortDelay {
180-
std::string port_name; ///<The name of the port to annotate with delay.
181-
int ipin; ///<The pin in the port to annotate (if a multi-pin port).
182-
DelayTriple port_delay_triple; ///<The delay triple to annotate.
180+
std::string port_name; ///<The name of the port to annotate with delay.
181+
int ipin; ///<The pin in the port to annotate (if a multi-pin port).
182+
DelayTriple port_delay_triple; ///<The delay triple to annotate.
183183
};
184184

185185
/*enum class PortType {
@@ -1981,7 +1981,6 @@ class NetlistWriterVisitor : public NetlistVisitor {
19811981

19821982
ipin_port_delay_triple = new_port_delay_time;
19831983
}
1984-
19851984
}
19861985
}
19871986

@@ -2007,7 +2006,6 @@ class NetlistWriterVisitor : public NetlistVisitor {
20072006
atom_netlist.pin_port_bit(clk_pin_id),
20082007
DelayTriple(thld, thld, thld));
20092008
}
2010-
20112009
}
20122010
}
20132011

@@ -2116,7 +2114,6 @@ class NetlistWriterVisitor : public NetlistVisitor {
21162114
port->name,
21172115
ipin,
21182116
total_cq_delay_triple);
2119-
21202117
}
21212118
}
21222119
}

vpr/src/base/setup_grid.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,12 +704,12 @@ static void check_grid(const DeviceGrid& grid) {
704704
VPR_FATAL_ERROR(VPR_ERROR_OTHER, "Grid Location (%d,%d,%d) has invalid width offset (%d).\n",
705705
tile_loc.layer_num, tile_loc.x, tile_loc.y,
706706
width_offset);
707-
}
707+
}
708708
if ((grid.get_height_offset(tile_loc) < 0) || (grid.get_height_offset(tile_loc) >= type->height)) {
709709
VPR_FATAL_ERROR(VPR_ERROR_OTHER, "Grid Location (%d,%d,%d) has invalid height offset (%d).\n",
710710
tile_loc.layer_num, tile_loc.x, tile_loc.y,
711711
height_offset);
712-
}
712+
}
713713

714714
// Verify that type and width/height offsets are correct (e.g. for dimension > 1 blocks)
715715
if (grid.get_width_offset(tile_loc) == 0 && grid.get_height_offset(tile_loc) == 0) {

vpr/src/base/stats.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void routing_stats(const Netlist<>& net_list,
9696
} else {
9797
area += type->area;
9898
}
99-
}
99+
}
100100
}
101101
/* Todo: need to add pitch of routing to blocks with height > 3 */
102102
VTR_LOG("\tTotal logic block area (Warning, need to add pitch of routing to blocks with height > 3): %g\n", area);

vpr/src/base/vpr_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class t_pb {
342342
///@brief Representation of intra-logic block routing
343343
struct t_pb_route {
344344
AtomNetId atom_net_id; ///<which net in the atom netlist uses this pin
345-
int driver_pb_pin_id = UNDEFINED; ///<The pb_pin id of the pb_pin that drives this pin
345+
int driver_pb_pin_id = UNDEFINED; ///<The pb_pin id of the pb_pin that drives this pin
346346
std::vector<int> sink_pb_pin_ids; ///<The pb_pin id's of the pb_pins driven by this node
347347
const t_pb_graph_pin* pb_graph_pin = nullptr; ///<The graph pin associated with this node
348348
};

vpr/src/draw/draw.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void update_screen(ScreenUpdatePriority priority, const char* msg, enum pic_type
299299
/* If it's the type of picture displayed has changed, set up the proper *
300300
* buttons. */
301301
if (draw_state->pic_on_screen != pic_on_screen_val) { //State changed
302-
302+
303303
state_change = true;
304304

305305
if (draw_state->pic_on_screen == NO_PICTURE) {
@@ -312,7 +312,6 @@ void update_screen(ScreenUpdatePriority priority, const char* msg, enum pic_type
312312
draw_state->pic_on_screen = pic_on_screen_val;
313313
}
314314

315-
316315
bool should_pause = int(priority) >= draw_state->gr_automode;
317316

318317
//If there was a state change, we must call ezgl::application::run() to update the buttons.
@@ -1150,7 +1149,7 @@ static void run_graphics_commands(const std::string& commands) {
11501149
"Expect show critical path delay (bool), show critical path flylines (bool), and show critical path routing (bool) after 'set_cpd'");
11511150
draw_state->show_crit_path = true;
11521151
draw_state->show_crit_path_flylines = true;
1153-
draw_state->show_crit_path_delays= (bool)vtr::atoi(cmd[1]);
1152+
draw_state->show_crit_path_delays = (bool)vtr::atoi(cmd[1]);
11541153
VTR_LOG("%d\n", (int)draw_state->show_crit_path);
11551154
} else if (cmd[0] == "set_routing_util") {
11561155
VTR_ASSERT_MSG(cmd.size() == 2,

0 commit comments

Comments
 (0)