170 SUBROUTINE sgemlq( SIDE, TRANS, M, N, K, A, LDA, T, TSIZE,
171 $ C, LDC, WORK, LWORK, INFO )
178 CHARACTER SIDE, TRANS
179 INTEGER INFO, LDA, M, N, K, TSIZE, LWORK, LDC
182 REAL A( LDA, * ), T( * ), C( LDC, * ), WORK( * )
189 LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY
190 INTEGER MB, NB, LW, NBLCKS, MN
198 EXTERNAL sroundup_lwork
204 INTRINSIC int, max, min, mod
211 notran = lsame( trans,
'N' )
212 tran = lsame( trans,
'T' )
213 left = lsame( side,
'L' )
214 right = lsame( side,
'R' )
226 IF( ( nb.GT.k ) .AND. ( mn.GT.k ) )
THEN
227 IF( mod( mn - k, nb - k ) .EQ. 0 )
THEN
228 nblcks = ( mn - k ) / ( nb - k )
230 nblcks = ( mn - k ) / ( nb - k ) + 1
237 IF( .NOT.left .AND. .NOT.right )
THEN
239 ELSE IF( .NOT.tran .AND. .NOT.notran )
THEN
241 ELSE IF( m.LT.0 )
THEN
243 ELSE IF( n.LT.0 )
THEN
245 ELSE IF( k.LT.0 .OR. k.GT.mn )
THEN
247 ELSE IF( lda.LT.max( 1, k ) )
THEN
249 ELSE IF( tsize.LT.5 )
THEN
251 ELSE IF( ldc.LT.max( 1, m ) )
THEN
253 ELSE IF( ( lwork.LT.max( 1, lw ) ) .AND. ( .NOT.lquery ) )
THEN
258 work( 1 ) = sroundup_lwork( lw )
262 CALL xerbla(
'SGEMLQ', -info )
264 ELSE IF( lquery )
THEN
270 IF( min( m, n, k ).EQ.0 )
THEN
274 IF( ( left .AND. m.LE.k ) .OR. ( right .AND. n.LE.k )
275 $ .OR. ( nb.LE.k ) .OR. ( nb.GE.max( m, n, k ) ) )
THEN
276 CALL sgemlqt( side, trans, m, n, k, mb, a, lda,
277 $ t( 6 ), mb, c, ldc, work, info )
279 CALL slamswlq( side, trans, m, n, k, mb, nb, a, lda, t( 6 ),
280 $ mb, c, ldc, work, lwork, info )
283 work( 1 ) = sroundup_lwork( lw )
subroutine xerbla(srname, info)
subroutine sgemlq(side, trans, m, n, k, a, lda, t, tsize, c, ldc, work, lwork, info)
SGEMLQ
subroutine sgemlqt(side, trans, m, n, k, mb, v, ldv, t, ldt, c, ldc, work, info)
SGEMLQT
subroutine slamswlq(side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)
SLAMSWLQ