Skip to content

Commit 48fbcb1

Browse files
committed
updating documentation, using xLARF1y where applicable, and removing some extraneous variables
1 parent 35d6a7b commit 48fbcb1

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

SRC/dlarf1f.f

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*>
3737
*> \verbatim
3838
*>
39-
*> DLARF applies a real elementary reflector H to a real m by n matrix
39+
*> DLARF1F applies a real elementary reflector H to a real m by n matrix
4040
*> C, from either the left or the right. H is represented in the form
4141
*>
4242
*> H = I - tau * v * v**T
@@ -193,7 +193,7 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
193193
* .. Executable Statements ..
194194
*
195195
APPLYLEFT = LSAME( SIDE, 'L' )
196-
LASTV = 0
196+
LASTV = 1
197197
LASTC = 0
198198
IF( TAU.NE.ZERO ) THEN
199199
! Set up variables for scanning V. LASTV begins pointing to the end
@@ -222,17 +222,17 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
222222
! Scan for the last non-zero row in C(:,1:lastv).
223223
LASTC = ILADLR(M, LASTV, C, LDC)
224224
END IF
225-
ELSE
226-
! TAU is 0, so H = I. Meaning HC = C = CH.
227-
RETURN
228225
END IF
229226
IF( APPLYLEFT ) THEN
230227
*
231228
* Form H * C
232229
*
233230
! Check if lastv = 1. This means v = 1, So we just need to compute
234231
! C := HC = (1-\tau)C.
235-
IF( LASTV.LE.1 ) THEN
232+
IF( LASTV.EQ.1 ) THEN
233+
*
234+
* C(1,1:lastc) := ( 1 - tau ) * C(1,1:lastc)
235+
*
236236
CALL DSCAL(LASTC, ONE - TAU, C, LDC)
237237
ELSE
238238
*
@@ -260,6 +260,9 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
260260
! Check if n = 1. This means v = 1, so we just need to compute
261261
! C := CH = C(1-\tau).
262262
IF( LASTV.EQ.1 ) THEN
263+
*
264+
* C(1:lastc,1) := ( 1 - tau ) * C(1:lastc,1)
265+
*
263266
CALL DSCAL(LASTC, ONE - TAU, C, 1)
264267
ELSE
265268
*

SRC/dlarf1l.f

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* http://www.netlib.org/lapack/explore-html/
99
*
1010
*> \htmlonly
11-
*> Download DLARF + dependencies
11+
*> Download DLARF1L + dependencies
1212
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarf1l.f">
1313
*> [TGZ]</a>
1414
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarf1l.f">
@@ -147,7 +147,7 @@ SUBROUTINE DLARF1L( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
147147
* ..
148148
* .. Local Scalars ..
149149
LOGICAL APPLYLEFT
150-
INTEGER I, J, FIRSTV, LASTV, LASTC
150+
INTEGER I, FIRSTV, LASTV, LASTC
151151
* ..
152152
* .. External Subroutines ..
153153
EXTERNAL DGEMV, DGER
@@ -183,8 +183,6 @@ SUBROUTINE DLARF1L( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
183183
! Scan for the last non-zero row in C(:,1:lastv).
184184
LASTC = ILADLR(M, LASTV, C, LDC)
185185
END IF
186-
ELSE
187-
RETURN
188186
END IF
189187
! Note that lastc.eq.0 renders the BLAS operations null; no special
190188
! case is needed at this level.

SRC/la_constants.mod

1.53 KB
Binary file not shown.

SRC/la_xisnan.mod

321 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)