LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ zgemlqt()

subroutine zgemlqt ( character  SIDE,
character  TRANS,
integer  M,
integer  N,
integer  K,
integer  MB,
complex*16, dimension( ldv, * )  V,
integer  LDV,
complex*16, dimension( ldt, * )  T,
integer  LDT,
complex*16, dimension( ldc, * )  C,
integer  LDC,
complex*16, dimension( * )  WORK,
integer  INFO 
)

ZGEMLQT

Download DGEMLQT + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 ZGEMLQT overwrites the general real M-by-N matrix C with

                 SIDE = 'L'     SIDE = 'R'
 TRANS = 'N':      Q C            C Q
 TRANS = 'C':   Q**H C            C Q**H

 where Q is a complex orthogonal matrix defined as the product of K
 elementary reflectors:

       Q = H(1) H(2) . . . H(K) = I - V T V**H

 generated using the compact WY representation as returned by ZGELQT.

 Q is of order M if SIDE = 'L' and of order N  if SIDE = 'R'.
Parameters
[in]SIDE
          SIDE is CHARACTER*1
          = 'L': apply Q or Q**H from the Left;
          = 'R': apply Q or Q**H from the Right.
[in]TRANS
          TRANS is CHARACTER*1
          = 'N':  No transpose, apply Q;
          = 'C':  Transpose, apply Q**H.
[in]M
          M is INTEGER
          The number of rows of the matrix C. M >= 0.
[in]N
          N is INTEGER
          The number of columns of the matrix C. N >= 0.
[in]K
          K is INTEGER
          The number of elementary reflectors whose product defines
          the matrix Q.
          If SIDE = 'L', M >= K >= 0;
          if SIDE = 'R', N >= K >= 0.
[in]MB
          MB is INTEGER
          The block size used for the storage of T.  K >= MB >= 1.
          This must be the same value of MB used to generate T
          in DGELQT.
[in]V
          V is COMPLEX*16 array, dimension
                               (LDV,M) if SIDE = 'L',
                               (LDV,N) if SIDE = 'R'
          The i-th row must contain the vector which defines the
          elementary reflector H(i), for i = 1,2,...,k, as returned by
          DGELQT in the first K rows of its array argument A.
[in]LDV
          LDV is INTEGER
          The leading dimension of the array V. LDV >= max(1,K).
[in]T
          T is COMPLEX*16 array, dimension (LDT,K)
          The upper triangular factors of the block reflectors
          as returned by DGELQT, stored as a MB-by-K matrix.
[in]LDT
          LDT is INTEGER
          The leading dimension of the array T.  LDT >= MB.
[in,out]C
          C is COMPLEX*16 array, dimension (LDC,N)
          On entry, the M-by-N matrix C.
          On exit, C is overwritten by Q C, Q**H C, C Q**H or C Q.
[in]LDC
          LDC is INTEGER
          The leading dimension of the array C. LDC >= max(1,M).
[out]WORK
          WORK is COMPLEX*16 array. The dimension of
          WORK is N*MB if SIDE = 'L', or  M*MB if SIDE = 'R'.
[out]INFO
          INFO is INTEGER
          = 0:  successful exit
          < 0:  if INFO = -i, the i-th argument had an illegal value
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2017

Definition at line 170 of file zgemlqt.f.

