Skip to content

Commit

Permalink
unrenumber the vertex_pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
jnke2016 committed Jul 4, 2024
1 parent 5249f02 commit d111e98
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion cpp/src/c_api/similarity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,20 @@ struct all_pairs_similarity_functor : public cugraph::c_api::abstract_functor {
vertices_->as_type<vertex_t const>(), vertices_->size_})
: std::nullopt,
topk_ != SIZE_MAX ? std::make_optional(topk_) : std::nullopt);

cugraph::unrenumber_int_vertices<vertex_t, multi_gpu>(handle_,
v1.data(),
v1.size(),
number_map->data(),
vertex_partition_range_lasts,
false);

cugraph::unrenumber_int_vertices<vertex_t, multi_gpu>(handle_,
v2.data(),
v2.size(),
number_map->data(),
vertex_partition_range_lasts,
false);

result_ = new cugraph::c_api::cugraph_similarity_result_t{
new cugraph::c_api::cugraph_type_erased_device_array_t(similarity_coefficients,
Expand Down Expand Up @@ -458,4 +472,4 @@ extern "C" cugraph_error_code_t cugraph_all_pairs_overlap_coefficients(
handle, graph, vertices, overlap_functor{}, use_weight, topk, do_expensive_check);

return cugraph::c_api::run_algorithm(graph, functor, result, error);
}
}

0 comments on commit d111e98

Please sign in to comment.