tstiee.c
Go to the documentation of this file.
00001 /* tstiee.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 #include "string.h"
00016 
00017 /* Table of constant values */
00018 
00019 static integer c__9 = 9;
00020 static integer c__1 = 1;
00021 static integer c__10 = 10;
00022 static integer c__2 = 2;
00023 static integer c__3 = 3;
00024 static integer c__4 = 4;
00025 static integer c__11 = 11;
00026 static integer c__0 = 0;
00027 static real c_b227 = 0.f;
00028 static real c_b228 = 1.f;
00029 
00030 /* Main program */ int MAIN__(void)
00031 {
00032     /* Builtin functions */
00033     integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen), 
00034             e_wsle(void);
00035 
00036     /* Local variables */
00037     integer ieeeok;
00038     extern integer ilaenv_(integer *, char *, char *, integer *, integer *, 
00039             integer *, integer *);
00040 
00041     /* Fortran I/O blocks */
00042     static cilist io___1 = { 0, 6, 0, 0, 0 };
00043     static cilist io___2 = { 0, 6, 0, 0, 0 };
00044     static cilist io___3 = { 0, 6, 0, 0, 0 };
00045     static cilist io___5 = { 0, 6, 0, 0, 0 };
00046     static cilist io___6 = { 0, 6, 0, 0, 0 };
00047     static cilist io___7 = { 0, 6, 0, 0, 0 };
00048     static cilist io___8 = { 0, 6, 0, 0, 0 };
00049     static cilist io___9 = { 0, 6, 0, 0, 0 };
00050     static cilist io___10 = { 0, 6, 0, 0, 0 };
00051     static cilist io___11 = { 0, 6, 0, 0, 0 };
00052     static cilist io___12 = { 0, 6, 0, 0, 0 };
00053     static cilist io___13 = { 0, 6, 0, 0, 0 };
00054     static cilist io___14 = { 0, 6, 0, 0, 0 };
00055     static cilist io___15 = { 0, 6, 0, 0, 0 };
00056     static cilist io___16 = { 0, 6, 0, 0, 0 };
00057     static cilist io___17 = { 0, 6, 0, 0, 0 };
00058     static cilist io___18 = { 0, 6, 0, 0, 0 };
00059     static cilist io___19 = { 0, 6, 0, 0, 0 };
00060 
00061 
00062 
00063 /*  -- LAPACK test routine (version 3.2) -- */
00064 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00065 /*     November 2006 */
00066 
00067 /*     .. External Functions .. */
00068 /*     .. */
00069 /*     .. Local Scalars .. */
00070 /*     .. */
00071 /*     .. Executable Statements .. */
00072 
00073     s_wsle(&io___1);
00074     do_lio(&c__9, &c__1, "We are about to check whether infinity arithmetic", 
00075             (ftnlen)49);
00076     e_wsle();
00077     s_wsle(&io___2);
00078     do_lio(&c__9, &c__1, "can be trusted.  If this test hangs, set", (ftnlen)
00079             40);
00080     e_wsle();
00081     s_wsle(&io___3);
00082     do_lio(&c__9, &c__1, "ILAENV = 0 for ISPEC = 10 in LAPACK/SRC/ilaenv.f", (
00083             ftnlen)48);
00084     e_wsle();
00085 
00086     ieeeok = ilaenv_(&c__10, "ILAENV", "N", &c__1, &c__2, &c__3, &c__4);
00087     s_wsle(&io___5);
00088     e_wsle();
00089 
00090     if (ieeeok == 0) {
00091         s_wsle(&io___6);
00092         do_lio(&c__9, &c__1, "Infinity arithmetic did not perform per the ie"
00093                 "ee spec", (ftnlen)53);
00094         e_wsle();
00095     } else {
00096         s_wsle(&io___7);
00097         do_lio(&c__9, &c__1, "Infinity arithmetic performed as per the ieee "
00098                 "spec.", (ftnlen)51);
00099         e_wsle();
00100         s_wsle(&io___8);
00101         do_lio(&c__9, &c__1, "However, this is not an exhaustive test and do"
00102                 "es not", (ftnlen)52);
00103         e_wsle();
00104         s_wsle(&io___9);
00105         do_lio(&c__9, &c__1, "guarantee that infinity arithmetic meets the", (
00106                 ftnlen)44);
00107         do_lio(&c__9, &c__1, " ieee spec.", (ftnlen)11);
00108         e_wsle();
00109     }
00110 
00111     s_wsle(&io___10);
00112     e_wsle();
00113     s_wsle(&io___11);
00114     do_lio(&c__9, &c__1, "We are about to check whether NaN arithmetic", (
00115             ftnlen)44);
00116     e_wsle();
00117     s_wsle(&io___12);
00118     do_lio(&c__9, &c__1, "can be trusted.  If this test hangs, set", (ftnlen)
00119             40);
00120     e_wsle();
00121     s_wsle(&io___13);
00122     do_lio(&c__9, &c__1, "ILAENV = 0 for ISPEC = 11 in LAPACK/SRC/ilaenv.f", (
00123             ftnlen)48);
00124     e_wsle();
00125     ieeeok = ilaenv_(&c__11, "ILAENV", "N", &c__1, &c__2, &c__3, &c__4);
00126 
00127     s_wsle(&io___14);
00128     e_wsle();
00129     if (ieeeok == 0) {
00130         s_wsle(&io___15);
00131         do_lio(&c__9, &c__1, "NaN arithmetic did not perform per the ieee sp"
00132                 "ec", (ftnlen)48);
00133         e_wsle();
00134     } else {
00135         s_wsle(&io___16);
00136         do_lio(&c__9, &c__1, "NaN arithmetic performed as per the ieee", (
00137                 ftnlen)40);
00138         do_lio(&c__9, &c__1, " spec.", (ftnlen)6);
00139         e_wsle();
00140         s_wsle(&io___17);
00141         do_lio(&c__9, &c__1, "However, this is not an exhaustive test and do"
00142                 "es not", (ftnlen)52);
00143         e_wsle();
00144         s_wsle(&io___18);
00145         do_lio(&c__9, &c__1, "guarantee that NaN arithmetic meets the", (
00146                 ftnlen)39);
00147         do_lio(&c__9, &c__1, " ieee spec.", (ftnlen)11);
00148         e_wsle();
00149     }
00150     s_wsle(&io___19);
00151     e_wsle();
00152 
00153     return 0;
00154 } /* MAIN__ */
00155 
00156 integer ilaenv_(integer *ispec, char *name__, char *opts, integer *n1, 
00157         integer *n2, integer *n3, integer *n4)
00158 {
00159     /* System generated locals */
00160     integer ret_val;
00161 
00162     /* Builtin functions */
00163     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00164     integer s_cmp(char *, char *, ftnlen, ftnlen);
00165 
00166     /* Local variables */
00167     integer i__;
00168     char c1[1], c2[2], c3[3], c4[2];
00169     integer ic, nb, iz, nx;
00170     logical cname, sname;
00171     integer nbmin;
00172     extern integer ieeeck_(integer *, real *, real *);
00173     char subnam[6];
00174     ftnlen name_len;
00175     name_len = strlen (name__);
00176 
00177 
00178 /*  -- LAPACK auxiliary routine (version 3.2) -- */
00179 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00180 /*     November 2006 */
00181 
00182 /*     .. Scalar Arguments .. */
00183 /*     .. */
00184 
00185 /*  Purpose */
00186 /*  ======= */
00187 
00188 /*  ILAENV is called from the LAPACK routines to choose problem-dependent */
00189 /*  parameters for the local environment.  See ISPEC for a description of */
00190 /*  the parameters. */
00191 
00192 /*  This version provides a set of parameters which should give good, */
00193 /*  but not optimal, performance on many of the currently available */
00194 /*  computers.  Users are encouraged to modify this subroutine to set */
00195 /*  the tuning parameters for their particular machine using the option */
00196 /*  and problem size information in the arguments. */
00197 
00198 /*  This routine will not function correctly if it is converted to all */
00199 /*  lower case.  Converting it to all upper case is allowed. */
00200 
00201 /*  Arguments */
00202 /*  ========= */
00203 
00204 /*  ISPEC   (input) INTEGER */
00205 /*          Specifies the parameter to be returned as the value of */
00206 /*          ILAENV. */
00207 /*          = 1: the optimal blocksize; if this value is 1, an unblocked */
00208 /*               algorithm will give the best performance. */
00209 /*          = 2: the minimum block size for which the block routine */
00210 /*               should be used; if the usable block size is less than */
00211 /*               this value, an unblocked routine should be used. */
00212 /*          = 3: the crossover point (in a block routine, for N less */
00213 /*               than this value, an unblocked routine should be used) */
00214 /*          = 4: the number of shifts, used in the nonsymmetric */
00215 /*               eigenvalue routines */
00216 /*          = 5: the minimum column dimension for blocking to be used; */
00217 /*               rectangular blocks must have dimension at least k by m, */
00218 /*               where k is given by ILAENV(2,...) and m by ILAENV(5,...) */
00219 /*          = 6: the crossover point for the SVD (when reducing an m by n */
00220 /*               matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds */
00221 /*               this value, a QR factorization is used first to reduce */
00222 /*               the matrix to a triangular form.) */
00223 /*          = 7: the number of processors */
00224 /*          = 8: the crossover point for the multishift QR and QZ methods */
00225 /*               for nonsymmetric eigenvalue problems. */
00226 /*          = 9: maximum size of the subproblems at the bottom of the */
00227 /*               computation tree in the divide-and-conquer algorithm */
00228 /*               (used by xGELSD and xGESDD) */
00229 /*          =10: ieee NaN arithmetic can be trusted not to trap */
00230 /*          =11: infinity arithmetic can be trusted not to trap */
00231 
00232 /*  NAME    (input) CHARACTER*(*) */
00233 /*          The name of the calling subroutine, in either upper case or */
00234 /*          lower case. */
00235 
00236 /*  OPTS    (input) CHARACTER*(*) */
00237 /*          The character options to the subroutine NAME, concatenated */
00238 /*          into a single character string.  For example, UPLO = 'U', */
00239 /*          TRANS = 'T', and DIAG = 'N' for a triangular routine would */
00240 /*          be specified as OPTS = 'UTN'. */
00241 
00242 /*  N1      (input) INTEGER */
00243 /*  N2      (input) INTEGER */
00244 /*  N3      (input) INTEGER */
00245 /*  N4      (input) INTEGER */
00246 /*          Problem dimensions for the subroutine NAME; these may not all */
00247 /*          be required. */
00248 
00249 /* (ILAENV) (output) INTEGER */
00250 /*          >= 0: the value of the parameter specified by ISPEC */
00251 /*          < 0:  if ILAENV = -k, the k-th argument had an illegal value. */
00252 
00253 /*  Further Details */
00254 /*  =============== */
00255 
00256 /*  The following conventions have been used when calling ILAENV from the */
00257 /*  LAPACK routines: */
00258 /*  1)  OPTS is a concatenation of all of the character options to */
00259 /*      subroutine NAME, in the same order that they appear in the */
00260 /*      argument list for NAME, even if they are not used in determining */
00261 /*      the value of the parameter specified by ISPEC. */
00262 /*  2)  The problem dimensions N1, N2, N3, N4 are specified in the order */
00263 /*      that they appear in the argument list for NAME.  N1 is used */
00264 /*      first, N2 second, and so on, and unused problem dimensions are */
00265 /*      passed a value of -1. */
00266 /*  3)  The parameter value returned by ILAENV is checked for validity in */
00267 /*      the calling subroutine.  For example, ILAENV is used to retrieve */
00268 /*      the optimal blocksize for STRTRI as follows: */
00269 
00270 /*      NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 ) */
00271 /*      IF( NB.LE.1 ) NB = MAX( 1, N ) */
00272 
00273 /*  ===================================================================== */
00274 
00275 /*     .. Local Scalars .. */
00276 /*     .. */
00277 /*     .. Intrinsic Functions .. */
00278 /*     .. */
00279 /*     .. External Functions .. */
00280 /*     .. */
00281 /*     .. Executable Statements .. */
00282 
00283     switch (*ispec) {
00284         case 1:  goto L100;
00285         case 2:  goto L100;
00286         case 3:  goto L100;
00287         case 4:  goto L400;
00288         case 5:  goto L500;
00289         case 6:  goto L600;
00290         case 7:  goto L700;
00291         case 8:  goto L800;
00292         case 9:  goto L900;
00293         case 10:  goto L1000;
00294         case 11:  goto L1100;
00295     }
00296 
00297 /*     Invalid value for ISPEC */
00298 
00299     ret_val = -1;
00300     return ret_val;
00301 
00302 L100:
00303 
00304 /*     Convert NAME to upper case if the first character is lower case. */
00305 
00306     ret_val = 1;
00307     s_copy(subnam, name__, (ftnlen)6, name_len);
00308     ic = *(unsigned char *)subnam;
00309     iz = 'Z';
00310     if (iz == 90 || iz == 122) {
00311 
00312 /*        ASCII character set */
00313 
00314         if (ic >= 97 && ic <= 122) {
00315             *(unsigned char *)subnam = (char) (ic - 32);
00316             for (i__ = 2; i__ <= 6; ++i__) {
00317                 ic = *(unsigned char *)&subnam[i__ - 1];
00318                 if (ic >= 97 && ic <= 122) {
00319                     *(unsigned char *)&subnam[i__ - 1] = (char) (ic - 32);
00320                 }
00321 /* L10: */
00322             }
00323         }
00324 
00325     } else if (iz == 233 || iz == 169) {
00326 
00327 /*        EBCDIC character set */
00328 
00329         if (ic >= 129 && ic <= 137 || ic >= 145 && ic <= 153 || ic >= 162 && 
00330                 ic <= 169) {
00331             *(unsigned char *)subnam = (char) (ic + 64);
00332             for (i__ = 2; i__ <= 6; ++i__) {
00333                 ic = *(unsigned char *)&subnam[i__ - 1];
00334                 if (ic >= 129 && ic <= 137 || ic >= 145 && ic <= 153 || ic >= 
00335                         162 && ic <= 169) {
00336                     *(unsigned char *)&subnam[i__ - 1] = (char) (ic + 64);
00337                 }
00338 /* L20: */
00339             }
00340         }
00341 
00342     } else if (iz == 218 || iz == 250) {
00343 
00344 /*        Prime machines:  ASCII+128 */
00345 
00346         if (ic >= 225 && ic <= 250) {
00347             *(unsigned char *)subnam = (char) (ic - 32);
00348             for (i__ = 2; i__ <= 6; ++i__) {
00349                 ic = *(unsigned char *)&subnam[i__ - 1];
00350                 if (ic >= 225 && ic <= 250) {
00351                     *(unsigned char *)&subnam[i__ - 1] = (char) (ic - 32);
00352                 }
00353 /* L30: */
00354             }
00355         }
00356     }
00357 
00358     *(unsigned char *)c1 = *(unsigned char *)subnam;
00359     sname = *(unsigned char *)c1 == 'S' || *(unsigned char *)c1 == 'D';
00360     cname = *(unsigned char *)c1 == 'C' || *(unsigned char *)c1 == 'Z';
00361     if (! (cname || sname)) {
00362         return ret_val;
00363     }
00364     s_copy(c2, subnam + 1, (ftnlen)2, (ftnlen)2);
00365     s_copy(c3, subnam + 3, (ftnlen)3, (ftnlen)3);
00366     s_copy(c4, c3 + 1, (ftnlen)2, (ftnlen)2);
00367 
00368     switch (*ispec) {
00369         case 1:  goto L110;
00370         case 2:  goto L200;
00371         case 3:  goto L300;
00372     }
00373 
00374 L110:
00375 
00376 /*     ISPEC = 1:  block size */
00377 
00378 /*     In these examples, separate code is provided for setting NB for */
00379 /*     real and complex.  We assume that NB will take the same value in */
00380 /*     single or double precision. */
00381 
00382     nb = 1;
00383 
00384     if (s_cmp(c2, "GE", (ftnlen)2, (ftnlen)2) == 0) {
00385         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
00386             if (sname) {
00387                 nb = 64;
00388             } else {
00389                 nb = 64;
00390             }
00391         } else if (s_cmp(c3, "QRF", (ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, 
00392                 "RQF", (ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, "LQF", (ftnlen)
00393                 3, (ftnlen)3) == 0 || s_cmp(c3, "QLF", (ftnlen)3, (ftnlen)3) 
00394                 == 0) {
00395             if (sname) {
00396                 nb = 32;
00397             } else {
00398                 nb = 32;
00399             }
00400         } else if (s_cmp(c3, "HRD", (ftnlen)3, (ftnlen)3) == 0) {
00401             if (sname) {
00402                 nb = 32;
00403             } else {
00404                 nb = 32;
00405             }
00406         } else if (s_cmp(c3, "BRD", (ftnlen)3, (ftnlen)3) == 0) {
00407             if (sname) {
00408                 nb = 32;
00409             } else {
00410                 nb = 32;
00411             }
00412         } else if (s_cmp(c3, "TRI", (ftnlen)3, (ftnlen)3) == 0) {
00413             if (sname) {
00414                 nb = 64;
00415             } else {
00416                 nb = 64;
00417             }
00418         }
00419     } else if (s_cmp(c2, "PO", (ftnlen)2, (ftnlen)2) == 0) {
00420         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
00421             if (sname) {
00422                 nb = 64;
00423             } else {
00424                 nb = 64;
00425             }
00426         }
00427     } else if (s_cmp(c2, "SY", (ftnlen)2, (ftnlen)2) == 0) {
00428         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
00429             if (sname) {
00430                 nb = 64;
00431             } else {
00432                 nb = 64;
00433             }
00434         } else if (sname && s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
00435             nb = 32;
00436         } else if (sname && s_cmp(c3, "GST", (ftnlen)3, (ftnlen)3) == 0) {
00437             nb = 64;
00438         }
00439     } else if (cname && s_cmp(c2, "HE", (ftnlen)2, (ftnlen)2) == 0) {
00440         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
00441             nb = 64;
00442         } else if (s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
00443             nb = 32;
00444         } else if (s_cmp(c3, "GST", (ftnlen)3, (ftnlen)3) == 0) {
00445             nb = 64;
00446         }
00447     } else if (sname && s_cmp(c2, "OR", (ftnlen)2, (ftnlen)2) == 0) {
00448         if (*(unsigned char *)c3 == 'G') {
00449             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
00450                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
00451                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
00452                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
00453                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
00454                     ftnlen)2, (ftnlen)2) == 0) {
00455                 nb = 32;
00456             }
00457         } else if (*(unsigned char *)c3 == 'M') {
00458             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
00459                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
00460                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
00461                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
00462                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
00463                     ftnlen)2, (ftnlen)2) == 0) {
00464                 nb = 32;
00465             }
00466         }
00467     } else if (cname && s_cmp(c2, "UN", (ftnlen)2, (ftnlen)2) == 0) {
00468         if (*(unsigned char *)c3 == 'G') {
00469             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
00470                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
00471                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
00472                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
00473                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
00474                     ftnlen)2, (ftnlen)2) == 0) {
00475                 nb = 32;
00476             }
00477         } else if (*(unsigned char *)c3 == 'M') {
00478             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
00479                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
00480                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
00481                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
00482                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
00483                     ftnlen)2, (ftnlen)2) == 0) {
00484                 nb = 32;
00485             }
00486         }
00487     } else if (s_cmp(c2, "GB", (ftnlen)2, (ftnlen)2) == 0) {
00488         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
00489             if (sname) {
00490                 if (*n4 <= 64) {
00491                     nb = 1;
00492                 } else {
00493                     nb = 32;
00494                 }
00495             } else {
00496                 if (*n4 <= 64) {
00497                     nb = 1;
00498                 } else {
00499                     nb = 32;
00500                 }
00501             }
00502         }
00503     } else if (s_cmp(c2, "PB", (ftnlen)2, (ftnlen)2) == 0) {
00504         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
00505             if (sname) {
00506                 if (*n2 <= 64) {
00507                     nb = 1;
00508                 } else {
00509                     nb = 32;
00510                 }
00511             } else {
00512                 if (*n2 <= 64) {
00513                     nb = 1;
00514                 } else {
00515                     nb = 32;
00516                 }
00517             }
00518         }
00519     } else if (s_cmp(c2, "TR", (ftnlen)2, (ftnlen)2) == 0) {
00520         if (s_cmp(c3, "TRI", (ftnlen)3, (ftnlen)3) == 0) {
00521             if (sname) {
00522                 nb = 64;
00523             } else {
00524                 nb = 64;
00525             }
00526         }
00527     } else if (s_cmp(c2, "LA", (ftnlen)2, (ftnlen)2) == 0) {
00528         if (s_cmp(c3, "UUM", (ftnlen)3, (ftnlen)3) == 0) {
00529             if (sname) {
00530                 nb = 64;
00531             } else {
00532                 nb = 64;
00533             }
00534         }
00535     } else if (sname && s_cmp(c2, "ST", (ftnlen)2, (ftnlen)2) == 0) {
00536         if (s_cmp(c3, "EBZ", (ftnlen)3, (ftnlen)3) == 0) {
00537             nb = 1;
00538         }
00539     }
00540     ret_val = nb;
00541     return ret_val;
00542 
00543 L200:
00544 
00545 /*     ISPEC = 2:  minimum block size */
00546 
00547     nbmin = 2;
00548     if (s_cmp(c2, "GE", (ftnlen)2, (ftnlen)2) == 0) {
00549         if (s_cmp(c3, "QRF", (ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, "RQF", (
00550                 ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, "LQF", (ftnlen)3, (
00551                 ftnlen)3) == 0 || s_cmp(c3, "QLF", (ftnlen)3, (ftnlen)3) == 0)
00552                  {
00553             if (sname) {
00554                 nbmin = 2;
00555             } else {
00556                 nbmin = 2;
00557             }
00558         } else if (s_cmp(c3, "HRD", (ftnlen)3, (ftnlen)3) == 0) {
00559             if (sname) {
00560                 nbmin = 2;
00561             } else {
00562                 nbmin = 2;
00563             }
00564         } else if (s_cmp(c3, "BRD", (ftnlen)3, (ftnlen)3) == 0) {
00565             if (sname) {
00566                 nbmin = 2;
00567             } else {
00568                 nbmin = 2;
00569             }
00570         } else if (s_cmp(c3, "TRI", (ftnlen)3, (ftnlen)3) == 0) {
00571             if (sname) {
00572                 nbmin = 2;
00573             } else {
00574                 nbmin = 2;
00575             }
00576         }
00577     } else if (s_cmp(c2, "SY", (ftnlen)2, (ftnlen)2) == 0) {
00578         if (s_cmp(c3, "TRF", (ftnlen)3, (ftnlen)3) == 0) {
00579             if (sname) {
00580                 nbmin = 8;
00581             } else {
00582                 nbmin = 8;
00583             }
00584         } else if (sname && s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
00585             nbmin = 2;
00586         }
00587     } else if (cname && s_cmp(c2, "HE", (ftnlen)2, (ftnlen)2) == 0) {
00588         if (s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
00589             nbmin = 2;
00590         }
00591     } else if (sname && s_cmp(c2, "OR", (ftnlen)2, (ftnlen)2) == 0) {
00592         if (*(unsigned char *)c3 == 'G') {
00593             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
00594                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
00595                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
00596                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
00597                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
00598                     ftnlen)2, (ftnlen)2) == 0) {
00599                 nbmin = 2;
00600             }
00601         } else if (*(unsigned char *)c3 == 'M') {
00602             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
00603                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
00604                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
00605                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
00606                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
00607                     ftnlen)2, (ftnlen)2) == 0) {
00608                 nbmin = 2;
00609             }
00610         }
00611     } else if (cname && s_cmp(c2, "UN", (ftnlen)2, (ftnlen)2) == 0) {
00612         if (*(unsigned char *)c3 == 'G') {
00613             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
00614                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
00615                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
00616                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
00617                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
00618                     ftnlen)2, (ftnlen)2) == 0) {
00619                 nbmin = 2;
00620             }
00621         } else if (*(unsigned char *)c3 == 'M') {
00622             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
00623                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
00624                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
00625                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
00626                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
00627                     ftnlen)2, (ftnlen)2) == 0) {
00628                 nbmin = 2;
00629             }
00630         }
00631     }
00632     ret_val = nbmin;
00633     return ret_val;
00634 
00635 L300:
00636 
00637 /*     ISPEC = 3:  crossover point */
00638 
00639     nx = 0;
00640     if (s_cmp(c2, "GE", (ftnlen)2, (ftnlen)2) == 0) {
00641         if (s_cmp(c3, "QRF", (ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, "RQF", (
00642                 ftnlen)3, (ftnlen)3) == 0 || s_cmp(c3, "LQF", (ftnlen)3, (
00643                 ftnlen)3) == 0 || s_cmp(c3, "QLF", (ftnlen)3, (ftnlen)3) == 0)
00644                  {
00645             if (sname) {
00646                 nx = 128;
00647             } else {
00648                 nx = 128;
00649             }
00650         } else if (s_cmp(c3, "HRD", (ftnlen)3, (ftnlen)3) == 0) {
00651             if (sname) {
00652                 nx = 128;
00653             } else {
00654                 nx = 128;
00655             }
00656         } else if (s_cmp(c3, "BRD", (ftnlen)3, (ftnlen)3) == 0) {
00657             if (sname) {
00658                 nx = 128;
00659             } else {
00660                 nx = 128;
00661             }
00662         }
00663     } else if (s_cmp(c2, "SY", (ftnlen)2, (ftnlen)2) == 0) {
00664         if (sname && s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
00665             nx = 32;
00666         }
00667     } else if (cname && s_cmp(c2, "HE", (ftnlen)2, (ftnlen)2) == 0) {
00668         if (s_cmp(c3, "TRD", (ftnlen)3, (ftnlen)3) == 0) {
00669             nx = 32;
00670         }
00671     } else if (sname && s_cmp(c2, "OR", (ftnlen)2, (ftnlen)2) == 0) {
00672         if (*(unsigned char *)c3 == 'G') {
00673             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
00674                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
00675                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
00676                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
00677                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
00678                     ftnlen)2, (ftnlen)2) == 0) {
00679                 nx = 128;
00680             }
00681         }
00682     } else if (cname && s_cmp(c2, "UN", (ftnlen)2, (ftnlen)2) == 0) {
00683         if (*(unsigned char *)c3 == 'G') {
00684             if (s_cmp(c4, "QR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "RQ", 
00685                     (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "LQ", (ftnlen)2, (
00686                     ftnlen)2) == 0 || s_cmp(c4, "QL", (ftnlen)2, (ftnlen)2) ==
00687                      0 || s_cmp(c4, "HR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(
00688                     c4, "TR", (ftnlen)2, (ftnlen)2) == 0 || s_cmp(c4, "BR", (
00689                     ftnlen)2, (ftnlen)2) == 0) {
00690                 nx = 128;
00691             }
00692         }
00693     }
00694     ret_val = nx;
00695     return ret_val;
00696 
00697 L400:
00698 
00699 /*     ISPEC = 4:  number of shifts (used by xHSEQR) */
00700 
00701     ret_val = 6;
00702     return ret_val;
00703 
00704 L500:
00705 
00706 /*     ISPEC = 5:  minimum column dimension (not used) */
00707 
00708     ret_val = 2;
00709     return ret_val;
00710 
00711 L600:
00712 
00713 /*     ISPEC = 6:  crossover point for SVD (used by xGELSS and xGESVD) */
00714 
00715     ret_val = (integer) ((real) min(*n1,*n2) * 1.6f);
00716     return ret_val;
00717 
00718 L700:
00719 
00720 /*     ISPEC = 7:  number of processors (not used) */
00721 
00722     ret_val = 1;
00723     return ret_val;
00724 
00725 L800:
00726 
00727 /*     ISPEC = 8:  crossover point for multishift (used by xHSEQR) */
00728 
00729     ret_val = 50;
00730     return ret_val;
00731 
00732 L900:
00733 
00734 /*     ISPEC = 9:  maximum size of the subproblems at the bottom of the */
00735 /*                 computation tree in the divide-and-conquer algorithm */
00736 /*                 (used by xGELSD and xGESDD) */
00737 
00738     ret_val = 25;
00739     return ret_val;
00740 
00741 L1000:
00742 
00743 /*     ISPEC = 10: ieee NaN arithmetic can be trusted not to trap */
00744 
00745     ret_val = 1;
00746     if (ret_val == 1) {
00747         ret_val = ieeeck_(&c__0, &c_b227, &c_b228);
00748     }
00749     return ret_val;
00750 
00751 L1100:
00752 
00753 /*     ISPEC = 11: infinity arithmetic can be trusted not to trap */
00754 
00755     ret_val = 1;
00756     if (ret_val == 1) {
00757         ret_val = ieeeck_(&c__1, &c_b227, &c_b228);
00758     }
00759     return ret_val;
00760 
00761 /*     End of ILAENV */
00762 
00763 } /* ilaenv_ */
00764 
00765 integer ieeeck_(integer *ispec, real *zero, real *one)
00766 {
00767     /* System generated locals */
00768     integer ret_val;
00769 
00770     /* Local variables */
00771     real nan1, nan2, nan3, nan4, nan5, nan6, neginf, posinf, negzro, newzro;
00772 
00773 
00774 /*  -- LAPACK auxiliary routine (version 3.2) -- */
00775 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00776 /*     November 2006 */
00777 
00778 /*     .. Scalar Arguments .. */
00779 /*     .. */
00780 
00781 /*  Purpose */
00782 /*  ======= */
00783 
00784 /*  IEEECK is called from the ILAENV to verify that Inifinity and */
00785 /*  possibly NaN arithmetic is safe (i.e. will not trap). */
00786 
00787 /*  Arguments */
00788 /*  ========= */
00789 
00790 /*  ISPEC   (input) INTEGER */
00791 /*          Specifies whether to test just for inifinity arithmetic */
00792 /*          or whether to test for infinity and NaN arithmetic. */
00793 /*          = 0: Verify infinity arithmetic only. */
00794 /*          = 1: Verify infinity and NaN arithmetic. */
00795 
00796 /*  ZERO    (input) REAL */
00797 /*          Must contain the value 0.0 */
00798 /*          This is passed to prevent the compiler from optimizing */
00799 /*          away this code. */
00800 
00801 /*  ONE     (input) REAL */
00802 /*          Must contain the value 1.0 */
00803 /*          This is passed to prevent the compiler from optimizing */
00804 /*          away this code. */
00805 
00806 /*  RETURN VALUE:  INTEGER */
00807 /*          = 0:  Arithmetic failed to produce the correct answers */
00808 /*          = 1:  Arithmetic produced the correct answers */
00809 
00810 /*     .. Local Scalars .. */
00811 /*     .. */
00812 /*     .. Executable Statements .. */
00813     ret_val = 1;
00814     posinf = *one / *zero;
00815     if (posinf <= *one) {
00816         ret_val = 0;
00817         return ret_val;
00818     }
00819     neginf = -(*one) / *zero;
00820     if (neginf >= *zero) {
00821         ret_val = 0;
00822         return ret_val;
00823     }
00824     negzro = *one / (neginf + *one);
00825     if (negzro != *zero) {
00826         ret_val = 0;
00827         return ret_val;
00828     }
00829     neginf = *one / negzro;
00830     if (neginf >= *zero) {
00831         ret_val = 0;
00832         return ret_val;
00833     }
00834     newzro = negzro + *zero;
00835     if (newzro != *zero) {
00836         ret_val = 0;
00837         return ret_val;
00838     }
00839     posinf = *one / newzro;
00840     if (posinf <= *one) {
00841         ret_val = 0;
00842         return ret_val;
00843     }
00844     neginf *= posinf;
00845     if (neginf >= *zero) {
00846         ret_val = 0;
00847         return ret_val;
00848     }
00849     posinf *= posinf;
00850     if (posinf <= *one) {
00851         ret_val = 0;
00852         return ret_val;
00853     }
00854 
00855 /*     Return if we were only asked to check infinity arithmetic */
00856 
00857     if (*ispec == 0) {
00858         return ret_val;
00859     }
00860     nan1 = posinf + neginf;
00861     nan2 = posinf / neginf;
00862     nan3 = posinf / posinf;
00863     nan4 = posinf * *zero;
00864     nan5 = neginf * negzro;
00865     nan6 = nan5 * 0.f;
00866     if (nan1 == nan1) {
00867         ret_val = 0;
00868         return ret_val;
00869     }
00870     if (nan2 == nan2) {
00871         ret_val = 0;
00872         return ret_val;
00873     }
00874     if (nan3 == nan3) {
00875         ret_val = 0;
00876         return ret_val;
00877     }
00878     if (nan4 == nan4) {
00879         ret_val = 0;
00880         return ret_val;
00881     }
00882     if (nan5 == nan5) {
00883         ret_val = 0;
00884         return ret_val;
00885     }
00886     if (nan6 == nan6) {
00887         ret_val = 0;
00888         return ret_val;
00889     }
00890     return ret_val;
00891 } /* ieeeck_ */
00892 
00893 /* Main program alias */ int main_ () { MAIN__ (); return 0; }


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:16