fix build error

This commit is contained in:
Lin 2024-09-09 18:18:07 +08:00
parent d15025d9d2
commit f1547bae8a
4 changed files with 6 additions and 8 deletions

View File

@ -175,9 +175,9 @@ void DeviceRRGSB::reserve(const vtr::Point<size_t>& coordinate) {
void DeviceRRGSB::reserve_unique_modules() {
/* As rr_gsb_ has been built, it has valid size. Will reserve space for unique
* blocks according to rr_gsb_'s size*/
sb_unique_module_id_.resize(rr_gsb_.x());
cbx_unique_module_id_.resize(rr_gsb_.x());
cby_unique_module_id_.resize(rr_gsb_.x());
sb_unique_module_id_.resize(rr_gsb_.size());
cbx_unique_module_id_.resize(rr_gsb_.size());
cby_unique_module_id_.resize(rr_gsb_.size());
for (std::size_t i = 0; i < rr_gsb_.size(); ++i) {
sb_unique_module_id_[i].resize(rr_gsb_[i].size());

View File

@ -76,9 +76,7 @@ class DeviceRRGSB {
void reserve(
const vtr::Point<size_t>& coordinate); /* Pre-allocate the rr_switch_block
array that the device requires */
void reserve_unique_modules(
const vtr::Point<size_t>&
coordinate); /* Pre-allocate the rr_sb_unique_module_id matrix that the
void reserve_unique_modules(); /* Pre-allocate the rr_sb_unique_module_id matrix that the
device requires */
void resize_upon_need(
const vtr::Point<size_t>&

View File

@ -118,7 +118,7 @@ int read_xml_unique_blocks(DeviceRRGSB& device_rr_gsb, const char* file_name,
/* clear unique modules & reserve memory to relavant vectors */
device_rr_gsb.clear_unique_modules();
// vtr::Point<size_t> grid_coord(rr_gsb_.size());
device_rr_gsb.reserve_unique_modules(grid_coord);
device_rr_gsb.reserve_unique_modules();
/* load unique blocks xml file and set up device_rr_gdb */
for (pugi::xml_node xml_block_info : xml_root.children()) {

View File

@ -123,7 +123,7 @@ void report_unique_module_status_write(const DeviceRRGSB& device_rr_gsb,
int write_xml_unique_blocks(const DeviceRRGSB& device_rr_gsb, const char* fname,
bool verbose_output) {
vtr::ScopedStartFinishTimer timer("Write unique blocks...");
if (device_rr_gsb.get_is_dirty_flag() == false) {
if (device_rr_gsb.is_compressed() == false) {
VTR_LOG_ERROR("unique_blocks are empty!");
return CMD_EXEC_FATAL_ERROR;
}