[docs] Update cuda::maximum/minimum signatures to match actual API#8365
Merged
fbusato merged 2 commits intoNVIDIA:mainfrom Apr 10, 2026
Merged
[docs] Update cuda::maximum/minimum signatures to match actual API#8365fbusato merged 2 commits intoNVIDIA:mainfrom
fbusato merged 2 commits intoNVIDIA:mainfrom
Conversation
The documentation showed operator() taking parameters by value and marked as inline, but the actual implementation takes const references and is constexpr with a conditional noexcept specification. Also add a section documenting the floating-point behavior: these functors use fmax/fmin for floating-point types, which treats NaN arguments as missing data rather than propagating them. Fixes NVIDIA#8350
Contributor
fbusato
requested changes
Apr 10, 2026
- Reference std::fmax/fmin specification instead of making specific claims about NaN handling that may not hold for all implementations - Add note that cuda::maximum and cuda::minimum are commutative for floating-point types due to using fmax/fmin
Contributor
Author
|
@fbusato Thanks for the review! I've pushed a follow-up commit addressing both points:
Please take another look when you get a chance. |
Contributor
|
/ok to test 7467f6b |
Contributor
|
thanks for the contribution, @edenfunf !! |
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.
Description
closes #8350
The documentation for
cuda::maximumandcuda::minimumdid not match the actual API in several ways:T a, T b)const T& a, const T& b)inlineconstexprnoexcept(/* conditional */)fmax/fmin(NaN = missing data)Changes:
operator()signatures (typed +voidspecializations, for bothmaximumandminimum) to useconst T¶ms,constexpr, andnoexcept(/* see below */)fmax/fminis used for floating-point types, as requested by @fbusato in the issue commentsChecklist