 LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

## ◆ zupgtr()

 subroutine zupgtr ( character UPLO, integer N, complex*16, dimension( * ) AP, complex*16, dimension( * ) TAU, complex*16, dimension( ldq, * ) Q, integer LDQ, complex*16, dimension( * ) WORK, integer INFO )

ZUPGTR

Purpose:
``` ZUPGTR generates a complex unitary matrix Q which is defined as the
product of n-1 elementary reflectors H(i) of order n, as returned by
ZHPTRD using packed storage:

if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),

if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).```
Parameters
 [in] UPLO ``` UPLO is CHARACTER*1 = 'U': Upper triangular packed storage used in previous call to ZHPTRD; = 'L': Lower triangular packed storage used in previous call to ZHPTRD.``` [in] N ``` N is INTEGER The order of the matrix Q. N >= 0.``` [in] AP ``` AP is COMPLEX*16 array, dimension (N*(N+1)/2) The vectors which define the elementary reflectors, as returned by ZHPTRD.``` [in] TAU ``` TAU is COMPLEX*16 array, dimension (N-1) TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by ZHPTRD.``` [out] Q ``` Q is COMPLEX*16 array, dimension (LDQ,N) The N-by-N unitary matrix Q.``` [in] LDQ ``` LDQ is INTEGER The leading dimension of the array Q. LDQ >= max(1,N).``` [out] WORK ` WORK is COMPLEX*16 array, dimension (N-1)` [out] INFO ``` INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value```
Date
December 2016

Definition at line 116 of file zupgtr.f.

116 *
117 * -- LAPACK computational routine (version 3.7.0) --
118 * -- LAPACK is a software package provided by Univ. of Tennessee, --
119 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
120 * December 2016
121 *
122 * .. Scalar Arguments ..
123  CHARACTER uplo
124  INTEGER info, ldq, n
125 * ..
126 * .. Array Arguments ..
127  COMPLEX*16 ap( * ), q( ldq, * ), tau( * ), work( * )
128 * ..
129 *
130 * =====================================================================
131 *
132 * .. Parameters ..
133  COMPLEX*16 czero, cone
134  parameter( czero = ( 0.0d+0, 0.0d+0 ),
135  \$ cone = ( 1.0d+0, 0.0d+0 ) )
136 * ..
137 * .. Local Scalars ..
138  LOGICAL upper
139  INTEGER i, iinfo, ij, j
140 * ..
141 * .. External Functions ..
142  LOGICAL lsame
143  EXTERNAL lsame
144 * ..
145 * .. External Subroutines ..
146  EXTERNAL xerbla, zung2l, zung2r
147 * ..
148 * .. Intrinsic Functions ..
149  INTRINSIC max
150 * ..
151 * .. Executable Statements ..
152 *
153 * Test the input arguments
154 *
155  info = 0
156  upper = lsame( uplo, 'U' )
157  IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
158  info = -1
159  ELSE IF( n.LT.0 ) THEN
160  info = -2
161  ELSE IF( ldq.LT.max( 1, n ) ) THEN
162  info = -6
163  END IF
164  IF( info.NE.0 ) THEN
165  CALL xerbla( 'ZUPGTR', -info )
166  RETURN
167  END IF
168 *
169 * Quick return if possible
170 *
171  IF( n.EQ.0 )
172  \$ RETURN
173 *
174  IF( upper ) THEN
175 *
176 * Q was determined by a call to ZHPTRD with UPLO = 'U'
177 *
178 * Unpack the vectors which define the elementary reflectors and
179 * set the last row and column of Q equal to those of the unit
180 * matrix
181 *
182  ij = 2
183  DO 20 j = 1, n - 1
184  DO 10 i = 1, j - 1
185  q( i, j ) = ap( ij )
186  ij = ij + 1
187  10 CONTINUE
188  ij = ij + 2
189  q( n, j ) = czero
190  20 CONTINUE
191  DO 30 i = 1, n - 1
192  q( i, n ) = czero
193  30 CONTINUE
194  q( n, n ) = cone
195 *
196 * Generate Q(1:n-1,1:n-1)
197 *
198  CALL zung2l( n-1, n-1, n-1, q, ldq, tau, work, iinfo )
199 *
200  ELSE
201 *
202 * Q was determined by a call to ZHPTRD with UPLO = 'L'.
203 *
204 * Unpack the vectors which define the elementary reflectors and
205 * set the first row and column of Q equal to those of the unit
206 * matrix
207 *
208  q( 1, 1 ) = cone
209  DO 40 i = 2, n
210  q( i, 1 ) = czero
211  40 CONTINUE
212  ij = 3
213  DO 60 j = 2, n
214  q( 1, j ) = czero
215  DO 50 i = j + 1, n
216  q( i, j ) = ap( ij )
217  ij = ij + 1
218  50 CONTINUE
219  ij = ij + 2
220  60 CONTINUE
221  IF( n.GT.1 ) THEN
222 *
223 * Generate Q(2:n,2:n)
224 *
225  CALL zung2r( n-1, n-1, n-1, q( 2, 2 ), ldq, tau, work,
226  \$ iinfo )
227  END IF
228  END IF
229  RETURN
230 *
231 * End of ZUPGTR
232 *
subroutine zung2r(M, N, K, A, LDA, TAU, WORK, INFO)
ZUNG2R
Definition: zung2r.f:116
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
subroutine zung2l(M, N, K, A, LDA, TAU, WORK, INFO)
ZUNG2L generates all or part of the unitary matrix Q from a QL factorization determined by cgeqlf (un...
Definition: zung2l.f:116
Here is the call graph for this function:
Here is the caller graph for this function: