--- rpl/lapack/lapack/iparmq.f 2017/06/17 11:06:40 1.17 +++ rpl/lapack/lapack/iparmq.f 2023/08/07 08:39:14 1.21 @@ -41,7 +41,7 @@ * *> \param[in] ISPEC *> \verbatim -*> ISPEC is integer scalar +*> ISPEC is INTEGER *> ISPEC specifies which tunable parameter IPARMQ should *> return. *> @@ -60,7 +60,7 @@ *> invest in an (expensive) multi-shift QR sweep. *> If the aggressive early deflation subroutine *> finds LD converged eigenvalues from an order -*> NW deflation window and LD.GT.(NW*NIBBLE)/100, +*> NW deflation window and LD > (NW*NIBBLE)/100, *> then the next QR sweep is skipped and early *> deflation is applied immediately to the *> remaining active diagonal block. Setting @@ -100,24 +100,28 @@ *> IPARMQ(ISPEC=16)=1 may be more efficient than *> IPARMQ(ISPEC=16)=2 despite the greater level of *> arithmetic work implied by the latter choice.) +*> +*> ISPEC=17: (ICOST) An estimate of the relative cost of flops +*> within the near-the-diagonal shift chase compared +*> to flops within the BLAS calls of a QZ sweep. *> \endverbatim *> *> \param[in] NAME *> \verbatim -*> NAME is character string +*> NAME is CHARACTER string *> Name of the calling subroutine *> \endverbatim *> *> \param[in] OPTS *> \verbatim -*> OPTS is character string +*> OPTS is CHARACTER string *> This is a concatenation of the string arguments to *> TTQRE. *> \endverbatim *> *> \param[in] N *> \verbatim -*> N is integer scalar +*> N is INTEGER *> N is the order of the Hessenberg matrix H. *> \endverbatim *> @@ -135,7 +139,7 @@ *> *> \param[in] LWORK *> \verbatim -*> LWORK is integer scalar +*> LWORK is INTEGER *> The amount of workspace available. *> \endverbatim * @@ -147,8 +151,6 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 -* *> \ingroup OTHERauxiliary * *> \par Further Details: @@ -184,8 +186,8 @@ *> This depends on ILO, IHI and NS, the *> number of simultaneous shifts returned *> by IPARMQ(ISPEC=15). The default for -*> (IHI-ILO+1).LE.500 is NS. The default -*> for (IHI-ILO+1).GT.500 is 3*NS/2. +*> (IHI-ILO+1) <= 500 is NS. The default +*> for (IHI-ILO+1) > 500 is 3*NS/2. *> *> IPARMQ(ISPEC=14) Nibble crossover point. Default: 14. *> @@ -217,15 +219,18 @@ *> IPARMQ(ISPEC=16) Select structured matrix multiply. *> (See ISPEC=16 above for details.) *> Default: 3. +*> +*> IPARMQ(ISPEC=17) Relative cost heuristic for blocksize selection. +*> Expressed as a percentage. +*> Default: 10. *> \endverbatim *> * ===================================================================== INTEGER FUNCTION IPARMQ( ISPEC, NAME, OPTS, N, ILO, IHI, LWORK ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 * * .. Scalar Arguments .. INTEGER IHI, ILO, ISPEC, LWORK, N @@ -233,12 +238,12 @@ * * ================================================================ * .. Parameters .. - INTEGER INMIN, INWIN, INIBL, ISHFTS, IACC22 + INTEGER INMIN, INWIN, INIBL, ISHFTS, IACC22, ICOST PARAMETER ( INMIN = 12, INWIN = 13, INIBL = 14, - $ ISHFTS = 15, IACC22 = 16 ) - INTEGER NMIN, K22MIN, KACMIN, NIBBLE, KNWSWP + $ ISHFTS = 15, IACC22 = 16, ICOST = 17 ) + INTEGER NMIN, K22MIN, KACMIN, NIBBLE, KNWSWP, RCOST PARAMETER ( NMIN = 75, K22MIN = 14, KACMIN = 14, - $ NIBBLE = 14, KNWSWP = 500 ) + $ NIBBLE = 14, KNWSWP = 500, RCOST = 10 ) REAL TWO PARAMETER ( TWO = 2.0 ) * .. @@ -384,6 +389,12 @@ $ IPARMQ = 2 END IF * + ELSE IF( ISPEC.EQ.ICOST ) THEN +* +* === Relative cost of near-the-diagonal chase vs +* BLAS updates === +* + IPARMQ = RCOST ELSE * ===== invalid value of ispec ===== IPARMQ = -1