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

◆ clatzm()

subroutine clatzm ( character side,
integer m,
integer n,
complex, dimension( * ) v,
integer incv,
complex tau,
complex, dimension( ldc, * ) c1,
complex, dimension( ldc, * ) c2,
integer ldc,
complex, dimension( * ) work )

CLATZM

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

Purpose:
!>
!> This routine is deprecated and has been replaced by routine CUNMRZ.
!>
!> CLATZM applies a Householder matrix generated by CTZRQF to a matrix.
!>
!> Let P = I - tau*u*u**H,   u = ( 1 ),
!>                               ( v )
!> where v is an (m-1) vector if SIDE = 'L', or a (n-1) vector if
!> SIDE = 'R'.
!>
!> If SIDE equals 'L', let
!>        C = [ C1 ] 1
!>            [ C2 ] m-1
!>              n
!> Then C is overwritten by P*C.
!>
!> If SIDE equals 'R', let
!>        C = [ C1, C2 ] m
!>               1  n-1
!> Then C is overwritten by C*P.
!> 
Parameters
[in]SIDE
!>          SIDE is CHARACTER*1
!>          = 'L': form P * C
!>          = 'R': form C * P
!> 
[in]M
!>          M is INTEGER
!>          The number of rows of the matrix C.
!> 
[in]N
!>          N is INTEGER
!>          The number of columns of the matrix C.
!> 
[in]V
!>          V is COMPLEX array, dimension
!>                  (1 + (M-1)*abs(INCV)) if SIDE = 'L'
!>                  (1 + (N-1)*abs(INCV)) if SIDE = 'R'
!>          The vector v in the representation of P. V is not used
!>          if TAU = 0.
!> 
[in]INCV
!>          INCV is INTEGER
!>          The increment between elements of v. INCV <> 0
!> 
[in]TAU
!>          TAU is COMPLEX
!>          The value tau in the representation of P.
!> 
[in,out]C1
!>          C1 is COMPLEX array, dimension
!>                         (LDC,N) if SIDE = 'L'
!>                         (M,1)   if SIDE = 'R'
!>          On entry, the n-vector C1 if SIDE = 'L', or the m-vector C1
!>          if SIDE = 'R'.
!>
!>          On exit, the first row of P*C if SIDE = 'L', or the first
!>          column of C*P if SIDE = 'R'.
!> 
[in,out]C2
!>          C2 is COMPLEX array, dimension
!>                         (LDC, N)   if SIDE = 'L'
!>                         (LDC, N-1) if SIDE = 'R'
!>          On entry, the (m - 1) x n matrix C2 if SIDE = 'L', or the
!>          m x (n - 1) matrix C2 if SIDE = 'R'.
!>
!>          On exit, rows 2:m of P*C if SIDE = 'L', or columns 2:m of C*P
!>          if SIDE = 'R'.
!> 
[in]LDC
!>          LDC is INTEGER
!>          The leading dimension of the arrays C1 and C2.
!>          LDC >= max(1,M).
!> 
[out]WORK
!>          WORK is COMPLEX array, dimension
!>                      (N) if SIDE = 'L'
!>                      (M) if SIDE = 'R'
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 149 of file clatzm.f.

151*
152* -- LAPACK computational routine --
153* -- LAPACK is a software package provided by Univ. of Tennessee, --
154* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
155*
156* .. Scalar Arguments ..
157 CHARACTER SIDE
158 INTEGER INCV, LDC, M, N
159 COMPLEX TAU
160* ..
161* .. Array Arguments ..
162 COMPLEX C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
163* ..
164*
165* =====================================================================
166*
167* .. Parameters ..
168 COMPLEX ONE, ZERO
169 parameter( one = ( 1.0e+0, 0.0e+0 ),
170 $ zero = ( 0.0e+0, 0.0e+0 ) )
171* ..
172* .. External Subroutines ..
173 EXTERNAL caxpy, ccopy, cgemv, cgerc, cgeru, clacgv
174* ..
175* .. External Functions ..
176 LOGICAL LSAME
177 EXTERNAL lsame
178* ..
179* .. Intrinsic Functions ..
180 INTRINSIC min
181* ..
182* .. Executable Statements ..
183*
184 IF( ( min( m, n ).EQ.0 ) .OR. ( tau.EQ.zero ) )
185 $ RETURN
186*
187 IF( lsame( side, 'L' ) ) THEN
188*
189* w := ( C1 + v**H * C2 )**H
190*
191 CALL ccopy( n, c1, ldc, work, 1 )
192 CALL clacgv( n, work, 1 )
193 CALL cgemv( 'Conjugate transpose', m-1, n, one, c2, ldc, v,
194 $ incv, one, work, 1 )
195*
196* [ C1 ] := [ C1 ] - tau* [ 1 ] * w**H
197* [ C2 ] [ C2 ] [ v ]
198*
199 CALL clacgv( n, work, 1 )
200 CALL caxpy( n, -tau, work, 1, c1, ldc )
201 CALL cgeru( m-1, n, -tau, v, incv, work, 1, c2, ldc )
202*
203 ELSE IF( lsame( side, 'R' ) ) THEN
204*
205* w := C1 + C2 * v
206*
207 CALL ccopy( m, c1, 1, work, 1 )
208 CALL cgemv( 'No transpose', m, n-1, one, c2, ldc, v, incv,
209 $ one, work, 1 )
210*
211* [ C1, C2 ] := [ C1, C2 ] - tau* w * [ 1 , v**H]
212*
213 CALL caxpy( m, -tau, work, 1, c1, 1 )
214 CALL cgerc( m, n-1, -tau, work, 1, v, incv, c2, ldc )
215 END IF
216*
217 RETURN
218*
219* End of CLATZM
220*
subroutine caxpy(n, ca, cx, incx, cy, incy)
CAXPY
Definition caxpy.f:88
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
Definition ccopy.f:81
subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
CGEMV
Definition cgemv.f:160
subroutine cgerc(m, n, alpha, x, incx, y, incy, a, lda)
CGERC
Definition cgerc.f:130
subroutine cgeru(m, n, alpha, x, incx, y, incy, a, lda)
CGERU
Definition cgeru.f:130
subroutine clacgv(n, x, incx)
CLACGV conjugates a complex vector.
Definition clacgv.f:72
logical function lsame(ca, cb)
LSAME
Definition lsame.f:48
Here is the call graph for this function:
Here is the caller graph for this function: