-
Notifications
You must be signed in to change notification settings - Fork 148
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 specialized methods for Triangular * Triangular #511
Conversation
Also, when looking at the code it seems like a lot of the specialized |
I haven't done systematic benchmarking but this gives you the kind of performance gains you'd expect:
|
src/triangular.jl
Outdated
|
||
X = [Symbol("X_$(i)_$(j)") for i = 1:n, j = 1:n] | ||
|
||
code = quote end |
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.
Do you want a LineNumberNode
? If not you could just do code = Expr(:block)
instead.
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 was just blindly copying the code from the rest of this file; I don't know enough to know whether I should have a preference one way or the other.
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.
OK... let's change them all to Expr(:block)
, then. You'll get a relevant line number from the final quote anyway.
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 can do that but won't get to it until later today; feel free to make the change yourself in the mean time if you'd rather.
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.
Sweet :)
Should be good to go now, I've replaced all the |
Adds specialized methods so that products of two
AbstractTriangular
s fromSMatrix
s results in anotherSMatrix
(or a triangular, if both are upper/lower).This partially fixes #508 because the
AbstractMatrix
converter for aCholesky
falls back onU'U
, which now returns anSMatrix
instead of a normalMatrix
.