version 1.1, 2010/01/26 15:22:45
|
version 1.8, 2011/07/22 07:38:06
|
Line 1
|
Line 1
|
SUBROUTINE DLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY ) |
SUBROUTINE DLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY ) |
* |
* |
* -- LAPACK auxiliary routine (version 3.2.1) -- |
* -- LAPACK auxiliary routine (version 3.3.1) -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* -- April 2009 -- |
* -- April 2009 -- |
Line 19
|
Line 19
|
* DLAHR2 reduces the first NB columns of A real general n-BY-(n-k+1) |
* DLAHR2 reduces the first NB columns of A real general n-BY-(n-k+1) |
* matrix A so that elements below the k-th subdiagonal are zero. The |
* matrix A so that elements below the k-th subdiagonal are zero. The |
* reduction is performed by an orthogonal similarity transformation |
* reduction is performed by an orthogonal similarity transformation |
* Q' * A * Q. The routine returns the matrices V and T which determine |
* Q**T * A * Q. The routine returns the matrices V and T which determine |
* Q as a block reflector I - V*T*V', and also the matrix Y = A * V * T. |
* Q as a block reflector I - V*T*V**T, and also the matrix Y = A * V * T. |
* |
* |
* This is an auxiliary routine called by DGEHRD. |
* This is an auxiliary routine called by DGEHRD. |
* |
* |
Line 75
|
Line 75
|
* |
* |
* Each H(i) has the form |
* Each H(i) has the form |
* |
* |
* H(i) = I - tau * v * v' |
* H(i) = I - tau * v * v**T |
* |
* |
* where tau is a real scalar, and v is a real vector with |
* where tau is a real scalar, and v is a real vector with |
* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in |
* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in |
Line 84
|
Line 84
|
* The elements of the vectors v together form the (n-k+1)-by-nb matrix |
* The elements of the vectors v together form the (n-k+1)-by-nb matrix |
* V which is needed, with T and Y, to apply the transformation to the |
* V which is needed, with T and Y, to apply the transformation to the |
* unreduced part of the matrix, using an update of the form: |
* unreduced part of the matrix, using an update of the form: |
* A := (I - V*T*V') * (A - Y*V'). |
* A := (I - V*T*V**T) * (A - Y*V**T). |
* |
* |
* The contents of A on exit are illustrated by the following example |
* The contents of A on exit are illustrated by the following example |
* with n = 7, k = 3 and nb = 2: |
* with n = 7, k = 3 and nb = 2: |
Line 144
|
Line 144
|
* |
* |
* Update A(K+1:N,I) |
* Update A(K+1:N,I) |
* |
* |
* Update I-th column of A - Y * V' |
* Update I-th column of A - Y * V**T |
* |
* |
CALL DGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, Y(K+1,1), LDY, |
CALL DGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, Y(K+1,1), LDY, |
$ A( K+I-1, 1 ), LDA, ONE, A( K+1, I ), 1 ) |
$ A( K+I-1, 1 ), LDA, ONE, A( K+1, I ), 1 ) |
* |
* |
* Apply I - V * T' * V' to this column (call it b) from the |
* Apply I - V * T**T * V**T to this column (call it b) from the |
* left, using the last column of T as workspace |
* left, using the last column of T as workspace |
* |
* |
* Let V = ( V1 ) and b = ( b1 ) (first I-1 rows) |
* Let V = ( V1 ) and b = ( b1 ) (first I-1 rows) |
Line 157
|
Line 157
|
* |
* |
* where V1 is unit lower triangular |
* where V1 is unit lower triangular |
* |
* |
* w := V1' * b1 |
* w := V1**T * b1 |
* |
* |
CALL DCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 ) |
CALL DCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 ) |
CALL DTRMV( 'Lower', 'Transpose', 'UNIT', |
CALL DTRMV( 'Lower', 'Transpose', 'UNIT', |
$ I-1, A( K+1, 1 ), |
$ I-1, A( K+1, 1 ), |
$ LDA, T( 1, NB ), 1 ) |
$ LDA, T( 1, NB ), 1 ) |
* |
* |
* w := w + V2'*b2 |
* w := w + V2**T * b2 |
* |
* |
CALL DGEMV( 'Transpose', N-K-I+1, I-1, |
CALL DGEMV( 'Transpose', N-K-I+1, I-1, |
$ ONE, A( K+I, 1 ), |
$ ONE, A( K+I, 1 ), |
$ LDA, A( K+I, I ), 1, ONE, T( 1, NB ), 1 ) |
$ LDA, A( K+I, I ), 1, ONE, T( 1, NB ), 1 ) |
* |
* |
* w := T'*w |
* w := T**T * w |
* |
* |
CALL DTRMV( 'Upper', 'Transpose', 'NON-UNIT', |
CALL DTRMV( 'Upper', 'Transpose', 'NON-UNIT', |
$ I-1, T, LDT, |
$ I-1, T, LDT, |