194 SUBROUTINE sormbr( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
195 $ LDC, WORK, LWORK, INFO )
202 CHARACTER SIDE, TRANS, VECT
203 INTEGER INFO, K, LDA, LDC, LWORK, M, N
206 REAL A( LDA, * ), C( LDC, * ), TAU( * ),
213 LOGICAL APPLYQ, LEFT, LQUERY, NOTRAN
215 INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
221 EXTERNAL ilaenv, lsame, sroundup_lwork
234 applyq = lsame( vect,
'Q' )
235 left = lsame( side,
'L' )
236 notran = lsame( trans,
'N' )
237 lquery = ( lwork.EQ.-1 )
248 IF( .NOT.applyq .AND. .NOT.lsame( vect,
'P' ) )
THEN
250 ELSE IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
252 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) )
THEN
254 ELSE IF( m.LT.0 )
THEN
256 ELSE IF( n.LT.0 )
THEN
258 ELSE IF( k.LT.0 )
THEN
260 ELSE IF( ( applyq .AND. lda.LT.max( 1, nq ) ) .OR.
261 $ ( .NOT.applyq .AND. lda.LT.max( 1, min( nq, k ) ) ) )
264 ELSE IF( ldc.LT.max( 1, m ) )
THEN
266 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
273 nb = ilaenv( 1,
'SORMQR', side // trans, m-1, n, m-1,
276 nb = ilaenv( 1,
'SORMQR', side // trans, m, n-1, n-1,
281 nb = ilaenv( 1,
'SORMLQ', side // trans, m-1, n, m-1,
284 nb = ilaenv( 1,
'SORMLQ', side // trans, m, n-1, n-1,
289 work( 1 ) = sroundup_lwork(lwkopt)
293 CALL xerbla(
'SORMBR', -info )
295 ELSE IF( lquery )
THEN
302 IF( m.EQ.0 .OR. n.EQ.0 )
313 CALL sormqr( side, trans, m, n, k, a, lda, tau, c, ldc,
314 $ work, lwork, iinfo )
315 ELSE IF( nq.GT.1 )
THEN
330 CALL sormqr( side, trans, mi, ni, nq-1, a( 2, 1 ), lda, tau,
331 $ c( i1, i2 ), ldc, work, lwork, iinfo )
346 CALL sormlq( side, transt, m, n, k, a, lda, tau, c, ldc,
347 $ work, lwork, iinfo )
348 ELSE IF( nq.GT.1 )
THEN
363 CALL sormlq( side, transt, mi, ni, nq-1, a( 1, 2 ), lda,
364 $ tau, c( i1, i2 ), ldc, work, lwork, iinfo )
367 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine sormbr(vect, side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
SORMBR
subroutine sormlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
SORMLQ
subroutine sormqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
SORMQR