|
|
◆ zsytrf()
| void zsytrf |
( |
char |
uplo, |
|
|
int |
n, |
|
|
int |
lda, |
|
|
doublecomplex |
a[], |
|
|
int |
ipiv[], |
|
|
doublecomplex |
work[], |
|
|
int |
lwork, |
|
|
int * |
info |
|
) |
| |
UDUT or LDLT factorization of a complex symmetric matrix
- Purpose
- This routine computes the factorization of a complex symmetric matrix A using the Bunch-Kaufman diagonal pivoting method. The form of the factorization is
A = U*D*U^T or A = L*D*L^T
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1 x 1 and 2 x 2 diagonal blocks.
This is the blocked version of the algorithm, calling Level 3 BLAS.
- Parameters
-
| [in] | uplo | = 'U': Upper triangle of A is stored.
= 'L': Lower triangle of A is stored. |
| [in] | n | Order of the matrix A. (n >= 0) (If n = 0, returns without computation) |
| [in] | lda | Leading dimension of the two dimensional array a[][]. (lda >= max(1, n)) |
| [in,out] | a[][] | Array a[la][lda] (la >= n)
[in] n x n symmetric matrix A. The upper or lower triangular part is to be referenced in accordance with uplo.
[out] The block diagonal matrix D and the multipliers used to obtain the factor U or L (see below for further details). |
| [out] | ipiv[] | Array ipiv[lipiv] (lipiv >= n)
Details of the interchanges and the block structure of D.
If ipiv[k-1] > 0, then rows and columns k and ipiv[k-1] were interchanged, and k-th diagonal of D is a 1 x 1 diagonal block.
If uplo = 'U' and ipiv[k-1] = ipiv[k-2] < 0, then rows and columns k-1 and -ipiv[k-1] were interchanged and (k-1)-th diagonal of D is a 2 x 2 diagonal block.
If uplo = 'L' and ipiv[k-1] = ipiv[k] < 0, then rows and columns k+1 and -ipiv[k-1] were interchanged and k-th diagonal of D is a 2 x 2 diagonal block. |
| [out] | work[] | Array work[lwork]
Work array
On exit, if info = 0, work[0] returns the optimal lwork. |
| [in] | lwork | The length of work[] (lwork >= 1)
For best performance, lwork >= n*nb, where nb is the optimal blocksize.
If lwork = -1, then a workspace query is assumed. The routine only calculates the optimal size of the work array and returns the value in work[0] |
| [out] | info | = 0: Successful exit
= -1: The argument uplo had an illegal value (uplo != 'U' nor 'L')
= -2: The argument n had an illegal value (n < 0)
= -3: The argument lda had an illegal value (lda < max(1, n))
= -7: The argument lwork had an illegal value (lwork too small)
= i > 0: The i-th diagonal element of D is exactly zero. The factorization has been completed, but the block diagonal matrix D is exactly singular, and division by zero will occur if it is used to solve a system of equations. |
- Further Details
- If uplo = 'U', then A = U*D*U^T, where
U = P(n)*U(n)* ... *P(k)U(k)* ...,
i.e., U is a product of terms P(k)*U(k), where k decreases from n to 1 in steps of 1 or 2, and D is a block diagonal matrix with 1 x 1 and 2 x 2 diagonal blocks D(k). P(k) is a permutation matrix as defined by ipiv[k-1], and 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 ( I v 0 ) k-s
U(k) = ( 0 I 0 ) s
( 0 0 I ) n-k
k-s s n-k
If s = 1, D(k) overwrites a[k-1][k-1], and v overwrites a[k-1][0 to k-2].
If s = 2, the upper triangle of D(k) overwrites a[k-2][k-2], a[k-1][k-2], and a[k-1][k-1], and v overwrites a[k-2 to k-1][0 to k-3].
If uplo = 'L', then A = L*D*L^T, where L = P(1)*L(1)* ... *P(k)*L(k)* ...,
i.e., L is a product of terms P(k)*L(k), where k increases from 1 to n in steps of 1 or 2, and D is a block diagonal matrix with 1 x 1 and 2 x 2 diagonal blocks D(k). P(k) is a permutation matrix as defined by ipiv[k-1], and 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 ( I 0 0 ) k-1
L(k) = ( 0 I 0 ) s
( 0 v I ) n-k-s+1
k-1 s n-k-s+1
If s = 1, D(k) overwrites a[k-1][k-1], and v overwrites a[k-1][k to n-1].
If s = 2, the lower triangle of D(k) overwrites a[k-1][k-1], a[k][k-1], and a[k][k], and v overwrites a[k-1 to k][k+1 to n-1].
- Reference
- LAPACK
|