Skip to content

Commit 59afa1c

Browse files
committed
Made a couple of fixes to get rid of warnings about variables being used uninitialized
1 parent f17da20 commit 59afa1c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

vpr/src/pack/attraction_groups.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ AttractionInfo::AttractionInfo() {
2525
//Then, fill in the group id for the atoms that do have an attraction group
2626
int num_att_grps = attraction_groups.size();
2727

28-
for (int igroup; igroup < num_att_grps; igroup++) {
28+
for (int igroup = 0; igroup < num_att_grps; igroup++) {
2929
AttractGroupId group_id(igroup);
3030

3131
AttractionGroup att_group = attraction_groups[group_id];

vpr/src/pack/cluster.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2074,9 +2074,9 @@ static void update_total_gain(float alpha, float beta, bool timing_driven, bool
20742074
* Eventually want to move this out of the while loop and only update it
20752075
* for the top-level block in each cluster.*/
20762076
AttractGroupId atom_grp_id = attraction_groups.get_atom_attraction_group(blk_id);
2077-
float att_grp_gain = attraction_groups.get_attraction_group_gain(atom_grp_id);
20782077
if (atom_grp_id != AttractGroupId::INVALID() && atom_grp_id == cluster_att_grp_id) {
20792078
//increase gain of atom based on attraction group gain
2079+
float att_grp_gain = attraction_groups.get_attraction_group_gain(atom_grp_id);
20802080
cur_pb->pb_stats->gain[blk_id] += att_grp_gain;
20812081
}
20822082

0 commit comments

Comments
 (0)