-
Notifications
You must be signed in to change notification settings - Fork 149
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
Use new broadcast API #348
Closed
Closed
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ec78329
first version
pablosanjose 0b7bab8
wip
pablosanjose 1c21255
wip (disabled broadcast!)
pablosanjose a2995d5
patched broadcast!, added version check
pablosanjose 3ea9ad1
deleted old broadcast.jl
pablosanjose 098dcbb
WIP: trying to fix Scalar broadcast
pablosanjose 48a84b0
Revert "WIP: trying to fix Scalar broadcast"
pablosanjose d6b58f4
Whitespace
pablosanjose 1a00c3f
Reverted use of uninitialised for compatibility
pablosanjose 75dc71e
fix Scalar broadcast, array precedence
pablosanjose 2edd21e
Less binary BroadcastStyle methods
pablosanjose b146f8a
Avoid calling dynamic combine_indices (duh!)
pablosanjose 5d5bab6
Addressed points by andyferris
pablosanjose b70fae3
add a DefaultArrayStyle rule
pablosanjose d7b23dd
edited comments, added reminders to fix VectorStyle, MatrixStyle
pablosanjose 35969d7
Adapt to new broadcast! implementation in Base.
tkoolen 0ccfc43
Merge pull request #1 from tkoolen/tk/newbroadcast
pablosanjose File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
VectorStyle
andMatrixStyle
are unfortunate (and hopefully temporary) objects because we don't trust that sparse broadcasting generalizes correctly beyondArray
(see JuliaLang/julia#23939 (comment)). However, this suggests we'll have to support them throughout julia 1.x. 😢Long-term the one we want to implement would be with
DefaultArrayStyle
. Instead of returningUnknown
, it might be best to do something like this (untested):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.
Hey Tim, thanks for reviewing! Your designs are a pleasure to work with.
So you suggest including this rule, in addition to the
VectorStyle
andMatrixStyle
ones, to take over once the latter are removed, yes? Done.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.
Right. Also the
DefaultArrayStyle
is necessary even now for dimensions higher than 2.Thanks for the kind words about the API. I think it's also fair to say that unfortunately they don't help StaticArrays that much; they're more oriented around improving the API for mutable arrays. But at least it's documented, and hopefully that's worth something.
Really grateful to you for tackling this!