# LAPACK 3.3.1 prototypes

BLAS and LAPACK guides are available from
http://web.eecs.utk.edu/~mgates3/
Copyright © 2007—2011 by Mark Gates. Updated September 2, 2011. You may freely copy and modify this document under the Creative Commons Attribution license. When distributing, please include the above link and copyright for this original document. |

## Rank-*k* update, RFP format

[sd ] sfrk ( transr, uplo, trans, n, k, alpha, A, ldA, beta, C ) [ cz] hfrk ( transr, uplo, trans, n, k, alpha, A, ldA, beta, C )

## Convert triangular formats

[sdcz] tfttp ( transr, uplo, n, Arf, Ap, info ) # RFP -> packed [sdcz] tfttr ( transr, uplo, n, Arf, A, ldA, info ) # RFP -> full [sdcz] trttp ( uplo, n, A, ldA, Ap, info ) # full -> packed [sdcz] trttf ( transr, uplo, n, A, ldA, Arf, info ) # full -> RFP [sdcz] tpttr ( uplo, n, Ap, A, ldA, info ) # packed -> full [sdcz] tpttf ( transr, uplo, n, Ap, Arf, info ) # packed -> RFP

## Solve *AX = B*

TYPE PARAM SIZE MATRIX PIVOT RHS WORK INFO[sdcz] gesv ( n, nrhs, A, ldA, ipiv, B, ldB, info ) [sdcz] gbsv ( n, kl, ku, nrhs, Ab, ldAb, ipiv, B, ldB, info ) [sdcz] gtsv ( n, nrhs, dl, d, du, B, ldB, info ) [sdcz] posv ( uplo, n, nrhs, A, ldA, B, ldB, info ) [sdcz] ppsv ( uplo, n, nrhs, Ap, B, ldB, info ) [sdcz] pbsv ( uplo, n, kd, nrhs, Ab, ldAb, B, ldB, info ) [sdcz] ptsv ( n, nrhs, d, e, B, ldB, info ) [sdcz] sysv ( uplo, n, nrhs, A, ldA, ipiv, B, ldB, work, lwork, info ) [ cz] hesv ( uplo, n, nrhs, A, ldA, ipiv, B, ldB, work, lwork, info ) [sdcz] spsv ( uplo, n, nrhs, Ap, ipiv, B, ldB, info ) [ cz] hpsv ( uplo, n, nrhs, Ap, ipiv, B, ldB, info )

## Solve *AX = B*, mixed precision

TYPE PARAM SIZE MATRIX PIVOT RHS SOLN WORK ITER INFOds gesv ( n, nrhs, A, ldA, ipiv, B, ldB, X, ldX, work, swork, iter, info ) zc gesv ( n, nrhs, A, ldA, ipiv, B, ldB, X, ldX, work, swork, rwork, iter, info ) ds posv ( uplo, n, nrhs, A, ldA, B, ldB, X, ldX, work, swork, iter, info ) zc posv ( uplo, n, nrhs, A, ldA, B, ldB, X, ldX, work, swork, rwork, iter, info )

## Solve *AX = B*, expert

TYPE PARAMS SIZE MATRIX FACTORED PIVOT EQ RHS SOLN COND WORK INFO[sdcz] gesvx ( fact, trans, n, nrhs, A, ldA, Af, ldAf, ipiv, equed, r, c, B, ldB, X, ldX, rcond, ferr, berr, work, [ir]work, info ) [sdcz] gbsvx ( fact, trans, n, kl, ku, nrhs, Ab, ldAb, Afb, ldAfb, ipiv, equed, r, c, B, ldB, X, ldX, rcond, ferr, berr, work, [ir]work, info ) [sdcz] gtsvx ( fact, trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, B, ldB, X, ldX, rcond, ferr, berr, work, [ir]work, info ) [sdcz] posvx ( fact, uplo, n, nrhs, A, ldA, Af, ldAf, equed, s, B, ldB, X, ldX, rcond, ferr, berr, work, [ir]work, info ) [sdcz] ppsvx ( fact, uplo, n, nrhs, Ap, Afp, equed, s, B, ldB, X, ldX, rcond, ferr, berr, work, [ir]work, info ) [sdcz] pbsvx ( fact, uplo, n, kd, nrhs, Ab, ldAb, Afb, ldAfb, equed, s, B, ldB, X, ldX, rcond, ferr, berr, work, [ir]work, info ) [sd ] ptsvx ( fact, n, nrhs, d, e, df, ef, B, ldB, X, ldX, rcond, ferr, berr, work, info ) [ cz] ptsvx ( fact, n, nrhs, d, e, df, ef, B, ldB, X, ldX, rcond, ferr, berr, work, rwork, info ) [sdcz] sysvx ( fact, uplo, n, nrhs, A, ldA, Af, ldAf, ipiv, B, ldB, X, ldX, rcond, ferr, berr, work, lwork, [ir]work, info ) [ cz] hesvx ( fact, uplo, n, nrhs, A, ldA, Af, ldAf, ipiv, B, ldB, X, ldX, rcond, ferr, berr, work, lwork, rwork, info ) [sdcz] spsvx ( fact, uplo, n, nrhs, Ap, Afp, ipiv, B, ldB, X, ldX, rcond, ferr, berr, work, [ir]work, info ) [ cz] hpsvx ( fact, uplo, n, nrhs, Ap, Afp, ipiv, B, ldB, X, ldX, rcond, ferr, berr, work, rwork, info )

## Solve *AX = B*, expert-2

TYPE PARAM SIZE MATRIX FACTORED PIVOT EQ RHS SOLN COND WORK INFO[sdcz] gesvxx( fact, trans, n, nrhs, A, ldA, Af, ldAf, ipiv, equed, r, c, B, ldB, X, ldX, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, [ir]work, info ) [sdcz] gbsvxx( fact, trans, n, kl, ku, nrhs, Ab, ldAb, Afb, ldAfb, ipiv, equed, r, c, B, ldB, X, ldX, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, [ir]work, info ) [sdcz] posvxx( fact, uplo, n, nrhs, A, ldA, Af, ldAf, equed, s, B, ldB, X, ldX, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, [ir]work, info ) [sdcz] sysvxx( fact, uplo, n, nrhs, A, ldA, Af, ldAf, ipiv, equed, s, B, ldB, X, ldX, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, [ir]work, info ) [ cz] hesvxx( fact, uplo, n, nrhs, A, ldA, Af, ldAf, ipiv, equed, s, B, ldB, X, ldX, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, rwork, info )

## Triangular factorization (LU, Cholesky, LDL)

TYPE PARAM SIZE MATRIX PIVOT WORK INFO[sdcz] getrf ( m, n, A, ldA, ipiv, info ) [sdcz] gbtrf ( m, n, kl, ku, Ab, ldAb, ipiv, info ) [sdcz] gttrf ( n, dl, d, du, du2, ipiv, info ) [sdcz] potrf ( uplo, n, A, ldA, info ) [sdcz] pptrf ( uplo, n, Ap, info ) [sdcz] pbtrf ( uplo, n, kd, Ab, ldAb, info ) [sdcz] pttrf ( n, d, e, info ) [sdcz] pftrf ( transr, uplo, n, A, info ) # RFP format [sdcz] pstrf ( uplo, n, A, ldA, ipiv, rank, tol, work, info ) # semi-definite, complete pivoting [sdcz] sytrf ( uplo, n, A, ldA, ipiv, work, lwork, info ) [ cz] hetrf ( uplo, n, A, ldA, ipiv, work, lwork, info ) [sdcz] sptrf ( uplo, n, Ap, ipiv, info ) [ cz] hptrf ( uplo, n, Ap, ipiv, info )

## Triangular forward and back solve, after factorization

TYPE PARAM SIZE MATRIX PIVOT RHS INFO[sdcz] getrs ( trans, n, nrhs, A, ldA, ipiv, B, ldB, info ) [sdcz] gbtrs ( trans, n, kl, ku, nrhs, Ab, ldAb, ipiv, B, ldB, info ) [sdcz] gttrs ( trans, n, nrhs, dl, d, du, du2, ipiv, B, ldB, info ) [sdcz] potrs ( uplo, n, nrhs, A, ldA, B, ldB, info ) [sdcz] pptrs ( uplo, n, nrhs, Ap, B, ldB, info ) [sdcz] pbtrs ( uplo, n, kd, nrhs, Ab, ldAb, B, ldB, info ) [sd ] pttrs ( n, nrhs, d, e, B, ldB, info ) [ cz] pttrs ( uplo, n, nrhs, d, e, B, ldB, info ) [sdcz] pftrs ( transr, uplo, n, nrhs, A, B, ldB, info ) # RFP format [sdcz] sytrs ( uplo, n, nrhs, A, ldA, ipiv, B, ldB, info ) [ cz] hetrs ( uplo, n, nrhs, A, ldA, ipiv, B, ldB, info ) [sdcz] sptrs ( uplo, n, nrhs, Ap, ipiv, B, ldB, info ) [ cz] hptrs ( uplo, n, nrhs, Ap, ipiv, B, ldB, info ) [sdcz] trtrs ( uplo, trans, diag, n, nrhs, A, ldA, B, ldB, info ) [sdcz] tptrs ( uplo, trans, diag, n, nrhs, Ap, B, ldB, info ) [sdcz] tbtrs ( uplo, trans, diag, n, kd, nrhs, Ab, ldAb, B, ldB, info )

## Triangular solve (BLAS)

TYPE PARAM SIZE SCALE MATRIX RHS[sdcz] tfsm ( transr, side, uplo, trans, diag, m, n, alpha, A, B, ldB )

## Condition number estimate, after factorization

TYPE PARAM SIZE MATRIX PIVOT COND WORK INFO[sdcz] gecon ( norm, n, A, ldA, anorm, rcond, work, [ir]work, info ) [sdcz] gbcon ( norm, n, kl, ku, Ab, ldAb, ipiv, anorm, rcond, work, [ir]work, info ) [sd ] gtcon ( norm, n, dl, d, du, du2, ipiv, anorm, rcond, work, iwork, info ) [ cz] gtcon ( norm, n, dl, d, du, du2, ipiv, anorm, rcond, work, info ) [sdcz] pocon ( uplo, n, A, ldA, anorm, rcond, work, [ir]work, info ) [sdcz] ppcon ( uplo, n, Ap, anorm, rcond, work, [ir]work, info ) [sdcz] pbcon ( uplo, n, kd, Ab, ldAb, anorm, rcond, work, [ir]work, info ) [sdcz] ptcon ( n, d, e, anorm, rcond, work, info ) [sd ] sycon ( uplo, n, A, ldA, ipiv, anorm, rcond, work, iwork, info ) [ cz] sycon ( uplo, n, A, ldA, ipiv, anorm, rcond, work, info ) [ cz] hecon ( uplo, n, A, ldA, ipiv, anorm, rcond, work, info ) [sd ] spcon ( uplo, n, Ap, ipiv, anorm, rcond, work, iwork, info ) [ cz] spcon ( uplo, n, Ap, ipiv, anorm, rcond, work, info ) [ cz] hpcon ( uplo, n, Ap, ipiv, anorm, rcond, work, info ) [sdcz] trcon ( norm, uplo, diag, n, A, ldA, rcond, work, [ir]work, info ) [sdcz] tpcon ( norm, uplo, diag, n, Ap, rcond, work, [ir]work, info ) [sdcz] tbcon ( norm, uplo, diag, n, kd, Ab, ldAb, rcond, work, [ir]work, info )

## Iterative refinement, after solve

