ADL-proof implementation of numeric algorithms#4391
Merged
StephanTLavavej merged 7 commits intomicrosoft:mainfrom Feb 16, 2024
Merged
ADL-proof implementation of numeric algorithms#4391StephanTLavavej merged 7 commits intomicrosoft:mainfrom
StephanTLavavej merged 7 commits intomicrosoft:mainfrom
Conversation
There're 2 occurrences where unqualified calls are always safe.
Always use `_STD_VECTORIZE_WITH_FLOAT_CONTROL` guards around `_Plus_on_arithmetic_ranges_reduction_v` and `_Default_ops_transform_reduce_v` machinery, drop their `false` fallbacks (which were weird and non-conventional). Use arrow comments for consistency. `_STD` qualify two more calls to `_Reduce_plus_arithmetic_ranges` in `<execution>`.
StephanTLavavej
approved these changes
Feb 15, 2024
Member
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Member
🧮 🛡️ 🎉 |
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.
Separated from #4004 (this is the last one). Towards #1596.
Some
begin()calls are replaced withdata()because the iterator operations are not ADL-proof.begin()calls on_Parallel_vectorthat are not dependent on user-defined types and thus are always safe. I'm not sure whether we should consistently usedata()(which possibly improves debug performance).After merging this PR, there're still a small number of unqualified
_Adl_verify_rangecalls that possibly do evil (inspananddistanceetc.).The remaining unqualified
_Adl_verify_rangecalls looks "OK" to me as ADL-incompatible types don't seem required to be supported in those cases (where the acceptable value types are integer/character types).