NVIDIA / NVIDIA/cccl

Implement `BlockScan` overloads that invoke the `binary_op` only for the given `num_items`

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

Description

Today, most of the block-level algorithms have to be invoked with a full tile of items (i.e., `BLOCK_THREADS * ITEMS_PER_THREAD`). For these block-level algorithms, if users have problem sizes that are not full tiles, we currently expect them to pad the out-of-bounds items.

Following the investigation in https://github.com/NVIDIA/cccl/issues/5019, having the `BlockScan` overloads that invoke the `binary_op` only for the given `num_items` is a prerequisite for https://github.com/NVIDIA/cccl/issues/5017.

_The scope of this issue is limited to only the `BlockScan` overloads that are required within `AgentScan`._

- [x] Evaluate whether adding the `BlockScan` overloads with an extra `num_items` parameter could lead to ambiguous overloads.
- [x] Implement `BlockScan` overloads that invoke the `binary_op` only for the given `num_items`.
- [x] Add tests for the new overloads
- [x] Add documentation for the new overloads

### Related issues

- https://github.com/NVIDIA/cccl/issues/869

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.