FastLapackInterface
separates workspace allocation and actual
running for some Lapack algorithms:
- LU factorization
- QR factorization
- Schur factorization
LU factorization and linear problem solution
ws = LUWs(A)
creates storage for a linear problem with matrix representationA
.LAPACK.getrf!(A, ws)
computes the LU factorization using the preallocated workspace and returns the arguments that can be used to constructLinearAlgebra.LU
.
A = [1.2 2.3
6.2 3.3]
ws = LUWs(A)
LinearAlgebra.LU(LAPACK.getrf!(A, ws)...)
QR factorization ( A = Q*R)
ws = QRWs(A)
allocates workspace for QR factorization of a matrix similar toA
geqrf!(A, ws)
computes QR factorization of matrixA
and stores it inA
andws.τ
, and returns the arguments for the constructor ofLinearAlgebra.QR
.ormqr!(side, A, C, ws)
computesQ*C
(side='L'
) orC*Q
(side='R'
)ormqr!(side, transpose(A), C, ws)
computestranspose(Q)*C
(side='L'
) orC*transpose(Q)
(side='R'
)- Workspaces exist for
QRCompactWY
(QRWYWs
) andQRPivoted
(QRpWs
).
A = [1.2 2.3
6.2 3.3]
ws = QRWs(A)
LinearAlgebra.QR(LAPACK.geqrf!(A, ws)...)
Schur factorization
SchurWs(A)
allocates workspace for the real Schur decomposition of a matrix similar toA
.gees!(A, ws)
computes the Schur decomposition and returns the arguments to the constructor ofLinearAlgebra.Schur
.- A workspace for the generalized Schur decomposition also exists.
- It is possible to use select functions with
gees!
orgges!
to order the eigenvalues.
A = [1.2 2.3
6.2 3.3]
ws = SchurWs(A)
LinearAlgebra.Schur(LAPACK.gees!('V', A, ws)...)
For more info see the Documentation
Package version
- v0.1.3: works only with Julia >= 1.7