TYPE PARAM SIZE MATRIX FACTORED PIVOT RHS SOLN ERROR WORK INFO[sdcz] gerfs ( trans, n, nrhs, A, ldA, Af, ldAf, ipiv, B, ldB, X, ldX, ferr, berr, work, [ir]work, info ) [sdcz] gbrfs ( trans, n, kl, ku, nrhs, Ab, ldAb, Afb, ldAfb, ipiv, B, ldB, X, ldX, ferr, berr, work, [ir]work, info ) [sdcz] gtrfs ( trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, B, ldB, X, ldX, ferr, berr, work, [ir]work, info ) [sdcz] porfs ( uplo, n, nrhs, A, ldA, Af, ldAf, B, ldB, X, ldX, ferr, berr, work, [ir]work, info ) [sdcz] pprfs ( uplo, n, nrhs, Ap, Afp, B, ldB, X, ldX, ferr, berr, work, [ir]work, info ) [sdcz] pbrfs ( uplo, n, kd, nrhs, Ab, ldAb, Afb, ldAfb, B, ldB, X, ldX, ferr, berr, work, [ir]work, info ) [sd ] ptrfs ( n, nrhs, d, e, df, ef, B, ldB, X, ldX, ferr, berr, work, info ) [ cz] ptrfs ( uplo, n, nrhs, d, e, df, ef, B, ldB, X, ldX, ferr, berr, work, rwork, info ) [sdcz] syrfs ( uplo, n, nrhs, A, ldA, Af, ldAf, ipiv, B, ldB, X, ldX, ferr, berr, work, [ir]work, info ) [ cz] herfs ( uplo, n, nrhs, A, ldA, Af, ldAf, ipiv, B, ldB, X, ldX, ferr, berr, work, rwork, info ) [sdcz] sprfs ( uplo, n, nrhs, Ap, Afp, ipiv, B, ldB, X, ldX, ferr, berr, work, [ir]work, info ) [ cz] hprfs ( uplo, n, nrhs, Ap, Afp, ipiv, B, ldB, X, ldX, ferr, berr, work, rwork, info ) [sdcz] trrfs ( uplo, trans, diag, n, nrhs, A, ldA, B, ldB, X, ldX, ferr, berr, work, [ir]work, info ) [sdcz] tprfs ( uplo, trans, diag, n, nrhs, Ap, B, ldB, X, ldX, ferr, berr, work, [ir]work, info ) [sdcz] tbrfs ( uplo, trans, diag, n, kd, nrhs, Ab, ldAb, B, ldB, X, ldX, ferr, berr, work, [ir]work, info ) [sdcz] gerfsx( trans, equed, n, nrhs, A, ldA, Af, ldAf, ipiv, r, c, B, ldB, X, ldX, rcond, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, [ir]work, info ) [sdcz] gbrfsx( trans, equed, n, kl, ku, nrhs, Ab, ldAb, Afb, ldAfb, ipiv, r, c, B, ldB, X, ldX, rcond, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, [ir]work, info ) [sdcz] porfsx( uplo, equed, n, nrhs, A, ldA, Af, ldAf, s, B, ldB, X, ldX, rcond, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, [ir]work, info ) [sdcz] syrfsx( uplo, equed, n, nrhs, A, ldA, Af, ldAf, ipiv, s, B, ldB, X, ldX, rcond, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, [ir]work, info ) [ cz] herfsx( uplo, equed, n, nrhs, A, ldA, Af, ldAf, ipiv, s, B, ldB, X, ldX, rcond, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, rwork, info )

## Matrix inverse, after factorization

TYPE PARAM SIZE MATRIX PIVOT WORK INFO[sdcz] getri ( n, A, ldA, ipiv, work, lwork, info ) [sdcz] potri ( uplo, n, A, ldA, info ) [sdcz] pftri ( transr, uplo, n, A, info ) [sdcz] pptri ( uplo, n, Ap, info ) [sdcz] sytri ( uplo, n, A, ldA, ipiv, work, info ) [ cz] hetri ( uplo, n, A, ldA, ipiv, work, info ) [sdcz] sptri ( uplo, n, Ap, ipiv, work, info ) [ cz] hptri ( uplo, n, Ap, ipiv, work, info ) [sdcz] trtri ( uplo, diag, n, A, ldA, info ) [sdcz] tftri ( transr, uplo, diag, n, A, info ) [sdcz] tptri ( uplo, diag, n, Ap, info )

## Equilibrate matrix

b version uses powers of radix (2) to avoid rounding errors.TYPE PARAM SIZE MATRIX SCALE RATIO AMAX WORK INFO[sdcz] geequ ( m, n, A, ldA, r, C, rowcnd, colcnd, amax, info ) [sdcz] geequb( m, n, A, ldA, r, C, rowcnd, colcnd, amax, info ) [sdcz] gbequ ( m, n, kl, ku, Ab, ldAb, r, C, rowcnd, colcnd, amax, info ) [sdcz] gbequb( m, n, kl, ku, Ab, ldAb, r, C, rowcnd, colcnd, amax, info ) [sdcz] poequ ( n, A, ldA, s, scond, amax, info ) [sdcz] poequb( n, A, ldA, s, scond, amax, info ) [sdcz] ppequ ( uplo, n, Ap, s, scond, amax, info ) [sdcz] pbequ ( uplo, n, kd, Ab, ldAb, s, scond, amax, info ) [sdcz] syequb( uplo, n, A, ldA, s, scond, amax, work, info ) [ cz] heequb( uplo, n, A, ldA, s, scond, amax, work, info )

## Least squares, minimize *|| B - AX ||*_{2}

_{2}

[sdcz] gels ( trans, m, n, nrhs, A, ldA, B, ldB, work, lwork, info ) # QR [sd ] gelsy ( m, n, nrhs, A, ldA, B, ldB, jpvt, rcond, rank, work, lwork, info ) # complete orthogonalization [ cz] gelsy ( m, n, nrhs, A, ldA, B, ldB, jpvt, rcond, rank, work, lwork, rwork, info ) [sd ] gelss ( m, n, nrhs, A, ldA, B, ldB, s, rcond, rank, work, lwork, info ) # SVD [ cz] gelss ( m, n, nrhs, A, ldA, B, ldB, s, rcond, rank, work, lwork, rwork, info ) [sd ] gelsd ( m, n, nrhs, A, ldA, B, ldB, s, rcond, rank, work, lwork, iwork, info ) # SVD, rank deficient [ cz] gelsd ( m, n, nrhs, A, ldA, B, ldB, s, rcond, rank, work, lwork, rwork, iwork, info )

## Linear equality-constrained least squares

[sdcz] gglse ( m, n, p, A, ldA, B, ldB, C, d, X, work, lwork, info )

## General Gauss-Markov linear model

[sdcz] ggglm ( n, m, p, A, ldA, B, ldB, d, X, y, work, lwork, info )

## QR, LQ, QL, RQ, TZ orthogonal factorization

TYPE SIZE MATRIX TAU WORK INFO[sdcz] geqrf ( m, n, A, ldA, tau, work, lwork, info ) [sdcz] geqrfp( m, n, A, ldA, tau, work, lwork, info ) [sdcz] gelqf ( m, n, A, ldA, tau, work, lwork, info ) [sdcz] geqlf ( m, n, A, ldA, tau, work, lwork, info ) [sdcz] gerqf ( m, n, A, ldA, tau, work, lwork, info ) [sdcz] tzrzf ( m, n, A, ldA, tau, work, lwork, info )

## Generate Q, after QR, LQ, QL, RQ factorization

TYPE SIZE MATRIX TAU WORK INFO[sd ] orgqr ( m, n, k, A, ldA, tau, work, lwork, info ) [sd ] orglq ( m, n, k, A, ldA, tau, work, lwork, info ) [sd ] orgql ( m, n, k, A, ldA, tau, work, lwork, info ) [sd ] orgrq ( m, n, k, A, ldA, tau, work, lwork, info ) [ cz] ungqr ( m, n, k, A, ldA, tau, work, lwork, info ) [ cz] unglq ( m, n, k, A, ldA, tau, work, lwork, info ) [ cz] ungql ( m, n, k, A, ldA, tau, work, lwork, info ) [ cz] ungrq ( m, n, k, A, ldA, tau, work, lwork, info )

## Multiply by Q, after QR, LQ, QL, RQ, TZ factorization

TYPE PARAM SIZE MATRIX TAU MATRIX WORK INFO[sd ] ormqr ( side, trans, m, n, k, A, ldA, tau, C, ldC, work, lwork, info ) [sd ] ormlq ( side, trans, m, n, k, A, ldA, tau, C, ldC, work, lwork, info ) [sd ] ormql ( side, trans, m, n, k, A, ldA, tau, C, ldC, work, lwork, info ) [sd ] ormrq ( side, trans, m, n, k, A, ldA, tau, C, ldC, work, lwork, info ) [sd ] ormrz ( side, trans, m, n, k, l, A, ldA, tau, C, ldC, work, lwork, info ) [ cz] unmqr ( side, trans, m, n, k, A, ldA, tau, C, ldC, work, lwork, info ) [ cz] unmlq ( side, trans, m, n, k, A, ldA, tau, C, ldC, work, lwork, info ) [ cz] unmql ( side, trans, m, n, k, A, ldA, tau, C, ldC, work, lwork, info ) [ cz] unmrq ( side, trans, m, n, k, A, ldA, tau, C, ldC, work, lwork, info ) [ cz] unmrz ( side, trans, m, n, k, l, A, ldA, tau, C, ldC, work, lwork, info )

## QR with pivoting

TYPE SIZE MATRIX PIVOT TAU WORK INFO[sd ] geqp3 ( m, n, A, ldA, jpvt, tau, work, lwork, info ) [ cz] geqp3 ( m, n, A, ldA, jpvt, tau, work, lwork, rwork, info )

## Generalized QR, RQ factorization

TYPE SIZE MATRIX TAU MATRIX TAU WORK INFO[sdcz] ggqrf ( n, m, p, A, ldA, taua, B, ldB, taub, work, lwork, info ) [sdcz] ggrqf ( m, p, n, A, ldA, taua, B, ldB, taub, work, lwork, info )

## Eigenvalues and eigenvectors

[sd ] geev ( jobvl, jobvr, n, A, ldA, wr, wi, vl, ldvl, vr, ldvr, work, lwork, info ) [ cz] geev ( jobvl, jobvr, n, A, ldA, w, vl, ldvl, vr, ldvr, work, lwork, rwork, info ) [sd ] ggev ( jobvl, jobvr, n, A, ldA, B, ldB, alphar, alphai, beta, vl, ldvl, vr, ldvr, work, lwork, info ) [ cz] ggev ( jobvl, jobvr, n, A, ldA, B, ldB, alpha, beta, vl, ldvl, vr, ldvr, work, lwork, rwork, info ) [sd ] syev ( jobz, uplo, n, A, ldA, w, work, lwork, info ) [ cz] heev ( jobz, uplo, n, A, ldA, w, work, lwork, rwork, info ) [sd ] spev ( jobz, uplo, n, Ap, w, Z, ldZ, work, info ) [ cz] hpev ( jobz, uplo, n, Ap, w, Z, ldZ, work, rwork, info ) [sd ] sbev ( jobz, uplo, n, kd, Ab, ldAb, w, Z, ldZ, work, info ) [ cz] hbev ( jobz, uplo, n, kd, Ab, ldAb, w, Z, ldZ, work, rwork, info ) [sd ] stev ( jobz, n, d, e, Z, ldZ, work, info )

## Eigenvalues and eigenvectors, expert

[sd ] geevx ( balanc, jobvl, jobvr, sense, n, A, ldA, wr, wi, vl, ldvl, vr, ldvr, ilo, ihi, scale, abnrm, rconde, rcondv, work, lwork, iwork, info ) [ cz] geevx ( balanc, jobvl, jobvr, sense, n, A, ldA, w, vl, ldvl, vr, ldvr, ilo, ihi, scale, abnrm, rconde, rcondv, work, lwork, rwork, info ) [sd ] ggevx ( balanc, jobvl, jobvr, sense, n, A, ldA, B, ldB, alphar, alphai, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work, lwork, iwork, bwork, info ) [ cz] ggevx ( balanc, jobvl, jobvr, sense, n, A, ldA, B, ldB, alpha, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work, lwork, rwork, iwork, bwork, info ) [sd ] syevx ( jobz, range, uplo, n, A, ldA, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, lwork, iwork, ifail, info ) [ cz] heevx ( jobz, range, uplo, n, A, ldA, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, lwork, rwork, iwork, ifail, info ) [sd ] spevx ( jobz, range, uplo, n, Ap, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, iwork, ifail, info ) [ cz] hpevx ( jobz, range, uplo, n, Ap, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, rwork, iwork, ifail, info ) [sd ] sbevx ( jobz, range, uplo, n, kd, Ab, ldAb, Q, ldQ, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, iwork, ifail, info ) [ cz] hbevx ( jobz, range, uplo, n, kd, Ab, ldAb, Q, ldQ, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, rwork, iwork, ifail, info ) [sd ] stevx ( jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, iwork, ifail, info )

## Eigenvalues, divide-and-conquer

[sd ] syevd ( jobz, uplo, n, A, ldA, w, work, lwork, iwork, liwork, info ) [ cz] heevd ( jobz, uplo, n, A, ldA, w, work, lwork, rwork, lrwork, iwork, liwork, info ) [sd ] spevd ( jobz, uplo, n, Ap, w, Z, ldZ, work, lwork, iwork, liwork, info ) [ cz] hpevd ( jobz, uplo, n, Ap, w, Z, ldZ, work, lwork, rwork, lrwork, iwork, liwork, info ) [sd ] sbevd ( jobz, uplo, n, kd, Ab, ldAb, w, Z, ldZ, work, lwork, iwork, liwork, info ) [ cz] hbevd ( jobz, uplo, n, kd, Ab, ldAb, w, Z, ldZ, work, lwork, rwork, lrwork, iwork, liwork, info ) [sd ] stevd ( jobz, n, d, e, Z, ldZ, work, lwork, iwork, liwork, info )

## Eigenvalues, relatively robust representation (RRR)

[sd ] syevr ( jobz, range, uplo, n, A, ldA, vl, vu, il, iu, abstol, m, w, Z, ldZ, isuppz, work, lwork, iwork, liwork, info ) [ cz] heevr ( jobz, range, uplo, n, A, ldA, vl, vu, il, iu, abstol, m, w, Z, ldZ, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info ) [sd ] stevr ( jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, Z, ldZ, isuppz, work, lwork, iwork, liwork, info )

## Eigenvalues and Schur form

[s ] gees ( jobvs, sort, S_SELECT2 select, n, A, ldA, sdim, wr, wi, vs, ldvs, work, lwork, bwork, info ) [d ] gees ( jobvs, sort, D_SELECT2 select, n, A, ldA, sdim, wr, wi, vs, ldvs, work, lwork, bwork, info ) [c ] gees ( jobvs, sort, C_SELECT1 select, n, A, ldA, sdim, w, vs, ldvs, work, lwork, rwork, bwork, info ) [z ] gees ( jobvs, sort, Z_SELECT1 select, n, A, ldA, sdim, w, vs, ldvs, work, lwork, rwork, bwork, info ) [s ] gges ( jobvsl, jobvsr, sort, S_SELECT3 selctg, n, A, ldA, B, ldB, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, bwork, info ) [d ] gges ( jobvsl, jobvsr, sort, D_SELECT3 selctg, n, A, ldA, B, ldB, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, bwork, info ) [c ] gges ( jobvsl, jobvsr, sort, C_SELECT2 selctg, n, A, ldA, B, ldB, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, rwork, bwork, info ) [z ] gges ( jobvsl, jobvsr, sort, Z_SELECT2 selctg, n, A, ldA, B, ldB, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, rwork, bwork, info ) [s ] geesx ( jobvs, sort, S_SELECT2 select, sense, n, A, ldA, sdim, wr, wi, vs, ldvs, rconde, rcondv, work, lwork, iwork, liwork, bwork, info ) [d ] geesx ( jobvs, sort, D_SELECT2 select, sense, n, A, ldA, sdim, wr, wi, vs, ldvs, rconde, rcondv, work, lwork, iwork, liwork, bwork, info ) [c ] geesx ( jobvs, sort, C_SELECT1 select, sense, n, A, ldA, sdim, w, vs, ldvs, rconde, rcondv, work, lwork, rwork, bwork, info ) [z ] geesx ( jobvs, sort, Z_SELECT1 select, sense, n, A, ldA, sdim, w, vs, ldvs, rconde, rcondv, work, lwork, rwork, bwork, info ) [s ] ggesx ( jobvsl, jobvsr, sort, S_SELECT3 selctg, sense, n, A, ldA, B, ldB, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, iwork, liwork, bwork, info ) [d ] ggesx ( jobvsl, jobvsr, sort, D_SELECT3 selctg, sense, n, A, ldA, B, ldB, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, iwork, liwork, bwork, info ) [c ] ggesx ( jobvsl, jobvsr, sort, C_SELECT2 selctg, sense, n, A, ldA, B, ldB, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, rwork, iwork, liwork, bwork, info ) [z ] ggesx ( jobvsl, jobvsr, sort, Z_SELECT2 selctg, sense, n, A, ldA, B, ldB, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, rwork, iwork, liwork, bwork, info )

## Generalized eigenvalues

