@@ -32,30 +32,31 @@ IndexAdditiveQuantizerFastScan::IndexAdditiveQuantizerFastScan(
3232}
3333
3434void IndexAdditiveQuantizerFastScan::init (
35- AdditiveQuantizer* aq_2 ,
35+ AdditiveQuantizer* aq_init ,
3636 MetricType metric,
3737 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 );
4141 if (metric == METRIC_INNER_PRODUCT) {
4242 FAISS_THROW_IF_NOT_MSG (
43- aq_2 ->search_type == AdditiveQuantizer::ST_LUT_nonorm,
43+ aq_init ->search_type == AdditiveQuantizer::ST_LUT_nonorm,
4444 " Search type must be ST_LUT_nonorm for IP metric" );
4545 } else {
4646 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,
4950 " Search type must be lsq2x4 or rq2x4 for L2 metric" );
5051 }
5152
52- this ->aq = aq_2 ;
53+ this ->aq = aq_init ;
5354 if (metric == METRIC_L2) {
54- M = aq_2 ->M + 2 ; // 2x4 bits AQ
55+ M = aq_init ->M + 2 ; // 2x4 bits AQ
5556 } else {
56- M = aq_2 ->M ;
57+ M = aq_init ->M ;
5758 }
58- init_fastscan (aq_2 ->d , M, 4 , metric, bbs);
59+ init_fastscan (aq_init ->d , M, 4 , metric, bbs);
5960
6061 max_train_points = 1024 * ksub * M;
6162}
0 commit comments