LAPACK  3.7.0
LAPACK: Linear Algebra PACKage
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 
)
Purpose:

CLASWLQ computes a blocked Short-Wide LQ factorization of a M-by-N matrix A, where N >= M: A = L * Q

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 bleow 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 152 of file claswlq.f.

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

Here is the call graph for this function:

Here is the caller graph for this function: