Developer Reference for Intel® oneAPI Math Kernel Library for C
?hetrf_rk
Computes the factorization of a complex Hermitian indefinite matrix using the bounded Bunch-Kaufman (rook) diagonal pivoting method (BLAS3 blocked algorithm).
Syntax
lapack_intLAPACKE_chetrf_rk ( intmatrix_layout , charuplo , lapack_intn , lapack_complex_float*A , lapack_intlda , lapack_complex_float*e , lapack_int*ipiv );
lapack_intLAPACKE_zhetrf_rk ( intmatrix_layout , charuplo , lapack_intn , lapack_complex_double*A , lapack_intlda , lapack_complex_double*e , lapack_int*ipiv );
Description
?hetrf_rk computes the factorization of a complex Hermitian matrix \(A\) using the bounded Bunch-Kaufman (rook) diagonal pivoting method: \(A = P*U*D*U^H*P^T\) or \(A = P*L*D*L^H*P^T\) , where \(U\) (or \(L\)) is unit upper (or lower) triangular matrix, \(U^H\) (or \(L^H\)) is the conjugate 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.
This is the blocked version of the algorithm, calling Level 3 BLAS.
Input Parameters
- matrix_layout
-
Specifies whether matrix storage layout is row major ( LAPACK_ROW_MAJOR ) or column major ( LAPACK_COL_MAJOR ).
- uplo
-
CHARACTER*1 Specifies whether the upper or lower triangular part of the Hermitian matrix A is stored:
- n
-
INTEGER The order of the matrix A. n ≥ 0.
- A
-
COMPLEX for chetrf_rk COMPLEX*16 for zhetrf_rk
Array of size max(1, 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.
- lda
-
INTEGER
The leading dimension of the array A .
- lwork
-
INTEGER The length of the array work . If lwork = - 1, a workspace query is assumed; the routine calculates only the optimal size of the work array and returns this value as the first entry of the work array, and no error message related to lwork is issued by XERBLA.
Output Parameters
- A
-
COMPLEX for chetrf_rk COMPLEX*16 for zhetrf_rk On exit, contains:
- e
-
COMPLEX for chetrf_rk COMPLEX*16 for zhetrf_rk
Array of size 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. If uplo = 'U' , e( i ) = D( i- 1, i ), i =2:N, and e(1) is set to 0. If uplo = 'L' , e( i ) = D( i +1, i ), i =1:N - 1, and e( n ) is set to 0.
- ipiv
-
INTEGER Array, dimension ( n ). ipiv describes the permutation matrix P in the factorization of matrix A as follows. The absolute value of ipiv(k) represents the index of row and column that were interchanged with the kth row and column. The value of uplo describes the order in which the interchanges were applied. Also, the sign of ipiv represents the block structure of the Hermitian block diagonal matrix D with 1-by-1 or 2-by-2 diagonal blocks that correspond to 1 or 2 interchanges at each factorization step. If uplo = 'U' (in factorization order, k decreases from n to 1): Array of size n . ipiv describes the permutation matrix P in the factorization of matrix A as follows: The absolute value of ipiv [ k- 1] represents the index of row and column that were interchanged with the kth row and column. The value of uplo describes the order in which the interchanges were applied. Also, the sign of ipiv represents the block structure of the Hermitian block diagonal matrix D with 1-by-1 or 2-by-2 diagonal blocks that correspond to 1 or 2 interchanges at each factorization step. If uplo = 'U' (in factorization order, k decreases from n to 1): If uplo = 'L' (in factorization order, k increases from 1 to n ):
- work
-
COMPLEX for chetrf_rk COMPLEX*16 for zhetrf_rk Array, dimension ( MAX(1, lwork ) ). On exit, if info = 0, work (1) returns the optimal lwork .
Return Values
This function returns a value info .
If info = 0, the execution is successful.
If info = -k , the kth argument had an illegal value.
If info = k , the matrix A is singular. If uplo = 'U' , the column k in the upper triangular part of A contains all zeros. If uplo = 'L' , the column k in the lower triangular part of A contains all zeros. Therefore \(D(k,k)\) is exactly zero, and superdiagonal elements of column k of U (or subdiagonal elements of column k of 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.