summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjames <james@8a072113-8704-0410-8d35-dd094bca7971>2011-04-21 22:00:11 +0000
committerjames <james@8a072113-8704-0410-8d35-dd094bca7971>2011-04-21 22:00:11 +0000
commit654407606d8ff71a833a9e20016c18f5bd088bff (patch)
tree7ac1cc2bd431e15557cb925781e9450d69e57776
parent13397e1419d91674a5338397757a00293d676447 (diff)
downloadlapack-654407606d8ff71a833a9e20016c18f5bd088bff.tar.gz
lapack-654407606d8ff71a833a9e20016c18f5bd088bff.tar.bz2
lapack-654407606d8ff71a833a9e20016c18f5bd088bff.zip
fixed problems with zero matrix and scan
-rw-r--r--SRC/ilaclr.f9
-rw-r--r--SRC/iladlr.f9
-rw-r--r--SRC/ilaslr.f7
-rw-r--r--SRC/ilazlr.f9
4 files changed, 23 insertions, 11 deletions
diff --git a/SRC/ilaclr.f b/SRC/ilaclr.f
index 3163544a..2d71bd47 100644
--- a/SRC/ilaclr.f
+++ b/SRC/ilaclr.f
@@ -54,9 +54,12 @@
ILACLR = 0
DO J = 1, N
I=M
- DO WHILE ((A(I,J).NE.ZERO).AND.(I.GE.1))
- I=I-1
- ENDDO
+ DO WHILE ((A(I,J).EQ.ZERO).AND.(I.GT.1))
+ I=I-1
+ ENDDO
+ IF( (I.EQ.1).AND.(A(1,J).EQ.ZERO) ) THEN
+ I = 0
+ END IF
ILACLR = MAX( ILACLR, I )
END DO
END IF
diff --git a/SRC/iladlr.f b/SRC/iladlr.f
index dd4d37ca..e9f86a03 100644
--- a/SRC/iladlr.f
+++ b/SRC/iladlr.f
@@ -53,10 +53,13 @@
* Scan up each column tracking the last zero row seen.
ILADLR = 0
DO J = 1, N
- I=M
- DO WHILE ((A(I,J).NE.ZERO).AND.(I.GE.1))
- I=I-1
+ I = M
+ DO WHILE ((A(I,J).EQ.ZERO).AND.(I.GT.1))
+ I=I-1
ENDDO
+ IF( (I.EQ.1).AND.(A(1,J).EQ.ZERO) ) THEN
+ I = 0
+ END IF
ILADLR = MAX( ILADLR, I )
END DO
END IF
diff --git a/SRC/ilaslr.f b/SRC/ilaslr.f
index 06e71be1..12511b36 100644
--- a/SRC/ilaslr.f
+++ b/SRC/ilaslr.f
@@ -54,9 +54,12 @@
ILASLR = 0
DO J = 1, N
I=M
- DO WHILE ((A(I,J).NE.ZERO).AND.(I.GE.1))
- I=I-1
+ DO WHILE ((A(I,J).EQ.ZERO).AND.(I.GT.1))
+ I=I-1
ENDDO
+ IF( (I.EQ.1).AND.(A(1,J).EQ.ZERO) ) THEN
+ I = 0
+ END IF
ILASLR = MAX( ILASLR, I )
END DO
END IF
diff --git a/SRC/ilazlr.f b/SRC/ilazlr.f
index 0647ac8e..44902e4b 100644
--- a/SRC/ilazlr.f
+++ b/SRC/ilazlr.f
@@ -53,9 +53,12 @@
ILAZLR = 0
DO J = 1, N
I=M
- DO WHILE ((A(I,J).NE.ZERO).AND.(I.GE.1))
- I=I-1
- ENDDO
+ DO WHILE ((A(I,J).EQ.ZERO).AND.(I.GT.1))
+ I=I-1
+ ENDDO
+ IF( (I.EQ.1).AND.(A(1,J).EQ.ZERO) ) THEN
+ I = 0
+ END IF
ILAZLR = MAX( ILAZLR, I )
END DO
END IF