Skip to content

Commit 648d221

Browse files
committed
updated check for if we are a trivial case from m/n=1 to lastv=1
1 parent 3267d41 commit 648d221

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

SRC/dlarf1f.f

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,6 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
159159
APPLYLEFT = LSAME( SIDE, 'L' )
160160
LASTV = 0
161161
LASTC = 0
162-
IF( TAU.EQ.ZERO ) THEN
163-
RETURN
164-
END IF
165162
IF( TAU.NE.ZERO ) THEN
166163
! Set up variables for scanning V. LASTV begins pointing to the end
167164
! of V.
@@ -188,16 +185,17 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
188185
LASTC = ILADLR(M, LASTV, C, LDC)
189186
END IF
190187
END IF
191-
! Note that lastc.eq.0 renders the BLAS operations null; no special
192-
! case is needed at this level.
188+
IF( LASTC.EQ.0 .OR. LASTV.EQ.0 ) THEN
189+
RETURN
190+
END IF
193191
IF( APPLYLEFT ) THEN
194192
*
195193
* Form H * C
196194
*
197195
IF( LASTV.GT.0 ) THEN
198196
! Check if m = 1. This means v = 1, So we just need to compute
199197
! C := HC = (1-\tau)C.
200-
IF( M.EQ.1 ) THEN
198+
IF(LASTV.EQ.1) THEN
201199
CALL DSCAL(LASTC, ONE - TAU, C, LDC)
202200
ELSE
203201
*
@@ -226,7 +224,7 @@ SUBROUTINE DLARF1F( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
226224
IF( LASTV.GT.0 ) THEN
227225
! Check if n = 1. This means v = 1, so we just need to compute
228226
! C := CH = C(1-\tau).
229-
IF( N.EQ.1 ) THEN
227+
IF(LASTV.EQ.1) THEN
230228
CALL DSCAL(LASTC, ONE - TAU, C, 1)
231229
ELSE
232230
*

0 commit comments

Comments
 (0)