Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REVIEW] Adding translations parameter to brute_force_knn #170

Merged
merged 1 commit into from
Mar 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cpp/include/raft/spatial/knn/knn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ inline void brute_force_knn(
raft::handle_t const &handle, std::vector<float *> &input,
std::vector<int> &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<int64_t> *translations = nullptr,
distance::DistanceType metric = distance::DistanceType::L2Unexpanded,
float metric_arg = 2.0f, bool expanded = false) {
ASSERT(input.size() == sizes.size(),
Expand All @@ -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
Expand Down