- Notifications
You must be signed in to change notification settings - Fork 197
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
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 typewhere 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
SpecialMatricestostdlib. It provides the base type and spmv kernel forSymTridiagonalmatrices.Proposed interfaces
A = symtridiagonal(dv, ev [, is_posdef])wheredvandevare rank-1 arrays describing the tridiagonal elements, andis_posdefis an optional logical flag letting the user specify thatAis 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 asymtridiagonalmatrix to its standard rank-2 array representation.transpose(A)to compute the transpose of asymtridiagonalmatrix.hermitian(A)to compute the hermitian of asymtridiagonalmatrix.+and-are being overloaded for addition and subtraction to twosymtridiagonalmatrices.*is being overloaded for scalar-matrix multiplication.Key facts
spmvkernel useslagtmLAPACK backend under the hood.spmvkernel has the same limitations asstdlib_linalg_lapack.Progress
cc @jvdp1, @jalvesz, @perazz