hetrf_rk#
Functions
-
void chetrf_rk(const char *uplo, const INT n, c64 *restrict A, const INT lda, c64 *restrict E, INT *restrict ipiv, c64 *restrict work, const INT lwork, INT *info)#
CHETRF_RK computes the factorization of a complex Hermitian matrix A using the bounded Bunch-Kaufman (rook) diagonal pivoting method:
where U (or L) is unit upper (or lower) triangular matrix, U**H (or L**H) is the conjugate transpose of U (or L), P is a permutation matrix, P**T is the transpose of P, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.A = P*U*D*(U**H)*(P**T) or A = P*L*D*(L**H)*(P**T),
This is the blocked version of the algorithm, calling Level 3 BLAS.
If
uplo='L':If
ipiv[k]>=0, then rows and columnskandipiv[k]were interchanged andD(k,k)is a 1-by-1 diagonal block.If
ipiv[k]<0andipiv[k+1]<0, then rows and columnskand-ipiv[k]-1were interchanged and rows and columnsk+1and-ipiv[k+1]-1were interchanged,D(k:k+1,k:k+1)is a 2-by-2 diagonal block.
Parameters
outworkArray of dimension
max(1,lwork). On exit, ifinfo=0,work[0]returns the optimallwork.inlworkThe length of
work.lwork>=1. For best performancelwork>=n*nb, wherenbis the block size returned by ILAENV. Iflwork=-1, then a workspace query is assumed; the routine only calculates the optimal size of theworkarray, returns this value as the first entry of theworkarray, and no error message related tolworkis issued.outinfoinfo=0: successful exitinfo<0: ifinfo=-k, the k-th argument had an illegal valueinfo>0: ifinfo=k, the matrix A is singular, because column k of the triangular part of A (upper or lower, peruplo) contains all zeros.D(k,k)is exactly zero, and superdiagonal (or subdiagonal) elements of column k of U (or L) are all zeros. The factorization has been completed, but the block diagonal matrix D is exactly singular, and division by zero will occur if it is used to solve a system of equations.infoonly stores the first occurrence of a singularity; the factorization always completes.
inuplo'U': Upper triangular'L': Lower triangular
innThe order of the matrix A.
n>=0.inoutAArray of dimension
(lda,n). On entry, the Hermitian matrix A. On exit, contains:Only diagonal elements of the Hermitian block diagonal matrix D on the diagonal of A, i.e.
D(k,k)=A(k,k); (superdiagonal (or subdiagonal) elements of D are stored on exit in arrayE), andIf
uplo='U': factor U in the superdiagonal part of A. Ifuplo='L': factor L in the subdiagonal part of A.
inldaThe leading dimension of the array A.
lda>=max(1,n).outEArray of dimension
n. On exit, contains the superdiagonal (or subdiagonal) elements of the Hermitian block diagonal matrix D with 1-by-1 or 2-by-2 diagonal blocks, where ifuplo='U':E[i]=D(i-1,i),i=1:n-1,E[0]is set to 0; ifuplo='L':E[i]=D(i+1,i),i=0:n-2,E[n-1]is set to 0. For a 1-by-1 diagonal blockD(k), the elementE[k]is set to 0 in bothuplo='U'anduplo='L'cases.outipivArray of dimension
n. Pivot indices (0-based). Ifuplo='U':If
ipiv[k]>=0, then rows and columnskandipiv[k]were interchanged andD(k,k)is a 1-by-1 diagonal block.If
ipiv[k]<0andipiv[k-1]<0, then rows and columnskand-ipiv[k]-1were interchanged and rows and columnsk-1and-ipiv[k-1]-1were interchanged,D(k-1:k,k-1:k)is a 2-by-2 diagonal block.
void chetrf_rk(
const char* uplo,
const INT n,
c64* restrict A,
const INT lda,
c64* restrict E,
INT* restrict ipiv,
c64* restrict work,
const INT lwork,
INT* info
);
Functions
-
void zhetrf_rk(const char *uplo, const INT n, c128 *restrict A, const INT lda, c128 *restrict E, INT *restrict ipiv, c128 *restrict work, const INT lwork, INT *info)#
ZHETRF_RK computes the factorization of a complex Hermitian matrix A using the bounded Bunch-Kaufman (rook) diagonal pivoting method:
where U (or L) is unit upper (or lower) triangular matrix, U**H (or L**H) is the conjugate transpose of U (or L), P is a permutation matrix, P**T is the transpose of P, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.A = P*U*D*(U**H)*(P**T) or A = P*L*D*(L**H)*(P**T),
This is the blocked version of the algorithm, calling Level 3 BLAS.
If
uplo='L':If
ipiv[k]>=0, then rows and columnskandipiv[k]were interchanged andD(k,k)is a 1-by-1 diagonal block.If
ipiv[k]<0andipiv[k+1]<0, then rows and columnskand-ipiv[k]-1were interchanged and rows and columnsk+1and-ipiv[k+1]-1were interchanged,D(k:k+1,k:k+1)is a 2-by-2 diagonal block.
Parameters
outworkArray of dimension
max(1,lwork). On exit, ifinfo=0,work[0]returns the optimallwork.inlworkThe length of
work.lwork>=1. For best performancelwork>=n*nb, wherenbis the block size returned by ILAENV. Iflwork=-1, then a workspace query is assumed; the routine only calculates the optimal size of theworkarray, returns this value as the first entry of theworkarray, and no error message related tolworkis issued.outinfoinfo=0: successful exitinfo<0: ifinfo=-k, the k-th argument had an illegal valueinfo>0: ifinfo=k, the matrix A is singular, because column k of the triangular part of A (upper or lower, peruplo) contains all zeros.D(k,k)is exactly zero, and superdiagonal (or subdiagonal) elements of column k of U (or L) are all zeros. The factorization has been completed, but the block diagonal matrix D is exactly singular, and division by zero will occur if it is used to solve a system of equations.infoonly stores the first occurrence of a singularity; the factorization always completes.
inuplo'U': Upper triangular'L': Lower triangular
innThe order of the matrix A.
n>=0.inoutAArray of dimension
(lda,n). On entry, the Hermitian matrix A. On exit, contains:Only diagonal elements of the Hermitian block diagonal matrix D on the diagonal of A, i.e.
D(k,k)=A(k,k); (superdiagonal (or subdiagonal) elements of D are stored on exit in arrayE), andIf
uplo='U': factor U in the superdiagonal part of A. Ifuplo='L': factor L in the subdiagonal part of A.
inldaThe leading dimension of the array A.
lda>=max(1,n).outEArray of dimension
n. On exit, contains the superdiagonal (or subdiagonal) elements of the Hermitian block diagonal matrix D with 1-by-1 or 2-by-2 diagonal blocks, where ifuplo='U':E[i]=D(i-1,i),i=1:n-1,E[0]is set to 0; ifuplo='L':E[i]=D(i+1,i),i=0:n-2,E[n-1]is set to 0. For a 1-by-1 diagonal blockD(k), the elementE[k]is set to 0 in bothuplo='U'anduplo='L'cases.outipivArray of dimension
n. Pivot indices (0-based). Ifuplo='U':If
ipiv[k]>=0, then rows and columnskandipiv[k]were interchanged andD(k,k)is a 1-by-1 diagonal block.If
ipiv[k]<0andipiv[k-1]<0, then rows and columnskand-ipiv[k]-1were interchanged and rows and columnsk-1and-ipiv[k-1]-1were interchanged,D(k-1:k,k-1:k)is a 2-by-2 diagonal block.
void zhetrf_rk(
const char* uplo,
const INT n,
c128* restrict A,
const INT lda,
c128* restrict E,
INT* restrict ipiv,
c128* restrict work,
const INT lwork,
INT* info
);