From 592f3016d1089bf9353560bce87adf13f86fcb67 Mon Sep 17 00:00:00 2001 From: Alexandr Guzhva Date: Wed, 27 Sep 2023 06:15:14 -0700 Subject: [PATCH] Unneeded field, exists in a baseclass (#3064) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3064 Reviewed By: pemazare Differential Revision: D49617455 Pulled By: mlomeli1 fbshipit-source-id: 2d35cfc3c2afc2536ac0d614b3dbe1401134d03f --- faiss/impl/ScalarQuantizer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/faiss/impl/ScalarQuantizer.cpp b/faiss/impl/ScalarQuantizer.cpp index 680a3bc059..853567e153 100644 --- a/faiss/impl/ScalarQuantizer.cpp +++ b/faiss/impl/ScalarQuantizer.cpp @@ -1175,7 +1175,6 @@ template struct IVFSQScannerIP : InvertedListScanner { DCClass dc; bool by_residual; - const IDSelector* sel; float accu0; /// added to all distances @@ -1186,8 +1185,9 @@ struct IVFSQScannerIP : InvertedListScanner { bool store_pairs, const IDSelector* sel, bool by_residual) - : dc(d, trained), by_residual(by_residual), sel(sel), accu0(0) { + : dc(d, trained), by_residual(by_residual), accu0(0) { this->store_pairs = store_pairs; + this->sel = sel; this->code_size = code_size; } @@ -1259,7 +1259,6 @@ struct IVFSQScannerL2 : InvertedListScanner { bool by_residual; const Index* quantizer; - const IDSelector* sel; const float* x; /// current query std::vector tmp; @@ -1275,10 +1274,10 @@ struct IVFSQScannerL2 : InvertedListScanner { : dc(d, trained), by_residual(by_residual), quantizer(quantizer), - sel(sel), x(nullptr), tmp(d) { this->store_pairs = store_pairs; + this->sel = sel; this->code_size = code_size; }