-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add a different implementation of Differentiation #33941
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
Add a different implementation of Differentiation #33941
Conversation
In the long term, the tgmath derivatives currently implemented in Differentation will be migrated to a separate overlay. In anticipation of this, provide an implementation of Differentation without such functions which is exposed through a feature flag. Addresses rdar://68471851
@swift-ci please smoke test |
Note for reviewers: Since differentiation is platform-independent, it shouldn't need to depend on platform runtime libraries like Darwin and Glibc. Here we are just adding an option to disable the tgmath parts in the build. One possible future direction is to move tgmath derivatives to a cross-import overlay for Darwin/Glibc and _Differentiation. |
@swift-ci please smoke test |
@swift-ci please test Windows |
In addition to moving the option at the stdlib level, I also took some offline feedback from @gottesmm and moved the new implementation to a separate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@swift-ci please smoke test macOS |
1 similar comment
@swift-ci please smoke test macOS |
@@ -0,0 +1,20 @@ | |||
set(SOURCES_FOLDER ../Differentiation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems in conflict with the comment in the parent CMakeLists, that this code should not be shared.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is indeed confusing -- my concern was around the CMake code, but the comment is not clear in this regard
I will sit a bit on the PR to see if I can improve the wording and/or the overall readability of the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and did some rewording -- for the sake of clarify, did that in a new PR, #34116
To avoid piling up many commits and to address properly the merge conflicts, close this PR in favor of |
In the long term, the tgmath derivatives currently implemented in
Differentation will be migrated to a separate overlay.
In anticipation of this, provide an implementation of Differentation
without such functions which is exposed through a feature flag.
Addresses rdar://68471851