196 SUBROUTINE sormbr( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
197 $ ldc, work, lwork, info )
205 CHARACTER SIDE, TRANS, VECT
206 INTEGER INFO, K, LDA, LDC, LWORK, M, N
209 REAL A( lda, * ), C( ldc, * ), TAU( * ),
216 LOGICAL APPLYQ, LEFT, LQUERY, NOTRAN
218 INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
223 EXTERNAL ilaenv, lsame
236 applyq = lsame( vect,
'Q' )
237 left = lsame( side,
'L' )
238 notran = lsame( trans,
'N' )
239 lquery = ( lwork.EQ.-1 )
250 IF( .NOT.applyq .AND. .NOT.lsame( vect,
'P' ) )
THEN
252 ELSE IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
254 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) )
THEN
256 ELSE IF( m.LT.0 )
THEN
258 ELSE IF( n.LT.0 )
THEN
260 ELSE IF( k.LT.0 )
THEN
262 ELSE IF( ( applyq .AND. lda.LT.max( 1, nq ) ) .OR.
263 $ ( .NOT.applyq .AND. lda.LT.max( 1, min( nq, k ) ) ) )
266 ELSE IF( ldc.LT.max( 1, m ) )
THEN
268 ELSE IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
275 nb = ilaenv( 1,
'SORMQR', side // trans, m-1, n, m-1,
278 nb = ilaenv( 1,
'SORMQR', side // trans, m, n-1, n-1,
283 nb = ilaenv( 1,
'SORMLQ', side // trans, m-1, n, m-1,
286 nb = ilaenv( 1,
'SORMLQ', side // trans, m, n-1, n-1,
290 lwkopt = max( 1, nw )*nb
295 CALL xerbla(
'SORMBR', -info )
297 ELSE IF( lquery )
THEN
304 IF( m.EQ.0 .OR. n.EQ.0 )
315 CALL sormqr( side, trans, m, n, k, a, lda, tau, c, ldc,
316 $ work, lwork, iinfo )
317 ELSE IF( nq.GT.1 )
THEN
332 CALL sormqr( side, trans, mi, ni, nq-1, a( 2, 1 ), lda, tau,
333 $ c( i1, i2 ), ldc, work, lwork, iinfo )
348 CALL sormlq( side, transt, m, n, k, a, lda, tau, c, ldc,
349 $ work, lwork, iinfo )
350 ELSE IF( nq.GT.1 )
THEN
365 CALL sormlq( side, transt, mi, ni, nq-1, a( 1, 2 ), lda,
366 $ tau, c( i1, i2 ), ldc, work, lwork, iinfo )
subroutine sormqr(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
SORMQR
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine sormlq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
SORMLQ
subroutine sormbr(VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
SORMBR