Developer Reference for Intel® oneAPI Math Kernel Library for C
?sptrf
Computes the Bunch-Kaufman factorization of a symmetric matrix using packed storage.
Syntax
lapack_intLAPACKE_ssptrf ( intmatrix_layout , charuplo , lapack_intn , float*ap , lapack_int*ipiv );
lapack_intLAPACKE_dsptrf ( intmatrix_layout , charuplo , lapack_intn , double*ap , lapack_int*ipiv );
lapack_intLAPACKE_csptrf ( intmatrix_layout , charuplo , lapack_intn , lapack_complex_float*ap , lapack_int*ipiv );
lapack_intLAPACKE_zsptrf ( intmatrix_layout , charuplo , lapack_intn , lapack_complex_double*ap , lapack_int*ipiv );
Include Files
mkl.h
Description
ssptrf dsptrf csptrf zsptrf sptrf
The routine computes the factorization of a real/complex symmetric matrix A stored in the packed format using the Bunch-Kaufman diagonal pivoting method. The form of the factorization is:
if uplo='U' , \(A = U*D*U^{T}\)
if uplo='L' , \(A = L*D*L^{T},\)
where \(U\) and \(L\) are products of permutation and triangular matrices with unit diagonal (upper triangular for \(U\) and lower triangular for \(L\) ), and \(D\) is a symmetric block-diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks. \(U\) and \(L\) have 2-by-2 unit diagonal blocks corresponding to the 2-by-2 blocks of \(D\) .
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 packed in the array ap and how A is factored:
If uplo = 'U' , the array ap stores the upper triangular part of the matrix \(A\) , and \(A\) is factored as \(U*D*U^{T}\) .
If uplo = 'L' , the array ap stores the lower triangular part of the matrix \(A\) , and \(A\) is factored as \(L*D*L^{T}\) .
n
The order of matrix A ; n ≥ 0.
ap
Array, size at least max(1, n(n+1)/2). The array ap contains the upper or the lower triangular part of the matrix A (as specified by uplo ) in packed storage (see Matrix Storage Schemes ) .
Output Parameters
ap
The upper or lower triangle of A (as specified by uplo ) is overwritten by details of the block-diagonal matrix D and the multipliers used to obtain the factor U (or L ).
ipiv
Array, size at least max(1, n) . Contains details of the interchanges and the block structure of D . If ipiv[i-1] = k >0 , then \(d_{ii}\) is a 1-by-1 block, and the i -th row and column of A was interchanged with the k -th row and column.
If uplo = ‘U’ and ipiv [ i ] = ipiv [ i -1] = - m < 0, then D has a 2-by-2 block in rows/columns i and i+1 , and i -th row and column of A was interchanged with the m -th row and column.
If uplo = ‘L’ and ipiv [ i ] = ipiv [ i -1] = - m < 0, then D has a 2-by-2 block in rows/columns i and i +1, and ( i +1)-th row and column of A was interchanged with the m -th row and column.
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 , \(d_{ii}\) is 0. The factorization has been completed, but \(D\) is exactly singular. Division by 0 will occur if you use \(D\) for solving a system of linear equations.
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
The 2-by-2 unit diagonal blocks and the unit diagonal elements of \(U\) and \(L\) are not stored. The remaining elements of \(U\) and \(L\) overwrite elements of the corresponding columns of the array ap , but additional row interchanges are required to recover \(U\) or \(L\) explicitly (which is seldom necessary).
If ipiv(i) = i for all i = 1...n , then all off-diagonal elements of \(U\) ( \(L\) ) are stored explicitly in packed form.
If uplo = 'U' , the computed factors \(U\) and \(D\) are the exact factors of a perturbed matrix \(A + E\) , where
\[|E| \leq c(n)\varepsilon P|U||D||U^{T}|P^{T}\]
c(n) is a modest linear function of n , and \(\varepsilon\) is the machine precision. A similar estimate holds for the computed \(L\) and \(D\) when 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:
?sptrs (Solves a system of linear equations with a \(UDU^T\)- or \(LDL^T\)-factored symmetric coefficient matrix using packed storage.)
to solve \(A X = B\)
?spcon (Estimates the reciprocal of the condition number of a packed symmetric matrix.)
to estimate the condition number of \(A\)
?sptri (Computes the inverse of a symmetric matrix using \(U*D*U^T\) or \(L*D*L^T\) Bunch-Kaufman factorization of matrix in packed storage.)
to compute the inverse of \(A\) .