170 *
171 * -- LAPACK computational routine (version 3.8.0) --
172 * -- LAPACK is a software package provided by Univ. of Tennessee, --
173 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
174 * November 2017
175 *
176 * .. Scalar Arguments ..
177  CHARACTER side, trans
178  INTEGER info, k, ldv, ldc, m, n, mb, ldt
179 * ..
180 * .. Array Arguments ..
181  COMPLEX*16 v( ldv, * ), c( ldc, * ), t( ldt, * ), work( * )
182 * ..
183 *
184 * =====================================================================
185 *
186 * ..
187 * .. Local Scalars ..
188  LOGICAL left, right, tran, notran
189  INTEGER i, ib, ldwork, kf
190 * ..
191 * .. External Functions ..
192  LOGICAL lsame
193  EXTERNAL lsame
194 * ..
195 * .. External Subroutines ..
196  EXTERNAL xerbla, zlarfb
197 * ..
198 * .. Intrinsic Functions ..
199  INTRINSIC max, min
200 * ..
201 * .. Executable Statements ..
202 *
203 * .. Test the input arguments ..
204 *
205  info = 0
206  left = lsame( side, 'L' )
207  right = lsame( side, 'R' )
208  tran = lsame( trans, 'C' )
209  notran = lsame( trans, 'N' )
210 *
211  IF( left ) THEN
212  ldwork = max( 1, n )
213  ELSE IF ( right ) THEN
214  ldwork = max( 1, m )
215  END IF
216  IF( .NOT.left .AND. .NOT.right ) THEN
217  info = -1
218  ELSE IF( .NOT.tran .AND. .NOT.notran ) THEN
219  info = -2
220  ELSE IF( m.LT.0 ) THEN
221  info = -3
222  ELSE IF( n.LT.0 ) THEN
223  info = -4
224  ELSE IF( k.LT.0) THEN
225  info = -5
226  ELSE IF( mb.LT.1 .OR. (mb.GT.k .AND. k.GT.0)) THEN
227  info = -6
228  ELSE IF( ldv.LT.max( 1, k ) ) THEN
229  info = -8
230  ELSE IF( ldt.LT.mb ) THEN
231  info = -10
232  ELSE IF( ldc.LT.max( 1, m ) ) THEN
233  info = -12
234  END IF
235 *
236  IF( info.NE.0 ) THEN
237  CALL xerbla( 'ZGEMLQT', -info )
238  RETURN
239  END IF
240 *
241 * .. Quick return if possible ..
242 *
243  IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 ) RETURN
244 *
245  IF( left .AND. notran ) THEN
246 *
247  DO i = 1, k, mb
248  ib = min( mb, k-i+1 )
249  CALL zlarfb( 'L', 'C', 'F', 'R', m-i+1, n, ib,
250  $ v( i, i ), ldv, t( 1, i ), ldt,
251  $ c( i, 1 ), ldc, work, ldwork )
252  END DO
253 *
254  ELSE IF( right .AND. tran ) THEN
255 *
256  DO i = 1, k, mb
257  ib = min( mb, k-i+1 )
258  CALL zlarfb( 'R', 'N', 'F', 'R', m, n-i+1, ib,
259  $ v( i, i ), ldv, t( 1, i ), ldt,
260  $ c( 1, i ), ldc, work, ldwork )
261  END DO
262 *
263  ELSE IF( left .AND. tran ) THEN
264 *
265  kf = ((k-1)/mb)*mb+1
266  DO i = kf, 1, -mb
267  ib = min( mb, k-i+1 )
268  CALL zlarfb( 'L', 'N', 'F', 'R', m-i+1, n, ib,
269  $ v( i, i ), ldv, t( 1, i ), ldt,
270  $ c( i, 1 ), ldc, work, ldwork )
271  END DO
272 *
273  ELSE IF( right .AND. notran ) THEN
274 *
275  kf = ((k-1)/mb)*mb+1
276  DO i = kf, 1, -mb
277  ib = min( mb, k-i+1 )
278  CALL zlarfb( 'R', 'C', 'F', 'R', m, n-i+1, ib,
279  $ v( i, i ), ldv, t( 1, i ), ldt,
280  $ c( 1, i ), ldc, work, ldwork )
281  END DO
282 *
283  END IF
284 *
285  RETURN
286 *
287 * End of ZGEMLQT
288 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
subroutine zlarfb(SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV, T, LDT, C, LDC, WORK, LDWORK)
ZLARFB applies a block reflector or its conjugate-transpose to a general rectangular matrix...
Definition: zlarfb.f:197
Here is the call graph for this function:
Here is the caller graph for this function: