Skip to content

Commit 7f79338

Browse files
committed
avoid resizing counts for isolated vertices (which implicitly have counts of 0)
1 parent 3b4e4b6 commit 7f79338

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

cpp/src/structure/renumber_edgelist.cu

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,10 @@ std::tuple<rmm::device_uvector<vertex_t>, std::vector<vertex_t>> compute_renumbe
302302

303303
if (isolated_vertices.size() > 0) {
304304
labels.resize(labels.size() + isolated_vertices.size(), handle.get_stream());
305-
counts.resize(labels.size(), handle.get_stream());
306305
thrust::copy(rmm::exec_policy(handle.get_stream_view()),
307306
isolated_vertices.begin(),
308307
isolated_vertices.end(),
309308
labels.end() - isolated_vertices.size());
310-
thrust::fill(rmm::exec_policy(handle.get_stream_view()),
311-
counts.end() - isolated_vertices.size(),
312-
counts.end(),
313-
edge_t{0});
314309
}
315310
}
316311

@@ -356,7 +351,7 @@ std::tuple<rmm::device_uvector<vertex_t>, std::vector<vertex_t>> compute_renumbe
356351
handle.get_stream());
357352

358353
auto zero_vertex = vertex_t{0};
359-
auto vertex_count = static_cast<vertex_t>(counts.size());
354+
auto vertex_count = static_cast<vertex_t>(labels.size());
360355
d_segment_offsets.set_element_async(0, zero_vertex, handle.get_stream());
361356
d_segment_offsets.set_element_async(
362357
num_segments_per_vertex_partition, vertex_count, handle.get_stream());

0 commit comments

Comments
 (0)