?sytrs2
?sytrs2
Solves a system of linear equations with a UDU- or LDL-factored symmetric coefficient matrix.
Syntax
lapack_int
LAPACKE_ssytrs2
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_int
nrhs
,
const
float
*
a
,
lapack_int
lda
,
const
lapack_int
*
ipiv
,
float
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_dsytrs2
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_int
nrhs
,
const
double
*
a
,
lapack_int
lda
,
const
lapack_int
*
ipiv
,
double
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_csytrs2
(
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_zsytrs2
(
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 symmetric matrix
A*X
= B
A
using the factorization of A
:- if,uplo='U'
- A=U*D*UT
- if,uplo='L'
- A=L*D*LT
where
- UandLare upper and lower triangular matrices with unit diagonal
- Dis a symmetric block-diagonal matrix.
The factorization is computed by
?sytrf
.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*UTIf, the arrayuplo='L'astores the lower triangular factorLof the factorizationA=.L*D*LT
- n
- The order of matrixA;n≥0.
- nrhs
- The number of right-hand sides;nrhs≥0.
- a
- The arrayaof size max(1,contains the block diagonal matrixlda*n)Dand the multipliers used to obtain the factorUorLas computed by?sytrf.
- b
- The arraybcontains the right-hand side matrixB.The size ofbis at least max(1,ldb*nrhs) for column major layout and max(1,ldb*n) for row major layout.
- 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?sytrf.
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.