LAPACK  3.9.0
LAPACK: Linear Algebra PACKage

◆ cgemlqt()

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 
)

CGEMLQT

Purpose:
 CGEMLQT 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 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**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 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 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 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 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 155 of file cgemlqt.f.

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