hesv_aa_2stage#

Functions

void chesv_aa_2stage(
    const char*          uplo,
    const INT            n,
    const INT            nrhs,
          c64*  restrict A,
    const INT            lda,
          c64*  restrict TB,
    const INT            ltb,
          INT*  restrict ipiv,
          INT*  restrict ipiv2,
          c64*  restrict B,
    const INT            ldb,
          c64*  restrict work,
    const INT            lwork,
          INT*           info
);
void chesv_aa_2stage(const char *uplo, const INT n, const INT nrhs, c64 *restrict A, const INT lda, c64 *restrict TB, const INT ltb, INT *restrict ipiv, INT *restrict ipiv2, c64 *restrict B, const INT ldb, c64 *restrict work, const INT lwork, INT *info)#

CHESV_AA_2STAGE computes the solution to a complex system of linear equations A * X = B, where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS matrices.

Aasen’s 2-stage algorithm is used to factor A as A = U**H * T * U, if uplo = ‘U’, or A = L * T * L**H, if uplo = ‘L’, where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and T is Hermitian and band. The matrix T is then LU-factored with partial pivoting. The factored form of A is then used to solve the system of equations A * X = B.

This is the blocked version of the algorithm, calling Level 3 BLAS.

Parameters

in
uplo

  • 'U': Upper triangle of A is stored

  • 'L': Lower triangle of A is stored

in
n

The order of the matrix A. n>=0.

in
nrhs

The number of right hand sides, i.e., the number of columns of the matrix B. nrhs>=0.

inout
A

Array of dimension (lda,n). On entry, the Hermitian matrix A. If uplo='U', the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If uplo='L', the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, L is stored below (or above) the subdiagonal blocks, when uplo='L' (or 'U').

in
lda

The leading dimension of the array A. lda>=max(1,n).

out
TB

Array of dimension max(1,ltb). On exit, details of the LU factorization of the band matrix.

in
ltb

The size of the array TB. ltb>=max(1,4*n), internally used to select nb such that ltb>=(3*nb+1)*n. If ltb=-1, then a workspace query is assumed; the routine only calculates the optimal size of ltb, returns this value as the first entry of TB, and no error message related to ltb is issued.

out
ipiv

Array of dimension n. On exit, it contains the details of the interchanges, i.e., the row and column k of A were interchanged with the row and column ipiv[k].

out
ipiv2

Array of dimension n. On exit, it contains the details of the interchanges, i.e., the row and column k of T were interchanged with the row and column ipiv[k].

inout
B

Array of dimension (ldb,nrhs). On entry, the right hand side matrix B. On exit, the solution matrix X.

in
ldb

The leading dimension of the array B. ldb>=max(1,n).

out
work

Array of dimension max(1,lwork). On exit, if info=0, work[0] returns the optimal lwork.

in
lwork

The size of work. lwork>=max(1,n), internally used to select nb such that lwork>=n*nb. If lwork=-1, then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued.

out
info

  • info=0: successful exit

  • info<0: if info=-i, the i-th argument had an illegal value

  • info>0: if info=i, band LU factorization failed on the i-th column

Functions

void zhesv_aa_2stage(
    const char*          uplo,
    const INT            n,
    const INT            nrhs,
          c128* restrict A,
    const INT            lda,
          c128* restrict TB,
    const INT            ltb,
          INT*  restrict ipiv,
          INT*  restrict ipiv2,
          c128* restrict B,
    const INT            ldb,
          c128* restrict work,
    const INT            lwork,
          INT*           info
);
void zhesv_aa_2stage(const char *uplo, const INT n, const INT nrhs, c128 *restrict A, const INT lda, c128 *restrict TB, const INT ltb, INT *restrict ipiv, INT *restrict ipiv2, c128 *restrict B, const INT ldb, c128 *restrict work, const INT lwork, INT *info)#

ZHESV_AA_2STAGE computes the solution to a complex system of linear equations A * X = B, where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS matrices.

Aasen’s 2-stage algorithm is used to factor A as A = U**H * T * U, if uplo = ‘U’, or A = L * T * L**H, if uplo = ‘L’, where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and T is Hermitian and band. The matrix T is then LU-factored with partial pivoting. The factored form of A is then used to solve the system of equations A * X = B.

This is the blocked version of the algorithm, calling Level 3 BLAS.

Parameters

in
uplo

  • 'U': Upper triangle of A is stored

  • 'L': Lower triangle of A is stored

in
n

The order of the matrix A. n>=0.

in
nrhs

The number of right hand sides, i.e., the number of columns of the matrix B. nrhs>=0.

inout
A

Array of dimension (lda,n). On entry, the Hermitian matrix A. If uplo='U', the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If uplo='L', the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, L is stored below (or above) the subdiagonal blocks, when uplo='L' (or 'U').

in
lda

The leading dimension of the array A. lda>=max(1,n).

out
TB

Array of dimension max(1,ltb). On exit, details of the LU factorization of the band matrix.

in
ltb

The size of the array TB. ltb>=max(1,4*n), internally used to select nb such that ltb>=(3*nb+1)*n. If ltb=-1, then a workspace query is assumed; the routine only calculates the optimal size of ltb, returns this value as the first entry of TB, and no error message related to ltb is issued.

out
ipiv

Array of dimension n. On exit, it contains the details of the interchanges, i.e., the row and column k of A were interchanged with the row and column ipiv[k].

out
ipiv2

Array of dimension n. On exit, it contains the details of the interchanges, i.e., the row and column k of T were interchanged with the row and column ipiv[k].

inout
B

Array of dimension (ldb,nrhs). On entry, the right hand side matrix B. On exit, the solution matrix X.

in
ldb

The leading dimension of the array B. ldb>=max(1,n).

out
work

Array of dimension max(1,lwork). On exit, if info=0, work[0] returns the optimal lwork.

in
lwork

The size of work. lwork>=max(1,n), internally used to select nb such that lwork>=n*nb. If lwork=-1, then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued.

out
info

  • info=0: successful exit

  • info<0: if info=-i, the i-th argument had an illegal value

  • info>0: if info=i, band LU factorization failed on the i-th column