From dc9de07f68395c7a39da1541eaeaf40e40492c01 Mon Sep 17 00:00:00 2001 From: viclafargue Date: Thu, 11 Mar 2021 13:16:45 +0000 Subject: [PATCH] Adding translations parameter to brute_force_knn --- cpp/include/raft/spatial/knn/knn.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp/include/raft/spatial/knn/knn.hpp b/cpp/include/raft/spatial/knn/knn.hpp index 38106f6e0c..e1ab413b15 100644 --- a/cpp/include/raft/spatial/knn/knn.hpp +++ b/cpp/include/raft/spatial/knn/knn.hpp @@ -54,6 +54,7 @@ inline void brute_force_knn( raft::handle_t const &handle, std::vector &input, std::vector &sizes, int D, float *search_items, int n, int64_t *res_I, float *res_D, int k, bool rowMajorIndex = false, bool rowMajorQuery = false, + std::vector *translations = nullptr, distance::DistanceType metric = distance::DistanceType::L2Unexpanded, float metric_arg = 2.0f, bool expanded = false) { ASSERT(input.size() == sizes.size(), @@ -64,8 +65,8 @@ inline void brute_force_knn( detail::brute_force_knn_impl( input, sizes, D, search_items, n, res_I, res_D, k, handle.get_device_allocator(), handle.get_stream(), int_streams.data(), - handle.get_num_internal_streams(), rowMajorIndex, rowMajorQuery, nullptr, - metric, metric_arg, expanded); + handle.get_num_internal_streams(), rowMajorIndex, rowMajorQuery, + translations, metric, metric_arg, expanded); } } // namespace knn