LAPACK  3.9.0
LAPACK: Linear Algebra PACKage

◆ claswlq()

subroutine claswlq ( integer  M,
integer  N,
integer  MB,
integer  NB,
complex, dimension( lda, * )  A,
integer  LDA,
complex, dimension( ldt, *)  T,
integer  LDT,
complex, dimension( * )  WORK,
integer  LWORK,
integer  INFO 
)

CLASWLQ

Purpose:
 CLASWLQ computes a blocked Tall-Skinny LQ factorization of
 a complex M-by-N matrix A for M <= N:

    A = ( L 0 ) *  Q,

 where:

    Q is a n-by-N orthogonal matrix, stored on exit in an implicit
    form in the elements above the digonal of the array A and in
    the elemenst of the array T;
    L is an lower-triangular M-by-M matrix stored on exit in
    the elements on and below the diagonal of the array A.
    0 is a M-by-(N-M) zero matrix, if M < N, and is not stored.
Parameters
[in]M
          M is INTEGER
          The number of rows of the matrix A.  M >= 0.
[in]N
          N is INTEGER
          The number of columns of the matrix A.  N >= M >= 0.
[in]MB
          MB is INTEGER
          The row block size to be used in the blocked QR.
          M >= MB >= 1
[in]NB
          NB is INTEGER
          The column block size to be used in the blocked QR.
          NB > M.
[in,out]A
          A is COMPLEX array, dimension (LDA,N)
          On entry, the M-by-N matrix A.
          On exit, the elements on and below the diagonal
          of the array contain the N-by-N lower triangular matrix L;
          the elements above the diagonal represent Q by the rows
          of blocked V (see Further Details).
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A.  LDA >= max(1,M).
[out]T
          T is COMPLEX array,
          dimension (LDT, N * Number_of_row_blocks)
          where Number_of_row_blocks = CEIL((N-M)/(NB-M))
          The blocked upper triangular block reflectors stored in compact form
          as a sequence of upper triangular blocks.
          See Further Details below.
[in]LDT
          LDT is INTEGER
          The leading dimension of the array T.  LDT >= MB.
[out]WORK
         (workspace) COMPLEX array, dimension (MAX(1,LWORK))
[in]LWORK
          The dimension of the array WORK.  LWORK >= MB*M.
          If LWORK = -1, then a workspace query is assumed; the routine
          only calculates the optimal size of the WORK array, returns
          this value as the first entry of the WORK array, and no error
          message related to LWORK is issued by XERBLA.
