@@ -32,30 +32,31 @@ IndexAdditiveQuantizerFastScan::IndexAdditiveQuantizerFastScan(
32
32
}
33
33
34
34
void IndexAdditiveQuantizerFastScan::init (
35
- AdditiveQuantizer* aq_2 ,
35
+ AdditiveQuantizer* aq_init ,
36
36
MetricType metric,
37
37
int bbs) {
38
- FAISS_THROW_IF_NOT (aq_2 != nullptr );
39
- FAISS_THROW_IF_NOT (!aq_2 ->nbits .empty ());
40
- FAISS_THROW_IF_NOT (aq_2 ->nbits [0 ] == 4 );
38
+ FAISS_THROW_IF_NOT (aq_init != nullptr );
39
+ FAISS_THROW_IF_NOT (!aq_init ->nbits .empty ());
40
+ FAISS_THROW_IF_NOT (aq_init ->nbits [0 ] == 4 );
41
41
if (metric == METRIC_INNER_PRODUCT) {
42
42
FAISS_THROW_IF_NOT_MSG (
43
- aq_2 ->search_type == AdditiveQuantizer::ST_LUT_nonorm,
43
+ aq_init ->search_type == AdditiveQuantizer::ST_LUT_nonorm,
44
44
" Search type must be ST_LUT_nonorm for IP metric" );
45
45
} else {
46
46
FAISS_THROW_IF_NOT_MSG (
47
- aq_2->search_type == AdditiveQuantizer::ST_norm_lsq2x4 ||
48
- aq_2->search_type == AdditiveQuantizer::ST_norm_rq2x4,
47
+ aq_init->search_type == AdditiveQuantizer::ST_norm_lsq2x4 ||
48
+ aq_init->search_type ==
49
+ AdditiveQuantizer::ST_norm_rq2x4,
49
50
" Search type must be lsq2x4 or rq2x4 for L2 metric" );
50
51
}
51
52
52
- this ->aq = aq_2 ;
53
+ this ->aq = aq_init ;
53
54
if (metric == METRIC_L2) {
54
- M = aq_2 ->M + 2 ; // 2x4 bits AQ
55
+ M = aq_init ->M + 2 ; // 2x4 bits AQ
55
56
} else {
56
- M = aq_2 ->M ;
57
+ M = aq_init ->M ;
57
58
}
58
- init_fastscan (aq_2 ->d , M, 4 , metric, bbs);
59
+ init_fastscan (aq_init ->d , M, 4 , metric, bbs);
59
60
60
61
max_train_points = 1024 * ksub * M;
61
62
}
0 commit comments