Skip to content

vector_algorithms.cpp: cleanup #5429

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

Merged
merged 7 commits into from
Apr 29, 2025
Merged

Conversation

AlexGuteniev
Copy link
Contributor

Fix accumulated inconsistencies in vector_algorithms.cpp, separate commit each:

  • More const, lately I've been trying to add const everywhere, but there is missing one in older code
  • Use the same type for a variable as in the other similar branch. Unsigned type is selected, as we do bitwise thing with it
  • Drop _CSTD, the C run time things used unqualified in this file in some other places
  • _Avx2_tail_mask_32 now takes bytes count. It is odd from the perspective of the function itself, but almost every call site has bytes, and even for the ones that don't, the lack of multiplication by 4 and multiplication by 2 instead of by 8 look odd.

Deliberately skipped namespace as per #5418 for now. These look more controversial, so I'd do just clean stuff first.

@AlexGuteniev AlexGuteniev requested a review from a team as a code owner April 24, 2025 05:25
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Apr 24, 2025
@github-project-automation github-project-automation bot moved this from Initial Review to Done in STL Code Reviews Apr 24, 2025
@AlexGuteniev AlexGuteniev reopened this Apr 24, 2025
@github-project-automation github-project-automation bot moved this from Done to Initial Review in STL Code Reviews Apr 24, 2025
@AlexGuteniev
Copy link
Contributor Author

Added another commit with noexcept lambdas.
This is still consistency. noexcept isn't useful there.

@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Apr 24, 2025
@StephanTLavavej StephanTLavavej self-assigned this Apr 24, 2025
@StephanTLavavej StephanTLavavej added the uncharted Excluded from the Status Chart label Apr 24, 2025
@StephanTLavavej StephanTLavavej removed their assignment Apr 24, 2025
@StephanTLavavej
Copy link
Member

Thanks, these changes are great - especially the count-in-bytes and unsigned long mask changes! 😻 I pushed a syntax nitpick and a comment fix. STL SEES ALL.

@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Apr 24, 2025
@StephanTLavavej
Copy link
Member

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

@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Apr 25, 2025
@StephanTLavavej StephanTLavavej merged commit 116ee9a into microsoft:main Apr 29, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Apr 29, 2025
@StephanTLavavej
Copy link
Member

🧹 🚀 😸

@AlexGuteniev AlexGuteniev deleted the cleanup branch April 29, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved uncharted Excluded from the Status Chart
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants