Skip to content

Commit 9bb6948

Browse files
mengdilinfacebook-github-bot
authored andcommitted
Improve naming due to codemod (facebookresearch#4065)
Summary: Pull Request resolved: facebookresearch#4065 improve neighbors_2 naming from codemod Reviewed By: junjieqi Differential Revision: D66823395 fbshipit-source-id: 90af06e7f6d917581a25311944689f82f12c93e1
1 parent 0868ffc commit 9bb6948

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

faiss/impl/HNSW.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -493,17 +493,17 @@ void HNSW::add_links_starting_from(
493493

494494
::faiss::shrink_neighbor_list(ptdis, link_targets, M, keep_max_size_level0);
495495

496-
std::vector<storage_idx_t> neighbors_2;
497-
neighbors_2.reserve(link_targets.size());
496+
std::vector<storage_idx_t> neighbors_to_add;
497+
neighbors_to_add.reserve(link_targets.size());
498498
while (!link_targets.empty()) {
499499
storage_idx_t other_id = link_targets.top().id;
500500
add_link(*this, ptdis, pt_id, other_id, level, keep_max_size_level0);
501-
neighbors_2.push_back(other_id);
501+
neighbors_to_add.push_back(other_id);
502502
link_targets.pop();
503503
}
504504

505505
omp_unset_lock(&locks[pt_id]);
506-
for (storage_idx_t other_id : neighbors_2) {
506+
for (storage_idx_t other_id : neighbors_to_add) {
507507
omp_set_lock(&locks[other_id]);
508508
add_link(*this, ptdis, other_id, pt_id, level, keep_max_size_level0);
509509
omp_unset_lock(&locks[other_id]);

0 commit comments

Comments
 (0)