PDLAQR5(3)    ScaLAPACK routine of NEC Numeric Library Collection   PDLAQR5(3)



NAME
       PDLAQR5 - performs a single small-bulge multi-shift QR sweep by chasing
       separated groups of bulges along the main block diagonal of H

SYNOPSIS
       SUBROUTINE PDLAQR5( WANTT, WANTZ, KACC22, N, KTOP,  KBOT,  NSHFTS,  SR,
                           SI,  H,  DESCH,  ILOZ, IHIZ, Z, DESCZ, WORK, LWORK,
                           IWORK, LIWORK )

           INTEGER         IHIZ, ILOZ, KACC22, KBOT, KTOP, N,  NSHFTS,  LWORK,
                           LIWORK

           LOGICAL         WANTT, WANTZ

           INTEGER         DESCH( * ), DESCZ( * ), IWORK( * )

           DOUBLE          PRECISION H( * ), SI( * ), SR( * ), Z( * ), WORK( *
                           )

PURPOSE
       This auxiliary subroutine called by PDLAQR0 performs  a  single  small-
       bulge  multi-shift QR sweep by chasing separated groups of bulges along
       the main block diagonal of H.


ARGUMENTS
       WANTT  (global input) logical scalar
               WANTT = .TRUE. if the quasi-triangular Schur  factor  is  being
               computed.  WANTT is set to .FALSE. otherwise.

       WANTZ  (global input) logical scalar
               WANTZ  =  .TRUE.  if  the orthogonal Schur factor is being com-
               puted.  WANTZ is set to .FALSE. otherwise.

       KACC22 (global input) integer with value 0, 1, or 2.
               Specifies the computation mode of far-from-diagonal  orthogonal
               updates.
               = 1: PDLAQR5 accumulates reflections and uses matrix-matrix
                    multiply to update the far-from-diagonal matrix entries.
               = 2: PDLAQR5 accumulates reflections, uses matrix-matrix
                    multiply to update the far-from-diagonal matrix entries,
                    and takes advantage of 2-by-2 block structure during
                    matrix multiplies.

       N      (global input) integer scalar
               N  is the order of the Hessenberg matrix H upon which this sub-
               routine operates.

       KTOP   (global input) integer scalar

       KBOT   (global input) integer scalar
               These are the first and last rows and columns  of  an  isolated
               diagonal  block upon which the QR sweep is to be applied. It is
               assumed without a check that
                         either KTOP = 1  or   H(KTOP,KTOP-1) = 0
               and
                         either KBOT = N  or   H(KBOT+1,KBOT) = 0.

       NSHFTS (global input) integer scalar
               NSHFTS gives the number of simultaneous shifts.  NSHFTS must be
               positive and even.

       SR     (global input) DOUBLE PRECISION array of size (NSHFTS)

       SI     (global input) DOUBLE PRECISION array of size (NSHFTS)
               SR  contains the real parts and SI contains the imaginary parts
               of the NSHFTS shifts of origin that define the  multi-shift  QR
               sweep.

       H      (local input/output) DOUBLE PRECISION array of size
               (DESCH(LLD_),*)  On  input  H contains a Hessenberg matrix.  On
               output a multi-shift QR  sweep  with  shifts  SR(J)+i*SI(J)  is
               applied to the isolated diagonal block in rows and columns KTOP
               through KBOT.

       DESCH  (global and local input) INTEGER array of dimension DLEN_.
               The array descriptor for the distributed matrix H.

       ILOZ   (global input) INTEGER

       IHIZ   (global input) INTEGER
               Specify the rows of Z to which transformations must be  applied
               if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N

       Z        (local   input/output)   DOUBLE   PRECISION   array   of  size
       (DESCZ(LLD_),*)
               If  WANTZ  =  .TRUE.,  then  the QR Sweep orthogonal similarity
               transformation is accumulated  into  Z(ILOZ:IHIZ,ILO:IHI)  from
               the right.
               If WANTZ = .FALSE., then Z is unreferenced.

       DESCZ  (global and local input) INTEGER array of dimension DLEN_.
               The array descriptor for the distributed matrix Z.

       WORK   (local workspace) DOUBLE PRECISION array, dimension(DWORK)

       LWORK  (local input) INTEGER
               The length of the workspace array WORK.

       IWORK  (local workspace) INTEGER array, dimension (LIWORK)

       LIWORK (local input) INTEGER
               The length of the workspace array IWORK.




ScaLAPACK routine               31 October 2017                     PDLAQR5(3)