[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.
Further Details:
 Short-Wide LQ (SWLQ) performs LQ by a sequence of orthogonal transformations,
 representing Q as a product of other orthogonal matrices
   Q = Q(1) * Q(2) * . . . * Q(k)
 where each Q(i) zeros out upper diagonal entries of a block of NB rows of A:
   Q(1) zeros out the upper diagonal entries of rows 1:NB of A
   Q(2) zeros out the bottom MB-N rows of rows [1:M,NB+1:2*NB-M] of A
   Q(3) zeros out the bottom MB-N rows of rows [1:M,2*NB-M+1:3*NB-2*M] of A
   . . .

 Q(1) is computed by GELQT, which represents Q(1) by Householder vectors
 stored under the diagonal of rows 1:MB of A, and by upper triangular
 block reflectors, stored in array T(1:LDT,1:N).
 For more information see Further Details in GELQT.

 Q(i) for i>1 is computed by TPLQT, which represents Q(i) by Householder vectors
 stored in columns [(i-1)*(NB-M)+M+1:i*(NB-M)+M] of A, and by upper triangular
 block reflectors, stored in array T(1:LDT,(i-1)*M+1:i*M).
 The last Q(k) may use fewer rows.
 For more information see Further Details in TPQRT.

 For more details of the overall algorithm, see the description of
 Sequential TSQR in Section 2.2 of [1].

 [1] “Communication-Optimal Parallel and Sequential QR and LU Factorizations,”
     J. Demmel, L. Grigori, M. Hoemmen, J. Langou,
     SIAM J. Sci. Comput, vol. 34, no. 1, 2012

Definition at line 164 of file claswlq.f.

164 *
165 * -- LAPACK computational routine (version 3.9.0) --
166 * -- LAPACK is a software package provided by Univ. of Tennessee, --
167 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
168 * June 2017
169 *
170 * .. Scalar Arguments ..
171  INTEGER INFO, LDA, M, N, MB, NB, LWORK, LDT
172 * ..
173 * .. Array Arguments ..
174  COMPLEX A( LDA, * ), WORK( * ), T( LDT, *)
175 * ..
176 *
177 * =====================================================================
178 *
179 * ..
180 * .. Local Scalars ..
181  LOGICAL LQUERY
182  INTEGER I, II, KK, CTR
183 * ..
184 * .. EXTERNAL FUNCTIONS ..
185  LOGICAL LSAME
186  EXTERNAL lsame
187 * .. EXTERNAL SUBROUTINES ..
188  EXTERNAL cgelqt, ctplqt, xerbla
189 * .. INTRINSIC FUNCTIONS ..
190  INTRINSIC max, min, mod
191 * ..
192 * .. EXTERNAL FUNCTIONS ..
193  INTEGER ILAENV
194  EXTERNAL ilaenv
195 * ..
196 * .. EXECUTABLE STATEMENTS ..
197 *
198 * TEST THE INPUT ARGUMENTS
199 *
200  info = 0
201 *
202  lquery = ( lwork.EQ.-1 )
203 *
204  IF( m.LT.0 ) THEN
205  info = -1
206  ELSE IF( n.LT.0 .OR. n.LT.m ) THEN
207  info = -2
208  ELSE IF( mb.LT.1 .OR. ( mb.GT.m .AND. m.GT.0 )) THEN
209  info = -3
210  ELSE IF( nb.LE.m ) THEN
211  info = -4
212  ELSE IF( lda.LT.max( 1, m ) ) THEN
213  info = -5
214  ELSE IF( ldt.LT.mb ) THEN
215  info = -8
216  ELSE IF( ( lwork.LT.m*mb) .AND. (.NOT.lquery) ) THEN
217  info = -10
218  END IF
219  IF( info.EQ.0) THEN
220  work(1) = mb*m
221  END IF
222 *
223  IF( info.NE.0 ) THEN
224  CALL xerbla( 'CLASWLQ', -info )
225  RETURN
226  ELSE IF (lquery) THEN
227  RETURN
228  END IF
229 *
230 * Quick return if possible
231 *
232  IF( min(m,n).EQ.0 ) THEN
233  RETURN
234  END IF
235 *
236 * The LQ Decomposition
237 *
238  IF((m.GE.n).OR.(nb.LE.m).OR.(nb.GE.n)) THEN
239  CALL cgelqt( m, n, mb, a, lda, t, ldt, work, info)
240  RETURN
241  END IF
242 *
243  kk = mod((n-m),(nb-m))
244  ii=n-kk+1
245 *
246 * Compute the LQ factorization of the first block A(1:M,1:NB)
247 *
248  CALL cgelqt( m, nb, mb, a(1,1), lda, t, ldt, work, info)
249  ctr = 1
250 *
251  DO i = nb+1, ii-nb+m , (nb-m)
252 *
253 * Compute the QR factorization of the current block A(1:M,I:I+NB-M)
254 *
255  CALL ctplqt( m, nb-m, 0, mb, a(1,1), lda, a( 1, i ),
256  $ lda, t(1,ctr*m+1),
257  $ ldt, work, info )
258  ctr = ctr + 1
259  END DO
260 *
261 * Compute the QR factorization of the last block A(1:M,II:N)
262 *
263  IF (ii.LE.n) THEN
264  CALL ctplqt( m, kk, 0, mb, a(1,1), lda, a( 1, ii ),
265  $ lda, t(1,ctr*m+1), ldt,
266  $ work, info )
267  END IF
268 *
269  work( 1 ) = m * mb
270  RETURN
271 *
272 * End of CLASWLQ
273 *
Here is the call graph for this function:
Here is the caller graph for this function:
ctplqt
subroutine ctplqt(M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK, INFO)
CTPLQT
Definition: ctplqt.f:176
cgelqt
subroutine cgelqt(M, N, MB, A, LDA, T, LDT, WORK, INFO)
CGELQT
Definition: cgelqt.f:126
xerbla
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
lsame
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
ilaenv
integer function ilaenv(ISPEC, NAME, OPTS, N1, N2, N3, N4)
ILAENV
Definition: tstiee.f:83