From 8a2b6d6123e5fa21b2be901a6c03177acf07a5f7 Mon Sep 17 00:00:00 2001 From: Jaap Aarts Date: Mon, 16 Sep 2024 12:07:40 -0700 Subject: [PATCH] Add explicit instanciations of `search_dispatch_implem` (#3860) Summary: 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. Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3860 Reviewed By: mengdilin Differential Revision: D62762224 Pulled By: mnorris11 fbshipit-source-id: 938d5bc1917ef947847b1d8fcc3e40cea52e8367 --- 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);