172 SUBROUTINE sgemqr( SIDE, TRANS, M, N, K, A, LDA, T, TSIZE,
173 $ C, LDC, WORK, LWORK, INFO )
180 CHARACTER SIDE, TRANS
181 INTEGER INFO, LDA, M, N, K, TSIZE, LWORK, LDC
184 REAL A( LDA, * ), T( * ), C( LDC, * ), WORK( * )
191 LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY
192 INTEGER MB, NB, LW, NBLCKS, MN
197 EXTERNAL lsame, sroundup_lwork
203 INTRINSIC int, max, min, mod
210 notran = lsame( trans,
'N' )
211 tran = lsame( trans,
'T' )
212 left = lsame( side,
'L' )
213 right = lsame( side,
'R' )
225 IF( ( mb.GT.k ) .AND. ( mn.GT.k ) )
THEN
226 IF( mod( mn - k, mb - k ).EQ.0 )
THEN
227 nblcks = ( mn - k ) / ( mb - k )
229 nblcks = ( mn - k ) / ( mb - k ) + 1
236 IF( .NOT.left .AND. .NOT.right )
THEN
238 ELSE IF( .NOT.tran .AND. .NOT.notran )
THEN
240 ELSE IF( m.LT.0 )
THEN
242 ELSE IF( n.LT.0 )
THEN
244 ELSE IF( k.LT.0 .OR. k.GT.mn )
THEN
246 ELSE IF( lda.LT.max( 1, mn ) )
THEN
248 ELSE IF( tsize.LT.5 )
THEN
250 ELSE IF( ldc.LT.max( 1, m ) )
THEN
252 ELSE IF( ( lwork.LT.max( 1, lw ) ) .AND. ( .NOT.lquery ) )
THEN
257 work( 1 ) = sroundup_lwork(lw)
261 CALL xerbla(
'SGEMQR', -info )
263 ELSE IF( lquery )
THEN
269 IF( min( m, n, k ).EQ.0 )
THEN
273 IF( ( left .AND. m.LE.k ) .OR. ( right .AND. n.LE.k )
274 $ .OR. ( mb.LE.k ) .OR. ( mb.GE.max( m, n, k ) ) )
THEN
275 CALL sgemqrt( side, trans, m, n, k, nb, a, lda, t( 6 ),
276 $ nb, c, ldc, work, info )
278 CALL slamtsqr( side, trans, m, n, k, mb, nb, a, lda, t( 6 ),
279 $ nb, c, ldc, work, lwork, info )
282 work( 1 ) = sroundup_lwork(lw)
subroutine xerbla(srname, info)
subroutine sgemqr(side, trans, m, n, k, a, lda, t, tsize, c, ldc, work, lwork, info)
SGEMQR
subroutine sgemqrt(side, trans, m, n, k, nb, v, ldv, t, ldt, c, ldc, work, info)
SGEMQRT
subroutine slamtsqr(side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)
SLAMTSQR