3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZSYCONV + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zsyconv.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zsyconv.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zsyconv.f">
21 * SUBROUTINE ZSYCONV( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
23 * .. Scalar Arguments ..
25 * INTEGER INFO, LDA, N
27 * .. Array Arguments ..
29 * COMPLEX*16 A( LDA, * ), E( * )
38 *> ZSYCONV converts A given by ZHETRF into L and D or vice-versa.
39 *> Get nondiagonal elements of D (returned in workspace) and
40 *> apply or reverse permutation done in TRF.
48 *> UPLO is CHARACTER*1
49 *> Specifies whether the details of the factorization are stored
50 *> as an upper or lower triangular matrix.
51 *> = 'U': Upper triangular, form is A = U*D*U**T;
52 *> = 'L': Lower triangular, form is A = L*D*L**T.
65 *> The order of the matrix A. N >= 0.
70 *> A is COMPLEX*16 array, dimension (LDA,N)
71 *> The block diagonal matrix D and the multipliers used to
72 *> obtain the factor U or L as computed by ZSYTRF.
78 *> The leading dimension of the array A. LDA >= max(1,N).
83 *> IPIV is INTEGER array, dimension (N)
84 *> Details of the interchanges and the block structure of D
85 *> as determined by ZSYTRF.
90 *> E is COMPLEX*16 array, dimension (N)
91 *> E stores the supdiagonal/subdiagonal of the symmetric 1-by-1
92 *> or 2-by-2 block diagonal matrix D in LDLT.
98 *> = 0: successful exit
99 *> < 0: if INFO = -i, the i-th argument had an illegal value
105 *> \author Univ. of Tennessee
106 *> \author Univ. of California Berkeley
107 *> \author Univ. of Colorado Denver
110 *> \date November 2015
112 *> \ingroup complex16SYcomputational
114 * =====================================================================
115 SUBROUTINE ZSYCONV( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
117 * -- LAPACK computational routine (version 3.6.0) --
118 * -- LAPACK is a software package provided by Univ. of Tennessee, --
119 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
122 * .. Scalar Arguments ..
126 * .. Array Arguments ..
128 COMPLEX*16 A( LDA, * ), E( * )
131 * =====================================================================
135 PARAMETER ( ZERO = (0.0D+0,0.0D+0) )
137 * .. External Functions ..
141 * .. External Subroutines ..
143 * .. Local Scalars ..
144 LOGICAL UPPER, CONVERT
148 * .. Executable Statements ..
151 UPPER = LSAME( UPLO, 'U' )
152 CONVERT = LSAME( WAY, 'C' )
153 IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
155 ELSE IF( .NOT.CONVERT .AND. .NOT.LSAME( WAY, 'R' ) ) THEN
157 ELSE IF( N.LT.0 ) THEN
159 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
164 CALL XERBLA( 'ZSYCONV', -INFO )
168 * Quick return if possible
179 * Convert A (A is upper)
185 DO WHILE ( I .GT. 1 )
186 IF( IPIV(I) .LT. 0 ) THEN
197 * Convert PERMUTATIONS
200 DO WHILE ( I .GE. 1 )
201 IF( IPIV(I) .GT. 0) THEN
226 * Revert A (A is upper)
228 * Revert PERMUTATIONS
231 DO WHILE ( I .LE. N )
232 IF( IPIV(I) .GT. 0 ) THEN
258 DO WHILE ( I .GT. 1 )
259 IF( IPIV(I) .LT. 0 ) THEN
273 * Convert A (A is lower)
279 DO WHILE ( I .LE. N )
280 IF( I.LT.N .AND. IPIV(I) .LT. 0 ) THEN
291 * Convert PERMUTATIONS
294 DO WHILE ( I .LE. N )
295 IF( IPIV(I) .GT. 0 ) THEN
320 * Revert A (A is lower)
322 * Revert PERMUTATIONS
325 DO WHILE ( I .GE. 1 )
326 IF( IPIV(I) .GT. 0 ) THEN
352 DO WHILE ( I .LE. N-1 )
353 IF( IPIV(I) .LT. 0 ) THEN