Skip to content

Commit 8939f48

Browse files
mengdilinfacebook-github-bot
authored andcommitted
Improve naming due to codemod (facebookresearch#4064)
Summary: Pull Request resolved: facebookresearch#4064 Apply matthijs' comments on better naming in D52582914 Reviewed By: junjieqi Differential Revision: D66822957 fbshipit-source-id: d899dbe89ebd716a18901c734c65dac428856954
1 parent 661557e commit 8939f48

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

faiss/IndexFastScan.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@ inline size_t roundup(size_t a, size_t b) {
3333

3434
void IndexFastScan::init_fastscan(
3535
int d,
36-
size_t M_2,
37-
size_t nbits_2,
36+
size_t M_init,
37+
size_t nbits_init,
3838
MetricType metric,
3939
int bbs) {
40-
FAISS_THROW_IF_NOT(nbits_2 == 4);
40+
FAISS_THROW_IF_NOT(nbits_init == 4);
4141
FAISS_THROW_IF_NOT(bbs % 32 == 0);
4242
this->d = d;
43-
this->M = M_2;
44-
this->nbits = nbits_2;
43+
this->M = M_init;
44+
this->nbits = nbits_init;
4545
this->metric_type = metric;
4646
this->bbs = bbs;
47-
ksub = (1 << nbits_2);
47+
ksub = (1 << nbits_init);
4848

49-
code_size = (M_2 * nbits_2 + 7) / 8;
49+
code_size = (M_init * nbits_init + 7) / 8;
5050
ntotal = ntotal2 = 0;
51-
M2 = roundup(M_2, 2);
51+
M2 = roundup(M_init, 2);
5252
is_trained = false;
5353
}
5454

0 commit comments

Comments
 (0)