Skip to content

Commit 616c503

Browse files
mengdilinfacebook-github-bot
authored andcommitted
improve naming due to codemod (facebookresearch#4067)
Summary: Pull Request resolved: facebookresearch#4067 rename L_res_2 to L_res_init Reviewed By: junjieqi Differential Revision: D66823751 fbshipit-source-id: 7face41c2ee22f29c7eeec5e39c0ac3eae460275
1 parent 0f86f33 commit 616c503

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

faiss/utils/utils.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,9 @@ int64_t count_gt(int64_t n, const T* row, T threshold) {
589589
} // namespace
590590

591591
template <typename T>
592-
void CombinerRangeKNN<T>::compute_sizes(int64_t* L_res_2) {
593-
this->L_res = L_res_2;
594-
L_res_2[0] = 0;
592+
void CombinerRangeKNN<T>::compute_sizes(int64_t* L_res_init) {
593+
this->L_res = L_res_init;
594+
L_res_init[0] = 0;
595595
int64_t j = 0;
596596
for (int64_t i = 0; i < nq; i++) {
597597
int64_t n_in;
@@ -602,11 +602,11 @@ void CombinerRangeKNN<T>::compute_sizes(int64_t* L_res_2) {
602602
n_in = lim_remain[j + 1] - lim_remain[j];
603603
j++;
604604
}
605-
L_res_2[i + 1] = n_in; // L_res_2[i] + n_in;
605+
L_res_init[i + 1] = n_in; // L_res_init[i] + n_in;
606606
}
607607
// cumsum
608608
for (int64_t i = 0; i < nq; i++) {
609-
L_res_2[i + 1] += L_res_2[i];
609+
L_res_init[i + 1] += L_res_init[i];
610610
}
611611
}
612612

0 commit comments

Comments
 (0)