Skip to content

Commit

Permalink
Add explicit instanciations of search_dispatch_implem (facebookrese…
Browse files Browse the repository at this point in the history
…arch#3860)

Summary:
Since commit 32f0e8c (facebookresearch#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: facebookresearch#3860

Reviewed By: mengdilin

Differential Revision: D62762224

Pulled By: mnorris11

fbshipit-source-id: 938d5bc1917ef947847b1d8fcc3e40cea52e8367
  • Loading branch information
JAicewizard authored and aalekhpatel07 committed Oct 17, 2024
1 parent c595d07 commit 8a2b6d6
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 8a2b6d6

Please sign in to comment.