LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
ilaenv.f
Go to the documentation of this file.
00001 *> \brief \b ILAENV
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *  Definition:
00009 *  ===========
00010 *
00011 *       INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3,
00012 *                        N4 )
00013 * 
00014 *       .. Scalar Arguments ..
00015 *       CHARACTER*( * )    NAME, OPTS
00016 *       INTEGER            ISPEC, N1, N2, N3, N4
00017 *       ..
00018 *  
00019 *
00020 *> \par Purpose:
00021 *  =============
00022 *>
00023 *> \verbatim
00024 *>
00025 *> ILAENV returns problem-dependent parameters for the local
00026 *> environment.  See ISPEC for a description of the parameters.
00027 *>
00028 *> In this version, the problem-dependent parameters are contained in
00029 *> the integer array IPARMS in the common block CLAENV and the value
00030 *> with index ISPEC is copied to ILAENV.  This version of ILAENV is
00031 *> to be used in conjunction with XLAENV in TESTING and TIMING.
00032 *> \endverbatim
00033 *
00034 *  Arguments:
00035 *  ==========
00036 *
00037 *> \param[in] ISPEC
00038 *> \verbatim
00039 *>          ISPEC is INTEGER
00040 *>          Specifies the parameter to be returned as the value of
00041 *>          ILAENV.
00042 *>          = 1: the optimal blocksize; if this value is 1, an unblocked
00043 *>               algorithm will give the best performance.
00044 *>          = 2: the minimum block size for which the block routine
00045 *>               should be used; if the usable block size is less than
00046 *>               this value, an unblocked routine should be used.
00047 *>          = 3: the crossover point (in a block routine, for N less
00048 *>               than this value, an unblocked routine should be used)
00049 *>          = 4: the number of shifts, used in the nonsymmetric
00050 *>               eigenvalue routines
00051 *>          = 5: the minimum column dimension for blocking to be used;
00052 *>               rectangular blocks must have dimension at least k by m,
00053 *>               where k is given by ILAENV(2,...) and m by ILAENV(5,...)
00054 *>          = 6: the crossover point for the SVD (when reducing an m by n
00055 *>               matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
00056 *>               this value, a QR factorization is used first to reduce
00057 *>               the matrix to a triangular form.)
00058 *>          = 7: the number of processors
00059 *>          = 8: the crossover point for the multishift QR and QZ methods
00060 *>               for nonsymmetric eigenvalue problems.
00061 *>          = 9: maximum size of the subproblems at the bottom of the
00062 *>               computation tree in the divide-and-conquer algorithm
00063 *>          =10: ieee NaN arithmetic can be trusted not to trap
00064 *>          =11: infinity arithmetic can be trusted not to trap
00065 *>
00066 *>          Other specifications (up to 100) can be added later.
00067 *> \endverbatim
00068 *>
00069 *> \param[in] NAME
00070 *> \verbatim
00071 *>          NAME is CHARACTER*(*)
00072 *>          The name of the calling subroutine.
00073 *> \endverbatim
00074 *>
00075 *> \param[in] OPTS
00076 *> \verbatim
00077 *>          OPTS is CHARACTER*(*)
00078 *>          The character options to the subroutine NAME, concatenated
00079 *>          into a single character string.  For example, UPLO = 'U',
00080 *>          TRANS = 'T', and DIAG = 'N' for a triangular routine would
00081 *>          be specified as OPTS = 'UTN'.
00082 *> \endverbatim
00083 *>
00084 *> \param[in] N1
00085 *> \verbatim
00086 *>          N1 is INTEGER
00087 *> \endverbatim
00088 *>
00089 *> \param[in] N2
00090 *> \verbatim
00091 *>          N2 is INTEGER
00092 *> \endverbatim
00093 *>
00094 *> \param[in] N3
00095 *> \verbatim
00096 *>          N3 is INTEGER
00097 *> \endverbatim
00098 *>
00099 *> \param[in] N4
00100 *> \verbatim
00101 *>          N4 is INTEGER
00102 *>
00103 *>          Problem dimensions for the subroutine NAME; these may not all
00104 *>          be required.
00105 *> \endverbatim
00106 *>
00107 *> \return ILAENV
00108 *> \verbatim
00109 *>          ILAENV is INTEGER
00110 *>          >= 0: the value of the parameter specified by ISPEC
00111 *>          < 0:  if ILAENV = -k, the k-th argument had an illegal value.
00112 *> \endverbatim
00113 *
00114 *  Authors:
00115 *  ========
00116 *
00117 *> \author Univ. of Tennessee 
00118 *> \author Univ. of California Berkeley 
00119 *> \author Univ. of Colorado Denver 
00120 *> \author NAG Ltd. 
00121 *
00122 *> \date November 2011
00123 *
00124 *> \ingroup aux_lin
00125 *
00126 *> \par Further Details:
00127 *  =====================
00128 *>
00129 *> \verbatim
00130 *>
00131 *>  The following conventions have been used when calling ILAENV from the
00132 *>  LAPACK routines:
00133 *>  1)  OPTS is a concatenation of all of the character options to
00134 *>      subroutine NAME, in the same order that they appear in the
00135 *>      argument list for NAME, even if they are not used in determining
00136 *>      the value of the parameter specified by ISPEC.
00137 *>  2)  The problem dimensions N1, N2, N3, N4 are specified in the order
00138 *>      that they appear in the argument list for NAME.  N1 is used
00139 *>      first, N2 second, and so on, and unused problem dimensions are
00140 *>      passed a value of -1.
00141 *>  3)  The parameter value returned by ILAENV is checked for validity in
00142 *>      the calling subroutine.  For example, ILAENV is used to retrieve
00143 *>      the optimal blocksize for STRTRI as follows:
00144 *>
00145 *>      NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 )
00146 *>      IF( NB.LE.1 ) NB = MAX( 1, N )
00147 *> \endverbatim
00148 *>
00149 *  =====================================================================
00150       INTEGER          FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3,
00151      $                 N4 )
00152 *
00153 *  -- LAPACK test routine (version 3.4.0) --
00154 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00155 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00156 *     November 2011
00157 *
00158 *     .. Scalar Arguments ..
00159       CHARACTER*( * )    NAME, OPTS
00160       INTEGER            ISPEC, N1, N2, N3, N4
00161 *     ..
00162 *
00163 *  =====================================================================
00164 *
00165 *     .. Intrinsic Functions ..
00166       INTRINSIC          INT, MIN, REAL
00167 *     ..
00168 *     .. External Functions ..
00169       INTEGER            IEEECK
00170       EXTERNAL           IEEECK
00171 *     ..
00172 *     .. Arrays in Common ..
00173       INTEGER            IPARMS( 100 )
00174 *     ..
00175 *     .. Common blocks ..
00176       COMMON             / CLAENV / IPARMS
00177 *     ..
00178 *     .. Save statement ..
00179       SAVE               / CLAENV /
00180 *     ..
00181 *     .. Executable Statements ..
00182 *
00183       IF( ISPEC.GE.1 .AND. ISPEC.LE.5 ) THEN
00184 *
00185 *        Return a value from the common block.
00186 *
00187          ILAENV = IPARMS( ISPEC )
00188 *
00189       ELSE IF( ISPEC.EQ.6 ) THEN
00190 *
00191 *        Compute SVD crossover point.
00192 *
00193          ILAENV = INT( REAL( MIN( N1, N2 ) )*1.6E0 )
00194 *
00195       ELSE IF( ISPEC.GE.7 .AND. ISPEC.LE.9 ) THEN
00196 *
00197 *        Return a value from the common block.
00198 *
00199          ILAENV = IPARMS( ISPEC )
00200 *
00201       ELSE IF( ISPEC.EQ.10 ) THEN
00202 *
00203 *        IEEE NaN arithmetic can be trusted not to trap
00204 *
00205 C        ILAENV = 0
00206          ILAENV = 1
00207          IF( ILAENV.EQ.1 ) THEN
00208             ILAENV = IEEECK( 1, 0.0, 1.0 )
00209          END IF
00210 *
00211       ELSE IF( ISPEC.EQ.11 ) THEN
00212 *
00213 *        Infinity arithmetic can be trusted not to trap
00214 *
00215 C        ILAENV = 0
00216          ILAENV = 1
00217          IF( ILAENV.EQ.1 ) THEN
00218             ILAENV = IEEECK( 0, 0.0, 1.0 )
00219          END IF
00220 *
00221       ELSE
00222 *
00223 *        Invalid value for ISPEC
00224 *
00225          ILAENV = -1
00226       END IF
00227 *
00228       RETURN
00229 *
00230 *     End of ILAENV
00231 *
00232       END
 All Files Functions