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

◆ ztpmlqt()

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

ZTPMLQT

Download ZTPMLQT + dependencies [TGZ] [ZIP] [TXT]

Purpose:
!>
!> ZTPMLQT 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 ZTPLQT.
!> 
[in]V
!>          V is COMPLEX*16 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
!>          ZTPLQT in B.  See Further Details.
!> 
[in]LDV
!>          LDV is INTEGER
!>          The leading dimension of the array V. LDV >= K.
!> 
[in]T
!>          T is COMPLEX*16 array, dimension (LDT,K)
!>          The upper triangular factors of the block reflectors
!>          as returned by ZTPLQT, 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*16 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*16 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*16 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 210 of file ztpmlqt.f.

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