Skip to content

Commit 313a984

Browse files
Change vector variable name to be more inline with the current style
1 parent 9ba0718 commit 313a984

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

vpr/src/pack/prepack.cpp

+14-15
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ static void print_chain_starting_points(t_pack_patterns* chain_pattern);
134134
*/
135135
static std::vector<t_pack_patterns> alloc_and_load_pack_patterns(const std::vector<t_logical_block_type>& logical_block_types) {
136136
int L_num_blocks;
137-
std::vector<t_pack_patterns> list_of_packing_patterns;
138137
t_pb_graph_edge* expansion_edge;
139138

140139
/* alloc and initialize array of packing patterns based on architecture complex blocks */
@@ -143,7 +142,7 @@ static std::vector<t_pack_patterns> alloc_and_load_pack_patterns(const std::vect
143142
discover_pattern_names_in_pb_graph_node(type.pb_graph_head, pattern_names);
144143
}
145144

146-
list_of_packing_patterns = alloc_and_init_pattern_list_from_hash(pattern_names);
145+
std::vector<t_pack_patterns> packing_patterns = alloc_and_init_pattern_list_from_hash(pattern_names);
147146

148147
/* load packing patterns by traversing the edges to find edges belonging to pattern */
149148
for (size_t i = 0; i < pattern_names.size(); i++) {
@@ -155,30 +154,30 @@ static std::vector<t_pack_patterns> alloc_and_load_pack_patterns(const std::vect
155154
}
156155

157156
L_num_blocks = 0;
158-
list_of_packing_patterns[i].base_cost = 0;
157+
packing_patterns[i].base_cost = 0;
159158
// use the found expansion edge to build the pack pattern
160159
backward_expand_pack_pattern_from_edge(expansion_edge,
161-
list_of_packing_patterns[i], nullptr, nullptr, &L_num_blocks);
162-
list_of_packing_patterns[i].num_blocks = L_num_blocks;
160+
packing_patterns[i], nullptr, nullptr, &L_num_blocks);
161+
packing_patterns[i].num_blocks = L_num_blocks;
163162

164163
/* Default settings: A section of a netlist must match all blocks in a pack
165164
* pattern before it can be made a molecule except for carry-chains.
166165
* For carry-chains, since carry-chains are typically quite flexible in terms
167166
* of size, it is optional whether or not an atom in a netlist matches any
168167
* particular block inside the chain */
169-
list_of_packing_patterns[i].is_block_optional = new bool[L_num_blocks];
168+
packing_patterns[i].is_block_optional = new bool[L_num_blocks];
170169
for (int k = 0; k < L_num_blocks; k++) {
171-
list_of_packing_patterns[i].is_block_optional[k] = false;
172-
if (list_of_packing_patterns[i].is_chain && list_of_packing_patterns[i].root_block->block_id != k) {
173-
list_of_packing_patterns[i].is_block_optional[k] = true;
170+
packing_patterns[i].is_block_optional[k] = false;
171+
if (packing_patterns[i].is_chain && packing_patterns[i].root_block->block_id != k) {
172+
packing_patterns[i].is_block_optional[k] = true;
174173
}
175174
}
176175

177176
// if this is a chain pattern (extends between complex blocks), check if there
178177
// are multiple equivalent chains with different starting and ending points
179-
if (list_of_packing_patterns[i].is_chain) {
180-
find_all_equivalent_chains(&list_of_packing_patterns[i], type.pb_graph_head);
181-
print_chain_starting_points(&list_of_packing_patterns[i]);
178+
if (packing_patterns[i].is_chain) {
179+
find_all_equivalent_chains(&packing_patterns[i], type.pb_graph_head);
180+
print_chain_starting_points(&packing_patterns[i]);
182181
}
183182

184183
// if pack pattern i is found to belong to current block type, go to next pack pattern
@@ -188,12 +187,12 @@ static std::vector<t_pack_patterns> alloc_and_load_pack_patterns(const std::vect
188187

189188
//Sanity check, every pattern should have a root block
190189
for (size_t i = 0; i < pattern_names.size(); ++i) {
191-
if (list_of_packing_patterns[i].root_block == nullptr) {
192-
VPR_FATAL_ERROR(VPR_ERROR_ARCH, "Failed to find root block for pack pattern %s", list_of_packing_patterns[i].name);
190+
if (packing_patterns[i].root_block == nullptr) {
191+
VPR_FATAL_ERROR(VPR_ERROR_ARCH, "Failed to find root block for pack pattern %s", packing_patterns[i].name);
193192
}
194193
}
195194

196-
return list_of_packing_patterns;
195+
return packing_patterns;
197196
}
198197

199198
/**

0 commit comments

Comments
 (0)