Skip to content

Conversation

@Sacha0
Copy link
Member

@Sacha0 Sacha0 commented Jan 15, 2017

(This pull request is #20046, but instead targeting master rather than mb/deprecate-17440 per discussion elsewhere). Towards fixing some generalized linear indexing deprecation warnings in #20040, this pull request rewrites the A[c|t]_ldiv_B[!] specializations for UmfpackLU-StridedVecOrMat combinations, leveraging multiple dispatch to remove generalized linear indexing and meta-fu. This pull request also fixes the issue described in and integrates the tests from #20045. Best!

…combinations, without generalized linear indexing and meta-fu.
@tkelman
Copy link
Contributor

tkelman commented Jan 15, 2017

do you plan on reverting #20046 inside matt's branch to avoid conflicts then?

@Sacha0
Copy link
Member Author

Sacha0 commented Jan 15, 2017

do you plan on reverting #20046 inside matt's branch to avoid conflicts then?

Dropping my commits from that branch seems like the best course of action. (And done.) Thanks!

@StefanKarpinski
Copy link
Member

Bump – this looks ready to go.

@tkelman
Copy link
Contributor

tkelman commented Jan 26, 2017

My understanding was this turned out to be unnecessary for now, though the added test coverage is nice. And this refactoring would be useful if we decide to transition to only allowing exactly-1-or-N indexing in the future.

@andreasnoack
Copy link
Member

I think we should do this anyway. It structures the code well although it was a little hard for me to read initially.

@andreasnoack andreasnoack merged commit 3e520ca into JuliaLang:master Jan 27, 2017
_Aq_ldiv_B!(X, lu, B, UMFPACK_A)
At_ldiv_B!{Tb<:Complex}(X::StridedVecOrMat{Tb}, lu::UmfpackLU{Float64}, B::StridedVecOrMat{Tb}) =
_Aq_ldiv_B!(X, lu, B, UMFPACK_At)
Ac_ldiv_B!{Tb<:Complex}(X::StridedVecOrMat{Tb}, lu::UmfpackLU{Float64}, B::StridedVecOrMat{Tb}) =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens here if one input's a vector and the other a 1-column matrix? I think that would have worked before but doesn't now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I believe you are correct. From brief inspection, covering the vector-colmat and colmat-vector cases would require four additional kernels. Would covering those cases justify the additional code complexity? Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if that functionality was being used anywhere, then might be a reason to prefer the old version

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course please feel welcome to revert this commit if so. (And if so, we should revive #20045 to retain the bug fix.) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear algebra Linear algebra sparse Sparse arrays

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants