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

Support StaticArrays of TrackedReals #154

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bzinberg
Copy link

@bzinberg bzinberg commented Oct 14, 2020

Draft fix of #153.

@bzinberg bzinberg marked this pull request as ready for review October 14, 2020 17:03
@bzinberg
Copy link
Author

LMK if this looks like a good approach. If yes, then I'll add unit tests.

@@ -33,6 +33,9 @@ for A in ARRAY_TYPES
@eval @inline Base.:+(x::$(A), y::TrackedArray{V,D}) where {V,D} = record_plus(x, y, D)
end

@inline Base.:+(x::TrackedArray{V,D}, y::StaticArray) where {V,D} = record_plus(x, Array(y), D)
Copy link
Member

Choose a reason for hiding this comment

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

Try changing to an MArray instead of Array here.

Copy link
Member

Choose a reason for hiding this comment

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

Then inplace operations will work.

Copy link
Member

@mohamed82008 mohamed82008 Feb 28, 2021

Choose a reason for hiding this comment

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

And please post a test of a MWE that was broken.

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