Update to 2.0.0 tree from current Fremantle build
[opencv] / 3rdparty / lapack / ilaenv.c
1 #include "clapack.h"
2 #include "string.h"
3
4 /* Table of constant values */
5
6 static integer c__0 = 0;
7 static real c_b163 = 0.f;
8 static real c_b164 = 1.f;
9 static integer c__1 = 1;
10
11 integer ilaenv_(integer *ispec, char *name__, char *opts, integer *n1, 
12         integer *n2, integer *n3, integer *n4)
13 {
14     /* System generated locals */
15     integer ret_val;
16
17     /* Builtin functions */
18     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
19     integer s_cmp(char *, char *, ftnlen, ftnlen);
20
21     /* Local variables */
22     static integer i__;
23     static char c1[1], c2[2], c3[3], c4[2];
24     static integer ic, nb, iz, nx;
25     static logical cname;
26     static integer nbmin;
27     static logical sname;
28     extern integer ieeeck_(integer *, real *, real *);
29     static char subnam[6];
30     extern integer iparmq_(integer *, char *, char *, integer *, integer *, 
31             integer *, integer *);
32
33     ftnlen name_len, opts_len;
34
35     name_len = strlen (name__);
36     opts_len = strlen (opts);
37
38
39 /*  -- LAPACK auxiliary routine (version 3.1.1) -- */
40 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
41 /*     January 2007 */
42
43 /*     .. Scalar Arguments .. */
44 /*     .. */
45
46 /*  Purpose */
47 /*  ======= */
48
49 /*  ILAENV is called from the LAPACK routines to choose problem-dependent */
50 /*  parameters for the local environment.  See ISPEC for a description of */
51 /*  the parameters. */
52
53 /*  ILAENV returns an INTEGER */
54 /*  if ILAENV >= 0: ILAENV returns the value of the parameter specified by ISPEC */
55 /*  if ILAENV < 0:  if ILAENV = -k, the k-th argument had an illegal value. */
56
57 /*  This version provides a set of parameters which should give good, */
58 /*  but not optimal, performance on many of the currently available */
59 /*  computers.  Users are encouraged to modify this subroutine to set */
60 /*  the tuning parameters for their particular machine using the option */
61 /*  and problem size information in the arguments. */
62
63 /*  This routine will not function correctly if it is converted to all */
64 /*  lower case.  Converting it to all upper case is allowed. */
65
66 /*  Arguments */
67 /*  ========= */
68
69 /*  ISPEC   (input) INTEGER */
70 /*          Specifies the parameter to be returned as the value of */
71 /*          ILAENV. */
72 /*          = 1: the optimal blocksize; if this value is 1, an unblocked */
73 /*               algorithm will give the best performance. */
74 /*          = 2: the minimum block size for which the block routine */
75 /*               should be used; if the usable block size is less than */
76 /*               this value, an unblocked routine should be used. */
77 /*          = 3: the crossover point (in a block routine, for N less */
78 /*               than this value, an unblocked routine should be used) */
79 /*          = 4: the number of shifts, used in the nonsymmetric */
80 /*               eigenvalue routines (DEPRECATED) */
81 /*          = 5: the minimum column dimension for blocking to be used; */
82 /*               rectangular blocks must have dimension at least k by m, */
83 /*               where k is given by ILAENV(2,...) and m by ILAENV(5,...) */
84 /*          = 6: the crossover point for the SVD (when reducing an m by n */
85 /*               matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds */
86 /*               this value, a QR factorization is used first to reduce */
87 /*               the matrix to a triangular form.) */
88 /*          = 7: the number of processors */
89 /*          = 8: the crossover point for the multishift QR method */
90 /*               for nonsymmetric eigenvalue problems (DEPRECATED) */
91 /*          = 9: maximum size of the subproblems at the bottom of the */
92 /*               computation tree in the divide-and-conquer algorithm */
93 /*               (used by xGELSD and xGESDD) */
94 /*          =10: ieee NaN arithmetic can be trusted not to trap */
95 /*          =11: infinity arithmetic can be trusted not to trap */
96 /*          12 <= ISPEC <= 16: */
97 /*               xHSEQR or one of its subroutines, */
98 /*               see IPARMQ for detailed explanation */
99
100 /*  NAME    (input) CHARACTER*(*) */
101 /*          The name of the calling subroutine, in either upper case or */
102 /*          lower case. */
103
104 /*  OPTS    (input) CHARACTER*(*) */
105 /*          The character options to the subroutine NAME, concatenated */
106 /*          into a single character string.  For example, UPLO = 'U', */
107 /*          TRANS = 'T', and DIAG = 'N' for a triangular routine would */
108 /*          be specified as OPTS = 'UTN'. */
109
110 /*  N1      (input) INTEGER */
111 /*  N2      (input) INTEGER */
112 /*  N3      (input) INTEGER */
113 /*  N4      (input) INTEGER */
114 /*          Problem dimensions for the subroutine NAME; these may not all */
115 /*          be required. */
116
117 /*  Further Details */
118 /*  =============== */
119
120 /*  The following conventions have been used when calling ILAENV from the */
121 /*  LAPACK routines: */
122 /*  1)  OPTS is a concatenation of all of the character options to */
123 /*      subroutine NAME, in the same order that they appear in the */
124 /*      argument list for NAME, even if they are not used in determining */
125 /*      the value of the parameter specified by ISPEC. */
126 /*  2)  The problem dimensions N1, N2, N3, N4 are specified in the order */
127 /*      that they appear in the argument list for NAME.  N1 is used */
128 /*      first, N2 second, and so on, and unused problem dimensions are */
129 /*      passed a value of -1. */
130 /*  3)  The parameter value returned by ILAENV is checked for validity in */
131 /*      the calling subroutine.  For example, ILAENV is used to retrieve */
132 /*      the optimal blocksize for STRTRI as follows: */
133
134 /*      NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 ) */
135 /*      IF( NB.LE.1 ) NB = MAX( 1, N ) */
136
137 /*  ===================================================================== */
138
139 /*     .. Local Scalars .. */
140 /*     .. */
141 /*     .. Intrinsic Functions .. */
142 /*     .. */
143 /*     .. External Functions .. */
144 /*     .. */
145 /*     .. Executable Statements .. */
146
147     switch (*ispec) {
148         case 1:  goto L10;
149         case 2:  goto L10;
150         case 3:  goto L10;
151         case 4:  goto L80;
152         case 5:  goto L90;
153         case 6:  goto L100;
154         case 7:  goto L110;
155         case 8:  goto L120;
156         case 9:  goto L130;
157         case 10:  goto L140;
158         case 11:  goto L150;
159         case 12:  goto L160;
160         case 13:  goto L160;
161         case 14:  goto L160;
162         case 15:  goto L160;
163         case 16:  goto L160;
164     }
165
166 /*     Invalid value for ISPEC */
167
168     ret_val = -1;
169     return ret_val;
170
171 L10:
172
173 /*     Convert NAME to upper case if the first character is lower case. */
174
175     ret_val = 1;
176     s_copy(subnam, name__, (ftnlen)6, name_len);
177     ic = *(unsigned char *)subnam;
178     iz = 'Z';
179     if (iz == 90 || iz == 122) {
180
181 /*        ASCII character set */
182
183         if (ic >= 97 && ic <= 122) {
184             *(unsigned char *)subnam = (char) (ic - 32);
185             for (i__ = 2; i__ <= 6; ++i__) {
186                 ic = *(unsigned char *)&subnam[i__ - 1];
187                 if (ic >= 97 && ic <= 122) {
188                     *(unsigned char *)&subnam[i__ - 1] = (char) (ic - 32);
189                 }
190 /* L20: */
191             }
192         }
193
194     } else if (iz == 233 || iz == 169) {
195
196 /*        EBCDIC character set */
197
198         if (ic >= 129 && ic <= 137 || ic >= 145 && ic <= 153 || ic >= 162 && 
199                 ic <= 169) {
200             *(unsigned char *)subnam = (char) (ic + 64);
201             for (i__ = 2; i__ <= 6; ++i__) {
202                 ic = *(unsigned char *)&subnam[i__ - 1];
203                 if (ic >= 129 && ic <= 137 || ic >= 145 && ic <= 153 || ic >= 
204                         162 && ic <= 169) {
205                     *(unsigned char *)&subnam[i__ - 1] = (char) (ic + 64);
206                 }
207 /* L30: */
208             }
209         }
210
211     } else if (iz == 218 || iz == 250) {
212
213 /*        Prime machines:  ASCII+128 */
214
215         if (ic >= 225 && ic <= 250) {
216             *(unsigned char *)subnam = (char) (ic - 32);
217             for (i__ = 2; i__ <= 6; ++i__) {
218                 ic = *(unsigned char *)&subnam[i__ - 1];
219                 if (ic >= 225 && ic <= 250) {
220                     *(unsigned char *)&subnam[i__ - 1] = (char) (ic - 32);
221                 }
222 /* L40: */
223             }
224         }
225     }
226
227     *(unsigned char *)c1 = *(unsigned char *)subnam;
228     sname = *(unsigned char *)c1 == 'S' || *(unsigned char *)c1 == 'D';
229     cname = *(unsigned char *)c1 == 'C' || *(unsigned char *)c1 == 'Z';
230     if (! (cname || sname)) {
231         return ret_val;
232     }
233     s_copy(c2, subnam + 1, (ftnlen)2, (ftnlen)2);
234     s_copy(c3, subnam + 3, (ftnlen)3, (ftnlen)3);
235     s_copy(c4, c3 + 1, (ftnlen)2, (ftnlen)2);
236
237     switch (*ispec) {
238         case 1:  goto L50;
239         case 2:  goto L60;
240         case 3:  goto L70;
241     }
242
243 L50:
244
245 /*     ISPEC = 1:  block size */
246
247 /*     In these examples, separate code is provided for setting NB for */
248 /*     real and complex.  We assume that NB will take the same value in */
249 /*     single or double precision. */
250
251     nb = 1;
252
253     if (s_cmp(c2, "GE", (ftnlen)2, (ftnlen)2) == 0) {
254         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
255             if (sname) {
256                 nb = 64;
257             } else {
258                 nb = 64;
259             }
260         } else if (s_cmp(c3, "QRF", (ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, 
261                 "RQF", (ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, "LQF", (ftnlen)
262                 3, (ftnlen)3) == 0 || s_cmp(c3, "QLF", (ftnlen)3, (ftnlen)3) 
263                 == 0) {
264             if (sname) {
265                 nb = 32;
266             } else {
267                 nb = 32;
268             }
269         } else if (s_cmp(c3, "HRD", (ftnlen)3, (ftnlen)3) == 0) {
270             if (sname) {
271                 nb = 32;
272             } else {
273                 nb = 32;
274             }
275         } else if (s_cmp(c3, "BRD", (ftnlen)3, (ftnlen)3) == 0) {
276             if (sname) {
277                 nb = 32;
278             } else {
279                 nb = 32;
280             }
281         } else if (s_cmp(c3, "TRI", (ftnlen)3, (ftnlen)3) == 0) {
282             if (sname) {
283                 nb = 64;
284             } else {
285                 nb = 64;
286             }
287         }
288     } else if (s_cmp(c2, "PO", (ftnlen)2, (ftnlen)2) == 0) {
289         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
290             if (sname) {
291                 nb = 64;
292             } else {
293                 nb = 64;
294             }
295         }
296     } else if (s_cmp(c2, "SY", (ftnlen)2, (ftnlen)2) == 0) {
297         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
298             if (sname) {
299                 nb = 64;
300             } else {
301                 nb = 64;
302             }
303         } else if (sname && s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
304             nb = 32;
305         } else if (sname && s_cmp(c3, "GST", (ftnlen)3, (ftnlen)3) == 0) {
306             nb = 64;
307         }
308     } else if (cname && s_cmp(c2, "HE", (ftnlen)2, (ftnlen)2) == 0) {
309         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
310             nb = 64;
311         } else if (s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
312             nb = 32;
313         } else if (s_cmp(c3, "GST", (ftnlen)3, (ftnlen)3) == 0) {
314             nb = 64;
315         }
316     } else if (sname && s_cmp(c2, "OR", (ftnlen)2, (ftnlen)2) == 0) {
317         if (*(unsigned char *)c3 == 'G') {
318             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
319                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
320                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
321                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
322                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
323                     ftnlen)2, (ftnlen)2) == 0) {
324                 nb = 32;
325             }
326         } else if (*(unsigned char *)c3 == 'M') {
327             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
328                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
329                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
330                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
331                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
332                     ftnlen)2, (ftnlen)2) == 0) {
333                 nb = 32;
334             }
335         }
336     } else if (cname && s_cmp(c2, "UN", (ftnlen)2, (ftnlen)2) == 0) {
337         if (*(unsigned char *)c3 == 'G') {
338             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
339                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
340                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
341                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
342                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
343                     ftnlen)2, (ftnlen)2) == 0) {
344                 nb = 32;
345             }
346         } else if (*(unsigned char *)c3 == 'M') {
347             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
348                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
349                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
350                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
351                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
352                     ftnlen)2, (ftnlen)2) == 0) {
353                 nb = 32;
354             }
355         }
356     } else if (s_cmp(c2, "GB", (ftnlen)2, (ftnlen)2) == 0) {
357         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
358             if (sname) {
359                 if (*n4 <= 64) {
360                     nb = 1;
361                 } else {
362                     nb = 32;
363                 }
364             } else {
365                 if (*n4 <= 64) {
366                     nb = 1;
367                 } else {
368                     nb = 32;
369                 }
370             }
371         }
372     } else if (s_cmp(c2, "PB", (ftnlen)2, (ftnlen)2) == 0) {
373         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
374             if (sname) {
375                 if (*n2 <= 64) {
376                     nb = 1;
377                 } else {
378                     nb = 32;
379                 }
380             } else {
381                 if (*n2 <= 64) {
382                     nb = 1;
383                 } else {
384                     nb = 32;
385                 }
386             }
387         }
388     } else if (s_cmp(c2, "TR", (ftnlen)2, (ftnlen)2) == 0) {
389         if (s_cmp(c3, "TRI", (ftnlen)3, (ftnlen)3) == 0) {
390             if (sname) {
391                 nb = 64;
392             } else {
393                 nb = 64;
394             }
395         }
396     } else if (s_cmp(c2, "LA", (ftnlen)2, (ftnlen)2) == 0) {
397         if (s_cmp(c3, "UUM", (ftnlen)3, (ftnlen)3) == 0) {
398             if (sname) {
399                 nb = 64;
400             } else {
401                 nb = 64;
402             }
403         }
404     } else if (sname && s_cmp(c2, "ST", (ftnlen)2, (ftnlen)2) == 0) {
405         if (s_cmp(c3, "EBZ", (ftnlen)3, (ftnlen)3) == 0) {
406             nb = 1;
407         }
408     }
409     ret_val = nb;
410     return ret_val;
411
412 L60:
413
414 /*     ISPEC = 2:  minimum block size */
415
416     nbmin = 2;
417     if (s_cmp(c2, "GE", (ftnlen)2, (ftnlen)2) == 0) {
418         if (s_cmp(c3, "QRF", (ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, "RQF", (
419                 ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, "LQF", (ftnlen)3, (
420                 ftnlen)3) == 0 || s_cmp(c3, "QLF", (ftnlen)3, (ftnlen)3) == 0)
421                  {
422             if (sname) {
423                 nbmin = 2;
424             } else {
425                 nbmin = 2;
426             }
427         } else if (s_cmp(c3, "HRD", (ftnlen)3, (ftnlen)3) == 0) {
428             if (sname) {
429                 nbmin = 2;
430             } else {
431                 nbmin = 2;
432             }
433         } else if (s_cmp(c3, "BRD", (ftnlen)3, (ftnlen)3) == 0) {
434             if (sname) {
435                 nbmin = 2;
436             } else {
437                 nbmin = 2;
438             }
439         } else if (s_cmp(c3, "TRI", (ftnlen)3, (ftnlen)3) == 0) {
440             if (sname) {
441                 nbmin = 2;
442             } else {
443                 nbmin = 2;
444             }
445         }
446     } else if (s_cmp(c2, "SY", (ftnlen)2, (ftnlen)2) == 0) {
447         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
448             if (sname) {
449                 nbmin = 8;
450             } else {
451                 nbmin = 8;
452             }
453         } else if (sname && s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
454             nbmin = 2;
455         }
456     } else if (cname && s_cmp(c2, "HE", (ftnlen)2, (ftnlen)2) == 0) {
457         if (s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
458             nbmin = 2;
459         }
460     } else if (sname && s_cmp(c2, "OR", (ftnlen)2, (ftnlen)2) == 0) {
461         if (*(unsigned char *)c3 == 'G') {
462             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
463                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
464                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
465                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
466                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
467                     ftnlen)2, (ftnlen)2) == 0) {
468                 nbmin = 2;
469             }
470         } else if (*(unsigned char *)c3 == 'M') {
471             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
472                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
473                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
474                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
475                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
476                     ftnlen)2, (ftnlen)2) == 0) {
477                 nbmin = 2;
478             }
479         }
480     } else if (cname && s_cmp(c2, "UN", (ftnlen)2, (ftnlen)2) == 0) {
481         if (*(unsigned char *)c3 == 'G') {
482             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
483                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
484                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
485                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
486                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
487                     ftnlen)2, (ftnlen)2) == 0) {
488                 nbmin = 2;
489             }
490         } else if (*(unsigned char *)c3 == 'M') {
491             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
492                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
493                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
494                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
495                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
496                     ftnlen)2, (ftnlen)2) == 0) {
497                 nbmin = 2;
498             }
499         }
500     }
501     ret_val = nbmin;
502     return ret_val;
503
504 L70:
505
506 /*     ISPEC = 3:  crossover point */
507
508     nx = 0;
509     if (s_cmp(c2, "GE", (ftnlen)2, (ftnlen)2) == 0) {
510         if (s_cmp(c3, "QRF", (ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, "RQF", (
511                 ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, "LQF", (ftnlen)3, (
512                 ftnlen)3) == 0 || s_cmp(c3, "QLF", (ftnlen)3, (ftnlen)3) == 0)
513                  {
514             if (sname) {
515                 nx = 128;
516             } else {
517                 nx = 128;
518             }
519         } else if (s_cmp(c3, "HRD", (ftnlen)3, (ftnlen)3) == 0) {
520             if (sname) {
521                 nx = 128;
522             } else {
523                 nx = 128;
524             }
525         } else if (s_cmp(c3, "BRD", (ftnlen)3, (ftnlen)3) == 0) {
526             if (sname) {
527                 nx = 128;
528             } else {
529                 nx = 128;
530             }
531         }
532     } else if (s_cmp(c2, "SY", (ftnlen)2, (ftnlen)2) == 0) {
533         if (sname && s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
534             nx = 32;
535         }
536     } else if (cname && s_cmp(c2, "HE", (ftnlen)2, (ftnlen)2) == 0) {
537         if (s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
538             nx = 32;
539         }
540     } else if (sname && s_cmp(c2, "OR", (ftnlen)2, (ftnlen)2) == 0) {
541         if (*(unsigned char *)c3 == 'G') {
542             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
543                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
544                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
545                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
546                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
547                     ftnlen)2, (ftnlen)2) == 0) {
548                 nx = 128;
549             }
550         }
551     } else if (cname && s_cmp(c2, "UN", (ftnlen)2, (ftnlen)2) == 0) {
552         if (*(unsigned char *)c3 == 'G') {
553             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
554                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
555                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
556                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
557                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
558                     ftnlen)2, (ftnlen)2) == 0) {
559                 nx = 128;
560             }
561         }
562     }
563     ret_val = nx;
564     return ret_val;
565
566 L80:
567
568 /*     ISPEC = 4:  number of shifts (used by xHSEQR) */
569
570     ret_val = 6;
571     return ret_val;
572
573 L90:
574
575 /*     ISPEC = 5:  minimum column dimension (not used) */
576
577     ret_val = 2;
578     return ret_val;
579
580 L100:
581
582 /*     ISPEC = 6:  crossover point for SVD (used by xGELSS and xGESVD) */
583
584     ret_val = (integer) ((real) min(*n1,*n2) * 1.6f);
585     return ret_val;
586
587 L110:
588
589 /*     ISPEC = 7:  number of processors (not used) */
590
591     ret_val = 1;
592     return ret_val;
593
594 L120:
595
596 /*     ISPEC = 8:  crossover point for multishift (used by xHSEQR) */
597
598     ret_val = 50;
599     return ret_val;
600
601 L130:
602
603 /*     ISPEC = 9:  maximum size of the subproblems at the bottom of the */
604 /*                 computation tree in the divide-and-conquer algorithm */
605 /*                 (used by xGELSD and xGESDD) */
606
607     ret_val = 25;
608     return ret_val;
609
610 L140:
611
612 /*     ISPEC = 10: ieee NaN arithmetic can be trusted not to trap */
613
614 /*     ILAENV = 0 */
615     ret_val = 1;
616     if (ret_val == 1) {
617         ret_val = ieeeck_(&c__0, &c_b163, &c_b164);
618     }
619     return ret_val;
620
621 L150:
622
623 /*     ISPEC = 11: infinity arithmetic can be trusted not to trap */
624
625 /*     ILAENV = 0 */
626     ret_val = 1;
627     if (ret_val == 1) {
628         ret_val = ieeeck_(&c__1, &c_b163, &c_b164);
629     }
630     return ret_val;
631
632 L160:
633
634 /*     12 <= ISPEC <= 16: xHSEQR or one of its subroutines. */
635
636     ret_val = iparmq_(ispec, name__, opts, n1, n2, n3, n4)
637             ;
638     return ret_val;
639
640 /*     End of ILAENV */
641
642 } /* ilaenv_ */