162 SUBROUTINE slarft( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
169 CHARACTER DIRECT, STOREV
170 INTEGER K, LDT, LDV, N
173 REAL T( LDT, * ), TAU( * ), V( LDV, * )
180 parameter( one = 1.0e+0, zero = 0.0e+0 )
183 INTEGER I, J, PREVLASTV, LASTV
199 IF( lsame( direct,
'F' ) )
THEN
202 prevlastv = max( i, prevlastv )
203 IF( tau( i ).EQ.zero )
THEN
214 IF( lsame( storev,
'C' ) )
THEN
216 DO lastv = n, i+1, -1
217 IF( v( lastv, i ).NE.zero )
EXIT
220 t( j, i ) = -tau( i ) * v( i , j )
222 j = min( lastv, prevlastv )
226 CALL sgemv(
'Transpose', j-i, i-1, -tau( i ),
227 $ v( i+1, 1 ), ldv, v( i+1, i ), 1, one,
231 DO lastv = n, i+1, -1
232 IF( v( i, lastv ).NE.zero )
EXIT
235 t( j, i ) = -tau( i ) * v( j , i )
237 j = min( lastv, prevlastv )
241 CALL sgemv(
'No transpose', i-1, j-i, -tau( i ),
242 $ v( 1, i+1 ), ldv, v( i, i+1 ), ldv,
243 $ one, t( 1, i ), 1 )
248 CALL strmv(
'Upper',
'No transpose',
'Non-unit', i-1, t,
249 $ ldt, t( 1, i ), 1 )
252 prevlastv = max( prevlastv, lastv )
261 IF( tau( i ).EQ.zero )
THEN
273 IF( lsame( storev,
'C' ) )
THEN
276 IF( v( lastv, i ).NE.zero )
EXIT
279 t( j, i ) = -tau( i ) * v( n-k+i , j )
281 j = max( lastv, prevlastv )
285 CALL sgemv(
'Transpose', n-k+i-j, k-i, -tau( i ),
286 $ v( j, i+1 ), ldv, v( j, i ), 1, one,
291 IF( v( i, lastv ).NE.zero )
EXIT
294 t( j, i ) = -tau( i ) * v( j, n-k+i )
296 j = max( lastv, prevlastv )
300 CALL sgemv(
'No transpose', k-i, n-k+i-j,
301 $ -tau( i ), v( i+1, j ), ldv, v( i, j ), ldv,
302 $ one, t( i+1, i ), 1 )
307 CALL strmv(
'Lower',
'No transpose',
'Non-unit', k-i,
308 $ t( i+1, i+1 ), ldt, t( i+1, i ), 1 )
310 prevlastv = min( prevlastv, lastv )
subroutine sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
SGEMV
subroutine slarft(direct, storev, n, k, v, ldv, tau, t, ldt)
SLARFT forms the triangular factor T of a block reflector H = I - vtvH
subroutine strmv(uplo, trans, diag, n, a, lda, x, incx)
STRMV