Skip to content

Commit

Permalink
Rewrite comment
Browse files Browse the repository at this point in the history
Signed-off-by: Nghia Truong <nghiatruong.vn@gmail.com>
  • Loading branch information
ttnghia committed May 30, 2022
1 parent ba58d6f commit 6e098a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/include/cudf/detail/labeling/label_segments.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ void label_segments(InputIterator offsets_begin,
rmm::cuda_stream_view stream)
{
// If the output array is empty, that means we have all empty segments.
// In such cases, there will not be any label value to output.
// In such cases, we must terminate immediately. Otherwise, the for loop below may try to access
// memory of the output array, resulting in "illegal memory access" error.
if (thrust::distance(out_begin, out_end) == 0) { return; }

// When the output array is not empty, always fill it with `0` value first.
Expand Down

0 comments on commit 6e098a2

Please sign in to comment.