LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ ctpmlqt()

subroutine ctpmlqt ( character side,
character trans,
integer m,
integer n,
integer k,
integer l,
integer mb,
complex, dimension( ldv, * ) v,
integer ldv,
complex, dimension( ldt, * ) t,
integer ldt,
complex, dimension( lda, * ) a,
integer lda,
complex, dimension( ldb, * ) b,
integer ldb,
complex, dimension( * ) work,
integer info )

CTPMLQT

Purpose:
!>
!> CTPMLQT applies a complex unitary matrix Q obtained from a
!>  complex block reflector H to a general
!> complex matrix C, which consists of two blocks A and B.
!> 
Parameters
[in]SIDE
!>          SIDE is CHARACTER*1
!>          = 'L': apply Q or Q**H from the Left;
!>          = 'R': apply Q or Q**H from the Right.
!> 
[in]TRANS
!>          TRANS is CHARACTER*1
!>          = 'N':  No transpose, apply Q;
!>          = 'C':  Conjugate transpose, apply Q**H.
!> 
[in]M
!>          M is INTEGER
!>          The number of rows of the matrix B. M >= 0.
!> 
[in]N
!>          N is INTEGER
!>          The number of columns of the matrix B. N >= 0.
!> 
[in]K
!>          K is INTEGER
!>          The number of elementary reflectors whose product defines
!>          the matrix Q.
!> 
[in]L
!>          L is INTEGER
!>          The order of the trapezoidal part of V.
!>          K >= L >= 0.  See Further Details.
!> 
[in]MB
!>          MB is INTEGER
!>          The block size used for the storage of T.  K >= MB >= 1.
!>          This must be the same value of MB used to generate T
!>          in CTPLQT.
!> 
[in]V
!>          V is COMPLEX array, dimension (LDV,K)
!>          The i-th row must contain the vector which defines the
!>          elementary reflector H(i), for i = 1,2,...,k, as returned by
!>          CTPLQT in B.  See Further Details.
!> 
[in]LDV
!>          LDV is INTEGER
!>          The leading dimension of the array V. LDV >= K.
!> 
[in]T
!>          T is COMPLEX array, dimension (LDT,K)
!>          The upper triangular factors of the block reflectors
!>          as returned by CTPLQT, stored as a MB-by-K matrix.
!> 
[in]LDT
!>          LDT is INTEGER
!>          The leading dimension of the array T.  LDT >= MB.
!> 
[in,out]A
!>          A is COMPLEX array, dimension
!>          (LDA,N) if SIDE = 'L' or
!>          (LDA,K) if SIDE = 'R'
!>          On entry, the K-by-N or M-by-K matrix A.
!>          On exit, A is overwritten by the corresponding block of
!>          Q*C or Q**H*C or C*Q or C*Q**H.  See Further Details.
!> 
[in]LDA
!>          LDA is INTEGER
!>          The leading dimension of the array A.
!>          If SIDE = 'L', LDA >= max(1,K);
!>          If SIDE = 'R', LDA >= max(1,M).
!> 
[in,out]B
!>          B is COMPLEX array, dimension (LDB,N)
!>          On entry, the M-by-N matrix B.
!>          On exit, B is overwritten by the corresponding block of
!>          Q*C or Q**H*C or C*Q or C*Q**H.  See Further Details.
!> 
[in]LDB
!>          LDB is INTEGER
!>          The leading dimension of the array B.
!>          LDB >= max(1,M).
!> 
[out]WORK
!>          WORK is COMPLEX array. The dimension of WORK is
!>           N*MB if SIDE = 'L', or  M*MB if SIDE = 'R'.
!> 
[out]INFO
!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details:
!>
!>  The columns of the pentagonal matrix V contain the elementary reflectors
!>  H(1), H(2), ..., H(K); V is composed of a rectangular block V1 and a
!>  trapezoidal block V2:
!>
!>        V = [V1] [V2].
!>
!>
!>  The size of the trapezoidal block V2 is determined by the parameter L,
!>  where 0 <= L <= K; V2 is lower trapezoidal, consisting of the first L
!>  rows of a K-by-K upper triangular matrix.  If L=K, V2 is lower triangular;
!>  if L=0, there is no trapezoidal block, hence V = V1 is rectangular.
!>
!>  If SIDE = 'L':  C = [A]  where A is K-by-N,  B is M-by-N and V is K-by-M.
!>                      [B]
!>
!>  If SIDE = 'R':  C = [A B]  where A is M-by-K, B is M-by-N and V is K-by-N.
!>
!>  The complex unitary matrix Q is formed from V and T.
!>
!>  If TRANS='N' and SIDE='L', C is on exit replaced with Q * C.
!>
!>  If TRANS='C' and SIDE='L', C is on exit replaced with Q**H * C.
!>
!>  If TRANS='N' and SIDE='R', C is on exit replaced with C * Q.
!>
!>  If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**H.
!> 

Definition at line 197 of file ctpmlqt.f.

