166 SUBROUTINE sgemqrt( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
167 $ C, LDC, WORK, INFO )
174 CHARACTER SIDE, TRANS
175 INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
178 REAL V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
185 LOGICAL LEFT, RIGHT, TRAN, NOTRAN
186 INTEGER I, IB, LDWORK, KF, Q
203 left = lsame( side,
'L' )
204 right = lsame( side,
'R' )
205 tran = lsame( trans,
'T' )
206 notran = lsame( trans,
'N' )
211 ELSE IF ( right )
THEN
215 IF( .NOT.left .AND. .NOT.right )
THEN
217 ELSE IF( .NOT.tran .AND. .NOT.notran )
THEN
219 ELSE IF( m.LT.0 )
THEN
221 ELSE IF( n.LT.0 )
THEN
223 ELSE IF( k.LT.0 .OR. k.GT.q )
THEN
225 ELSE IF( nb.LT.1 .OR. (nb.GT.k .AND. k.GT.0))
THEN
227 ELSE IF( ldv.LT.max( 1, q ) )
THEN
229 ELSE IF( ldt.LT.nb )
THEN
231 ELSE IF( ldc.LT.max( 1, m ) )
THEN
236 CALL xerbla(
'SGEMQRT', -info )
242 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 )
RETURN
244 IF( left .AND. tran )
THEN
247 ib = min( nb, k-i+1 )
248 CALL slarfb(
'L',
'T',
'F',
'C', m-i+1, n, ib,
249 $ v( i, i ), ldv, t( 1, i ), ldt,
250 $ c( i, 1 ), ldc, work, ldwork )
253 ELSE IF( right .AND. notran )
THEN
256 ib = min( nb, k-i+1 )
257 CALL slarfb(
'R',
'N',
'F',
'C', m, n-i+1, ib,
258 $ v( i, i ), ldv, t( 1, i ), ldt,
259 $ c( 1, i ), ldc, work, ldwork )
262 ELSE IF( left .AND. notran )
THEN
266 ib = min( nb, k-i+1 )
267 CALL slarfb(
'L',
'N',
'F',
'C', m-i+1, n, ib,
268 $ v( i, i ), ldv, t( 1, i ), ldt,
269 $ c( i, 1 ), ldc, work, ldwork )
272 ELSE IF( right .AND. tran )
THEN
276 ib = min( nb, k-i+1 )
277 CALL slarfb(
'R',
'T',
'F',
'C', m, n-i+1, ib,
278 $ v( i, i ), ldv, t( 1, i ), ldt,
279 $ c( 1, i ), ldc, work, ldwork )
subroutine xerbla(srname, info)
subroutine sgemqrt(side, trans, m, n, k, nb, v, ldv, t, ldt, c, ldc, work, info)
SGEMQRT
subroutine slarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
SLARFB applies a block reflector or its transpose to a general rectangular matrix.