From 793b44198da69544ebb07dfeff97f0c33593e8fc Mon Sep 17 00:00:00 2001 From: Jaap Aarts Date: Sun, 15 Sep 2024 00:20:18 +0200 Subject: [PATCH] Add explicit instanciations of `search_dispatch_implem` Since commit 32f0e8cf92cd2275b60364517bb1cce67aa29a55 (https://github.com/facebookresearch/faiss/pull/3190) faiss fails to build on gcc7. For some reason gcc7 needs these explicit instanciations (or rather, for some reason later versions are OK without them). This commit partially revers that commit, adding back the explicit instanciations. --- faiss/IndexFastScan.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/faiss/IndexFastScan.cpp b/faiss/IndexFastScan.cpp index 529465da3e..36ebafe931 100644 --- a/faiss/IndexFastScan.cpp +++ b/faiss/IndexFastScan.cpp @@ -549,6 +549,22 @@ void IndexFastScan::search_implem_14( } } +template void IndexFastScan::search_dispatch_implem( + idx_t n, + const float* x, + idx_t k, + float* distances, + idx_t* labels, + const NormTableScaler* scaler) const; + +template void IndexFastScan::search_dispatch_implem( + idx_t n, + const float* x, + idx_t k, + float* distances, + idx_t* labels, + const NormTableScaler* scaler) const; + void IndexFastScan::reconstruct(idx_t key, float* recons) const { std::vector code(code_size, 0); BitstringWriter bsw(code.data(), code_size);