Skip to content

Commit

Permalink
Add explicit instanciations of search_dispatch_implem (#3860)
Browse files Browse the repository at this point in the history
Summary:
Since commit 32f0e8c (#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: #3860

Reviewed By: mengdilin

Differential Revision: D62762224

Pulled By: mnorris11

fbshipit-source-id: 938d5bc1917ef947847b1d8fcc3e40cea52e8367
  • Loading branch information
JAicewizard authored and facebook-github-bot committed Sep 16, 2024
1 parent f67f518 commit 6da9952
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions faiss/IndexFastScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,22 @@ void IndexFastScan::search_implem_14(
}
}

template void IndexFastScan::search_dispatch_implem<true>(
idx_t n,
const float* x,
idx_t k,
float* distances,
idx_t* labels,
const NormTableScaler* scaler) const;

template void IndexFastScan::search_dispatch_implem<false>(
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<uint8_t> code(code_size, 0);
BitstringWriter bsw(code.data(), code_size);
Expand Down

0 comments on commit 6da9952

Please sign in to comment.