?pstrf
?pstrf
Computes the Cholesky factorization with complete pivoting of a real symmetric (complex Hermitian) positive semidefinite matrix.
Syntax
lapack_int LAPACKE_spstrf
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
float*
a
,
lapack_int
lda
,
lapack_int*
piv
,
lapack_int*
rank
,
float
tol
);
lapack_int LAPACKE_dpstrf
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
double*
a
,
lapack_int
lda
,
lapack_int*
piv
,
lapack_int*
rank
,
double
tol
);
lapack_int LAPACKE_cpstrf
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_complex_float*
a
,
lapack_int
lda
,
lapack_int*
piv
,
lapack_int*
rank
,
float
tol
);
lapack_int LAPACKE_zpstrf
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_complex_double*
a
,
lapack_int
lda
,
lapack_int*
piv
,
lapack_int*
rank
,
double
tol
);
Include Files
- mkl.h
Description
The routine computes the Cholesky factorization with complete pivoting of a real symmetric (complex Hermitian) positive semidefinite matrix. The form of the
factorization is:
- , ifPT*A*P=UT*Uuplo='U'for real flavors,
- , ifPT*A*P=UH*Uuplo='U'for complex flavors,
- , ifPT*A*P=L*LTuplo='L'for real flavors,
- , ifPT*A*P=L*LHuplo='L'for complex flavors,
where
P
is a permutation matrix stored as vector piv
, and U
and L
are upper and lower triangular matrices, respectively.This algorithm does not attempt to check that
A
is positive semidefinite. This version of the algorithm calls 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
- Must be'U'or'L'.Indicates whether the upper or lower triangular part ofAis stored:If, the arrayuplo='U'astores the upper triangular part of the matrixA, and the strictly lower triangular part of the matrix is not referenced.If, the arrayuplo='L'astores the lower triangular part of the matrixA, and the strictly upper triangular part of the matrix is not referenced.
- n
- The order of matrixA;n≥0.
- a
- Arraya, sizemax(1,. The arraylda*n)acontains either the upper or the lower triangular part of the matrixA(seeuplo). .
- tol
- User defined tolerance. Iftol< 0, thenn*ε*max(A), wherek,kεis the machine precision, will be used (see Error Analysis for the definition of machine precision). The algorithm terminates at the(-st step, if the pivotk-1)≤tol.
- lda
- The leading dimension ofa; at leastmax(1,.n)
Output Parameters
- a
- If, the factorinfo= 0UorLfrom the Cholesky factorizationis as described in.Description
- piv
- Array, size at leastmax(1,. The arrayn)pivis such that the nonzero entries areP(1piv[k-1],k≤k≤n).
- rank
- The rank ofagiven by the number of steps the algorithm completed.
Return Values
This function returns a value
info
.If , the execution is successful.
info
= 0If , the
info
= -k
k-
th argument had an illegal value.If , the matrix
info
> 0A
is either rank deficient with a computed rank as returned in rank
, or is not positive semidefinite.