Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
jnke2016 committed Dec 1, 2024
1 parent bcfc99c commit 19c37a8
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cpp/src/sampling/neighbor_sampling_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,10 @@ neighbor_sample_impl(raft::handle_t const& handle,
// If there are missing labels, still inlude it in the result_labels
result_labels = std::move(*cp_starting_vertex_labels);
auto unique_labels_end =
thrust::unique(handle.get_thrust_policy(),
result_labels->begin(),
result_labels->end());

auto num_unique_labels = thrust::distance(
result_labels->begin(), unique_labels_end);

thrust::unique(handle.get_thrust_policy(), result_labels->begin(), result_labels->end());

auto num_unique_labels = thrust::distance(result_labels->begin(), unique_labels_end);

result_labels->resize(num_unique_labels, handle.get_stream());

result_offsets->resize(num_unique_labels + 1, handle.get_stream());
Expand All @@ -519,7 +516,6 @@ neighbor_sample_impl(raft::handle_t const& handle,

return sampled_label_size;
});


// Run inclusive scan
thrust::inclusive_scan(handle.get_thrust_policy(),
Expand Down

0 comments on commit 19c37a8

Please sign in to comment.