-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
add missing mul, ldiv, and rdiv variants involving one triangular matrix. also fix #14502. #14508
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
Conversation
The nearly-repeated code here screams for some macro loops... |
Heh, check my last sentence in #14475 (comment) :). On the list. |
@@ -278,13 +278,13 @@ for elty1 in (Float32, Float64, Complex64, Complex128, BigFloat, Int) | |||
@test full(A1 + A2) == full(A1) + full(A2) | |||
@test full(A1 - A2) == full(A1) - full(A2) | |||
|
|||
# Triangular-Triangular multiplication and division | |||
elty1 != BigFloat && elty2 != BigFloat && @test_approx_eq full(A1*A2) full(A1)*full(A2) | |||
# Triangular-Triangular multiplication and division # should transpose rather than only conjugate transpose variants be tested here? |
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.
I think we should test both versions here.
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.
Tests expanded accordingly. Thanks!
This is great.
I think it should be |
Fixed, thanks! |
The Travis failure seems unrelated? Failure on i686 with
|
…spectively. Fix generic Ac_mul_B! and A_mul_Bc! methods for complex triangular A and B respectively (see #14502). Add BLAS hooks for matrix-matrix At_mul_B! and A_mul_Bt! with triangular A and B respectively. Also add hooks for matrix-vector At_mul_B! and Ac_mul_B! with triangular A. Add tests for matrix-matrix and matrix-vector multiplications involving one transposed triangular matrix.
…div_Bc! methods for complex triangular B (see #14502). Add BLAS hook for matrix-matrix A_rdiv_Bt! with triangular B. Add tests for right-division by transposed triangular matrices.
…LAS hook for matrix-matrix and matrix-vector At_ldiv_B! with triangular A. Add tests for left-division by transposed triangular matrices.
…es test-shadowing of generic triangular methods by corresponding BLAS-calling methods for complex matrices (see #14502).
A different unrelated Travis failure on x86_64 linux? LoadError: start_watching (FileMonitor): no space left on device (ENOSPC) Is this otherwise in shape to merge? Thanks! |
That's been happening occasionally since we switched to using docker workers on travis with deps caching, sorry. Restarted for now. |
Great, thanks! |
Looks good to me if @tkelman thinks the errors are unrelated. |
Same |
add missing mul, ldiv, and rdiv variants involving one triangular matrix. also fix #14502.
Thanks for the review / restarts / merge! |
Followup to #14396 (comment). Subsumes #14505.
Fixes the right-division part of JuliaLang/LinearAlgebra.jl#295 (JuliaLang/LinearAlgebra.jl#295).Update: Now subsumes #14504 as well, fixing JuliaLang/LinearAlgebra.jl#295 altogether.This pull request provides generic methods, BLAS hooks, and tests for missing matrix-matrix and matrix-vector multiplication, left-division, and right-division operations involving one triangular matrix.
Concerning tests,
the shadowing caveat mentioned in JuliaLang/LinearAlgebra.jl#295 / #14504 still stands. Right now I lean towards the simple fix of addingUpdate: This pull request now expands the combinations of element types tested in linalg/triangular, fixing the shadowing issue and broadening the tests.Complex{BigFloat}
to the set of types tested in test/linalg/triangular.jl.Question: Is the
StridedVecOrMat
part of the signature injulia/base/linalg/triangular.jl
Line 401 in 6bf6f35
StridedMatrix
? Thanks!