NVIDIA / NVIDIA/cccl

Support for negative segment sizes

Open
#907 2 comments 0 reactions 1 assignee Claimed by @wmaxey View on GitHub
cub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

In our segmented reduce we state:
> If `d_end_offsets[i] - 1 <= d_begin_offsets[i]`, the *i*th segment is considered empty.
In our segmented sort and segmented radix sort we state the same thing.

While in the segmented reduce implementation, we check that:
```cpp
if (segment_begin == segment_end)
```
to recognize empty segments. I don't think we test for negative segment sizes.

I suggest we decide if we want to support negative offsets and then add necessary tests / fixes, or we change the docs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.