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

Add support for StaticArrays >= 1.7 #703

Merged
merged 2 commits into from
May 29, 2024
Merged

Conversation

devmotion
Copy link
Member

@devmotion devmotion commented May 28, 2024

In StaticArrays 1.7 broadcasting with static arrays was improved: JuliaArrays/StaticArrays.jl#1220 This fix implies that in some cases in newer versions now a static array is returned where in older versions incorrectly an Array was returned.

In ForwardDiff this breaks the eigen definition which uses an in-place method _lyap_div! to compute A ./ (l' .- l) (with diagonal entries A[i, i]). This PR fixes the problem by replacing it with a _lyap_div!! method that, following the bang-bang notation, falls back to an out-of-place implementation and only uses an in-place method for arrays that are known to be mutable such as Matrix or StaticArrays.MMatrix.

Fixes #690.
Fixes #702.

Copy link
Member

@mcabbott mcabbott left a comment

Choose a reason for hiding this comment

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

Sounds good, haven't read every line, but am happy if tests pass.

@andreasnoack andreasnoack merged commit ff56092 into master May 29, 2024
4 checks passed
@andreasnoack andreasnoack deleted the dw/forwarddiff_staticarrays branch May 29, 2024 04:47
devmotion added a commit that referenced this pull request Sep 30, 2024
devmotion added a commit that referenced this pull request Sep 30, 2024
devmotion added a commit that referenced this pull request Sep 30, 2024
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.

3 participants