NVIDIA / NVIDIA/cccl

[DOC]: Document work complexity of Thrust/CUB algorithms

Open
#1,661 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

### Is this a duplicate?

- [X] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this bug and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)

### Is this for new documentation, or an update to existing docs?

New

### Describe the incorrect/future/missing documentation

As a user of Thrust and CUB algorithms, I often want to know things like:
- Am I guaranteed that each element of the input range is accessed only once?
- Am I guaranteed that each element of the output is only written to once?
- Can my operator have side-effects?
- Can dereferencing my input/output iterator have side-effects?

All of these questions are inter-related and the answer is unique to each algorithm.

To address these questions, I would like for each Thrust and CUB algorithm to have a "Complexity" section similar to what [cppreference](https://en.cppreference.com/w/cpp/algorithm/adjacent_difference) has:

![image](https://github.com/NVIDIA/cccl/assets/15221289/0fbed0e0-b829-4d9a-bc97-98caa6289df8)

### If this is a correction, please provide a link to the incorrect documentation. If this is a new documentation request, please link to where you have looked.

_No response_

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.