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

◆ zlaqz1()

subroutine zlaqz1 ( logical, intent(in) ilq,
logical, intent(in) ilz,
integer, intent(in) k,
integer, intent(in) istartm,
integer, intent(in) istopm,
integer, intent(in) ihi,
complex*16, dimension( lda, * ) a,
integer, intent(in) lda,
complex*16, dimension( ldb, * ) b,
integer, intent(in) ldb,
integer, intent(in) nq,
integer, intent(in) qstart,
complex*16, dimension( ldq, * ) q,
integer, intent(in) ldq,
integer, intent(in) nz,
integer, intent(in) zstart,
complex*16, dimension( ldz, * ) z,
integer, intent(in) ldz )

ZLAQZ1

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

Purpose:
!>
!>      ZLAQZ1 chases a 1x1 shift bulge in a matrix pencil down a single position
!> 
Parameters
[in]ILQ
!>          ILQ is LOGICAL
!>              Determines whether or not to update the matrix Q
!> 
[in]ILZ
!>          ILZ is LOGICAL
!>              Determines whether or not to update the matrix Z
!> 
[in]K
!>          K is INTEGER
!>              Index indicating the position of the bulge.
!>              On entry, the bulge is located in
!>              (A(k+1,k),B(k+1,k)).
!>              On exit, the bulge is located in
!>              (A(k+2,k+1),B(k+2,k+1)).
!> 
[in]ISTARTM
!>          ISTARTM is INTEGER
!> 
[in]ISTOPM
!>          ISTOPM is INTEGER
!>              Updates to (A,B) are restricted to
!>              (istartm:k+2,k:istopm). It is assumed
!>              without checking that istartm <= k+1 and
!>              k+2 <= istopm
!> 
[in]IHI
!>          IHI is INTEGER
!> 
[in,out]A
!>          A is COMPLEX*16 array, dimension (LDA,N)
!> 
[in]LDA
!>          LDA is INTEGER
!>              The leading dimension of A as declared in
!>              the calling procedure.
!> 
[in,out]B
!>          B is COMPLEX*16 array, dimension (LDB,N)
!> 
[in]LDB
!>          LDB is INTEGER
!>              The leading dimension of B as declared in
!>              the calling procedure.
!> 
[in]NQ
!>          NQ is INTEGER
!>              The order of the matrix Q
!> 
[in]QSTART
!>          QSTART is INTEGER
!>              Start index of the matrix Q. Rotations are applied
!>              To columns k+2-qStart:k+3-qStart of Q.
!> 
[in,out]Q
!>          Q is COMPLEX*16 array, dimension (LDQ,NQ)
!> 
[in]LDQ
!>          LDQ is INTEGER
!>              The leading dimension of Q as declared in
!>              the calling procedure.
!> 
[in]NZ
!>          NZ is INTEGER
!>              The order of the matrix Z
!> 
[in]ZSTART
!>          ZSTART is INTEGER
!>              Start index of the matrix Z. Rotations are applied
!>              To columns k+1-qStart:k+2-qStart of Z.
!> 
[in,out]Z
!>          Z is COMPLEX*16 array, dimension (LDZ,NZ)
!> 
[in]LDZ
!>          LDZ is INTEGER
!>              The leading dimension of Q as declared in
!>              the calling procedure.
!> 
Author
Thijs Steel, KU Leuven
Date
May 2020

Definition at line 169 of file zlaqz1.f.

172 IMPLICIT NONE
173*
174* Arguments
175 LOGICAL, INTENT( IN ) :: ILQ, ILZ
176 INTEGER, INTENT( IN ) :: K, LDA, LDB, LDQ, LDZ, ISTARTM, ISTOPM,
177 $ NQ, NZ, QSTART, ZSTART, IHI
178 COMPLEX*16 :: A( LDA, * ), B( LDB, * ), Q( LDQ, * ), Z( LDZ, * )
179*
180* Parameters
181 COMPLEX*16 CZERO, CONE
182 parameter( czero = ( 0.0d+0, 0.0d+0 ), cone = ( 1.0d+0,
183 $ 0.0d+0 ) )
184 DOUBLE PRECISION :: ZERO, ONE, HALF
185 parameter( zero = 0.0d0, one = 1.0d0, half = 0.5d0 )
186*
187* Local variables
188 DOUBLE PRECISION :: C
189 COMPLEX*16 :: S, TEMP
190*
191* External Functions
192 EXTERNAL :: zlartg, zrot
193*
194 IF( k+1 .EQ. ihi ) THEN
195*
196* Shift is located on the edge of the matrix, remove it
197*
198 CALL zlartg( b( ihi, ihi ), b( ihi, ihi-1 ), c, s, temp )
199 b( ihi, ihi ) = temp
200 b( ihi, ihi-1 ) = czero
201 CALL zrot( ihi-istartm, b( istartm, ihi ), 1, b( istartm,
202 $ ihi-1 ), 1, c, s )
203 CALL zrot( ihi-istartm+1, a( istartm, ihi ), 1, a( istartm,
204 $ ihi-1 ), 1, c, s )
205 IF ( ilz ) THEN
206 CALL zrot( nz, z( 1, ihi-zstart+1 ), 1, z( 1,
207 $ ihi-1-zstart+
208 $ 1 ), 1, c, s )
209 END IF
210*
211 ELSE
212*
213* Normal operation, move bulge down
214*
215*
216* Apply transformation from the right
217*
218 CALL zlartg( b( k+1, k+1 ), b( k+1, k ), c, s, temp )
219 b( k+1, k+1 ) = temp
220 b( k+1, k ) = czero
221 CALL zrot( k+2-istartm+1, a( istartm, k+1 ), 1, a( istartm,
222 $ k ), 1, c, s )
223 CALL zrot( k-istartm+1, b( istartm, k+1 ), 1, b( istartm,
224 $ k ),
225 $ 1, c, s )
226 IF ( ilz ) THEN
227 CALL zrot( nz, z( 1, k+1-zstart+1 ), 1, z( 1,
228 $ k-zstart+1 ),
229 $ 1, c, s )
230 END IF
231*
232* Apply transformation from the left
233*
234 CALL zlartg( a( k+1, k ), a( k+2, k ), c, s, temp )
235 a( k+1, k ) = temp
236 a( k+2, k ) = czero
237 CALL zrot( istopm-k, a( k+1, k+1 ), lda, a( k+2, k+1 ), lda,
238 $ c,
239 $ s )
240 CALL zrot( istopm-k, b( k+1, k+1 ), ldb, b( k+2, k+1 ), ldb,
241 $ c,
242 $ s )
243 IF ( ilq ) THEN
244 CALL zrot( nq, q( 1, k+1-qstart+1 ), 1, q( 1, k+2-qstart+
245 $ 1 ), 1, c, dconjg( s ) )
246 END IF
247*
248 END IF
249*
250* End of ZLAQZ1
251*
subroutine zlartg(f, g, c, s, r)
ZLARTG generates a plane rotation with real cosine and complex sine.
Definition zlartg.f90:116
subroutine zrot(n, cx, incx, cy, incy, c, s)
ZROT applies a plane rotation with real cosine and complex sine to a pair of complex vectors.
Definition zrot.f:101
Here is the call graph for this function:
Here is the caller graph for this function: