version 1.18, 2020/05/21 21:46:00
|
version 1.19, 2023/08/07 08:38:56
|
Line 237
|
Line 237
|
*> \author Univ. of Colorado Denver |
*> \author Univ. of Colorado Denver |
*> \author NAG Ltd. |
*> \author NAG Ltd. |
* |
* |
*> \date December 2016 |
|
* |
|
*> \ingroup doubleOTHERauxiliary |
*> \ingroup doubleOTHERauxiliary |
* |
* |
*> \par Contributors: |
*> \par Contributors: |
Line 263
|
Line 261
|
SUBROUTINE DLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, |
SUBROUTINE DLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, |
$ ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO ) |
$ ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO ) |
* |
* |
* -- LAPACK auxiliary routine (version 3.7.0) -- |
* -- LAPACK auxiliary routine -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* December 2016 |
|
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N |
INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N |
Line 284
|
Line 281
|
* . DLAHQR because of insufficient subdiagonal scratch space. |
* . DLAHQR because of insufficient subdiagonal scratch space. |
* . (This is a hard limit.) ==== |
* . (This is a hard limit.) ==== |
INTEGER NTINY |
INTEGER NTINY |
PARAMETER ( NTINY = 11 ) |
PARAMETER ( NTINY = 15 ) |
* |
* |
* ==== Exceptional deflation windows: try to cure rare |
* ==== Exceptional deflation windows: try to cure rare |
* . slow convergence by varying the size of the |
* . slow convergence by varying the size of the |
Line 368
|
Line 365
|
END IF |
END IF |
* |
* |
* ==== NWR = recommended deflation window size. At this |
* ==== NWR = recommended deflation window size. At this |
* . point, N .GT. NTINY = 11, so there is enough |
* . point, N .GT. NTINY = 15, so there is enough |
* . subdiagonal workspace for NWR.GE.2 as required. |
* . subdiagonal workspace for NWR.GE.2 as required. |
* . (In fact, there is enough subdiagonal space for |
* . (In fact, there is enough subdiagonal space for |
* . NWR.GE.3.) ==== |
* . NWR.GE.4.) ==== |
* |
* |
NWR = ILAENV( 13, 'DLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) |
NWR = ILAENV( 13, 'DLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) |
NWR = MAX( 2, NWR ) |
NWR = MAX( 2, NWR ) |
NWR = MIN( IHI-ILO+1, ( N-1 ) / 3, NWR ) |
NWR = MIN( IHI-ILO+1, ( N-1 ) / 3, NWR ) |
* |
* |
* ==== NSR = recommended number of simultaneous shifts. |
* ==== NSR = recommended number of simultaneous shifts. |
* . At this point N .GT. NTINY = 11, so there is at |
* . At this point N .GT. NTINY = 15, so there is at |
* . enough subdiagonal workspace for NSR to be even |
* . enough subdiagonal workspace for NSR to be even |
* . and greater than or equal to two as required. ==== |
* . and greater than or equal to two as required. ==== |
* |
* |
NSR = ILAENV( 15, 'DLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) |
NSR = ILAENV( 15, 'DLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) |
NSR = MIN( NSR, ( N+6 ) / 9, IHI-ILO ) |
NSR = MIN( NSR, ( N-3 ) / 6, IHI-ILO ) |
NSR = MAX( 2, NSR-MOD( NSR, 2 ) ) |
NSR = MAX( 2, NSR-MOD( NSR, 2 ) ) |
* |
* |
* ==== Estimate optimal workspace ==== |
* ==== Estimate optimal workspace ==== |
Line 431
|
Line 428
|
* ==== NSMAX = the Largest number of simultaneous shifts |
* ==== NSMAX = the Largest number of simultaneous shifts |
* . for which there is sufficient workspace. ==== |
* . for which there is sufficient workspace. ==== |
* |
* |
NSMAX = MIN( ( N+6 ) / 9, 2*LWORK / 3 ) |
NSMAX = MIN( ( N-3 ) / 6, 2*LWORK / 3 ) |
NSMAX = NSMAX - MOD( NSMAX, 2 ) |
NSMAX = NSMAX - MOD( NSMAX, 2 ) |
* |
* |
* ==== NDFL: an iteration count restarted at deflation. ==== |
* ==== NDFL: an iteration count restarted at deflation. ==== |
Line 582
|
Line 579
|
* |
* |
* ==== Got NS/2 or fewer shifts? Use DLAHQR |
* ==== Got NS/2 or fewer shifts? Use DLAHQR |
* . on a trailing principal submatrix to |
* . on a trailing principal submatrix to |
* . get more. (Since NS.LE.NSMAX.LE.(N+6)/9, |
* . get more. (Since NS.LE.NSMAX.LE.(N-3)/6, |
* . there is enough space below the subdiagonal |
* . there is enough space below the subdiagonal |
* . to fit an NS-by-NS scratch array.) ==== |
* . to fit an NS-by-NS scratch array.) ==== |
* |
* |
Line 697
|
Line 694
|
* . (NVE-by-KDU) vertical work WV arrow along |
* . (NVE-by-KDU) vertical work WV arrow along |
* . the left-hand-edge. ==== |
* . the left-hand-edge. ==== |
* |
* |
KDU = 3*NS - 3 |
KDU = 2*NS |
KU = N - KDU + 1 |
KU = N - KDU + 1 |
KWH = KDU + 1 |
KWH = KDU + 1 |
NHO = ( N-KDU+1-4 ) - ( KDU+1 ) + 1 |
NHO = ( N-KDU+1-4 ) - ( KDU+1 ) + 1 |