[sd ] sygv ( itype, jobz, uplo, n, A, ldA, B, ldB, w, work, lwork, info ) [ cz] hegv ( itype, jobz, uplo, n, A, ldA, B, ldB, w, work, lwork, rwork, info ) [sd ] spgv ( itype, jobz, uplo, n, Ap, Bp, w, Z, ldZ, work, info ) [ cz] hpgv ( itype, jobz, uplo, n, Ap, Bp, w, Z, ldZ, work, rwork, info ) [sd ] sbgv ( jobz, uplo, n, ka, kb, Ab, ldAb, Bb, ldBb, w, Z, ldZ, work, info ) [ cz] hbgv ( jobz, uplo, n, ka, kb, Ab, ldAb, Bb, ldBb, w, Z, ldZ, work, rwork, info )

## Generalized eigenvalues, divide-and-conquer

[sd ] sygvd ( itype, jobz, uplo, n, A, ldA, B, ldB, w, work, lwork, iwork, liwork, info ) [ cz] hegvd ( itype, jobz, uplo, n, A, ldA, B, ldB, w, work, lwork, rwork, lrwork, iwork, liwork, info ) [sd ] spgvd ( itype, jobz, uplo, n, Ap, Bp, w, Z, ldZ, work, lwork, iwork, liwork, info ) [ cz] hpgvd ( itype, jobz, uplo, n, Ap, Bp, w, Z, ldZ, work, lwork, rwork, lrwork, iwork, liwork, info ) [sd ] sbgvd ( jobz, uplo, n, ka, kb, Ab, ldAb, Bb, ldBb, w, Z, ldZ, work, lwork, iwork, liwork, info ) [ cz] hbgvd ( jobz, uplo, n, ka, kb, Ab, ldAb, Bb, ldBb, w, Z, ldZ, work, lwork, rwork, lrwork, iwork, liwork, info )

## Generalized eigenvalues, where *B* is SPD

[sd ] sygvx ( itype, jobz, range, uplo, n, A, ldA, B, ldB, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, lwork, iwork, ifail, info ) [ cz] hegvx ( itype, jobz, range, uplo, n, A, ldA, B, ldB, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, lwork, rwork, iwork, ifail, info ) [sd ] spgvx ( itype, jobz, range, uplo, n, Ap, Bp, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, iwork, ifail, info ) [ cz] hpgvx ( itype, jobz, range, uplo, n, Ap, Bp, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, rwork, iwork, ifail, info ) [sd ] sbgvx ( jobz, range, uplo, n, ka, kb, Ab, ldAb, Bb, ldBb, Q, ldQ, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, iwork, ifail, info ) [ cz] hbgvx ( jobz, range, uplo, n, ka, kb, Ab, ldAb, Bb, ldBb, Q, ldQ, vl, vu, il, iu, abstol, m, w, Z, ldZ, work, rwork, iwork, ifail, info )

## Reduce to tri-diagonal

[sd ] sytrd ( uplo, n, A, ldA, d, e, tau, work, lwork, info ) [ cz] hetrd ( uplo, n, A, ldA, d, e, tau, work, lwork, info ) [sd ] sptrd ( uplo, n, Ap, d, e, tau, info ) [ cz] hptrd ( uplo, n, Ap, d, e, tau, info ) [sd ] sbtrd ( vect, uplo, n, kd, Ab, ldAb, d, e, Q, ldQ, work, info ) [ cz] hbtrd ( vect, uplo, n, kd, Ab, ldAb, d, e, Q, ldQ, work, info )

## Generate Q, after tri-diagonalization

[sd ] orgtr ( uplo, n, A, ldA, tau, work, lwork, info ) [ cz] ungtr ( uplo, n, A, ldA, tau, work, lwork, info ) [sd ] opgtr ( uplo, n, Ap, tau, Q, ldQ, work, info ) [ cz] upgtr ( uplo, n, Ap, tau, Q, ldQ, work, info )

## Multiply by Q, after tri-diagonalization

[sd ] ormtr ( side, uplo, trans, m, n, A, ldA, tau, C, ldC, work, lwork, info ) [ cz] unmtr ( side, uplo, trans, m, n, A, ldA, tau, C, ldC, work, lwork, info ) [sd ] opmtr ( side, uplo, trans, m, n, Ap, tau, C, ldC, work, info ) [ cz] upmtr ( side, uplo, trans, m, n, Ap, tau, C, ldC, work, info )

## Eigenvalues of symmetric tri-diagonal

[sd ] sterf ( n, d, e, info ) [sdcz] steqr ( compz, n, d, e, Z, ldZ, work, info ) [sdcz] pteqr ( compz, n, d, e, Z, ldZ, work, info ) [sd ] stedc ( compz, n, d, e, Z, ldZ, work, lwork, iwork, liwork, info ) [ cz] stedc ( compz, n, d, e, Z, ldZ, work, lwork, rwork, lrwork, iwork, liwork, info )

## Eigenvalues of symmetric tri-diagonal (selected)

[sdcz] stemr ( jobz, range, n, d, e, vl, vu, il, iu, m, w, Z, ldZ, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info ) [sdcz] stegr ( jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, Z, ldZ, isuppz, work, lwork, iwork, liwork, info ) [sd ] stebz ( range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info )

## Reduce generalized eigenvalue problem to standard form

[sd ] sygst ( itype, uplo, n, A, ldA, B, ldB, info ) [ cz] hegst ( itype, uplo, n, A, ldA, B, ldB, info ) [sd ] spgst ( itype, uplo, n, Ap, Bp, info ) [ cz] hpgst ( itype, uplo, n, Ap, Bp, info ) [sd ] sbgst ( vect, uplo, n, ka, kb, Ab, ldAb, Bb, ldBb, X, ldX, work, info ) [ cz] hbgst ( vect, uplo, n, ka, kb, Ab, ldAb, Bb, ldBb, X, ldX, work, rwork, info )

