NVIDIA / cccl

CUDA Core Compute Libraries
https://nvidia.github.io/cccl/
Other
1.22k stars 156 forks source link

Inplace overloads for BlockExchange need tests and documentation #932

Open pauleonix opened 1 year ago

pauleonix commented 1 year ago

The first example for BlockExchange involves an overload of StripedToBlocked taking only one argument for an in-place exchange. This overload exists in code but seems to be intentionally undocumented (#ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document) and I'm not sure what to make of that.

If they are a proper part of the public API, I would expect them to be listed with the other member methods in the documentation. If they aren't for some reason, I think the example should be modified to avoid head-scratching.

gevtushenko commented 1 year ago

Hello @pauleonix! I agree, current state is a bit confusing. Undocumented code didn't use to be considered as public API. In other words, #ifndef DOXYGEN_SHOULD_SKIP_THIS used to mean private. We are in the process of making the API ridge more explicit.

Before changing the documentation, we should cover the facility with tests. It's only tested indirectly as part of block load / store tests. After we cover block exchange with tests, we should update the documentation and remove DOXYGEN_SHOULD_SKIP_THIS.

That's said, other CUB facilities rely on StripedToBlocked(items, items), so in-place path should work.