version 1.1, 2017/06/17 11:02:55
|
version 1.6, 2023/08/07 08:39:29
|
Line 1
|
Line 1
|
|
*> \brief \b ZLAMSWLQ |
* |
* |
* Definition: |
* Definition: |
* =========== |
* =========== |
Line 18
|
Line 19
|
*> |
*> |
*> \verbatim |
*> \verbatim |
*> |
*> |
*> ZLAMQRTS overwrites the general real M-by-N matrix C with |
*> ZLAMSWLQ overwrites the general complex M-by-N matrix C with |
*> |
*> |
*> |
*> |
*> SIDE = 'L' SIDE = 'R' |
*> SIDE = 'L' SIDE = 'R' |
*> TRANS = 'N': Q * C C * Q |
*> TRANS = 'N': Q * C C * Q |
*> TRANS = 'T': Q**T * C C * Q**T |
*> TRANS = 'C': Q**H * C C * Q**H |
*> where Q is a real orthogonal matrix defined as the product of blocked |
*> where Q is a complex unitary matrix defined as the product of blocked |
*> elementary reflectors computed by short wide LQ |
*> elementary reflectors computed by short wide LQ |
*> factorization (ZLASWLQ) |
*> factorization (ZLASWLQ) |
*> \endverbatim |
*> \endverbatim |
Line 35
|
Line 36
|
*> \param[in] SIDE |
*> \param[in] SIDE |
*> \verbatim |
*> \verbatim |
*> SIDE is CHARACTER*1 |
*> SIDE is CHARACTER*1 |
*> = 'L': apply Q or Q**T from the Left; |
*> = 'L': apply Q or Q**H from the Left; |
*> = 'R': apply Q or Q**T from the Right. |
*> = 'R': apply Q or Q**H from the Right. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in] TRANS |
*> \param[in] TRANS |
*> \verbatim |
*> \verbatim |
*> TRANS is CHARACTER*1 |
*> TRANS is CHARACTER*1 |
*> = 'N': No transpose, apply Q; |
*> = 'N': No transpose, apply Q; |
*> = 'T': Transpose, apply Q**T. |
*> = 'C': Conjugate Transpose, apply Q**H. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in] M |
*> \param[in] M |
*> \verbatim |
*> \verbatim |
*> M is INTEGER |
*> M is INTEGER |
*> The number of rows of the matrix A. M >=0. |
*> The number of rows of the matrix C. M >=0. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in] N |
*> \param[in] N |
*> \verbatim |
*> \verbatim |
*> N is INTEGER |
*> N is INTEGER |
*> The number of columns of the matrix C. N >= M. |
*> The number of columns of the matrix C. N >= 0. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in] K |
*> \param[in] K |
Line 69
|
Line 70
|
*> \param[in] MB |
*> \param[in] MB |
*> \verbatim |
*> \verbatim |
*> MB is INTEGER |
*> MB is INTEGER |
*> The row block size to be used in the blocked QR. |
*> The row block size to be used in the blocked LQ. |
*> M >= MB >= 1 |
*> M >= MB >= 1 |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in] NB |
*> \param[in] NB |
*> \verbatim |
*> \verbatim |
*> NB is INTEGER |
*> NB is INTEGER |
*> The column block size to be used in the blocked QR. |
*> The column block size to be used in the blocked LQ. |
*> NB > M. |
*> NB > M. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in] NB |
*> \param[in] A |
*> \verbatim |
|
*> NB is INTEGER |
|
*> The block size to be used in the blocked QR. |
|
*> MB > M. |
|
*> |
|
*> \endverbatim |
|
*> |
|
*> \param[in,out] A |
|
*> \verbatim |
*> \verbatim |
*> A is COMPLEX*16 array, dimension (LDA,K) |
*> A is COMPLEX*16 array, dimension |
|
*> (LDA,M) if SIDE = 'L', |
|
*> (LDA,N) if SIDE = 'R' |
*> The i-th row must contain the vector which defines the blocked |
*> The i-th row must contain the vector which defines the blocked |
*> elementary reflector H(i), for i = 1,2,...,k, as returned by |
*> elementary reflector H(i), for i = 1,2,...,k, as returned by |
*> DLASWLQ in the first k rows of its array argument A. |
*> ZLASWLQ in the first k rows of its array argument A. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in] LDA |
*> \param[in] LDA |
*> \verbatim |
*> \verbatim |
*> LDA is INTEGER |
*> LDA is INTEGER |
*> The leading dimension of the array A. |
*> The leading dimension of the array A. LDA >= MAX(1,K). |
*> If SIDE = 'L', LDA >= max(1,M); |
|
*> if SIDE = 'R', LDA >= max(1,N). |
|
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in] T |
*> \param[in] T |
Line 123
|
Line 116
|
*> \verbatim |
*> \verbatim |
*> C is COMPLEX*16 array, dimension (LDC,N) |
*> C is COMPLEX*16 array, dimension (LDC,N) |
*> On entry, the M-by-N matrix C. |
*> On entry, the M-by-N matrix C. |
*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. |
*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in] LDC |
*> \param[in] LDC |
Line 168
|
Line 161
|
* ===================== |
* ===================== |
*> |
*> |
*> \verbatim |
*> \verbatim |
*> Short-Wide LQ (SWLQ) performs LQ by a sequence of orthogonal transformations, |
*> Short-Wide LQ (SWLQ) performs LQ by a sequence of unitary transformations, |
*> representing Q as a product of other orthogonal matrices |
*> representing Q as a product of other unitary matrices |
*> Q = Q(1) * Q(2) * . . . * Q(k) |
*> Q = Q(1) * Q(2) * . . . * Q(k) |
*> where each Q(i) zeros out upper diagonal entries of a block of NB rows of A: |
*> where each Q(i) zeros out upper diagonal entries of a block of NB rows of A: |
*> Q(1) zeros out the upper diagonal entries of rows 1:NB of A |
*> Q(1) zeros out the upper diagonal entries of rows 1:NB of A |
Line 186
|
Line 179
|
*> stored in columns [(i-1)*(NB-M)+M+1:i*(NB-M)+M] of A, and by upper triangular |
*> stored in columns [(i-1)*(NB-M)+M+1:i*(NB-M)+M] of A, and by upper triangular |
*> block reflectors, stored in array T(1:LDT,(i-1)*M+1:i*M). |
*> block reflectors, stored in array T(1:LDT,(i-1)*M+1:i*M). |
*> The last Q(k) may use fewer rows. |
*> The last Q(k) may use fewer rows. |
*> For more information see Further Details in TPQRT. |
*> For more information see Further Details in TPLQT. |
*> |
*> |
*> For more details of the overall algorithm, see the description of |
*> For more details of the overall algorithm, see the description of |
*> Sequential TSQR in Section 2.2 of [1]. |
*> Sequential TSQR in Section 2.2 of [1]. |
Line 200
|
Line 193
|
SUBROUTINE ZLAMSWLQ( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T, |
SUBROUTINE ZLAMSWLQ( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T, |
$ LDT, C, LDC, WORK, LWORK, INFO ) |
$ LDT, C, LDC, WORK, LWORK, INFO ) |
* |
* |
* -- LAPACK computational routine (version 3.7.0) -- |
* -- 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..-- |
* December 2016 |
|
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
CHARACTER SIDE, TRANS |
CHARACTER SIDE, TRANS |
INTEGER INFO, LDA, M, N, K, MB, NB, LDT, LWORK, LDC, LW |
INTEGER INFO, LDA, M, N, K, MB, NB, LDT, LWORK, LDC |
* .. |
* .. |
* .. Array Arguments .. |
* .. Array Arguments .. |
COMPLEX*16 A( LDA, * ), WORK( * ), C(LDC, * ), |
COMPLEX*16 A( LDA, * ), WORK( * ), C(LDC, * ), |
Line 219
|
Line 211
|
* .. |
* .. |
* .. Local Scalars .. |
* .. Local Scalars .. |
LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY |
LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY |
INTEGER I, II, KK, CTR |
INTEGER I, II, KK, LW, CTR |
* .. |
* .. |
* .. External Functions .. |
* .. External Functions .. |
LOGICAL LSAME |
LOGICAL LSAME |
Line 247
|
Line 239
|
INFO = -1 |
INFO = -1 |
ELSE IF( .NOT.TRAN .AND. .NOT.NOTRAN ) THEN |
ELSE IF( .NOT.TRAN .AND. .NOT.NOTRAN ) THEN |
INFO = -2 |
INFO = -2 |
ELSE IF( M.LT.0 ) THEN |
ELSE IF( K.LT.0 ) THEN |
|
INFO = -5 |
|
ELSE IF( M.LT.K ) THEN |
INFO = -3 |
INFO = -3 |
ELSE IF( N.LT.0 ) THEN |
ELSE IF( N.LT.0 ) THEN |
INFO = -4 |
INFO = -4 |
ELSE IF( K.LT.0 ) THEN |
ELSE IF( K.LT.MB .OR. MB.LT.1) THEN |
INFO = -5 |
INFO = -6 |
ELSE IF( LDA.LT.MAX( 1, K ) ) THEN |
ELSE IF( LDA.LT.MAX( 1, K ) ) THEN |
INFO = -9 |
INFO = -9 |
ELSE IF( LDT.LT.MAX( 1, MB) ) THEN |
ELSE IF( LDT.LT.MAX( 1, MB) ) THEN |