167 SUBROUTINE sgemlq( SIDE, TRANS, M, N, K, A, LDA, T, TSIZE,
168 $ c, ldc, work, lwork, info )
176 CHARACTER SIDE, TRANS
177 INTEGER INFO, LDA, M, N, K, TSIZE, LWORK, LDC
180 REAL A( lda, * ), T( * ), C( ldc, * ), WORK( * )
187 LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY
188 INTEGER MB, NB, LW, NBLCKS, MN
198 INTRINSIC int, max, min, mod
205 notran = lsame( trans,
'N' )
206 tran = lsame( trans,
'T' )
207 left = lsame( side,
'L' )
208 right = lsame( side,
'R' )
220 IF( ( nb.GT.k ) .AND. ( mn.GT.k ) )
THEN
221 IF( mod( mn - k, nb - k ) .EQ. 0 )
THEN
222 nblcks = ( mn - k ) / ( nb - k )
224 nblcks = ( mn - k ) / ( nb - k ) + 1
231 IF( .NOT.left .AND. .NOT.right )
THEN
233 ELSE IF( .NOT.tran .AND. .NOT.notran )
THEN
235 ELSE IF( m.LT.0 )
THEN
237 ELSE IF( n.LT.0 )
THEN
239 ELSE IF( k.LT.0 .OR. k.GT.mn )
THEN
241 ELSE IF( lda.LT.max( 1, k ) )
THEN
243 ELSE IF( tsize.LT.5 )
THEN
245 ELSE IF( ldc.LT.max( 1, m ) )
THEN
247 ELSE IF( ( lwork.LT.max( 1, lw ) ) .AND. ( .NOT.lquery ) )
THEN
252 work( 1 ) =
REAL( lw )
256 CALL xerbla(
'SGEMLQ', -info )
258 ELSE IF( lquery )
THEN
264 IF( min( m, n, k ).EQ.0 )
THEN
268 IF( ( left .AND. m.LE.k ) .OR. ( right .AND. n.LE.k )
269 $ .OR. ( nb.LE.k ) .OR. ( nb.GE.max( m, n, k ) ) )
THEN
270 CALL sgemlqt( side, trans, m, n, k, mb, a, lda,
271 $ t( 6 ), mb, c, ldc, work, info )
273 CALL slamswlq( side, trans, m, n, k, mb, nb, a, lda, t( 6 ),
274 $ mb, c, ldc, work, lwork, info )
277 work( 1 ) =
REAL( lw )
subroutine slamswlq(SIDE, TRANS, M, N, K, MB, NB, A, LDA, T, LDT, C, LDC, WORK, LWORK, INFO)
subroutine sgemlqt(SIDE, TRANS, M, N, K, MB, V, LDV, T, LDT, C, LDC, WORK, INFO)
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine sgemlq(SIDE, TRANS, M, N, K, A, LDA, T, TSIZE, C, LDC, WORK, LWORK, INFO)