-
Notifications
You must be signed in to change notification settings - Fork 152
Fix A\B where A is nonsquare #607
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
@@ -1,17 +1,17 @@ | |||
@inline (\)(a::StaticMatrix, b::StaticVecOrMat) = solve(Size(a), Size(b), a, b) | |||
@inline (\)(a::StaticMatrix, b::StaticVecOrMat) = _solve(Size(a), Size(b), a, b) |
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.
By the way, I've renamed solve
to _solve
here just to make extra clear that it's an internal function.
Codecov Report
@@ Coverage Diff @@
## master #607 +/- ##
=========================================
+ Coverage 81.69% 81.7% +<.01%
=========================================
Files 39 39
Lines 2781 2782 +1
=========================================
+ Hits 2272 2273 +1
Misses 509 509
Continue to review full report at Codecov.
|
I think this should be pretty safe so I'll merge it shortly. However, always happy for a review. Any takers? @jw3126? |
c = similar(b, T) | ||
for col = 1:Sb[2] | ||
@inbounds c[:, col] = solve(Size($Sa), Size($Sa[1],), a, b[:, col]) | ||
@inbounds c[:, col] = _solve(Size($Sa), Size($Sa[1],), a, b[:, col]) |
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.
Not sure here. Does b[: col]
allocate if b
is a MArray
?
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.
No, this is one of the luxuries of the julia-1.0 compiler: a temporary MArray
which doesn't escape the function doesn't result in any allocations. I still can't quite believe it myself :-)
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.
Nice! LGTM
Fix #606