ilaenv.c 19 KB

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