## Split Cholesky factorization (use with sbgst)

[sdcz] pbstf ( uplo, n, kb, Bb, ldBb, info )

## Reduce to upper Hessenberg

[sdcz] gehrd ( n, ilo, ihi, A, ldA, tau, work, lwork, info ) [sdcz] gghrd ( compq, compz, n, ilo, ihi, A, ldA, B, ldB, Q, ldQ, Z, ldZ, info )

## Generate Q, after reduction to upper Hessenberg

[sd ] orghr ( n, ilo, ihi, A, ldA, tau, work, lwork, info ) [ cz] unghr ( n, ilo, ihi, A, ldA, tau, work, lwork, info )

## Multiply by Q, after reduction to upper Hessenberg

[sd ] ormhr ( side, trans, m, n, ilo, ihi, A, ldA, tau, C, ldC, work, lwork, info ) [ cz] unmhr ( side, trans, m, n, ilo, ihi, A, ldA, tau, C, ldC, work, lwork, info )

## Eigenvalues of upper Hessenberg

[sd ] hseqr ( job, compz, n, ilo, ihi, h, ldh, wr, wi, Z, ldZ, work, lwork, info ) [ cz] hseqr ( job, compz, n, ilo, ihi, h, ldh, w, Z, ldZ, work, lwork, info )

## Eigenvalues of upper Hessenberg H and upper triangular T

[sd ] hgeqz ( job, compq, compz, n, ilo, ihi, H, ldH, T, ldT, alphar, alphai, beta, Q, ldQ, Z, ldZ, work, lwork, info ) [ cz] hgeqz ( job, compq, compz, n, ilo, ihi, H, ldH, T, ldT, alpha, beta, Q, ldQ, Z, ldZ, work, lwork, rwork, info )

## Eigenvectors for given eigenvalues, by inverse iteration

[sdcz] stein ( n, d, e, m, w, iblock, isplit, Z, ldZ, work, iwork, ifailv, info ) [sd ] hsein ( job, eigsrc, initv, select, n, h, ldh, wr, wi, vl, ldvl, vr, ldvr, mm, m, work, ifaill, ifailr, info ) [ cz] hsein ( job, eigsrc, initv, select, n, h, ldh, w, vl, ldvl, vr, ldvr, mm, m, work, rwork, ifaill, ifailr, info )

## Eigenvectors of Schur factorization T

[sd ] trevc ( side, howmny, select, n, T, ldT, vl, ldvl, vr, ldvr, mm, m, work, info ) [ cz] trevc ( side, howmny, select, n, T, ldT, vl, ldvl, vr, ldvr, mm, m, work, rwork, info ) [sd ] tgevc ( side, howmny, select, n, s, lds, p, ldp, vl, ldvl, vr, ldvr, mm, m, work, info ) [ cz] tgevc ( side, howmny, select, n, s, lds, p, ldp, vl, ldvl, vr, ldvr, mm, m, work, rwork, info )

## Reorder Schur factorization

[sd ] trexc ( compq, n, T, ldT, Q, ldQ, ifst, ilst, work, info ) [ cz] trexc ( compq, n, T, ldT, Q, ldQ, ifst, ilst, info ) [sd ] tgexc ( wantq, wantz, n, A, ldA, B, ldB, Q, ldQ, Z, ldZ, ifst, ilst, work, lwork, info ) [ cz] tgexc ( wantq, wantz, n, A, ldA, B, ldB, Q, ldQ, Z, ldZ, ifst, ilst, info )

## Reorder Schur factorization

[sd ] trsen ( job, compq, select, n, T, ldT, Q, ldQ, wr, wi, m, s, sep, work, lwork, iwork, liwork, info ) [ cz] trsen ( job, compq, select, n, T, ldT, Q, ldQ, w, m, s, sep, work, lwork, info ) [sd ] tgsen ( ijob, wantq, wantz, select, n, A, ldA, B, ldB, alphar, alphai, beta, Q, ldQ, Z, ldZ, m, pl, pr, dif, work, lwork, iwork, liwork, info ) [ cz] tgsen ( ijob, wantq, wantz, select, n, A, ldA, B, ldB, alpha, beta, Q, ldQ, Z, ldZ, m, pl, pr, dif, work, lwork, iwork, liwork, info )

## Condition numbers of eigenvectors

[sd ] disna ( job, m, n, d, sep, info ) [sdcz] trsna ( job, howmny, select, n, T, ldT, vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork, [ir]work, info ) [sdcz] tgsna ( job, howmny, select, n, A, ldA, B, ldB, vl, ldvl, vr, ldvr, s, dif, mm, m, work, lwork, iwork, info )

## Balance matrix (improves eigenvalue accuracy)

[sdcz] gebal ( job, n, A, ldA, ilo, ihi, scale, info ) [sdcz] ggbal ( job, n, A, ldA, B, ldB, ilo, ihi, lscale, rscale, work, info )

## Eigenvectors by back transformation

[sdcz] gebak ( job, side, n, ilo, ihi, scale, m, v, ldV, info ) [sdcz] ggbak ( job, side, n, ilo, ihi, lscale, rscale, m, v, ldV, info )

## Solve Sylvester matrix equation

[sdcz] trsyl ( trana, tranb, isgn, m, n, A, ldA, B, ldB, C, ldC, scale, info ) [sdcz] tgsyl ( trans, ijob, m, n, A, ldA, B, ldB, C, ldC, D, ldD, E, ldE, F, ldF, scale, dif, work, lwork, iwork, info )

## SVD

[sd ] gesvd ( jobu, jobvt, m, n, A, ldA, s, u, ldU, vt, ldvt, work, lwork, info ) [ cz] gesvd ( jobu, jobvt, m, n, A, ldA, s, u, ldU, vt, ldvt, work, lwork, rwork, info ) [sd ] ggsvd ( jobu, jobv, jobq, m, n, p, k, l, A, ldA, B, ldB, alpha, beta, u, ldU, v, ldV, Q, ldQ, work, iwork, info ) [ cz] ggsvd ( jobu, jobv, jobq, m, n, p, k, l, A, ldA, B, ldB, alpha, beta, u, ldU, v, ldV, Q, ldQ, work, rwork, iwork, info )

