julia
julia copied to clipboard
`lu!` for `Tridiagonal` incurs allocations
It seems that lu! for Tridiagonal incurs allocations here.
Can we cache this vector to make lu! allocation-free? Discovered here.
Maybe we could add a method lu!(F::LU, A::AbstractMatrix) that takes a pre-existing factorization object F and overwrites it with the factorization of A (a matrix of the same size). That way we could re-use all of the storage, but the user wouldn't need to know anything about the workspace details.