Developer Reference for Intel® oneAPI Math Kernel Library for C
?potrf
Computes the Cholesky factorization of a symmetric (Hermitian) positive-definite matrix.
Syntax
lapack_intLAPACKE_spotrf ( intmatrix_layout , charuplo , lapack_intn , float*a , lapack_intlda );
lapack_intLAPACKE_dpotrf ( intmatrix_layout , charuplo , lapack_intn , double*a , lapack_intlda );
lapack_intLAPACKE_cpotrf ( intmatrix_layout , charuplo , lapack_intn , lapack_complex_float*a , lapack_intlda );
lapack_intLAPACKE_zpotrf ( intmatrix_layout , charuplo , lapack_intn , lapack_complex_double*a , lapack_intlda );
Include Files
mkl.h
Description
spotrf dpotrf cpotrf zpotrf potrf
The routine forms the Cholesky factorization of a symmetric positive-definite or, for complex data, Hermitian positive-definite matrix \(A\) :
\(A = U^{T} U\) for real data, \(A = U^{H} U\) for complex data |
if uplo='U' |
\(A = L L^{T}\) for real data, \(A = L L^{H}\) for complex data |
if uplo='L' |
where \(L\) is a lower triangular matrix and \(U\) is upper triangular.
This routine supports the Progress Routine feature. See Progress Function for details.
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 and how A is factored: 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
Specifies the order of the matrix A . The value of n must be at least zero.
- a
-
Array, size max(1, lda * n ). The array a contains either the upper or the lower triangular part of the matrix A (see uplo ). REAL for spotrfDOUBLE PRECISION for dpotrfCOMPLEX for cpotrfDOUBLE COMPLEX for zpotrf . Array, size ( lda ,*). The array a contains either the upper or the lower triangular part of the matrix A (see uplo ). The second dimension of a must be at least max(1, n) .
- lda
-
The leading dimension of a . Must be at least max(1, n ). INTEGER . The leading dimension of a .
Output Parameters
- a
-
The upper or lower triangular part of a is overwritten by the Cholesky factor U or L , as specified by uplo .
Return Values
This function returns a value info .
If info=0 , the execution is successful.
If info = -i , parameter i had an illegal value.
If info = i , the leading minor of order i (and therefore the matrix A itself) is not positive-definite, and the factorization could not be completed. This may indicate an error in forming the matrix A .
LAPACK 95 Interface Notes
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.
Application Notes
If uplo='U', the computed factor \(U\) is the exact factor of a perturbed matrix \(A + E\) , where
\[|E| \leq c(n) \epsilon |U^H| |U|, \quad |e_{ij}| \leq c(n) \epsilon \sqrt{a_{ii}a_{jj}}\]
c(n) is a modest linear function of n , and \(\varepsilon\) is the machine precision.
A similar estimate holds for uplo = 'L' .
The total number of floating-point operations is approximately \((1/3)n^{3}\) for real flavors or \((4/3)n^{3}\) for complex flavors.
After calling this routine, you can call the following routines:
?potrs (Solves a system of linear equations with a Cholesky-factored symmetric (Hermitian) positive-definite coefficient matrix.)
to solve \(A X = B\)
?pocon (Estimates the reciprocal of the condition number of a symmetric (Hermitian) positive-definite matrix.)
to estimate the condition number of \(A\)
?potri (Computes the inverse of a symmetric (Hermitian) positive-definite matrix using the Cholesky factorization.)
to compute the inverse of \(A\) .