165 SUBROUTINE claswlq( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
173 INTEGER INFO, LDA, M, N, MB, NB, LWORK, LDT
176 COMPLEX A( LDA, * ), WORK( * ), T( LDT, *)
184 INTEGER I, II, KK, CTR
190 EXTERNAL lsame, ilaenv, sroundup_lwork
194 INTRINSIC max, min, mod
202 lquery = ( lwork.EQ.-1 )
206 ELSE IF( n.LT.0 .OR. n.LT.m )
THEN
208 ELSE IF( mb.LT.1 .OR. ( mb.GT.m .AND. m.GT.0 ))
THEN
210 ELSE IF( nb.LE.0 )
THEN
212 ELSE IF( lda.LT.max( 1, m ) )
THEN
214 ELSE IF( ldt.LT.mb )
THEN
216 ELSE IF( ( lwork.LT.m*mb) .AND. (.NOT.lquery) )
THEN
220 work(1) = sroundup_lwork(mb*m)
224 CALL xerbla(
'CLASWLQ', -info )
226 ELSE IF (lquery)
THEN
232 IF( min(m,n).EQ.0 )
THEN
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)
243 kk = mod((n-m),(nb-m))
248 CALL cgelqt( m, nb, mb, a(1,1), lda, t, ldt, work, info)
251 DO i = nb+1, ii-nb+m , (nb-m)
255 CALL ctplqt( m, nb-m, 0, mb, a(1,1), lda, a( 1, i ),
264 CALL ctplqt( m, kk, 0, mb, a(1,1), lda, a( 1, ii ),
265 $ lda, t(1,ctr*m+1), ldt,
269 work( 1 ) = sroundup_lwork(m * mb)
subroutine xerbla(srname, info)
subroutine cgelqt(m, n, mb, a, lda, t, ldt, work, info)
CGELQT
subroutine claswlq(m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
CLASWLQ
subroutine ctplqt(m, n, l, mb, a, lda, b, ldb, t, ldt, work, info)
CTPLQT