Skip to content

Commit 468cb59

Browse files
committed
alternative formulation more similar to dlarf1f.f
1 parent 15ec332 commit 468cb59

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

SRC/zlarf1f.f

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,20 @@ SUBROUTINE ZLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
209209
! First compute w**H = v**H c -> w = C**H v
210210
! C = [ C_1 C_2 ]**T, v = [1 v_2]**T
211211
! w = C_1**H + C_2**Hv_2
212-
! w = C_1**H
212+
! w = C_2**Hv_2
213+
CALL ZGEMV( 'Conj', LASTV-1, LASTC, ONE, C(1+1,1), LDC,
214+
$ V(1+INCV), INCV, ZERO, WORK, 1)
215+
! w += C_1**H
216+
! This is essentially a zaxpyc
213217
DO I = 1, LASTC
214-
WORK(I) = DCONJG(C(1,I))
218+
WORK(I) = WORK(I) + DCONJG(C(1,I))
215219
END DO
216-
! w += C_2**Hv_2
217-
CALL ZGEMV( 'Conj', LASTV-1, LASTC, ONE, C(1+1,1), LDC,
218-
$ V(1+INCV), INCV, ONE, WORK, 1)
219220
*
220221
* C(1:lastv,1:lastc) := C(...) - tau * v(1:lastv,1) * w(1:lastc,1)**H
221222
*
222223
! C(1, 1:lastc) := C(...) - tau * v(1,1) * w(1:lastc,1)**H
223224
! = C(...) - tau * Conj(w(1:lastc,1))
225+
! This is essentially a zaxpyc
224226
DO I = 1, LASTC
225227
C(1,I) = C(1,I) - TAU * DCONJG(WORK(I))
226228
END DO

0 commit comments

Comments
 (0)