-
Notifications
You must be signed in to change notification settings - Fork 7
Clean up ButterflyFactorization #103
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
base: master
Are you sure you want to change the base?
Clean up ButterflyFactorization #103
Conversation
src/butterflylu.jl
Outdated
C | ||
end | ||
|
||
function 🦋2!(C, A::Diagonal, B::Diagonal) |
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.
What's the difference between 🦋2!
and 🦋!
? Can we unify them?
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.
yeah this was one thing I wanted to talk about, currently we have two functions because 🦋!
can't accept submatrices generated by view
calls, so as of right now we need the second 🦋2!
function for those cases, but ideally we would combine those.
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 the answer here might be the same as to the issue with 🦋!
allocating, in that it might be worth allocating a butterfly matrix with the proper diagonals preallocated and fill in the entries manually.
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.
But this wouldn't allow us to pass submatrices into the function right? so we would still need 🦋2!
?
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.
it could just be a separate method of 🦋!
.
end | ||
|
||
function 🦋!(C::SparseBandedMatrix, A::Diagonal, B::Diagonal) | ||
setdiagonal!(C, [A.diag; -B.diag], true) |
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.
[A.diag; -B.diag]
allocates. Any way to avoid?
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.
hmm not sure to be honest
src/butterflylu.jl
Outdated
M = size(U, 1) | ||
Mh = M >>> 1 |
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.
rename to n
and n_half
?
@ChrisRackauckas I think this is good to go |
No description provided.