127 SUBROUTINE clarf( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
135 INTEGER INCV, LDC, M, N
139 COMPLEX C( LDC, * ), V( * ), WORK( * )
146 parameter( one = ( 1.0e+0, 0.0e+0 ),
147 $ zero = ( 0.0e+0, 0.0e+0 ) )
151 INTEGER I, LASTV, LASTC
158 INTEGER ILACLR, ILACLC
159 EXTERNAL lsame, ilaclr, ilaclc
163 applyleft = lsame( side,
'L' )
166 IF( tau.NE.zero )
THEN
175 i = 1 + (lastv-1) * incv
180 DO WHILE( lastv.GT.0 .AND. v( i ).EQ.zero )
186 lastc = ilaclc(lastv, n, c, ldc)
189 lastc = ilaclr(m, lastv, c, ldc)
198 IF( lastv.GT.0 )
THEN
202 CALL cgemv(
'Conjugate transpose', lastv, lastc, one,
203 $ c, ldc, v, incv, zero, work, 1 )
207 CALL cgerc( lastv, lastc, -tau, v, incv, work, 1, c, ldc )
213 IF( lastv.GT.0 )
THEN
217 CALL cgemv(
'No transpose', lastc, lastv, one, c, ldc,
218 $ v, incv, zero, work, 1 )
222 CALL cgerc( lastc, lastv, -tau, work, 1, v, incv, c, ldc )
subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
CGEMV
subroutine cgerc(m, n, alpha, x, incx, y, incy, a, lda)
CGERC
subroutine clarf(side, m, n, v, incv, tau, c, ldc, work)
CLARF applies an elementary reflector to a general rectangular matrix.