Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
?sytrf_rook
Computes the bounded Bunch-Kaufman factorization of a symmetric matrix.
Syntax
call ssytrf_rook ( uplo , n , a , lda , ipiv , work , lwork , info )
call dsytrf_rook ( uplo , n , a , lda , ipiv , work , lwork , info )
call csytrf_rook ( uplo , n , a , lda , ipiv , work , lwork , info )
call zsytrf_rook ( uplo , n , a , lda , ipiv , work , lwork , info )
call sytrf_rook ( a [ , uplo ] [ , ipiv ] [ , info ] )
Include Files
mkl.fi , mkl_lapack.f90
Description
ssytrf_rook dsytrf_rook csytrf_rook zsytrf_rook sytrf_rook
The routine computes the factorization of a real/complex symmetric matrix A using the bounded Bunch-Kaufman (“rook”) 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 \(A\) is the input matrix, \(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\) .
Input Parameters
uplo
CHARACTER*1 . 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 \(A\) is factored as \(U*D*U^{T}\) .
If uplo = 'L' , the array a stores the lower triangular part of the matrix \(A\) , and \(A\) is factored as \(L*D*L^{T}\) .
n
INTEGER . The order of matrix A ; n ≥ 0.
a
REAL for ssytrf_rook
DOUBLE PRECISION for dsytrf_rook
COMPLEX for csytrf_rook
DOUBLE COMPLEX for zsytrf_rook .
Array, size (lda,n) . The array a contains either the upper or the lower triangular part of the matrix A (see uplo ).
lda
INTEGER . The leading dimension of a ; at least max(1, n) .
work
Same type as a . A workspace array, dimension at least max(1,lwork) .
lwork
INTEGER . The size of the work array (lwork≥n) .
If lwork = -1 , then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued by xerbla .
See ?sytrf (Computes the Bunch-Kaufman factorization of a symmetric matrix.) Application Notes for the suggested value of lwork .
Output Parameters
a
The upper or lower triangular part of a is overwritten by details of the block-diagonal matrix D and the multipliers used to obtain the factor U (or L ).
work(1)
If info=0 , on exit work(1) contains the minimum value of lwork required for optimum performance. Use this lwork for subsequent runs.
ipiv
INTEGER .
Array, size at least max(1, n) . Contains details of the interchanges and the block structure of D .
If ipiv(k) > 0 , then rows and columns k and ipiv(k) were interchanged and \(D_{k, k}\) is a 1-by-1 diagonal block.
If uplo = 'U' and ipiv(k) < 0 and ipiv(k - 1) < 0 , then rows and columns k and - ipiv(k) were interchanged, rows and columns k - 1 and - ipiv(k-1) were interchanged, and \(D_{k-1:k, k-1:k}\) is a 2-by-2 diagonal block.
If uplo = 'L' and ipiv(k) < 0 and ipiv(k + 1) < 0 , then rows and columns k and -ipiv ( k ) were interchanged, rows and columns k + 1 and -ipiv ( k + 1) were interchanged, and \(D_{k:k+1, k:k+1}\) is a 2-by-2 diagonal block.
info
INTEGER .
If info = 0 , the execution is successful.
If info = -i , the i- th parameter 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.
Return Values
No return value, info is an Output Parameter.
LAPACK 95 Interface Notes
Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see LAPACK 95 Interface Conventions .
Specific details for the routine sytrf_rook interface are as follows:
a
holds the matrix A of size ( n , n )
ipiv
holds the vector of length n
uplo
must be ‘U’ or ‘L’ . The default value is ‘U’ .
Application Notes
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:
?sytrs_rook (Solves a system of linear equations with a UDU- or LDL-factored symmetric coefficient matrix.)
to solve \(A X = B\)
?sycon_rook (Estimates the reciprocal of the condition number of a symmetric matrix.) ?sycon_rook (Fortran only)
to estimate the condition number of \(A\)
?sytri_rook (Computes the inverse of a symmetric matrix using \(U*D*U^T\) or \(L*D*L^T\) bounded Bunch-Kaufman factorization.) ?sytri_rook (Fortran only)
to compute the inverse of \(A\) .
If uplo = 'U' , then \(A = U D U^{T}\) , where
U = P(n)*U(n)* ... *P(k)*U(k)*...,
k decreases from n to 1 in steps of 1 and 2.
D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D ( k ).
P ( k ) is a permutation matrix as defined by ipiv(k) .
U ( k ) is a unit upper triangular matrix, such that if the diagonal block D ( k ) is of order s ( s = 1 or 2), then
\[U(k) = \begin{pmatrix} I & v & 0 \\ 0 & I & 0 \\ \underbrace{0}_{k-s} & \underbrace{0}_{s} & \underbrace{I}_{n-k} \end{pmatrix} \begin{matrix} & k-s \\ & s \\ & n-k \\ & \end{matrix}\]
If s = 1, D ( k ) overwrites \(A(k, k)\), and v overwrites \(A(1:k-1, k)\).
If s = 2, the upper triangle of D ( k ) overwrites \(A(k-1, k-1)\), \(A(k-1, k)\) and \(A(k, k)\), and v overwrites \(A(1:k-2, k-1:k)\).
If uplo = 'L' , then \(A = L D L^{T}\) , where
L = P(1)*L(1)* ... *P(k)*L(k)*...,
k increases from 1 to n in steps of 1 and 2.
D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D ( k ).
P ( k ) is a permutation matrix as defined by ipiv(k).
L ( k ) is a unit lower triangular matrix, such that if the diagonal block D ( k ) is of order s ( s = 1 or 2), then
\[L(k) = \begin{pmatrix} I & 0 & 0 \\ 0 & I & 0 \\ \underbrace{0}_{k-1} & \underbrace{v}_{s} & \underbrace{I}_{n-k-s+1} \end{pmatrix} \begin{matrix} & k-1 \\ & s \\ & n-k+s-1 \\ & \end{matrix}\]
If s = 1, D ( k ) overwrites \(A(k, k)\), and v overwrites \(A(k+1:n, k)\).
If s = 2, the lower triangle of D ( k ) overwrites \(A(k, k)\), \(A(k+1, k)\), and \(A(k+1, k+1)\), and v overwrites \(A(k+2:n, k:k+1)\).