Skip to content

Support StaticArrays of TrackedReals - #154

Closed
bzinberg wants to merge 4 commits into
JuliaDiff:masterfrom
bzinberg:patch-1
Closed

bzinberg wants to merge 4 commits into
JuliaDiff:masterfrom
bzinberg:patch-1

Conversation

@bzinberg

@bzinberg bzinberg commented Oct 14, 2020 •

Copy link
Copy Markdown

Draft fix of #153.

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

Copy link
Copy Markdown
Author

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

@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
Copy Markdown
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
Copy Markdown
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.

@mohdibntarek mohdibntarek Feb 28, 2021 •

Copy link
Copy Markdown
Member

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.

@devmotion devmotion mentioned this pull request Aug 6, 2024
2 of 4 tasks
@devmotion

Copy link
Copy Markdown
Member

Closed in favour of #307

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