LAPACK  3.7.0
LAPACK: Linear Algebra PACKage
subroutine cgemlqt ( character  SIDE,
character  TRANS,
integer  M,
integer  N,
integer  K,
integer  MB,
complex, dimension( ldv, * )  V,
integer  LDV,
complex, dimension( ldt, * )  T,
integer  LDT,
complex, dimension( ldc, * )  C,
integer  LDC,
complex, dimension( * )  WORK,
integer  INFO 
)
Purpose:

CGEMQRT overwrites the general real M-by-N matrix C with

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

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

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

generated using the compact WY representation as returned by CGELQT.

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**C from the Left;
          = 'R': apply Q or Q**C from the Right.
[in]TRANS
          TRANS is CHARACTER*1
          = 'N':  No transpose, apply Q;
          = 'C':  Transpose, apply Q**C.
[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 array, dimension (LDV,K)
          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.
          If SIDE = 'L', LDA >= max(1,M);
          if SIDE = 'R', LDA >= max(1,N).
[in]T
          T is COMPLEX array, dimension (LDT,K)
          The upper triangular factors of the block reflectors
          as returned by DGELQT, stored as a MB-by-M matrix.
[in]LDT
          LDT is INTEGER
          The leading dimension of the array T.  LDT >= MB.
[in,out]C
          C is COMPLEX array, dimension (LDC,N)
          On entry, the M-by-N matrix C.
          On exit, C is overwritten by Q C, Q**C C, C Q**C or C Q.
[in]LDC
          LDC is INTEGER
          The leading dimension of the array C. LDC >= max(1,M).
[out]WORK
          WORK is COMPLEX 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
December 2016

Definition at line 153 of file cgemlqt.f.

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

Here is the call graph for this function:

Here is the caller graph for this function: