summaryrefslogtreecommitdiff
path: root/SRC/clahef.f
diff options
context:
space:
mode:
authorigor175 <igor175@8a072113-8704-0410-8d35-dd094bca7971>2012-11-01 22:51:10 +0000
committerigor175 <igor175@8a072113-8704-0410-8d35-dd094bca7971>2012-11-01 22:51:10 +0000
commita47e62c31d492e9599c3d7611712efc70e95fb6f (patch)
tree025d12a5d90b80d38bf4d49e5902eaa8d2ea4809 /SRC/clahef.f
parent2326ea03981cefadcbf94d330e173e6d1da2e12a (diff)
downloadlapack-a47e62c31d492e9599c3d7611712efc70e95fb6f.tar.gz
lapack-a47e62c31d492e9599c3d7611712efc70e95fb6f.tar.bz2
lapack-a47e62c31d492e9599c3d7611712efc70e95fb6f.zip
(c,z)lahef.f: Changed the length of the swap vector from KK-1 to K-1 for the 'L' case and from N-KK to N-K for the 'U' case. It is sufficient to swap rows KK and KP only in the first K-1 columns of A instead of in the first KK-1 columns of A in 'L' case (columns K (or K and K+1) of A will be later overwritten). It is sufficient to swap rows KK and KP only in the last K+1 to N columns of A instead of in the last KK+1 to N columns of A in the 'U' case (columns K (or K and K-1) of A will be later overwritten).
Diffstat (limited to 'SRC/clahef.f')
-rw-r--r--SRC/clahef.f16
1 files changed, 11 insertions, 5 deletions
diff --git a/SRC/clahef.f b/SRC/clahef.f
index 6deeaabc..27c24c47 100644
--- a/SRC/clahef.f
+++ b/SRC/clahef.f
@@ -350,10 +350,13 @@
IF( KP.GT.1 )
$ CALL CCOPY( KP-1, A( 1, KK ), 1, A( 1, KP ), 1 )
*
-* Interchange rows KK and KP in last KK columns of A and W
+* Interchange rows KK and KP in last K+1 to N columns of A
+* (columns K (or K and K-1) of A will be later overwritten)
+* and interchange rows KK and KP in last KKW to NB columns
+* of W
*
- IF( KK.LT.N )
- $ CALL CSWAP( N-KK, A( KK, KK+1 ), LDA, A( KP, KK+1 ),
+ IF( K.LT.N )
+ $ CALL CSWAP( N-K, A( KK, K+1 ), LDA, A( KP, K+1 ),
$ LDA )
CALL CSWAP( N-KK+1, W( KK, KKW ), LDW, W( KP, KKW ),
$ LDW )
@@ -601,9 +604,12 @@
IF( KP.LT.N )
$ CALL CCOPY( N-KP, A( KP+1, KK ), 1, A( KP+1, KP ), 1 )
*
-* Interchange rows KK and KP in first KK columns of A and W
+* Interchange rows KK and KP in first K-1 columns of A
+* (columns K (or K and K+1) of A will be later overwritten)
+* and interchange rows KK and KP in first KK columns of W
*
- CALL CSWAP( KK-1, A( KK, 1 ), LDA, A( KP, 1 ), LDA )
+ IF( K.GT.1 )
+ $ CALL CSWAP( K-1, A( KK, 1 ), LDA, A( KP, 1 ), LDA )
CALL CSWAP( KK, W( KK, 1 ), LDW, W( KP, 1 ), LDW )
END IF
*