## Developer Reference

• 2020.2
• 07/15/2020
• Public Content
Contents

# ?hetri2

Computes the inverse of a Hermitian indefinite matrix through
setting the leading dimension of the workspace
and calling
?hetri2x
.

## Syntax

Include Files
• mkl.fi
,
lapack.f90
Description
The routine computes the inverse
inv(
A
)
of a Hermitian indefinite matrix
A
using the factorization
A
=
U*D*U
H
or
A
=
L*D*L
H
computed by
?hetrf
.
The
?hetri2
routine
sets the leading dimension of the workspace
before calling
?hetri2x
that actually computes the inverse.
Input Parameters
uplo
CHARACTER*1
.
Must be
'U'
or
'L'
.
Indicates how the input matrix
A
has been factored:
If
uplo
=
'U'
, the array
a
stores the factorization
A
=
U*D*U
H
.
If
uplo
=
'L'
, the array
a
stores the factorization
A
=
L*D*L
H
.
n
INTEGER
.
The order of the matrix
A
;
n
0
.
a
,
work
COMPLEX
for
chetri2
DOUBLE COMPLEX
for
zhetri2
Array
a
(size
lda
by *)
contains the block diagonal matrix
D
and the multipliers used to obtain the factor
U
or
L
as returned by
?sytrf
.
The second dimension of
a
must be at least
max(1,
n
)
.
work
is a workspace array of
(
n
+
nb
+1)*(
nb
+3)
dimension.
lda
INTEGER
.
a
;
lda
max(1,
n
)
.
ipiv
INTEGER
.
Array, size at least
max(1,
n
)
.
Details of the interchanges and the block structure of
D
as returned by
?hetrf
.
lwork
INTEGER
.
The dimension of the
work
array.
lwork
(
n
+
nb
+1)*(
nb
+3)
where
nb
is the block size parameter as returned by
hetrf
.
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 by
xerbla
.
Output Parameters
a
If
info
= 0
, the inverse of the original matrix.
If
uplo
=
'U'
, the upper triangular part of the inverse is formed and the part of
A
below the diagonal is not referenced.
If
uplo
=
'L'
, the lower triangular part of the inverse is formed and the part of
A
above the diagonal is not referenced.
info
INTEGER
.
If