@@ -93,7 +93,6 @@ class DeviceGrid {
93
93
return root_loc;
94
94
}
95
95
96
-
97
96
// /@brief Returns a rectangle which represents the bounding box of the tile at the given location.
98
97
inline vtr::Rect<int > get_tile_bb (const t_physical_tile_loc& tile_loc) const {
99
98
t_physical_tile_type_ptr tile_type = get_physical_type (tile_loc);
@@ -108,7 +107,7 @@ class DeviceGrid {
108
107
109
108
// Forward const-iterator over (layer, x, y)
110
109
class loc_const_iterator {
111
- public:
110
+ public:
112
111
using value_type = t_physical_tile_loc;
113
112
using difference_type = std::ptrdiff_t ;
114
113
using iterator_category = std::forward_iterator_tag;
@@ -139,26 +138,25 @@ class DeviceGrid {
139
138
140
139
bool operator ==(const loc_const_iterator& o) const {
141
140
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 ;
145
144
}
146
145
bool operator !=(const loc_const_iterator& o) const { return !(*this == o); }
147
146
148
- private:
147
+ private:
149
148
const DeviceGrid* g_ = nullptr ;
150
149
t_physical_tile_loc loc_{0 , 0 , 0 };
151
150
};
152
151
153
152
// / Iterate every (layer, x, y) location
154
153
inline auto all_locations () const {
155
154
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
158
157
);
159
158
}
160
159
161
-
162
160
// /@brief Return the metadata of the tile at the specified location
163
161
inline const t_metadata_dict* get_metadata (const t_physical_tile_loc& tile_loc) const {
164
162
return grid_[tile_loc.layer_num ][tile_loc.x ][tile_loc.y ].meta ;
0 commit comments