Skip to content

Commit 8a2b6d6

Browse files
JAicewizardaalekhpatel07
authored andcommitted
Add explicit instanciations of search_dispatch_implem (facebookresearch#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
1 parent c595d07 commit 8a2b6d6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

faiss/IndexFastScan.cpp

+16
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)