Developer Reference

  • 2021.1
  • 12/04/2020
  • Public Content
Contents

?hetrf

Computes the Bunch-Kaufman factorization of a complex Hermitian matrix.

Syntax

lapack_int
LAPACKE_chetrf
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_complex_float
*
a
,
lapack_int
lda
,
lapack_int
*
ipiv
);
lapack_int
LAPACKE_zhetrf
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_complex_double
*
a
,
lapack_int
lda
,
lapack_int
*
ipiv
);
Include Files
  • mkl.h
Description
The routine computes the factorization of a complex Hermitian matrix
A
using the Bunch-Kaufman diagonal pivoting method:
  • if
    uplo
    =
    'U'
    ,
    A
    =
    U*D*U
    H
  • if
    uplo
    =
    'L'
    ,
    A
    =
    L*D*L
    H
    ,
where
A
is the input matrix,
U
and
L
are products of permutation and triangular matrices with unit diagonal (upper triangular for
U
and lower triangular for
L
), and
D
is a Hermitian block-diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks.
U
and
L
have 2-by-2 unit diagonal blocks corresponding to the 2-by-2 blocks of
D
.
This routine supports the Progress Routine feature.
See Progress Routine for details.
Input Parameters
matrix_layout
Specifies whether matrix storage layout is row major (
LAPACK_ROW_MAJOR
) or column major (
LAPACK_COL_MAJOR
).
uplo
Must be
'U'
or
'L'
.
Indicates whether the upper or lower triangular part of
A
is stored and how
A
is factored:
If
uplo
=
'U'
, the array
a
stores the upper triangular part of the matrix
A
, and
A
is factored as
U*D*U
H
.
If
uplo
=
'L'
, the array
a
stores the lower triangular part of the matrix
A
, and
A
is factored as
L*D*L
H
.
n
The order of matrix
A
;
n
0.
a
Array, size
max(1,
lda
*
n
)
.
The array
a
contains the upper or the lower triangular part of the matrix
A
(see
uplo
).
lda
The leading dimension of
a
; at least
max(1,
n
)
.
Output Parameters
a
The upper or lower triangular part of
a
is overwritten by details of the block-diagonal matrix
D
and the multipliers used to obtain the factor
U
(or
L
).
ipiv
Array, size at least
max(1,
n
)
. Contains details of the interchanges and the block structure of
D
. If
ipiv
[
i
-1] =
k
>0
, then
d
i
i
is a 1-by-1 block, and the
i
-th row and column of
A
was interchanged with the
k
-th row and column.
If
uplo
=
'U'
and
ipiv
[
i
] =
ipiv
[
i
-1] = -
m
< 0, then
D
has a 2-by-2 block in rows/columns
i
and
i
+1
, and
i
-th row and column of
A
was interchanged with the
m
-th row and column.
If
uplo
=
'L'
and
ipiv
[
i
] =
ipiv
[
i
-1] = -
m
< 0, then
D
has a 2-by-2 block in rows/columns
i
and
i
+1, and (
i
+1)-th row and column of
A
was interchanged with the
m
-th row and column.
Return Values
This function returns a value
info
.
If
info
= 0
, the execution is successful.
If
info
=
-i
, parameter
i
had an illegal value.
If
info
=
i
,
d
i
i
is 0. The factorization has been completed, but
D
is exactly singular. Division by 0 will occur if you use
D
for solving a system of linear equations.
Application Notes
This routine is suitable for Hermitian matrices that are not known to be positive-definite. If
A
is in fact positive-definite, the routine does not perform interchanges, and no 2-by-2 diagonal blocks occur in
D
.
The 2-by-2 unit diagonal blocks and the unit diagonal elements of
U
and
L
are not stored. The remaining elements of
U
and
L
are stored in the corresponding columns of the array
a
, but additional row interchanges are required to recover
U
or
L
explicitly (which is seldom necessary).
If
ipiv
[
i
-1]
=
i
for all
i
=1...
n
, then all off-diagonal elements of
U
(
L
) are stored explicitly in the corresponding elements of the array
a
.
If
uplo
=
'U'
, the computed factors
U
and
D
are the exact factors of a perturbed matrix
A
+
E
, where
|E| ≤ c(n)ε P|U||D||U
T
|P
T
c
(
n
)
is a modest linear function of
n
, and
ε
is the machine precision.
A similar estimate holds for the computed
L
and
D
when
uplo
=
'L'
.
The total number of floating-point operations is approximately
(4/3)
n
3
.
After calling this routine, you can call the following routines:
to solve
A*X
=
B
to estimate the condition number of
A
to compute the inverse of
A
.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.