200*
201* -- LAPACK computational routine --
202* -- LAPACK is a software package provided by Univ. of Tennessee, --
203* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
204*
205* .. Scalar Arguments ..
206 CHARACTER SIDE, TRANS
207 INTEGER INFO, K, LDV, LDA, LDB, M, N, L, MB, LDT
208* ..
209* .. Array Arguments ..
210 COMPLEX V( LDV, * ), A( LDA, * ), B( LDB, * ),
211 $ T( LDT, * ), WORK( * )
212* ..
213*
214* =====================================================================
215*
216* ..
217* .. Local Scalars ..
218 LOGICAL LEFT, RIGHT, TRAN, NOTRAN
219 INTEGER I, IB, NB, LB, KF, LDAQ
220* ..
221* .. External Functions ..
222 LOGICAL LSAME
223 EXTERNAL lsame
224* ..
225* .. External Subroutines ..
226 EXTERNAL xerbla, ctprfb
227* ..
228* .. Intrinsic Functions ..
229 INTRINSIC max, min
230* ..
231* .. Executable Statements ..
232*
233* .. Test the input arguments ..
234*
235 info = 0
236 left = lsame( side, 'L' )
237 right = lsame( side, 'R' )
238 tran = lsame( trans, 'C' )
239 notran = lsame( trans, 'N' )
240*
241 IF ( left ) THEN
242 ldaq = max( 1, k )
243 ELSE IF ( right ) THEN
244 ldaq = max( 1, m )
245 END IF
246 IF( .NOT.left .AND. .NOT.right ) THEN
247 info = -1
248 ELSE IF( .NOT.tran .AND. .NOT.notran ) THEN
249 info = -2
250 ELSE IF( m.LT.0 ) THEN
251 info = -3
252 ELSE IF( n.LT.0 ) THEN
253 info = -4
254 ELSE IF( k.LT.0 ) THEN
255 info = -5
256 ELSE IF( l.LT.0 .OR. l.GT.k ) THEN
257 info = -6
258 ELSE IF( mb.LT.1 .OR. (mb.GT.k .AND. k.GT.0) ) THEN
259 info = -7
260 ELSE IF( ldv.LT.k ) THEN
261 info = -9
262 ELSE IF( ldt.LT.mb ) THEN
263 info = -11
264 ELSE IF( lda.LT.ldaq ) THEN
265 info = -13
266 ELSE IF( ldb.LT.max( 1, m ) ) THEN
267 info = -15
268 END IF
269*
270 IF( info.NE.0 ) THEN
271 CALL xerbla( 'CTPMLQT', -info )
272 RETURN
273 END IF
274*
275* .. Quick return if possible ..
276*
277 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 ) RETURN
278*
279 IF( left .AND. notran ) THEN
280*
281 DO i = 1, k, mb
282 ib = min( mb, k-i+1 )
283 nb = min( m-l+i+ib-1, m )
284 IF( i.GE.l ) THEN
285 lb = 0
286 ELSE
287 lb = 0
288 END IF
289 CALL ctprfb( 'L', 'C', 'F', 'R', nb, n, ib, lb,
290 $ v( i, 1 ), ldv, t( 1, i ), ldt,
291 $ a( i, 1 ), lda, b, ldb, work, ib )
292 END DO
293*
294 ELSE IF( right .AND. tran ) THEN
295*
296 DO i = 1, k, mb
297 ib = min( mb, k-i+1 )
298 nb = min( n-l+i+ib-1, n )
299 IF( i.GE.l ) THEN
300 lb = 0
301 ELSE
302 lb = nb-n+l-i+1
303 END IF
304 CALL ctprfb( 'R', 'N', 'F', 'R', m, nb, ib, lb,
305 $ v( i, 1 ), ldv, t( 1, i ), ldt,
306 $ a( 1, i ), lda, b, ldb, work, m )
307 END DO
308*
309 ELSE IF( left .AND. tran ) THEN
310*
311 kf = ((k-1)/mb)*mb+1
312 DO i = kf, 1, -mb
313 ib = min( mb, k-i+1 )
314 nb = min( m-l+i+ib-1, m )
315 IF( i.GE.l ) THEN
316 lb = 0
317 ELSE
318 lb = 0
319 END IF
320 CALL ctprfb( 'L', 'N', 'F', 'R', nb, n, ib, lb,
321 $ v( i, 1 ), ldv, t( 1, i ), ldt,
322 $ a( i, 1 ), lda, b, ldb, work, ib )
323 END DO
324*
325 ELSE IF( right .AND. notran ) THEN
326*
327 kf = ((k-1)/mb)*mb+1
328 DO i = kf, 1, -mb
329 ib = min( mb, k-i+1 )
330 nb = min( n-l+i+ib-1, n )
331 IF( i.GE.l ) THEN
332 lb = 0
333 ELSE
334 lb = nb-n+l-i+1
335 END IF
336 CALL ctprfb( 'R', 'C', 'F', 'R', m, nb, ib, lb,
337 $ v( i, 1 ), ldv, t( 1, i ), ldt,
338 $ a( 1, i ), lda, b, ldb, work, m )
339 END DO
340*
341 END IF
342*
343 RETURN
344*
345* End of CTPMLQT
346*
subroutine xerbla(srname, info)
Definition cblat2.f:3285
logical function lsame(ca, cb)
LSAME
Definition lsame.f:48
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:249
Here is the call graph for this function:
Here is the caller graph for this function: