1ZHESV(1) LAPACK driver routine (version 3.1) ZHESV(1)
2
3
4
6 ZHESV - the solution to a complex system of linear equations A * X =
7 B,
8
10 SUBROUTINE ZHESV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK, LWORK,
11 INFO )
12
13 CHARACTER UPLO
14
15 INTEGER INFO, LDA, LDB, LWORK, N, NRHS
16
17 INTEGER IPIV( * )
18
19 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
20
22 ZHESV computes the solution to a complex system of linear equations
23 A * X = B, where A is an N-by-N Hermitian matrix and X and B are N-
24 by-NRHS matrices.
25
26 The diagonal pivoting method is used to factor A as
27 A = U * D * U**H, if UPLO = 'U', or
28 A = L * D * L**H, if UPLO = 'L',
29 where U (or L) is a product of permutation and unit upper (lower) tri‐
30 angular matrices, and D is Hermitian and block diagonal with 1-by-1 and
31 2-by-2 diagonal blocks. The factored form of A is then used to solve
32 the system of equations A * X = B.
33
34
36 UPLO (input) CHARACTER*1
37 = 'U': Upper triangle of A is stored;
38 = 'L': Lower triangle of A is stored.
39
40 N (input) INTEGER
41 The number of linear equations, i.e., the order of the matrix
42 A. N >= 0.
43
44 NRHS (input) INTEGER
45 The number of right hand sides, i.e., the number of columns of
46 the matrix B. NRHS >= 0.
47
48 A (input/output) COMPLEX*16 array, dimension (LDA,N)
49 On entry, the Hermitian matrix A. If UPLO = 'U', the leading
50 N-by-N upper triangular part of A contains the upper triangular
51 part of the matrix A, and the strictly lower triangular part of
52 A is not referenced. If UPLO = 'L', the leading N-by-N lower
53 triangular part of A contains the lower triangular part of the
54 matrix A, and the strictly upper triangular part of A is not
55 referenced.
56
57 On exit, if INFO = 0, the block diagonal matrix D and the mul‐
58 tipliers used to obtain the factor U or L from the factoriza‐
59 tion A = U*D*U**H or A = L*D*L**H as computed by ZHETRF.
60
61 LDA (input) INTEGER
62 The leading dimension of the array A. LDA >= max(1,N).
63
64 IPIV (output) INTEGER array, dimension (N)
65 Details of the interchanges and the block structure of D, as
66 determined by ZHETRF. If IPIV(k) > 0, then rows and columns k
67 and IPIV(k) were interchanged, and D(k,k) is a 1-by-1 diagonal
68 block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows
69 and columns k-1 and -IPIV(k) were interchanged and
70 D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
71 IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k)
72 were interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal
73 block.
74
75 B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
76 On entry, the N-by-NRHS right hand side matrix B. On exit, if
77 INFO = 0, the N-by-NRHS solution matrix X.
78
79 LDB (input) INTEGER
80 The leading dimension of the array B. LDB >= max(1,N).
81
82 WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
83 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
84
85 LWORK (input) INTEGER
86 The length of WORK. LWORK >= 1, and for best performance LWORK
87 >= max(1,N*NB), where NB is the optimal blocksize for ZHETRF.
88
89 If LWORK = -1, then a workspace query is assumed; the routine
90 only calculates the optimal size of the WORK array, returns
91 this value as the first entry of the WORK array, and no error
92 message related to LWORK is issued by XERBLA.
93
94 INFO (output) INTEGER
95 = 0: successful exit
96 < 0: if INFO = -i, the i-th argument had an illegal value
97 > 0: if INFO = i, D(i,i) is exactly zero. The factorization
98 has been completed, but the block diagonal matrix D is exactly
99 singular, so the solution could not be computed.
100
101
102
103 LAPACK driver routine (version 3.N1o)vember 2006 ZHESV(1)