171 SUBROUTINE cgemlq( SIDE, TRANS, M, N, K, A, LDA, T, TSIZE,
172 $ C, LDC, WORK, LWORK, INFO )
179 CHARACTER SIDE, TRANS
180 INTEGER INFO, LDA, M, N, K, TSIZE, LWORK, LDC
183 COMPLEX A( LDA, * ), T( * ), C( LDC, * ), WORK( * )
190 LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY
191 INTEGER MB, NB, LW, NBLCKS, MN, MINMNK, LWMIN
196 EXTERNAL lsame, sroundup_lwork
202 INTRINSIC int, max, min, mod
208 lquery = ( lwork.EQ.-1 )
209 notran = lsame( trans,
'N' )
210 tran = lsame( trans,
'C' )
211 left = lsame( side,
'L' )
212 right = lsame( side,
'R' )
224 minmnk = min( m, n, k )
225 IF( minmnk.EQ.0 )
THEN
231 IF( ( nb.GT.k ) .AND. ( mn.GT.k ) )
THEN
232 IF( mod( mn - k, nb - k ) .EQ. 0 )
THEN
233 nblcks = ( mn - k ) / ( nb - k )
235 nblcks = ( mn - k ) / ( nb - k ) + 1
242 IF( .NOT.left .AND. .NOT.right )
THEN
244 ELSE IF( .NOT.tran .AND. .NOT.notran )
THEN
246 ELSE IF( m.LT.0 )
THEN
248 ELSE IF( n.LT.0 )
THEN
250 ELSE IF( k.LT.0 .OR. k.GT.mn )
THEN
252 ELSE IF( lda.LT.max( 1, k ) )
THEN
254 ELSE IF( tsize.LT.5 )
THEN
256 ELSE IF( ldc.LT.max( 1, m ) )
THEN
258 ELSE IF( ( lwork.LT.lwmin ) .AND. ( .NOT.lquery ) )
THEN
263 work( 1 ) = sroundup_lwork( lwmin )
267 CALL xerbla(
'CGEMLQ', -info )
269 ELSE IF( lquery )
THEN
275 IF( minmnk.EQ.0 )
THEN
279 IF( ( left .AND. m.LE.k ) .OR. ( right .AND. n.LE.k )
280 $ .OR. ( nb.LE.k ) .OR. ( nb.GE.max( m, n, k ) ) )
THEN
281 CALL cgemlqt( side, trans, m, n, k, mb, a, lda,
282 $ t( 6 ), mb, c, ldc, work, info )
284 CALL clamswlq( side, trans, m, n, k, mb, nb, a, lda, t( 6 ),
285 $ mb, c, ldc, work, lwork, info )
288 work( 1 ) = sroundup_lwork( lwmin )
subroutine cgemlq(side, trans, m, n, k, a, lda, t, tsize, c, ldc, work, lwork, info)
CGEMLQ
subroutine cgemlqt(side, trans, m, n, k, mb, v, ldv, t, ldt, c, ldc, work, info)
CGEMLQT
subroutine clamswlq(side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)
CLAMSWLQ