Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REVIEW] Mdspanify permute #834

Merged
merged 3 commits into from
Sep 23, 2022

Conversation

mhoemmen
Copy link
Contributor

@mhoemmen mhoemmen commented Sep 21, 2022

I added an overload of raft::random::permute that takes device mdspan instead of raw arrays, and std::optional<mdspan<...>> for optional output arrays. I also added two overloads that let users pass in std::nullopt.

I've added a unit test that imitates the existing unit test for the raw-array overloads; it builds and passes. The test ensures that the two std::nullopt overloads also compile.

I also opportunistically fixed some unrelated existing small build errors that were blocking forward progress. That commit is included in PRs #830 and #833 as well, so if it merges, the change should rebase correctly.

@mhoemmen mhoemmen requested a review from a team as a code owner September 21, 2022 04:17
@github-actions github-actions bot added the cpp label Sep 21, 2022
@mhoemmen mhoemmen added feature request New feature or request non-breaking Non-breaking change labels Sep 21, 2022
@mhoemmen mhoemmen changed the title Mdspanify permute [REVIEW] Mdspanify permute Sep 21, 2022
@mhoemmen mhoemmen changed the title [REVIEW] Mdspanify permute [WIP] Mdspanify permute Sep 21, 2022
@mhoemmen mhoemmen force-pushed the mdspanify-permute branch 2 times, most recently from 6b8a6ce to 5f99839 Compare September 22, 2022 15:54
@mhoemmen mhoemmen changed the title [WIP] Mdspanify permute [REVIEW] Mdspanify permute Sep 22, 2022
Add overloads of permute that take arrays as mdspan
(std::optional<mdspan<...>> if the array is an optional
output argument).

Improve documentation of the existing overload
and document the new overloads.  Add tests.
Make sure that the function compiles if users pass in
std::nullopt for either or both optional arguments.
@mhoemmen mhoemmen changed the title [REVIEW] Mdspanify permute [WIP] Mdspanify permute Sep 22, 2022
@mhoemmen mhoemmen changed the title [WIP] Mdspanify permute [REVIEW] Mdspanify permute Sep 22, 2022
Copy link
Member

@cjnolet cjnolet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cjnolet
Copy link
Member

cjnolet commented Sep 23, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit bfd90a7 into rapidsai:branch-22.10 Sep 23, 2022
@mhoemmen mhoemmen deleted the mdspanify-permute branch September 23, 2022 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp feature request New feature or request non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants