version 1.4, 2012/12/14 14:22:45
|
version 1.11, 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 ZGEQRT3 + dependencies |
*> Download ZGEQRT3 + dependencies |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeqrt3.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeqrt3.f"> |
*> [TGZ]</a> |
*> [TGZ]</a> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeqrt3.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeqrt3.f"> |
*> [ZIP]</a> |
*> [ZIP]</a> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeqrt3.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeqrt3.f"> |
*> [TXT]</a> |
*> [TXT]</a> |
*> \endhtmlonly |
*> \endhtmlonly |
* |
* |
* Definition: |
* Definition: |
* =========== |
* =========== |
* |
* |
* RECURSIVE SUBROUTINE ZGEQRT3( M, N, A, LDA, T, LDT, INFO ) |
* RECURSIVE SUBROUTINE ZGEQRT3( M, N, A, LDA, T, LDT, INFO ) |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
* INTEGER INFO, LDA, M, N, LDT |
* INTEGER INFO, LDA, M, N, LDT |
* .. |
* .. |
* .. Array Arguments .. |
* .. Array Arguments .. |
* COMPLEX*16 A( LDA, * ), T( LDT, * ) |
* COMPLEX*16 A( LDA, * ), T( LDT, * ) |
* .. |
* .. |
* |
* |
* |
* |
*> \par Purpose: |
*> \par Purpose: |
* ============= |
* ============= |
*> |
*> |
*> \verbatim |
*> \verbatim |
*> |
*> |
*> ZGEQRT3 recursively computes a QR factorization of a complex M-by-N |
*> ZGEQRT3 recursively computes a QR factorization of a complex M-by-N |
*> matrix A, using the compact WY representation of Q. |
*> matrix A, using the compact WY representation of Q. |
*> |
*> |
*> Based on the algorithm of Elmroth and Gustavson, |
*> Based on the algorithm of Elmroth and Gustavson, |
*> IBM J. Res. Develop. Vol 44 No. 4 July 2000. |
*> IBM J. Res. Develop. Vol 44 No. 4 July 2000. |
*> \endverbatim |
*> \endverbatim |
* |
* |
Line 58
|
Line 58
|
*> \param[in,out] A |
*> \param[in,out] A |
*> \verbatim |
*> \verbatim |
*> A is COMPLEX*16 array, dimension (LDA,N) |
*> A is COMPLEX*16 array, dimension (LDA,N) |
*> On entry, the complex M-by-N matrix A. On exit, the elements on |
*> On entry, the complex M-by-N matrix A. On exit, the elements on |
*> and above the diagonal contain the N-by-N upper triangular matrix R; |
*> and above the diagonal contain the N-by-N upper triangular matrix R; |
*> the elements below the diagonal are the columns of V. See below for |
*> the elements below the diagonal are the columns of V. See below for |
*> further details. |
*> further details. |
Line 95
|
Line 95
|
* 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 132
|
Line 130
|
* ===================================================================== |
* ===================================================================== |
RECURSIVE SUBROUTINE ZGEQRT3( M, N, A, LDA, T, LDT, INFO ) |
RECURSIVE SUBROUTINE ZGEQRT3( 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, M, N, LDT |
INTEGER INFO, LDA, M, N, LDT |
Line 177
|
Line 174
|
* |
* |
* Compute Householder transform when N=1 |
* Compute Householder transform when N=1 |
* |
* |
CALL ZLARFG( M, A, A( MIN( 2, M ), 1 ), 1, T ) |
CALL ZLARFG( M, A(1,1), A( MIN( 2, M ), 1 ), 1, T(1,1) ) |
* |
* |
ELSE |
ELSE |
* |
* |
* Otherwise, split A into blocks... |
* Otherwise, split A into blocks... |
Line 199
|
Line 196
|
T( I, J+N1 ) = A( I, J+N1 ) |
T( I, J+N1 ) = A( I, J+N1 ) |
END DO |
END DO |
END DO |
END DO |
CALL ZTRMM( 'L', 'L', 'C', 'U', N1, N2, ONE, |
CALL ZTRMM( 'L', 'L', 'C', 'U', N1, N2, ONE, |
& A, LDA, T( 1, J1 ), LDT ) |
& A, LDA, T( 1, J1 ), LDT ) |
* |
* |
CALL ZGEMM( 'C', 'N', N1, N2, M-N1, ONE, A( J1, 1 ), LDA, |
CALL ZGEMM( 'C', 'N', N1, N2, M-N1, ONE, A( J1, 1 ), LDA, |
Line 208
|
Line 205
|
CALL ZTRMM( 'L', 'U', 'C', 'N', N1, N2, ONE, |
CALL ZTRMM( 'L', 'U', 'C', 'N', N1, N2, ONE, |
& T, LDT, T( 1, J1 ), LDT ) |
& T, LDT, T( 1, J1 ), LDT ) |
* |
* |
CALL ZGEMM( 'N', 'N', M-N1, N2, N1, -ONE, A( J1, 1 ), LDA, |
CALL ZGEMM( 'N', 'N', M-N1, N2, N1, -ONE, A( J1, 1 ), LDA, |
& T( 1, J1 ), LDT, ONE, A( J1, J1 ), LDA ) |
& T( 1, J1 ), LDT, ONE, A( J1, J1 ), LDA ) |
* |
* |
CALL ZTRMM( 'L', 'L', 'N', 'U', N1, N2, ONE, |
CALL ZTRMM( 'L', 'L', 'N', 'U', N1, N2, ONE, |
Line 222
|
Line 219
|
* |
* |
* Compute A(J1:M,J1:N) <- (Y2,R2,T2) where Q2 = I - Y2 T2 Y2^H |
* Compute A(J1:M,J1:N) <- (Y2,R2,T2) where Q2 = I - Y2 T2 Y2^H |
* |
* |
CALL ZGEQRT3( M-N1, N2, A( J1, J1 ), LDA, |
CALL ZGEQRT3( M-N1, N2, A( J1, J1 ), LDA, |
& T( J1, J1 ), LDT, IINFO ) |
& T( J1, J1 ), LDT, IINFO ) |
* |
* |
* Compute T3 = T(1:N1,J1:N) = -T1 Y1^H Y2 T2 |
* Compute T3 = T(1:N1,J1:N) = -T1 Y1^H Y2 T2 |
Line 236
|
Line 233
|
CALL ZTRMM( 'R', 'L', 'N', 'U', N1, N2, ONE, |
CALL ZTRMM( 'R', 'L', 'N', 'U', N1, N2, ONE, |
& A( J1, J1 ), LDA, T( 1, J1 ), LDT ) |
& A( J1, J1 ), LDA, T( 1, J1 ), LDT ) |
* |
* |
CALL ZGEMM( 'C', 'N', N1, N2, M-N, ONE, A( I1, 1 ), LDA, |
CALL ZGEMM( 'C', 'N', N1, N2, M-N, ONE, A( I1, 1 ), LDA, |
& A( I1, J1 ), LDA, ONE, T( 1, J1 ), LDT ) |
& A( I1, J1 ), LDA, ONE, T( 1, J1 ), LDT ) |
* |
* |
CALL ZTRMM( 'L', 'U', 'N', 'N', N1, N2, -ONE, T, LDT, |
CALL ZTRMM( 'L', 'U', 'N', 'N', N1, N2, -ONE, T, LDT, |
& T( 1, J1 ), LDT ) |
& T( 1, J1 ), LDT ) |
* |
* |
CALL ZTRMM( 'R', 'U', 'N', 'N', N1, N2, ONE, |
CALL ZTRMM( 'R', 'U', 'N', 'N', N1, N2, ONE, |
& T( J1, J1 ), LDT, T( 1, J1 ), LDT ) |
& T( J1, J1 ), LDT, T( 1, J1 ), LDT ) |
* |
* |
* Y = (Y1,Y2); R = [ R1 A(1:N1,J1:N) ]; T = [T1 T3] |
* Y = (Y1,Y2); R = [ R1 A(1:N1,J1:N) ]; T = [T1 T3] |