@@ -155,27 +155,25 @@ NetCostHandler::NetCostHandler(const t_placer_opts& placer_opts,
155155void NetCostHandler::alloc_and_load_chan_w_factors_for_place_cost_ (float place_cost_exp) {
156156 const auto & device_ctx = g_vpr_ctx.device ();
157157
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 ();
160160
161161 /* Access arrays below as chan?_place_cost_fac_(subhigh, sublow). Since subhigh must be greater than or
162162 * equal to sublow, we will only access the lower half of a matrix, but we allocate the whole matrix anyway
163163 * 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}}});
166166
167167 // 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 ;
170169 for (int y = 0 ; y < grid_height; y++) {
171170 acc_chanx_width_[y] = acc_chanx_width_[y - 1 ] + device_ctx.chan_width .x_list [y];
172171 if (acc_chanx_width_[y] == acc_chanx_width_[y - 1 ]) {
173172 acc_chanx_width_[y]++;
174173 }
175174 }
176175
177- acc_chany_width_[-2 ] = 0 ;
178- acc_chany_width_[-1 ] = 1 ;
176+ acc_chany_width_[-1 ] = 0 ;
179177 for (int x = 0 ; x < grid_width; x++) {
180178 acc_chany_width_[x] = acc_chany_width_[x - 1 ] + device_ctx.chan_width .y_list [x];
181179 if (acc_chany_width_[x] == acc_chany_width_[x - 1 ]) {
0 commit comments