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

Fixes for apple-clang crashes and performance issues #655

Merged
merged 6 commits into from
Dec 19, 2024

Conversation

rothmichaels
Copy link
Contributor

The source of the crash with the latest changes seemed to be from the IsOfCharacter concept. This concept was refactored to use some type traits and more simple concepts although with less strict requirements.

A new macro, MP_UNITS_APPLE_CLANG_HACKS was added to mp-units/bits/hacks.h to enable work arounds for pre-Xcode 16.1 apple-clang.

Some tests were not passing and were removed with the preprocessor macro for apple-clang hacks is defined.

Adding ComplexFunctionsAvailable and VectorFunctionsAvailable fixed some test failures in concepts_test.cpp but not all.

The source of the crash with the latest changes seemed to be from the
`IsOfCharacter` concept.  This concept was refactored to use some type
traits and more simple concepts although with less strict requirements.

A new macro, `MP_UNITS_APPLE_CLANG_HACKS` was added to
mp-units/bits/hacks.h to enable work arounds for pre-Xcode 16.1 apple-clang.

Some tests were not passing and were removed with the preprocessor macro
for apple-clang hacks is defined.

Adding `ComplexFunctionsAvailable` and `VectorFunctionsAvailable` fixed
some test failures in concepts_test.cpp but not all.
@rothmichaels rothmichaels force-pushed the bugfix/apple-clang-crash branch from fa9e052 to d30f5a6 Compare December 9, 2024 17:06
@rothmichaels
Copy link
Contributor Author

@mpusz I guess all we needed to do was remove WeaklyRegular. I thought I tried that before but maybe something else changed after I rebased to master.

Removing the `WeaklyRegular` requirement from the `Scalar`, `Complex`,
and `Vector` concepts seems to address compiler crashes or long
compilation times with apple-clang included in Xcode 15.

I thought I had previously tried removing the `WeaklyRegular`
requirement and it had not solved the problem but either I made a
mistake with this test or some other changes after rebasing this work
changed the situation.
@rothmichaels rothmichaels force-pushed the bugfix/apple-clang-crash branch from d79c178 to ada508a Compare December 19, 2024 16:19
Copy link
Owner

@mpusz mpusz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mpusz mpusz merged commit 75ae652 into mpusz:master Dec 19, 2024
77 checks passed
@rothmichaels rothmichaels deleted the bugfix/apple-clang-crash branch December 19, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants