-
Notifications
You must be signed in to change notification settings - Fork 192
SymTridiagonal matrices and associated spmv kernel #1021
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?
Conversation
I do have a couple of design questions, mostly regarding the complex-valued cases. ConstructorsAt the moment, the complex types are defined as type, public :: symtridiagonal_cdp
private
integer(ilp) :: n
complex(dp), allocatable :: dv(:), ev(:)
logical(lk) :: is_posdef
end type where Symmetric vs Hermitian matricesAt the moment, symmetric matrix types have been defined for real and complex-valued arithmetic. Yet, I've hardly seen symmetric complex-valued matrices in the wild. Hermitian matrices on the other hand are a big thing. Should we restrict the Own type vs extending from
|
I think it is pretty much ready for review, at least code wise. Addition to
|
This PR is the second of a series to port what is available from
SpecialMatrices
tostdlib
. It provides the base type and spmv kernel forSymTridiagonal
matrices.Proposed interfaces
A = symtridiagonal(dv, ev [, is_posdef])
wheredv
andev
are rank-1 arrays describing the tridiagonal elements, andis_posdef
is an optional logical flag letting the user specify thatA
is positive-definite (useful for eigenvalue computation and linear solver for instance).call spmv(A, x, y [, alpha] [, beta] [, op])
for the matrix-vector product.dense(A)
to convert asymtridiagonal
matrix to its standard rank-2 array representation.transpose(A)
to compute the transpose of asymtridiagonal
matrix.hermitian(A)
to compute the hermitian of asymtridiagonal
matrix.+
and-
are being overloaded for addition and subtraction to twosymtridiagonal
matrices.*
is being overloaded for scalar-matrix multiplication.Key facts
spmv
kernel useslagtm
LAPACK backend under the hood.spmv
kernel has the same limitations asstdlib_linalg_lapack
.Progress
cc @jvdp1, @jalvesz, @perazz