@@ -155,27 +155,25 @@ NetCostHandler::NetCostHandler(const t_placer_opts& placer_opts,
155
155
void NetCostHandler::alloc_and_load_chan_w_factors_for_place_cost_ (float place_cost_exp) {
156
156
const auto & device_ctx = g_vpr_ctx.device ();
157
157
158
- const int grid_height = device_ctx.grid .height ();
159
- const int grid_width = device_ctx.grid .width ();
158
+ const int grid_height = ( int ) device_ctx.grid .height ();
159
+ const int grid_width = ( int ) device_ctx.grid .width ();
160
160
161
161
/* Access arrays below as chan?_place_cost_fac_(subhigh, sublow). Since subhigh must be greater than or
162
162
* equal to sublow, we will only access the lower half of a matrix, but we allocate the whole matrix anyway
163
163
* for simplicity, so we can use the vtr utility matrix functions. */
164
- acc_chanx_width_ = vtr::NdOffsetMatrix<int , 1 >({{{-2 , grid_height}}});
165
- acc_chany_width_ = vtr::NdOffsetMatrix<int , 1 >({{{-2 , grid_width}}});
164
+ acc_chanx_width_ = vtr::NdOffsetMatrix<int , 1 >({{{-1 , grid_height}}});
165
+ acc_chany_width_ = vtr::NdOffsetMatrix<int , 1 >({{{-1 , grid_width}}});
166
166
167
167
// First compute the number of tracks between channel high and channel low, inclusive.
168
- acc_chanx_width_[-2 ] = 0 ;
169
- acc_chanx_width_[-1 ] = 1 ;
168
+ acc_chanx_width_[-1 ] = 0 ;
170
169
for (int y = 0 ; y < grid_height; y++) {
171
170
acc_chanx_width_[y] = acc_chanx_width_[y - 1 ] + device_ctx.chan_width .x_list [y];
172
171
if (acc_chanx_width_[y] == acc_chanx_width_[y - 1 ]) {
173
172
acc_chanx_width_[y]++;
174
173
}
175
174
}
176
175
177
- acc_chany_width_[-2 ] = 0 ;
178
- acc_chany_width_[-1 ] = 1 ;
176
+ acc_chany_width_[-1 ] = 0 ;
179
177
for (int x = 0 ; x < grid_width; x++) {
180
178
acc_chany_width_[x] = acc_chany_width_[x - 1 ] + device_ctx.chan_width .y_list [x];
181
179
if (acc_chany_width_[x] == acc_chany_width_[x - 1 ]) {
0 commit comments