version 1.3, 2012/12/14 12:30:28
|
version 1.10, 2023/08/07 08:39:19
|
Line 2
|
Line 2
|
* |
* |
* =========== 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 ZGEQRT2 + dependencies |
*> Download ZGEQRT2 + dependencies |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeqrt2.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeqrt2.f"> |
*> [TGZ]</a> |
*> [TGZ]</a> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeqrt2.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeqrt2.f"> |
*> [ZIP]</a> |
*> [ZIP]</a> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeqrt2.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeqrt2.f"> |
*> [TXT]</a> |
*> [TXT]</a> |
*> \endhtmlonly |
*> \endhtmlonly |
* |
* |
* Definition: |
* Definition: |
* =========== |
* =========== |
* |
* |
* SUBROUTINE ZGEQRT2( M, N, A, LDA, T, LDT, INFO ) |
* SUBROUTINE ZGEQRT2( M, N, A, LDA, T, LDT, INFO ) |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
* INTEGER INFO, LDA, LDT, M, N |
* INTEGER INFO, LDA, LDT, M, N |
* .. |
* .. |
* .. Array Arguments .. |
* .. Array Arguments .. |
* COMPLEX*16 A( LDA, * ), T( LDT, * ) |
* COMPLEX*16 A( LDA, * ), T( LDT, * ) |
* .. |
* .. |
* |
* |
* |
* |
*> \par Purpose: |
*> \par Purpose: |
* ============= |
* ============= |
*> |
*> |
*> \verbatim |
*> \verbatim |
*> |
*> |
*> ZGEQRT2 computes a QR factorization of a complex M-by-N matrix A, |
*> ZGEQRT2 computes a QR factorization of a complex M-by-N matrix A, |
*> using the compact WY representation of Q. |
*> using the compact WY representation of Q. |
*> \endverbatim |
*> \endverbatim |
* |
* |
* Arguments: |
* Arguments: |
Line 92
|
Line 92
|
* 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 September 2012 |
|
* |
* |
*> \ingroup complex16GEcomputational |
*> \ingroup complex16GEcomputational |
* |
* |
Line 127
|
Line 125
|
* ===================================================================== |
* ===================================================================== |
SUBROUTINE ZGEQRT2( M, N, A, LDA, T, LDT, INFO ) |
SUBROUTINE ZGEQRT2( M, N, A, LDA, T, LDT, INFO ) |
* |
* |
* -- LAPACK computational routine (version 3.4.2) -- |
* -- LAPACK computational 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..-- |
* September 2012 |
|
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
INTEGER INFO, LDA, LDT, M, N |
INTEGER INFO, LDA, LDT, M, N |
Line 157
|
Line 154
|
* Test the input arguments |
* Test the input arguments |
* |
* |
INFO = 0 |
INFO = 0 |
IF( M.LT.0 ) THEN |
IF( N.LT.0 ) THEN |
INFO = -1 |
|
ELSE IF( N.LT.0 ) THEN |
|
INFO = -2 |
INFO = -2 |
|
ELSE IF( M.LT.N ) THEN |
|
INFO = -1 |
ELSE IF( LDA.LT.MAX( 1, M ) ) THEN |
ELSE IF( LDA.LT.MAX( 1, M ) ) THEN |
INFO = -4 |
INFO = -4 |
ELSE IF( LDT.LT.MAX( 1, N ) ) THEN |
ELSE IF( LDT.LT.MAX( 1, N ) ) THEN |
Line 170
|
Line 167
|
CALL XERBLA( 'ZGEQRT2', -INFO ) |
CALL XERBLA( 'ZGEQRT2', -INFO ) |
RETURN |
RETURN |
END IF |
END IF |
* |
* |
K = MIN( M, N ) |
K = MIN( M, N ) |
* |
* |
DO I = 1, K |
DO I = 1, K |
Line 188
|
Line 185
|
* |
* |
* W(1:N-I) := A(I:M,I+1:N)^H * A(I:M,I) [W = T(:,N)] |
* W(1:N-I) := A(I:M,I+1:N)^H * A(I:M,I) [W = T(:,N)] |
* |
* |
CALL ZGEMV( 'C',M-I+1, N-I, ONE, A( I, I+1 ), LDA, |
CALL ZGEMV( 'C',M-I+1, N-I, ONE, A( I, I+1 ), LDA, |
$ A( I, I ), 1, ZERO, T( 1, N ), 1 ) |
$ A( I, I ), 1, ZERO, T( 1, N ), 1 ) |
* |
* |
* A(I:M,I+1:N) = A(I:m,I+1:N) + alpha*A(I:M,I)*W(1:N-1)^H |
* A(I:M,I+1:N) = A(I:m,I+1:N) + alpha*A(I:M,I)*W(1:N-1)^H |
* |
* |
ALPHA = -CONJG(T( I, 1 )) |
ALPHA = -CONJG(T( I, 1 )) |
CALL ZGERC( M-I+1, N-I, ALPHA, A( I, I ), 1, |
CALL ZGERC( M-I+1, N-I, ALPHA, A( I, I ), 1, |
$ T( 1, N ), 1, A( I, I+1 ), LDA ) |
$ T( 1, N ), 1, A( I, I+1 ), LDA ) |
A( I, I ) = AII |
A( I, I ) = AII |
END IF |
END IF |
Line 207
|
Line 204
|
* T(1:I-1,I) := alpha * A(I:M,1:I-1)**H * A(I:M,I) |
* T(1:I-1,I) := alpha * A(I:M,1:I-1)**H * A(I:M,I) |
* |
* |
ALPHA = -T( I, 1 ) |
ALPHA = -T( I, 1 ) |
CALL ZGEMV( 'C', M-I+1, I-1, ALPHA, A( I, 1 ), LDA, |
CALL ZGEMV( 'C', M-I+1, I-1, ALPHA, A( I, 1 ), LDA, |
$ A( I, I ), 1, ZERO, T( 1, I ), 1 ) |
$ A( I, I ), 1, ZERO, T( 1, I ), 1 ) |
A( I, I ) = AII |
A( I, I ) = AII |
* |
* |
Line 220
|
Line 217
|
T( I, I ) = T( I, 1 ) |
T( I, I ) = T( I, 1 ) |
T( I, 1) = ZERO |
T( I, 1) = ZERO |
END DO |
END DO |
|
|
* |
* |
* End of ZGEQRT2 |
* End of ZGEQRT2 |
* |
* |