ilaenv.f.html

来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 577 行 · 第 1/3 页

HTML
577
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>ilaenv.f</title>
 <meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!-- 
body { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default   { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.default a { background: rgb(255, 255, 255);  color: rgb(0, 0, 0);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.string   { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.string a { color: rgb(188, 143, 143);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
span.comment   { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: none; }
span.comment a { color: rgb(178, 34, 34);  background: rgb(255, 255, 255);  font-style: normal;  font-weight: 500;  font-stretch: normal;  font-family: adobe-courier;  font-size: 11pt;  text-decoration: underline; }
 --></style>

 </head>
  <body>

<pre>
      INTEGER FUNCTION <a name="ILAENV.1"></a><a href="hfy-index.html#ILAENV">ILAENV</a>( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- LAPACK auxiliary routine (version 3.1.1) --
</span><span class="comment">*</span><span class="comment">     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
</span><span class="comment">*</span><span class="comment">     January 2007
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      CHARACTER*( * )    NAME, OPTS
      INTEGER            ISPEC, N1, N2, N3, N4
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Purpose
</span><span class="comment">*</span><span class="comment">  =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  <a name="ILAENV.15"></a><a href="hfy-index.html#ILAENV">ILAENV</a> is called from the LAPACK routines to choose problem-dependent
</span><span class="comment">*</span><span class="comment">  parameters for the local environment.  See ISPEC for a description of
</span><span class="comment">*</span><span class="comment">  the parameters.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  <a name="ILAENV.19"></a><a href="hfy-index.html#ILAENV">ILAENV</a> returns an INTEGER
</span><span class="comment">*</span><span class="comment">  if <a name="ILAENV.20"></a><a href="hfy-index.html#ILAENV">ILAENV</a> &gt;= 0: <a name="ILAENV.20"></a><a href="hfy-index.html#ILAENV">ILAENV</a> returns the value of the parameter specified by ISPEC
</span><span class="comment">*</span><span class="comment">  if <a name="ILAENV.21"></a><a href="hfy-index.html#ILAENV">ILAENV</a> &lt; 0:  if <a name="ILAENV.21"></a><a href="hfy-index.html#ILAENV">ILAENV</a> = -k, the k-th argument had an illegal value.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  This version provides a set of parameters which should give good,
</span><span class="comment">*</span><span class="comment">  but not optimal, performance on many of the currently available
</span><span class="comment">*</span><span class="comment">  computers.  Users are encouraged to modify this subroutine to set
</span><span class="comment">*</span><span class="comment">  the tuning parameters for their particular machine using the option
</span><span class="comment">*</span><span class="comment">  and problem size information in the arguments.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  This routine will not function correctly if it is converted to all
</span><span class="comment">*</span><span class="comment">  lower case.  Converting it to all upper case is allowed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Arguments
</span><span class="comment">*</span><span class="comment">  =========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  ISPEC   (input) INTEGER
</span><span class="comment">*</span><span class="comment">          Specifies the parameter to be returned as the value of
</span><span class="comment">*</span><span class="comment">          <a name="ILAENV.37"></a><a href="hfy-index.html#ILAENV">ILAENV</a>.
</span><span class="comment">*</span><span class="comment">          = 1: the optimal blocksize; if this value is 1, an unblocked
</span><span class="comment">*</span><span class="comment">               algorithm will give the best performance.
</span><span class="comment">*</span><span class="comment">          = 2: the minimum block size for which the block routine
</span><span class="comment">*</span><span class="comment">               should be used; if the usable block size is less than
</span><span class="comment">*</span><span class="comment">               this value, an unblocked routine should be used.
</span><span class="comment">*</span><span class="comment">          = 3: the crossover point (in a block routine, for N less
</span><span class="comment">*</span><span class="comment">               than this value, an unblocked routine should be used)
</span><span class="comment">*</span><span class="comment">          = 4: the number of shifts, used in the nonsymmetric
</span><span class="comment">*</span><span class="comment">               eigenvalue routines (DEPRECATED)
</span><span class="comment">*</span><span class="comment">          = 5: the minimum column dimension for blocking to be used;
</span><span class="comment">*</span><span class="comment">               rectangular blocks must have dimension at least k by m,
</span><span class="comment">*</span><span class="comment">               where k is given by <a name="ILAENV.49"></a><a href="hfy-index.html#ILAENV">ILAENV</a>(2,...) and m by <a name="ILAENV.49"></a><a href="hfy-index.html#ILAENV">ILAENV</a>(5,...)
</span><span class="comment">*</span><span class="comment">          = 6: the crossover point for the SVD (when reducing an m by n
</span><span class="comment">*</span><span class="comment">               matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
</span><span class="comment">*</span><span class="comment">               this value, a QR factorization is used first to reduce
</span><span class="comment">*</span><span class="comment">               the matrix to a triangular form.)
</span><span class="comment">*</span><span class="comment">          = 7: the number of processors
</span><span class="comment">*</span><span class="comment">          = 8: the crossover point for the multishift QR method
</span><span class="comment">*</span><span class="comment">               for nonsymmetric eigenvalue problems (DEPRECATED)
</span><span class="comment">*</span><span class="comment">          = 9: maximum size of the subproblems at the bottom of the
</span><span class="comment">*</span><span class="comment">               computation tree in the divide-and-conquer algorithm
</span><span class="comment">*</span><span class="comment">               (used by xGELSD and xGESDD)
</span><span class="comment">*</span><span class="comment">          =10: ieee NaN arithmetic can be trusted not to trap
</span><span class="comment">*</span><span class="comment">          =11: infinity arithmetic can be trusted not to trap
</span><span class="comment">*</span><span class="comment">          12 &lt;= ISPEC &lt;= 16:
</span><span class="comment">*</span><span class="comment">               xHSEQR or one of its subroutines,
</span><span class="comment">*</span><span class="comment">               see <a name="IPARMQ.64"></a><a href="iparmq.f.html#IPARMQ.1">IPARMQ</a> for detailed explanation
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  NAME    (input) CHARACTER*(*)
</span><span class="comment">*</span><span class="comment">          The name of the calling subroutine, in either upper case or
</span><span class="comment">*</span><span class="comment">          lower case.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  OPTS    (input) CHARACTER*(*)
</span><span class="comment">*</span><span class="comment">          The character options to the subroutine NAME, concatenated
</span><span class="comment">*</span><span class="comment">          into a single character string.  For example, UPLO = 'U',
</span><span class="comment">*</span><span class="comment">          TRANS = 'T', and DIAG = 'N' for a triangular routine would
</span><span class="comment">*</span><span class="comment">          be specified as OPTS = 'UTN'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  N1      (input) INTEGER
</span><span class="comment">*</span><span class="comment">  N2      (input) INTEGER
</span><span class="comment">*</span><span class="comment">  N3      (input) INTEGER
</span><span class="comment">*</span><span class="comment">  N4      (input) INTEGER
</span><span class="comment">*</span><span class="comment">          Problem dimensions for the subroutine NAME; these may not all
</span><span class="comment">*</span><span class="comment">          be required.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Further Details
</span><span class="comment">*</span><span class="comment">  ===============
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The following conventions have been used when calling <a name="ILAENV.86"></a><a href="hfy-index.html#ILAENV">ILAENV</a> from the
</span><span class="comment">*</span><span class="comment">  LAPACK routines:
</span><span class="comment">*</span><span class="comment">  1)  OPTS is a concatenation of all of the character options to
</span><span class="comment">*</span><span class="comment">      subroutine NAME, in the same order that they appear in the
</span><span class="comment">*</span><span class="comment">      argument list for NAME, even if they are not used in determining
</span><span class="comment">*</span><span class="comment">      the value of the parameter specified by ISPEC.
</span><span class="comment">*</span><span class="comment">  2)  The problem dimensions N1, N2, N3, N4 are specified in the order
</span><span class="comment">*</span><span class="comment">      that they appear in the argument list for NAME.  N1 is used
</span><span class="comment">*</span><span class="comment">      first, N2 second, and so on, and unused problem dimensions are
</span><span class="comment">*</span><span class="comment">      passed a value of -1.
</span><span class="comment">*</span><span class="comment">  3)  The parameter value returned by <a name="ILAENV.96"></a><a href="hfy-index.html#ILAENV">ILAENV</a> is checked for validity in
</span><span class="comment">*</span><span class="comment">      the calling subroutine.  For example, <a name="ILAENV.97"></a><a href="hfy-index.html#ILAENV">ILAENV</a> is used to retrieve
</span><span class="comment">*</span><span class="comment">      the optimal blocksize for <a name="STRTRI.98"></a><a href="strtri.f.html#STRTRI.1">STRTRI</a> as follows:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">      NB = <a name="ILAENV.100"></a><a href="hfy-index.html#ILAENV">ILAENV</a>( 1, '<a name="STRTRI.100"></a><a href="strtri.f.html#STRTRI.1">STRTRI</a>', UPLO // DIAG, N, -1, -1, -1 )
</span><span class="comment">*</span><span class="comment">      IF( NB.LE.1 ) NB = MAX( 1, N )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  =====================================================================
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      INTEGER            I, IC, IZ, NB, NBMIN, NX
      LOGICAL            CNAME, SNAME
      CHARACTER          C1*1, C2*2, C4*2, C3*3, SUBNAM*6
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC          CHAR, ICHAR, INT, MIN, REAL
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      INTEGER            <a name="IEEECK.114"></a><a href="hfy-index.html#IEEECK">IEEECK</a>, <a name="IPARMQ.114"></a><a href="iparmq.f.html#IPARMQ.1">IPARMQ</a>
      EXTERNAL           <a name="IEEECK.115"></a><a href="hfy-index.html#IEEECK">IEEECK</a>, <a name="IPARMQ.115"></a><a href="iparmq.f.html#IPARMQ.1">IPARMQ</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span>      GO TO ( 10, 10, 10, 80, 90, 100, 110, 120,
     $        130, 140, 150, 160, 160, 160, 160, 160 )ISPEC
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Invalid value for ISPEC
</span><span class="comment">*</span><span class="comment">
</span>      <a name="ILAENV.124"></a><a href="hfy-index.html#ILAENV">ILAENV</a> = -1
      RETURN
<span class="comment">*</span><span class="comment">
</span>   10 CONTINUE
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Convert NAME to upper case if the first character is lower case.
</span><span class="comment">*</span><span class="comment">
</span>      <a name="ILAENV.131"></a><a href="hfy-index.html#ILAENV">ILAENV</a> = 1
      SUBNAM = NAME
      IC = ICHAR( SUBNAM( 1: 1 ) )
      IZ = ICHAR( <span class="string">'Z'</span> )
      IF( IZ.EQ.90 .OR. IZ.EQ.122 ) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">        ASCII character set
</span><span class="comment">*</span><span class="comment">
</span>         IF( IC.GE.97 .AND. IC.LE.122 ) THEN
            SUBNAM( 1: 1 ) = CHAR( IC-32 )
            DO 20 I = 2, 6
               IC = ICHAR( SUBNAM( I: I ) )
               IF( IC.GE.97 .AND. IC.LE.122 )
     $            SUBNAM( I: I ) = CHAR( IC-32 )
   20       CONTINUE
         END IF
<span class="comment">*</span><span class="comment">
</span>      ELSE IF( IZ.EQ.233 .OR. IZ.EQ.169 ) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">        EBCDIC character set
</span><span class="comment">*</span><span class="comment">
</span>         IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR.
     $       ( IC.GE.145 .AND. IC.LE.153 ) .OR.
     $       ( IC.GE.162 .AND. IC.LE.169 ) ) THEN
            SUBNAM( 1: 1 ) = CHAR( IC+64 )
            DO 30 I = 2, 6
               IC = ICHAR( SUBNAM( I: I ) )
               IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR.
     $             ( IC.GE.145 .AND. IC.LE.153 ) .OR.
     $             ( IC.GE.162 .AND. IC.LE.169 ) )SUBNAM( I:
     $             I ) = CHAR( IC+64 )
   30       CONTINUE
         END IF
<span class="comment">*</span><span class="comment">
</span>      ELSE IF( IZ.EQ.218 .OR. IZ.EQ.250 ) THEN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">        Prime machines:  ASCII+128
</span><span class="comment">*</span><span class="comment">
</span>         IF( IC.GE.225 .AND. IC.LE.250 ) THEN
            SUBNAM( 1: 1 ) = CHAR( IC-32 )
            DO 40 I = 2, 6
               IC = ICHAR( SUBNAM( I: I ) )
               IF( IC.GE.225 .AND. IC.LE.250 )
     $            SUBNAM( I: I ) = CHAR( IC-32 )

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?