Skip to content

Commit 08ee834

Browse files
committed
revert the changes in device_grid.num_instances(): if instance_counts_ is empty, return 0
1 parent 267fac7 commit 08ee834

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libs/libarchfpga/src/device_grid.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ DeviceGrid::DeviceGrid(std::string grid_name, vtr::NdMatrix<t_grid_tile, 3> grid
1414
size_t DeviceGrid::num_instances(t_physical_tile_type_ptr type, int layer_num) const {
1515
size_t count = 0;
1616
//instance_counts_ is not initialized
17-
VTR_ASSERT(!instance_counts_.empty());
17+
if(instance_counts_.empty()) {
18+
return 0;
19+
}
1820

1921
int num_layers = (int)grid_.dim_size(0);
2022

0 commit comments

Comments
 (0)