Skip to content

Commit 793b441

Browse files
authored
Add explicit instanciations of search_dispatch_implem
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.
1 parent dc55e11 commit 793b441

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

faiss/IndexFastScan.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,22 @@ void IndexFastScan::search_implem_14(
549549
}
550550
}
551551

552+
template void IndexFastScan::search_dispatch_implem<true>(
553+
idx_t n,
554+
const float* x,
555+
idx_t k,
556+
float* distances,
557+
idx_t* labels,
558+
const NormTableScaler* scaler) const;
559+
560+
template void IndexFastScan::search_dispatch_implem<false>(
561+
idx_t n,
562+
const float* x,
563+
idx_t k,
564+
float* distances,
565+
idx_t* labels,
566+
const NormTableScaler* scaler) const;
567+
552568
void IndexFastScan::reconstruct(idx_t key, float* recons) const {
553569
std::vector<uint8_t> code(code_size, 0);
554570
BitstringWriter bsw(code.data(), code_size);

0 commit comments

Comments
 (0)