Use an explicit std::min for byte alignment calculation#1465
Merged
rapids-bot[bot] merged 5 commits intorapidsai:mainfrom Oct 28, 2025
Merged
Use an explicit std::min for byte alignment calculation#1465rapids-bot[bot] merged 5 commits intorapidsai:mainfrom
rapids-bot[bot] merged 5 commits intorapidsai:mainfrom
Conversation
Use explicit std::min removing compiler ambiguity. This is imported at the top of the file and used elsewhere
cjnolet
approved these changes
Oct 25, 2025
Contributor
|
/ok to test a87860c |
mythrocks
reviewed
Oct 27, 2025
| size_t align_x = alignment_of_2d_array(params.x, params.ldx); | ||
| size_t align_y = alignment_of_2d_array(params.y, params.ldy); | ||
| size_t byte_alignment = min(align_x, align_y); | ||
| size_t byte_alignment = std::min(align_x, align_y); |
Contributor
There was a problem hiding this comment.
Silly question: Should we consider converting this to cuda::std::min instead?
Contributor
There was a problem hiding this comment.
(I ask because this is function template in a .cuh file.)
Contributor
There was a problem hiding this comment.
Even though its a .cuh file, the function itself is still a purely host function, so that is not necessary.
Contributor
There was a problem hiding this comment.
Ok, thanks for confirming that this template isn't used in __device__ code. 👍
Contributor
|
/ok to test 81c3507 |
mythrocks
approved these changes
Oct 28, 2025
Contributor
mythrocks
left a comment
There was a problem hiding this comment.
👍 Thanks for entertaining the question.
Member
|
/ok to test 324b308 |
Member
|
/merge |
Member
|
Thanks so much for helping us improve the codebase @maxwbuckley. These changes LGTM! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use explicit std::min removing compiler ambiguity. This is imported at the top of the file "" and used elsewhere in this file