From a730716fec53b521a076090acefe54eff58a3a76 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Tue, 27 Jun 2023 07:59:20 -0500 Subject: [PATCH] Make one more AnnoyIndex use be Annoy::AnnoyIndex --- src/nn_parallel.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/nn_parallel.h b/src/nn_parallel.h index 7f5c092c..460963cc 100644 --- a/src/nn_parallel.h +++ b/src/nn_parallel.h @@ -89,10 +89,17 @@ template struct NNWorker { std::vector idx; std::vector dists; +#if ANNOY_VERSION >= Annoy_Version(1,17,3) + Annoy::AnnoyIndex + index; +#else AnnoyIndex index; +#endif NNWorker(const std::string &index_name, const std::vector &mat, std::size_t ncol, std::size_t n_neighbors, std::size_t search_k)