?hetrs2
?hetrs2
Solves a system of linear equations with a UDU- or LDL-factored Hermitian coefficient matrix.
Syntax
lapack_int
LAPACKE_chetrs2
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_int
nrhs
,
const
lapack_complex_float
*
a
,
lapack_int
lda
,
const
lapack_int
*
ipiv
,
lapack_complex_float
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_zhetrs2
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_int
nrhs
,
const
lapack_complex_double
*
a
,
lapack_int
lda
,
const
lapack_int
*
ipiv
,
lapack_complex_double
*
b
,
lapack_int
ldb
);
Include Files
- mkl.h
Description
The routine solves a system of linear equations with a complex Hermitian matrix
A*X
= B
A
using the factorization of A
:- if,uplo='U'
- A=U*D*UH
- if,uplo='L'
- A=L*D*LH
where
- UandLare upper and lower triangular matrices with unit diagonal
- Dis a Hermitian block-diagonal matrix.
The factorization is computed by
?hetrf
.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 how the input matrixAhas been factored:If, the arrayuplo='U'astores the upper triangular factorUof the factorizationA=.U*D*UHIf, the arrayuplo='L'astores the lower triangular factorLof the factorizationA=.L*D*LH
- n
- The order of matrixA;n≥0.
- nrhs
- The number of right-hand sides;nrhs≥0.
- a
- The arrayaof size max(1,lda*n) contains the block diagonal matrixDand the multipliers used to obtain the factorUorLas computed by?hetrf.
- b
- The arraybof size max(1,ldb*nrhs) for column major layout and max(1,ldb*n) for row major layout contains the right-hand side matrixB.
- lda
- The leading dimension ofa;.lda≥max(1,n)
- ldb
- The leading dimension ofb;.ldb≥max(1,n) for column major layout andldb≥nrhsfor row major layout
- ipiv
- Array of sizen. Theipivarray contains details of the interchanges and the block structure ofDas determined by?hetrf.
Output Parameters
- b
- Overwritten by the solution matrixX.
Return Values
This function returns a value
info
.If , the execution is successful.
info
= 0If , parameter
info
= -i
i
had an illegal value.