-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 3-arg * methods #37898
Merged
Merged
Add 3-arg * methods #37898
Changes from 31 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
2ed51d6
add 3-arg star
14fa53e
also handle 3 matrices
b0c33f4
a few more cases, and tests
1981525
two scalars + one array
71dfbb0
avoid dot dispatch
be5eee3
add some array-of-array tests
8e9bcd5
fix order of multiplication
cfa28cb
add a docstring
93d03b8
preserve order in fallbacks
b04b3a5
opt-in, take 1
1a29b74
remove two-scalar methods
6c3c9c0
fewer adjoint = less chance of spurious dimensions
a1ddb42
Update stdlib/LinearAlgebra/src/matmul.jl
mcabbott ea98220
four-argument *, why not
d6954e0
one more case
ffbb4b8
rm ambiguity
f0b3648
use 3-arg dot only when length(x)<64
1c92294
more explicit name for _SafeMatrix
0a71d33
don't use 3-arg dot at all
fb3b7da
use RealOrComplex for eltypes, too
f005fb5
better fallback for mat_vec_scalar
eac95e7
remove a now-duplicate definition of StridedMaybeAdjOrTransMat
2f39e33
Apply suggestions from code review
mcabbott d9b456e
constrain adjoint eltypes
766368f
two tiny fixes
mcabbott 15f9f21
optimise dot(x,A,y)-like cases based on whether A is transposed
mcabbott 5ef2922
two tests
mcabbott f778a00
Update stdlib/LinearAlgebra/test/matmul.jl
mcabbott eacc11b
change zero(γ) -> false as suggested
mcabbott ebb52fb
better docstring
mcabbott e7aa4ad
wording, plus examples
mcabbott 468d19b
docstring
mcabbott 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
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.
colum -> column
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.
Hm, why not be explicit: "For scalar eltypes, this is equivalent to
dot(x, B, y)
" or something in that direction.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.
Maybe "Unlike dot(), ..."? I don't want to dwell on pinning down exactly what types they agree or disagree on.
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.
As an aside, trying to puzzle out what recursive
dot
means in the 3-arg case, is this the intended behaviour?The action on the component matrices looks like a trace of a matrix product.