## SVD, divide-and-conquer

[sd ] gesdd ( jobz, m, n, A, ldA, s, u, ldU, vt, ldvt, work, lwork, iwork, info ) [ cz] gesdd ( jobz, m, n, A, ldA, s, u, ldU, vt, ldvt, work, lwork, rwork, iwork, info )

## SVD, Jacobi

[sd ] gejsv ( joba, jobu, jobv, jobr, jobt, jobp, m, n, A, ldA, sva, u, ldU, v, ldV, work, lwork, iwork, info ) [sd ] gesvj ( joba, jobu, jobv, m, n, A, ldA, sva, mv, v, ldV, work, lwork, info )

## Generalized SVD of upper triangular A and B

[sdcz] tgsja ( jobu, jobv, jobq, m, p, n, k, l, A, ldA, B, ldB, tola, tolb, alpha, beta, U, ldU, V, ldV, Q, ldQ, work, ncycle, info )

## (step in generalized SVD)

[sd ] ggsvp ( jobu, jobv, jobq, m, p, n, A, ldA, B, ldB, tola, tolb, k, l, U, ldU, V, ldV, Q, ldQ, iwork, tau, work, info ) [ cz] ggsvp ( jobu, jobv, jobq, m, p, n, A, ldA, B, ldB, tola, tolb, k, l, U, ldU, V, ldV, Q, ldQ, iwork, rwork, tau, work, info )

## Reduce to bi-diagonal

[sdcz] gebrd ( m, n, A, ldA, d, e, tauQ, tauP, work, lwork, info ) [sd ] gbbrd ( vect, m, n, ncc, kl, ku, Ab, ldAb, d, e, Q, ldQ, Pt, ldPt, C, ldC, work, info ) [ cz] gbbrd ( vect, m, n, ncc, kl, ku, Ab, ldAb, d, e, Q, ldQ, Pt, ldPt, C, ldC, work, rwork, info )

## Generate Q, after bi-diagonalization

[sd ] orgbr ( vect, m, n, k, A, ldA, tau, work, lwork, info ) [ cz] ungbr ( vect, m, n, k, A, ldA, tau, work, lwork, info )

## Multiply by Q, after bi-diagonalization

[sd ] ormbr ( vect, side, trans, m, n, k, A, ldA, tau, C, ldC, work, lwork, info ) [ cz] unmbr ( vect, side, trans, m, n, k, A, ldA, tau, C, ldC, work, lwork, info )

## SVD of bi-diagonal matrix

[sdcz] bdsqr ( uplo, n, ncvt, nru, ncc, d, e, Vt, ldVt, U, ldU, C, ldC, work, info ) [sd ] bdsdc ( uplo, compq, n, d, e, U, ldU, Vt, ldVt, q, iq, work, iwork, info )

## Matrix norm (1, Fro, inf, largest element)

double [sdcz] lange ( norm, m, n, A, ldA, work ) double [ cz] lanhe ( norm, uplo, n, A, ldA, work ) double [sdcz] lansy ( norm, uplo, n, A, ldA, work ) double [sdcz] lantr ( norm, uplo, diag, m, n, A, ldA, work )

## Utilities

# copy (sub) matrix A to another (sub) matrix B [sdcz] lacpy ( uplo, m, n, A, ldA, B, ldB ) # machine parameters [sd ] lamch ( cmach ) # random vector [sdcz] larnv ( idist, iseed, n, X ) # set A to beta on diagonal and alpha on off-diagonal [sdcz] laset ( uplo, m, n, alpha, beta, A, ldA ) # sort vector [sd ] lasrt( id, n, d, info ) # interchange rows [sdcz] laswp ( n, A, ldA, k1, k2, ipiv, incx ) # compute UU^T or L^TL [sdcz] lauum ( uplo, n, A, ldA, info )

## Reflectors

# apply real block reflector H [sdcz] larfb ( side, trans, direct, storev, m, n, k, v, ldV, T, ldT, C, ldC, mywork, myldwork ) # apply real elementary reflector H [sdcz] larfg ( n, alpha, X, incx, tau ) # apply real elementary reflector H [sdcz] larfx ( side, m, n, v, tau, C, ldC, work ) # form triangular T from block reflector [sdcz] larft ( direct, storev, n, k, v, ldV, tau, T, ldT )

## Conversions

# convert single to double? [s ] lag2d ( m, n, sa, ldsa, A, ldA, info ) # convert double to single [ d ] lag2s ( m, n, A, ldA, sa, ldsa, info ) # convert single-complex to double-complex? [ c ] lag2z ( m, n, sa, ldsa, A, ldA, info ) # convert double-complex to single-complex? [ z] lag2c ( m, n, A, ldA, sa, ldsa, info )

## BLAS 2 versions

# LQ factorization [sdcz] gelq2 ( m, n, A, ldA, tau, work, info ) # QR factorization [sdcz] geqr2 ( m, n, A, ldA, tau, work, info ) # LU factorization [sdcz] getf2 ( m, n, A, ldA, ipiv, info )

## Unknown

[ cz] lacgv ( n, X, incx ) [sdcz] latms ( m, n, dist, iseed, sym, d, mode, cond, dmax, kl, ku, pack, A, ldA, work, info ) [sdcz] lagge ( m, n, kl, ku, d, A, ldA, iseed, work, info )

## Deprecated

# deprecated; see geqp3 # [sd ] geqpf ( m, n, A, ldA, jpvt, tau, work, info ) # [ cz] geqpf ( m, n, A, ldA, jpvt, tau, work, rwork, info )