Skip to content

Commit

Permalink
Add explicit instanciations of search_dispatch_implem
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JAicewizard authored Sep 14, 2024
1 parent dc55e11 commit 793b441
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 793b441

Please sign in to comment.