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

ADL-proof implementation of numeric algorithms #4391

Merged

Conversation

frederick-vs-ja
Copy link
Contributor

Separated from #4004 (this is the last one). Towards #1596.

Some begin() calls are replaced with data() because the iterator operations are not ADL-proof.

  • There're some other begin() calls on _Parallel_vector that are not dependent on user-defined types and thus are always safe. I'm not sure whether we should consistently use data() (which possibly improves debug performance).

After merging this PR, there're still a small number of unqualified _Adl_verify_range calls that possibly do evil (in span and distance etc.).
The remaining unqualified _Adl_verify_range calls 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).

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner February 14, 2024 13:40
@StephanTLavavej StephanTLavavej added the bug Something isn't working label Feb 14, 2024
@StephanTLavavej StephanTLavavej self-assigned this Feb 14, 2024
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 StephanTLavavej removed their assignment Feb 15, 2024
@StephanTLavavej StephanTLavavej self-assigned this Feb 15, 2024
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 7d4fc23 into microsoft:main Feb 16, 2024
35 checks passed
@StephanTLavavej
Copy link
Member

🧮 🛡️ 🎉

@frederick-vs-ja frederick-vs-ja deleted the adl-proof-numeric-algo branch February 17, 2024 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants