Developer Reference for Intel® oneAPI Math Kernel Library for C
?pstrf
Computes the Cholesky factorization with complete pivoting of a real symmetric (complex Hermitian) positive semidefinite matrix.
Syntax
lapack_int LAPACKE_spstrf ( intmatrix_layout , charuplo , lapack_intn , float*a , lapack_intlda , lapack_int*piv , lapack_int*rank , floattol );
lapack_int LAPACKE_dpstrf ( intmatrix_layout , charuplo , lapack_intn , double*a , lapack_intlda , lapack_int*piv , lapack_int*rank , doubletol );
lapack_int LAPACKE_cpstrf ( intmatrix_layout , charuplo , lapack_intn , lapack_complex_float*a , lapack_intlda , lapack_int*piv , lapack_int*rank , floattol );
lapack_int LAPACKE_zpstrf ( intmatrix_layout , charuplo , lapack_intn , lapack_complex_double*a , lapack_intlda , lapack_int*piv , lapack_int*rank , doubletol );
Include Files
mkl.h
Description
spstrf dpstrf cpstrf zpstrf pstrf
The routine computes the Cholesky factorization with complete pivoting of a real symmetric (complex Hermitian) positive semidefinite matrix. The form of the factorization is:
\(P^{T} * A * P = U^{T} * U\) , if uplo = ‘U’ for real flavors,
\(P^{T} * A * P = U^{H} * U\) , if uplo = ‘U’ for complex flavors,
\(P^{T} * A * P = L * L^{T}\) , if uplo = ‘L’ for real flavors,
\(P^{T} * A * P = L * L^{H}\) , if uplo = ‘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 of A is stored:
If uplo = 'U' , the array a stores the upper triangular part of the matrix A , and the strictly lower triangular part of the matrix is not referenced.
If uplo = 'L' , the array a stores the lower triangular part of the matrix A , and the strictly upper triangular part of the matrix is not referenced.
n
The order of matrix A ; n ≥ 0.
a
Array a , size (lda,*) max(1, lda * n ) . The array a contains either the upper or the lower triangular part of the matrix A (see uplo ). .
work
REAL for spstrf and cpstrf
DOUBLE PRECISION for dpstrf and zpstrf .
work(*) is a workspace array. The dimension of work is at least max(1,2*n) .
tol
User defined tolerance. If tol < 0, then \(n * \varepsilon * max(A_{kk})\), where \(\varepsilon\) is the machine precision, will be used (see Error Analysis for the definition of machine precision). The algorithm terminates at the (k-1) -st step, if the pivot ≤ tol .
lda
The leading dimension of a ; at least max(1, n) .
Output Parameters
a
If info = 0 , the factor U or L from the Cholesky factorization is as described in Description .
piv
Array, size at least max(1, n) . The array piv is such that the nonzero entries are \(P_{piv(k),k}\) (1 ≤ k ≤ n ).
rank
The rank of a given by the number of steps the algorithm completed.
Return Values
This function returns a value info .
If info = 0 , the execution is successful.
If info = -k , the k- th argument had an illegal value.
If info > 0 , the matrix A is either rank deficient with a computed rank as returned in rank , or is not positive semidefinite.