-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Incorporate (some of) BandedMatrices.jl into StdLib? #37258
Comments
Like what? If you have a banded matrix, why not just use BandedMatrices.jl? |
I'll let @ChrisRackauckas answer that since he's pushing for this. |
I don't think that BandedMatrices should be redefining basic functions in Base. There are cases where Base could/should be using banded matrices as the output to give the user something more optimized than the current implementation. Things that come to mind:
But these are the kinds of things where BandedMatrices could do a bunch of type-piracy could make a few things faster, but pirating |
I will strongly advocate against moving more linear algebra into stdlibs. If anything I'd like to do the opposite. I just reopened I'm closing this for now - but of course let's reopen if necessary. |
There's been some discussion by @ChrisRackauckas on incorporating BandedMatrices.jl into StdLib so more operations can take advantage of such structures, see discussion in
https://discourse.julialang.org/t/sparse-solve-vs-bandedmatrix-time-and-allocation-surprise/45119/22
JuliaLinearAlgebra/BandedMatrices.jl#197 (comment)
This issue is to open up the discussion on what this would look like. Some options from most lightweight:
colsupport(A,j)
androwsupport(A,k)
to LinearAlgebra.jl to give the non-zero rows/columns of a matrix. For example:This can be immediately incorporated into the generic linear algebra algorithms to give optimal complexity algorithms for banded matrices (and actually this is already done in ArrayLayouts.jl, see for example
default_blasmul!
, and has the nice benefit of supporting InfiniteArrays.jl.2. Add
AbstractBandedMatrix
and interface (bandwidths
,band
, ...). ThenDiagonal
,Tridiagonal
,Bidiagonal
.3. Add
BandedMatrix
and companions[Symmetric{<:Any,<:BandedMatrix}]
,[Adjoint{<:Any,<:BandedMatrix}]
,BandedLU
, etc. for BLAS banded matrix support.1 or 2 should be pretty easy to do. 3 has some issues:
gbmm!
which implements banded * banded multiplication (which annoyingly is not in BLAS or LAPACK).CC @ctkelley
The text was updated successfully, but these errors were encountered: