LAPACK 3.3.1
Linear Algebra PACKage
|
00001 INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, 00002 $ N4 ) 00003 * 00004 * -- LAPACK auxiliary routine (version 3.1) -- 00005 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. 00006 * November 2006 00007 * 00008 * .. Scalar Arguments .. 00009 CHARACTER*( * ) NAME, OPTS 00010 INTEGER ISPEC, N1, N2, N3, N4 00011 * .. 00012 * 00013 * Purpose 00014 * ======= 00015 * 00016 * ILAENV returns problem-dependent parameters for the local 00017 * environment. See ISPEC for a description of the parameters. 00018 * 00019 * In this version, the problem-dependent parameters are contained in 00020 * the integer array IPARMS in the common block CLAENV and the value 00021 * with index ISPEC is copied to ILAENV. This version of ILAENV is 00022 * to be used in conjunction with XLAENV in TESTING and TIMING. 00023 * 00024 * Arguments 00025 * ========= 00026 * 00027 * ISPEC (input) INTEGER 00028 * Specifies the parameter to be returned as the value of 00029 * ILAENV. 00030 * = 1: the optimal blocksize; if this value is 1, an unblocked 00031 * algorithm will give the best performance. 00032 * = 2: the minimum block size for which the block routine 00033 * should be used; if the usable block size is less than 00034 * this value, an unblocked routine should be used. 00035 * = 3: the crossover point (in a block routine, for N less 00036 * than this value, an unblocked routine should be used) 00037 * = 4: the number of shifts, used in the nonsymmetric 00038 * eigenvalue routines 00039 * = 5: the minimum column dimension for blocking to be used; 00040 * rectangular blocks must have dimension at least k by m, 00041 * where k is given by ILAENV(2,...) and m by ILAENV(5,...) 00042 * = 6: the crossover point for the SVD (when reducing an m by n 00043 * matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds 00044 * this value, a QR factorization is used first to reduce 00045 * the matrix to a triangular form.) 00046 * = 7: the number of processors 00047 * = 8: the crossover point for the multishift QR and QZ methods 00048 * for nonsymmetric eigenvalue problems. 00049 * = 9: maximum size of the subproblems at the bottom of the 00050 * computation tree in the divide-and-conquer algorithm 00051 * =10: ieee NaN arithmetic can be trusted not to trap 00052 * =11: infinity arithmetic can be trusted not to trap 00053 * 00054 * Other specifications (up to 100) can be added later. 00055 * 00056 * NAME (input) CHARACTER*(*) 00057 * The name of the calling subroutine. 00058 * 00059 * OPTS (input) CHARACTER*(*) 00060 * The character options to the subroutine NAME, concatenated 00061 * into a single character string. For example, UPLO = 'U', 00062 * TRANS = 'T', and DIAG = 'N' for a triangular routine would 00063 * be specified as OPTS = 'UTN'. 00064 * 00065 * N1 (input) INTEGER 00066 * N2 (input) INTEGER 00067 * N3 (input) INTEGER 00068 * N4 (input) INTEGER 00069 * Problem dimensions for the subroutine NAME; these may not all 00070 * be required. 00071 * 00072 * (ILAENV) (output) INTEGER 00073 * >= 0: the value of the parameter specified by ISPEC 00074 * < 0: if ILAENV = -k, the k-th argument had an illegal value. 00075 * 00076 * Further Details 00077 * =============== 00078 * 00079 * The following conventions have been used when calling ILAENV from the 00080 * LAPACK routines: 00081 * 1) OPTS is a concatenation of all of the character options to 00082 * subroutine NAME, in the same order that they appear in the 00083 * argument list for NAME, even if they are not used in determining 00084 * the value of the parameter specified by ISPEC. 00085 * 2) The problem dimensions N1, N2, N3, N4 are specified in the order 00086 * that they appear in the argument list for NAME. N1 is used 00087 * first, N2 second, and so on, and unused problem dimensions are 00088 * passed a value of -1. 00089 * 3) The parameter value returned by ILAENV is checked for validity in 00090 * the calling subroutine. For example, ILAENV is used to retrieve 00091 * the optimal blocksize for STRTRI as follows: 00092 * 00093 * NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 ) 00094 * IF( NB.LE.1 ) NB = MAX( 1, N ) 00095 * 00096 * ===================================================================== 00097 * 00098 * .. Intrinsic Functions .. 00099 INTRINSIC INT, MIN, REAL 00100 * .. 00101 * .. External Functions .. 00102 INTEGER IEEECK 00103 EXTERNAL IEEECK 00104 * .. 00105 * .. Arrays in Common .. 00106 INTEGER IPARMS( 100 ) 00107 * .. 00108 * .. Common blocks .. 00109 COMMON / CLAENV / IPARMS 00110 * .. 00111 * .. Save statement .. 00112 SAVE / CLAENV / 00113 * .. 00114 * .. Executable Statements .. 00115 * 00116 IF( ISPEC.GE.1 .AND. ISPEC.LE.5 ) THEN 00117 * 00118 * Return a value from the common block. 00119 * 00120 ILAENV = IPARMS( ISPEC ) 00121 * 00122 ELSE IF( ISPEC.EQ.6 ) THEN 00123 * 00124 * Compute SVD crossover point. 00125 * 00126 ILAENV = INT( REAL( MIN( N1, N2 ) )*1.6E0 ) 00127 * 00128 ELSE IF( ISPEC.GE.7 .AND. ISPEC.LE.9 ) THEN 00129 * 00130 * Return a value from the common block. 00131 * 00132 ILAENV = IPARMS( ISPEC ) 00133 * 00134 ELSE IF( ISPEC.EQ.10 ) THEN 00135 * 00136 * IEEE NaN arithmetic can be trusted not to trap 00137 * 00138 C ILAENV = 0 00139 ILAENV = 1 00140 IF( ILAENV.EQ.1 ) THEN 00141 ILAENV = IEEECK( 1, 0.0, 1.0 ) 00142 END IF 00143 * 00144 ELSE IF( ISPEC.EQ.11 ) THEN 00145 * 00146 * Infinity arithmetic can be trusted not to trap 00147 * 00148 C ILAENV = 0 00149 ILAENV = 1 00150 IF( ILAENV.EQ.1 ) THEN 00151 ILAENV = IEEECK( 0, 0.0, 1.0 ) 00152 END IF 00153 * 00154 ELSE 00155 * 00156 * Invalid value for ISPEC 00157 * 00158 ILAENV = -1 00159 END IF 00160 * 00161 RETURN 00162 * 00163 * End of ILAENV 00164 * 00165 END