LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
ctplqt.f
Go to the documentation of this file.
1*> \brief \b CTPLQT
2*
3* Definition:
4* ===========
5*
6* SUBROUTINE CTPLQT( M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK,
7* INFO )
8*
9* .. Scalar Arguments ..
10* INTEGER INFO, LDA, LDB, LDT, N, M, L, MB
11* ..
12* .. Array Arguments ..
13* COMPLEX A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
14* ..
15*
16*
17*> \par Purpose:
18* =============
19*>
20*> \verbatim
21*>
22*> CTPLQT computes a blocked LQ factorization of a complex
23*> "triangular-pentagonal" matrix C, which is composed of a
24*> triangular block A and pentagonal block B, using the compact
25*> WY representation for Q.
26*> \endverbatim
27*
28* Arguments:
29* ==========
30*
31*> \param[in] M
32*> \verbatim
33*> M is INTEGER
34*> The number of rows of the matrix B, and the order of the
35*> triangular matrix A.
36*> M >= 0.
37*> \endverbatim
38*>
39*> \param[in] N
40*> \verbatim
41*> N is INTEGER
42*> The number of columns of the matrix B.
43*> N >= 0.
44*> \endverbatim
45*>
46*> \param[in] L
47*> \verbatim
48*> L is INTEGER
49*> The number of rows of the lower trapezoidal part of B.
50*> MIN(M,N) >= L >= 0. See Further Details.
51*> \endverbatim
52*>
53*> \param[in] MB
54*> \verbatim
55*> MB is INTEGER
56*> The block size to be used in the blocked QR. M >= MB >= 1.
57*> \endverbatim
58*>
59*> \param[in,out] A
60*> \verbatim
61*> A is COMPLEX array, dimension (LDA,M)
62*> On entry, the lower triangular M-by-M matrix A.
63*> On exit, the elements on and below the diagonal of the array
64*> contain the lower triangular matrix L.
65*> \endverbatim
66*>
67*> \param[in] LDA
68*> \verbatim
69*> LDA is INTEGER
70*> The leading dimension of the array A. LDA >= max(1,M).
71*> \endverbatim
72*>
73*> \param[in,out] B
74*> \verbatim
75*> B is COMPLEX array, dimension (LDB,N)
76*> On entry, the pentagonal M-by-N matrix B. The first N-L columns
77*> are rectangular, and the last L columns are lower trapezoidal.
78*> On exit, B contains the pentagonal matrix V. See Further Details.
79*> \endverbatim
80*>
81*> \param[in] LDB
82*> \verbatim
83*> LDB is INTEGER
84*> The leading dimension of the array B. LDB >= max(1,M).
85*> \endverbatim
86*>
87*> \param[out] T
88*> \verbatim
89*> T is COMPLEX array, dimension (LDT,N)
90*> The lower triangular block reflectors stored in compact form
91*> as a sequence of upper triangular blocks. See Further Details.
92*> \endverbatim
93*>
94*> \param[in] LDT
95*> \verbatim
96*> LDT is INTEGER
97*> The leading dimension of the array T. LDT >= MB.
98*> \endverbatim
99*>
100*> \param[out] WORK
101*> \verbatim
102*> WORK is COMPLEX array, dimension (MB*M)
103*> \endverbatim
104*>
105*> \param[out] INFO
106*> \verbatim
107*> INFO is INTEGER
108*> = 0: successful exit
109*> < 0: if INFO = -i, the i-th argument had an illegal value
110*> \endverbatim
111*
112* Authors:
113* ========
114*
115*> \author Univ. of Tennessee
116*> \author Univ. of California Berkeley
117*> \author Univ. of Colorado Denver
118*> \author NAG Ltd.
119*
120*> \ingroup tplqt
121*
122*> \par Further Details:
123* =====================
124*>
125*> \verbatim
126*>
127*> The input matrix C is a M-by-(M+N) matrix
128*>
129*> C = [ A ] [ B ]
130*>
131*>
132*> where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal
133*> matrix consisting of a M-by-(N-L) rectangular matrix B1 on left of a M-by-L
134*> upper trapezoidal matrix B2:
135*> [ B ] = [ B1 ] [ B2 ]
136*> [ B1 ] <- M-by-(N-L) rectangular
137*> [ B2 ] <- M-by-L lower trapezoidal.
138*>
139*> The lower trapezoidal matrix B2 consists of the first L columns of a
140*> M-by-M lower triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
141*> B is rectangular M-by-N; if M=L=N, B is lower triangular.
142*>
143*> The matrix W stores the elementary reflectors H(i) in the i-th row
144*> above the diagonal (of A) in the M-by-(M+N) input matrix C
145*> [ C ] = [ A ] [ B ]
146*> [ A ] <- lower triangular M-by-M
147*> [ B ] <- M-by-N pentagonal
148*>
149*> so that W can be represented as
150*> [ W ] = [ I ] [ V ]
151*> [ I ] <- identity, M-by-M
152*> [ V ] <- M-by-N, same form as B.
153*>
154*> Thus, all of information needed for W is contained on exit in B, which
155*> we call V above. Note that V has the same form as B; that is,
156*> [ V ] = [ V1 ] [ V2 ]
157*> [ V1 ] <- M-by-(N-L) rectangular
158*> [ V2 ] <- M-by-L lower trapezoidal.
159*>
160*> The rows of V represent the vectors which define the H(i)'s.
161*>
162*> The number of blocks is B = ceiling(M/MB), where each
163*> block is of order MB except for the last block, which is of order
164*> IB = M - (M-1)*MB. For each of the B blocks, a upper triangular block
165*> reflector factor is computed: T1, T2, ..., TB. The MB-by-MB (and IB-by-IB
166*> for the last block) T's are stored in the MB-by-N matrix T as
167*>
168*> T = [T1 T2 ... TB].
169*> \endverbatim
170*>
171* =====================================================================
172 SUBROUTINE ctplqt( M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK,
173 $ INFO )
174*
175* -- LAPACK computational routine --
176* -- LAPACK is a software package provided by Univ. of Tennessee, --
177* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
178*
179* .. Scalar Arguments ..
180 INTEGER INFO, LDA, LDB, LDT, N, M, L, MB
181* ..
182* .. Array Arguments ..
183 COMPLEX A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
184* ..
185*
186* =====================================================================
187*
188* ..
189* .. Local Scalars ..
190 INTEGER I, IB, LB, NB, IINFO
191* ..
192* .. External Subroutines ..
193 EXTERNAL ctplqt2, ctprfb, xerbla
194* ..
195* .. Executable Statements ..
196*
197* Test the input arguments
198*
199 info = 0
200 IF( m.LT.0 ) THEN
201 info = -1
202 ELSE IF( n.LT.0 ) THEN
203 info = -2
204 ELSE IF( l.LT.0 .OR. (l.GT.min(m,n) .AND. min(m,n).GE.0)) THEN
205 info = -3
206 ELSE IF( mb.LT.1 .OR. (mb.GT.m .AND. m.GT.0)) THEN
207 info = -4
208 ELSE IF( lda.LT.max( 1, m ) ) THEN
209 info = -6
210 ELSE IF( ldb.LT.max( 1, m ) ) THEN
211 info = -8
212 ELSE IF( ldt.LT.mb ) THEN
213 info = -10
214 END IF
215 IF( info.NE.0 ) THEN
216 CALL xerbla( 'CTPLQT', -info )
217 RETURN
218 END IF
219*
220* Quick return if possible
221*
222 IF( m.EQ.0 .OR. n.EQ.0 ) RETURN
223*
224 DO i = 1, m, mb
225*
226* Compute the QR factorization of the current block
227*
228 ib = min( m-i+1, mb )
229 nb = min( n-l+i+ib-1, n )
230 IF( i.GE.l ) THEN
231 lb = 0
232 ELSE
233 lb = nb-n+l-i+1
234 END IF
235*
236 CALL ctplqt2( ib, nb, lb, a(i,i), lda, b( i, 1 ), ldb,
237 $ t(1, i ), ldt, iinfo )
238*
239* Update by applying H**T to B(I+IB:M,:) from the right
240*
241 IF( i+ib.LE.m ) THEN
242 CALL ctprfb( 'R', 'N', 'F', 'R', m-i-ib+1, nb, ib, lb,
243 $ b( i, 1 ), ldb, t( 1, i ), ldt,
244 $ a( i+ib, i ), lda, b( i+ib, 1 ), ldb,
245 $ work, m-i-ib+1)
246 END IF
247 END DO
248 RETURN
249*
250* End of CTPLQT
251*
252 END
subroutine xerbla(srname, info)
Definition cblat2.f:3285
subroutine ctplqt2(m, n, l, a, lda, b, ldb, t, ldt, info)
CTPLQT2
Definition ctplqt2.f:162
subroutine ctplqt(m, n, l, mb, a, lda, b, ldb, t, ldt, work, info)
CTPLQT
Definition ctplqt.f:174
subroutine ctprfb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, a, lda, b, ldb, work, ldwork)
CTPRFB applies a complex "triangular-pentagonal" block reflector to a complex matrix,...
Definition ctprfb.f:251