version 1.9, 2011/11/21 20:42:55
|
version 1.19, 2023/08/07 08:38:54
|
Line 1
|
Line 1
|
*> \brief \b DLAHR2 |
*> \brief \b DLAHR2 reduces the specified number of first columns of a general rectangular matrix A so that elements below the specified subdiagonal are zero, and returns auxiliary matrices which are needed to apply the transformation to the unreduced part of A. |
* |
* |
* =========== DOCUMENTATION =========== |
* =========== DOCUMENTATION =========== |
* |
* |
* Online html documentation available at |
* Online html documentation available at |
* http://www.netlib.org/lapack/explore-html/ |
* http://www.netlib.org/lapack/explore-html/ |
* |
* |
*> \htmlonly |
*> \htmlonly |
*> Download DLAHR2 + dependencies |
*> Download DLAHR2 + dependencies |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlahr2.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlahr2.f"> |
*> [TGZ]</a> |
*> [TGZ]</a> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlahr2.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlahr2.f"> |
*> [ZIP]</a> |
*> [ZIP]</a> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlahr2.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlahr2.f"> |
*> [TXT]</a> |
*> [TXT]</a> |
*> \endhtmlonly |
*> \endhtmlonly |
* |
* |
* Definition: |
* Definition: |
* =========== |
* =========== |
* |
* |
* SUBROUTINE DLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY ) |
* SUBROUTINE DLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY ) |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
* INTEGER K, LDA, LDT, LDY, N, NB |
* INTEGER K, LDA, LDT, LDY, N, NB |
* .. |
* .. |
Line 27
|
Line 27
|
* DOUBLE PRECISION A( LDA, * ), T( LDT, NB ), TAU( NB ), |
* DOUBLE PRECISION A( LDA, * ), T( LDT, NB ), TAU( NB ), |
* $ Y( LDY, NB ) |
* $ Y( LDY, NB ) |
* .. |
* .. |
* |
* |
* |
* |
*> \par Purpose: |
*> \par Purpose: |
* ============= |
* ============= |
Line 118
|
Line 118
|
* Authors: |
* Authors: |
* ======== |
* ======== |
* |
* |
*> \author Univ. of Tennessee |
*> \author Univ. of Tennessee |
*> \author Univ. of California Berkeley |
*> \author Univ. of California Berkeley |
*> \author Univ. of Colorado Denver |
*> \author Univ. of Colorado Denver |
*> \author NAG Ltd. |
*> \author NAG Ltd. |
* |
|
*> \date November 2011 |
|
* |
* |
*> \ingroup doubleOTHERauxiliary |
*> \ingroup doubleOTHERauxiliary |
* |
* |
Line 181
|
Line 179
|
* ===================================================================== |
* ===================================================================== |
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.4.0) -- |
* -- LAPACK auxiliary routine -- |
* -- 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..-- |
* November 2011 |
|
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
INTEGER K, LDA, LDT, LDY, N, NB |
INTEGER K, LDA, LDT, LDY, N, NB |
Line 198
|
Line 195
|
* |
* |
* .. Parameters .. |
* .. Parameters .. |
DOUBLE PRECISION ZERO, ONE |
DOUBLE PRECISION ZERO, ONE |
PARAMETER ( ZERO = 0.0D+0, |
PARAMETER ( ZERO = 0.0D+0, |
$ ONE = 1.0D+0 ) |
$ ONE = 1.0D+0 ) |
* .. |
* .. |
* .. Local Scalars .. |
* .. Local Scalars .. |
Line 240
|
Line 237
|
* w := V1**T * 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**T * 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**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, |
$ T( 1, NB ), 1 ) |
$ T( 1, NB ), 1 ) |
* |
* |
* b2 := b2 - V2*w |
* b2 := b2 - V2*w |
* |
* |
CALL DGEMV( 'NO TRANSPOSE', N-K-I+1, I-1, -ONE, |
CALL DGEMV( 'NO TRANSPOSE', N-K-I+1, I-1, -ONE, |
$ A( K+I, 1 ), |
$ A( K+I, 1 ), |
$ LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 ) |
$ LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 ) |
* |
* |
* b1 := b1 - V1*w |
* b1 := b1 - V1*w |
* |
* |
CALL DTRMV( 'Lower', 'NO TRANSPOSE', |
CALL DTRMV( 'Lower', 'NO TRANSPOSE', |
$ 'UNIT', I-1, |
$ 'UNIT', I-1, |
$ A( K+1, 1 ), LDA, T( 1, NB ), 1 ) |
$ A( K+1, 1 ), LDA, T( 1, NB ), 1 ) |
CALL DAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 ) |
CALL DAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 ) |
Line 282
|
Line 279
|
* |
* |
* Compute Y(K+1:N,I) |
* Compute Y(K+1:N,I) |
* |
* |
CALL DGEMV( 'NO TRANSPOSE', N-K, N-K-I+1, |
CALL DGEMV( 'NO TRANSPOSE', N-K, N-K-I+1, |
$ ONE, A( K+1, I+1 ), |
$ ONE, A( K+1, I+1 ), |
$ LDA, A( K+I, I ), 1, ZERO, Y( K+1, I ), 1 ) |
$ LDA, A( K+I, I ), 1, ZERO, Y( K+1, I ), 1 ) |
CALL DGEMV( 'Transpose', N-K-I+1, I-1, |
CALL DGEMV( 'Transpose', N-K-I+1, I-1, |
$ ONE, A( K+I, 1 ), LDA, |
$ ONE, A( K+I, 1 ), LDA, |
$ A( K+I, I ), 1, ZERO, T( 1, I ), 1 ) |
$ A( K+I, I ), 1, ZERO, T( 1, I ), 1 ) |
CALL DGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, |
CALL DGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, |
$ Y( K+1, 1 ), LDY, |
$ Y( K+1, 1 ), LDY, |
$ T( 1, I ), 1, ONE, Y( K+1, I ), 1 ) |
$ T( 1, I ), 1, ONE, Y( K+1, I ), 1 ) |
CALL DSCAL( N-K, TAU( I ), Y( K+1, I ), 1 ) |
CALL DSCAL( N-K, TAU( I ), Y( K+1, I ), 1 ) |
Line 296
|
Line 293
|
* Compute T(1:I,I) |
* Compute T(1:I,I) |
* |
* |
CALL DSCAL( I-1, -TAU( I ), T( 1, I ), 1 ) |
CALL DSCAL( I-1, -TAU( I ), T( 1, I ), 1 ) |
CALL DTRMV( 'Upper', 'No Transpose', 'NON-UNIT', |
CALL DTRMV( 'Upper', 'No Transpose', 'NON-UNIT', |
$ I-1, T, LDT, |
$ I-1, T, LDT, |
$ T( 1, I ), 1 ) |
$ T( 1, I ), 1 ) |
T( I, I ) = TAU( I ) |
T( I, I ) = TAU( I ) |
Line 307
|
Line 304
|
* Compute Y(1:K,1:NB) |
* Compute Y(1:K,1:NB) |
* |
* |
CALL DLACPY( 'ALL', K, NB, A( 1, 2 ), LDA, Y, LDY ) |
CALL DLACPY( 'ALL', K, NB, A( 1, 2 ), LDA, Y, LDY ) |
CALL DTRMM( 'RIGHT', 'Lower', 'NO TRANSPOSE', |
CALL DTRMM( 'RIGHT', 'Lower', 'NO TRANSPOSE', |
$ 'UNIT', K, NB, |
$ 'UNIT', K, NB, |
$ ONE, A( K+1, 1 ), LDA, Y, LDY ) |
$ ONE, A( K+1, 1 ), LDA, Y, LDY ) |
IF( N.GT.K+NB ) |
IF( N.GT.K+NB ) |
$ CALL DGEMM( 'NO TRANSPOSE', 'NO TRANSPOSE', K, |
$ CALL DGEMM( 'NO TRANSPOSE', 'NO TRANSPOSE', K, |
$ NB, N-K-NB, ONE, |
$ NB, N-K-NB, ONE, |
$ A( 1, 2+NB ), LDA, A( K+1+NB, 1 ), LDA, ONE, Y, |
$ A( 1, 2+NB ), LDA, A( K+1+NB, 1 ), LDA, ONE, Y, |
$ LDY ) |
$ LDY ) |
CALL DTRMM( 'RIGHT', 'Upper', 'NO TRANSPOSE', |
CALL DTRMM( 'RIGHT', 'Upper', 'NO TRANSPOSE', |
$ 'NON-UNIT', K, NB, |
$ 'NON-UNIT', K, NB, |
$ ONE, T, LDT, Y, LDY ) |
$ ONE, T, LDT, Y, LDY ) |
* |
* |