1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301
|
//------------------------------------------------------------------------------
// SuiteSparse_config/SuiteSparse_config.h: common utilites for SuiteSparse
//------------------------------------------------------------------------------
// SuiteSparse_config, Copyright (c) 2012-2023, Timothy A. Davis.
// All Rights Reserved.
// SPDX-License-Identifier: BSD-3-clause
//------------------------------------------------------------------------------
// Configuration file for SuiteSparse: a Suite of Sparse matrix packages: AMD,
// COLAMD, CCOLAMD, CAMD, CHOLMOD, UMFPACK, CXSparse, SuiteSparseQR, ParU, ...
// The SuiteSparse_config.h file is configured by CMake to be specific to the
// C/C++ compiler and BLAS library being used for SuiteSparse. The original
// file is SuiteSparse_config/SuiteSparse_config.h.in. Do not edit the
// SuiteSparse_config.h file directly.
#ifndef SUITESPARSE_CONFIG_H
#define SUITESPARSE_CONFIG_H
//------------------------------------------------------------------------------
// SuiteSparse-wide ANSI C11 #include files
//------------------------------------------------------------------------------
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <inttypes.h>
#include <stddef.h>
#include <limits.h>
#include <math.h>
#include <stdarg.h>
#include <ctype.h>
//------------------------------------------------------------------------------
// SuiteSparse_long is now int64_t in SuiteSparse v6.0.0 and later
//------------------------------------------------------------------------------
// The use of SuiteSparse_long is deprecated. User applications should use
// int64_t instead.
#undef SuiteSparse_long
#undef SuiteSparse_long_max
#undef SuiteSparse_long_idd
#undef SuiteSparse_long_id
#define SuiteSparse_long int64_t
#define SuiteSparse_long_max INT64_MAX
#define SuiteSparse_long_idd PRId64
#define SuiteSparse_long_id "%" SuiteSparse_long_idd
//------------------------------------------------------------------------------
// OpenMP
//------------------------------------------------------------------------------
#if defined ( _OPENMP )
#include <omp.h>
#define SUITESPARSE_OPENMP_MAX_THREADS omp_get_max_threads ( )
#define SUITESPARSE_OPENMP_GET_NUM_THREADS omp_get_num_threads ( )
#define SUITESPARSE_OPENMP_GET_WTIME omp_get_wtime ( )
#define SUITESPARSE_OPENMP_GET_THREAD_ID omp_get_thread_num ( )
#else
// OpenMP not available
#define SUITESPARSE_OPENMP_MAX_THREADS (1)
#define SUITESPARSE_OPENMP_GET_NUM_THREADS (1)
#define SUITESPARSE_OPENMP_GET_WTIME (0)
#define SUITESPARSE_OPENMP_GET_THREAD_ID (0)
#endif
//------------------------------------------------------------------------------
// MATLAB/Octave
//------------------------------------------------------------------------------
// #if defined ( MATLAB_MEX_FILE )
// #include "mex.h"
// #include "matrix.h"
// #endif
//------------------------------------------------------------------------------
// string and token handling macros
//------------------------------------------------------------------------------
// SUITESPARSE_STR: convert the content of x into a string "x"
#define SUITESPARSE_XSTR(x) SUITESPARSE_STR(x)
#define SUITESPARSE_STR(x) #x
// SUITESPARSE_CAT(x,y): concatenate two tokens
#define SUITESPARSE_CAT2(x,y) x ## y
#define SUITESPARSE_CAT(x,y) SUITESPARSE_CAT2(x,y)
//------------------------------------------------------------------------------
// determine which compiler is in use
//------------------------------------------------------------------------------
#define SUITESPARSE_COMPILER_NVCC 0
#define SUITESPARSE_COMPILER_ICX 0
#define SUITESPARSE_COMPILER_ICC 0
#define SUITESPARSE_COMPILER_CLANG 0
#define SUITESPARSE_COMPILER_GCC 0
#define SUITESPARSE_COMPILER_MSC 0
#define SUITESPARSE_COMPILER_XLC 0
#if defined ( __NVCC__ )
// NVIDIA nvcc compiler
#undef SUITESPARSE_COMPILER_NVCC
#define SUITESPARSE_COMPILER_NVCC 1
#define SUITESPARSE_COMPILER_MAJOR __CUDACC_VER_MAJOR__
#define SUITESPARSE_COMPILER_MINOR __CUDACC_VER_MINOR__
#define SUITESPARSE_COMPILER_SUB __CUDACC_VER_BUILD__
#define SUITESPARSE_COMPILER_NAME "nvcc"
#elif defined ( __INTEL_CLANG_COMPILER )
// Intel icx compiler, 2022.0.0 based on clang/llvm 14.0.0
#undef SUITESPARSE_COMPILER_ICX
#define SUITESPARSE_COMPILER_ICX 1
#define SUITESPARSE_COMPILER_MAJOR __INTEL_CLANG_COMPILER
#define SUITESPARSE_COMPILER_MINOR 0
#define SUITESPARSE_COMPILER_SUB 0
#define SUITESPARSE_COMPILER_NAME __VERSION__
#elif defined ( __INTEL_COMPILER )
// Intel icc compiler: 2021.5.0 uses "gcc 7.5 mode"
#undef SUITESPARSE_COMPILER_ICC
#define SUITESPARSE_COMPILER_ICC 1
#define SUITESPARSE_COMPILER_MAJOR __INTEL_COMPILER
#define SUITESPARSE_COMPILER_MINOR __INTEL_COMPILER_UPDATE
#define SUITESPARSE_COMPILER_SUB 0
#define SUITESPARSE_COMPILER_NAME __VERSION__
#elif defined ( __clang__ )
// clang
#undef SUITESPARSE_COMPILER_CLANG
#define SUITESPARSE_COMPILER_CLANG 1
#define SUITESPARSE_COMPILER_MAJOR __clang_major__
#define SUITESPARSE_COMPILER_MINOR __clang_minor__
#define SUITESPARSE_COMPILER_SUB __clang_patchlevel__
#define SUITESPARSE_COMPILER_NAME "clang " __clang_version__
#elif defined ( __xlC__ )
// xlc
#undef SUITESPARSE_COMPILER_XLC
#define SUITESPARSE_COMPILER_XLC 1
#define SUITESPARSE_COMPILER_MAJOR ( __xlC__ / 256 )
#define SUITESPARSE_COMPILER_MINOR \
( __xlC__ - 256 * SUITESPARSE_COMPILER_MAJOR)
#define SUITESPARSE_COMPILER_SUB 0
#define SUITESPARSE_COMPILER_NAME "IBM xlc " SUITESPARSE_XSTR (__xlC__)
#elif defined ( __GNUC__ )
// gcc
#undef SUITESPARSE_COMPILER_GCC
#define SUITESPARSE_COMPILER_GCC 1
#define SUITESPARSE_COMPILER_MAJOR __GNUC__
#define SUITESPARSE_COMPILER_MINOR __GNUC_MINOR__
#define SUITESPARSE_COMPILER_SUB __GNUC_PATCHLEVEL__
#define SUITESPARSE_COMPILER_NAME "GNU gcc " \
SUITESPARSE_XSTR (__GNUC__) "." \
SUITESPARSE_XSTR (__GNUC_MINOR__) "." \
SUITESPARSE_XSTR (__GNUC_PATCHLEVEL__)
#elif defined ( _MSC_VER )
// Microsoft Visual Studio (cl compiler)
#undef SUITESPARSE_COMPILER_MSC
#define SUITESPARSE_COMPILER_MSC 1
#define SUITESPARSE_COMPILER_MAJOR ( _MSC_VER / 100 )
#define SUITESPARSE_COMPILER_MINOR \
( _MSC_VER - 100 * SUITESPARSE_COMPILER_MAJOR)
#define SUITESPARSE_COMPILER_SUB 0
#define SUITESPARSE_COMPILER_NAME \
"Microsoft Visual Studio " SUITESPARSE_XSTR (_MSC_VER)
#else
// other compiler
#define SUITESPARSE_COMPILER_MAJOR 0
#define SUITESPARSE_COMPILER_MINOR 0
#define SUITESPARSE_COMPILER_SUB 0
#define SUITESPARSE_COMPILER_NAME "other C compiler"
#endif
//------------------------------------------------------------------------------
// malloc.h: required include file for Microsoft Visual Studio
//------------------------------------------------------------------------------
#if SUITESPARSE_COMPILER_MSC
#include <malloc.h>
#endif
// this was formerly "extern", or "__declspec ..." for Windows.
#define SUITESPARSE_PUBLIC
//------------------------------------------------------------------------------
// determine the ANSI C version
//------------------------------------------------------------------------------
#ifdef __STDC_VERSION__
// ANSI C17: 201710L
// ANSI C11: 201112L
// ANSI C99: 199901L
// ANSI C95: 199409L
#define SUITESPARSE_STDC_VERSION __STDC_VERSION__
#else
// assume ANSI C90 / C89
#define SUITESPARSE_STDC_VERSION 199001L
#endif
//------------------------------------------------------------------------------
// handle the restrict keyword
//------------------------------------------------------------------------------
#if defined ( __cplusplus )
// C++ does not have the "restrict" keyword
#define SUITESPARSE_RESTRICT
#elif SUITESPARSE_COMPILER_MSC
// MS Visual Studio
#define SUITESPARSE_RESTRICT __restrict
#elif SUITESPARSE_COMPILER_NVCC
// NVIDIA nvcc
#define SUITESPARSE_RESTRICT __restrict__
#elif SUITESPARSE_STDC_VERSION >= 199901L
// ANSI C99 or later
#define SUITESPARSE_RESTRICT restrict
#else
// ANSI C95 and earlier: no restrict keyword
#define SUITESPARSE_RESTRICT
#endif
#ifdef __cplusplus
extern "C"
{
#endif
//==============================================================================
// SuiteSparse_config parameters and functions
//==============================================================================
// SuiteSparse-wide parameters are placed in a single static struct, defined
// locally in SuiteSparse_config.c. It is not meant to be updated frequently
// by multiple threads. Rather, if an application needs to modify
// SuiteSparse_config, it should do it once at the beginning of the
// application, before multiple threads are launched.
// The intent of these function pointers is that they not be used in your
// application directly, except to assign them to the desired user-provided
// functions. Rather, you should use the SuiteSparse_malloc/calloc, etc
// wrappers defined below to access them.
// The SuiteSparse_config_*_get methods return the contents of the struct:
void *(*SuiteSparse_config_malloc_func_get (void)) (size_t);
void *(*SuiteSparse_config_calloc_func_get (void)) (size_t, size_t);
void *(*SuiteSparse_config_realloc_func_get (void)) (void *, size_t);
void (*SuiteSparse_config_free_func_get (void)) (void *);
int (*SuiteSparse_config_printf_func_get (void)) (const char *, ...);
double (*SuiteSparse_config_hypot_func_get (void)) (double, double);
int (*SuiteSparse_config_divcomplex_func_get (void)) (double, double, double, double, double *, double *);
// The SuiteSparse_config_*_set methods modify the contents of the struct:
void SuiteSparse_config_malloc_func_set (void *(*malloc_func) (size_t));
void SuiteSparse_config_calloc_func_set (void *(*calloc_func) (size_t, size_t));
void SuiteSparse_config_realloc_func_set (void *(*realloc_func) (void *, size_t));
void SuiteSparse_config_free_func_set (void (*free_func) (void *));
void SuiteSparse_config_printf_func_set (int (*printf_func) (const char *, ...));
void SuiteSparse_config_hypot_func_set (double (*hypot_func) (double, double));
void SuiteSparse_config_divcomplex_func_set (int (*divcomplex_func) (double, double, double, double, double *, double *));
// The SuiteSparse_config_*_func methods are wrappers that call the function
// pointers in the struct. Note that there is no wrapper for the printf_func.
// See the SUITESPARSE_PRINTF macro instead.
void *SuiteSparse_config_malloc (size_t s) ;
void *SuiteSparse_config_calloc (size_t n, size_t s) ;
void *SuiteSparse_config_realloc (void *, size_t s) ;
void SuiteSparse_config_free (void *) ;
double SuiteSparse_config_hypot (double x, double y) ;
int SuiteSparse_config_divcomplex
(
double xr, double xi, double yr, double yi, double *zr, double *zi
) ;
void SuiteSparse_start ( void ) ; // called to start SuiteSparse
void SuiteSparse_finish ( void ) ; // called to finish SuiteSparse
void *SuiteSparse_malloc // pointer to allocated block of memory
(
size_t nitems, // number of items to malloc (>=1 is enforced)
size_t size_of_item // sizeof each item
) ;
void *SuiteSparse_calloc // pointer to allocated block of memory
(
size_t nitems, // number of items to calloc (>=1 is enforced)
size_t size_of_item // sizeof each item
) ;
void *SuiteSparse_realloc // pointer to reallocated block of memory, or
///to original block if the realloc failed.
(
size_t nitems_new, // new number of items in the object
size_t nitems_old, // old number of items in the object
size_t size_of_item, // sizeof each item
void *p, // old object to reallocate
int *ok // 1 if successful, 0 otherwise
) ;
void *SuiteSparse_free // always returns NULL
(
void *p // block to free
) ;
void SuiteSparse_tic // start the timer
(
double tic [2] // output, contents undefined on input
) ;
double SuiteSparse_toc // return time in seconds since last tic
(
double tic [2] // input: from last call to SuiteSparse_tic
) ;
double SuiteSparse_time // returns current wall clock time in seconds
(
void
) ;
// returns sqrt (x^2 + y^2), computed reliably
double SuiteSparse_hypot (double x, double y) ;
// complex division of c = a/b
int SuiteSparse_divcomplex
(
double ar, double ai, // real and imaginary parts of a
double br, double bi, // real and imaginary parts of b
double *cr, double *ci // real and imaginary parts of c
) ;
// determine which timer to use, if any
#ifndef NTIMER
// SuiteSparse_config itself can be compiled without OpenMP,
// but other packages can themselves use OpenMP. In this case,
// those packages should use omp_get_wtime() directly. This can
// be done via the SUITESPARSE_TIME macro, defined below:
#define SUITESPARSE_TIMER_ENABLED
#define SUITESPARSE_HAVE_CLOCK_GETTIME
#define SUITESPARSE_CONFIG_TIMER omp_get_wtime
#if defined ( SUITESPARSE_TIMER_ENABLED )
#if defined ( _OPENMP )
// Avoid indirection through the library if the compilation unit
// including this header happens to use OpenMP.
#define SUITESPARSE_TIME (omp_get_wtime ( ))
#else
#define SUITESPARSE_TIME (SuiteSparse_time ( ))
#endif
#else
// No timer is available
#define SUITESPARSE_TIME (0)
#endif
#else
// The SuiteSparse_config timer is explictly disabled;
// use the OpenMP timer omp_get_wtime if available.
#undef SUITESPARSE_TIMER_ENABLED
#undef SUITESPARSE_HAVE_CLOCK_GETTIME
#undef SUITESPARSE_CONFIG_TIMER
#if defined ( _OPENMP )
#define SUITESPARSE_CONFIG_TIMER omp_get_wtime
#define SUITESPARSE_TIME (omp_get_wtime ( ))
#else
#define SUITESPARSE_CONFIG_TIMER none
#define SUITESPARSE_TIME (0)
#endif
#endif
// SuiteSparse printf macro
#define SUITESPARSE_PRINTF(params) \
{ \
int (*printf_func) (const char *, ...) ; \
printf_func = SuiteSparse_config_printf_func_get ( ) ; \
if (printf_func != NULL) \
{ \
(void) (printf_func) params ; \
} \
}
//==============================================================================
// SuiteSparse version
//==============================================================================
// SuiteSparse is not a package itself, but a collection of packages, some of
// which must be used together (UMFPACK requires AMD, CHOLMOD requires AMD,
// COLAMD, CAMD, and CCOLAMD, etc). A version number is provided here for the
// collection itself, which is also the version number of SuiteSparse_config.
int SuiteSparse_version // returns SUITESPARSE_VERSION
(
// output, not defined on input. Not used if NULL. Returns
// the three version codes in version [0..2]:
// version [0] is SUITESPARSE_MAIN_VERSION
// version [1] is SUITESPARSE_SUB_VERSION
// version [2] is SUITESPARSE_SUBSUB_VERSION
int version [3]
) ;
#define SUITESPARSE_HAS_VERSION_FUNCTION
#define SUITESPARSE_DATE "Mar 6, 2025"
#define SUITESPARSE_MAIN_VERSION 7
#define SUITESPARSE_SUB_VERSION 10
#define SUITESPARSE_SUBSUB_VERSION 1
// version format x.y
#define SUITESPARSE_VER_CODE(main,sub) ((main) * 1000 + (sub))
#define SUITESPARSE_VERSION SUITESPARSE_VER_CODE(7, 10)
// version format x.y.z
#define SUITESPARSE__VERCODE(main,sub,patch) \
(((main)*1000ULL + (sub))*1000ULL + (patch))
#define SUITESPARSE__VERSION SUITESPARSE__VERCODE(7,10,1)
//==============================================================================
// SuiteSparse interface to the BLAS and LAPACK libraries
//==============================================================================
// Several SuiteSparse packages rely on the BLAS/LAPACK libraries (UMFPACK
// CHOLMOD, and SPQR, and likely GraphBLAS in the future). All of these
// packages are written in C/C++, but rely on the Fortran interface to
// BLAS/LAPACK. SuiteSparse does not use the cblas / lapacke interfaces to
// these libraries, mainly because FindBLAS.cmake does not locate them (or at
// least does not locate their respective cblas.h and lapacke.h files). In
// addition, the original definition of these files do not include a different
// name space for 64-bit integer versions. Finally, Intel renames cblas.h as
// mkl_cblas.h. As a result of these many portability issues, different
// implementations of those libraries extend them in different ways. Thus,
// SuiteSparse simply calls the Fortran functions directly.
// However, the method for how C/C++ calling Fortran depends on the compilers
// involved. This connection is handled by the FortranCInterface.cmake module
// of CMake.
// On typical systems (Linux with the GCC compiler for example, or on the Mac
// with clang) the Fortan name "dgemm" is called by C as "dgemm_", Other
// systems do not append the underscore.
//------------------------------------------------------------------------------
// SUITESPARSE_FORTRAN: macros created by CMake describing how C calls Fortran
//------------------------------------------------------------------------------
// SUITESPARSE_FORTAN: for Fortran routines with no "_" in their names
// SUITESPARSE__FORTAN: for Fortran routines with "_" in their names
// The decision on which of these macros to use is based on the presence of
// underscores in the original Fortran names, not the (commonly) appended
// underscore needed for C to all the corresponding Fortran routine.
// These two macros are created by the CMake module, FortranCInterface.cmake,
// which is then used by CMake to configure this file.
// The CMAKE decision can be superceded by setting -DBLAS_NO_UNDERSCORE, so
// that "dgemm" remains "dgemm" (for MS Visual Studio for example). Setting
// -DBLAS_UNDERSCORE changes "dgemm" to "dgemm_", the common case for Mac and
// Linux.
#if defined ( BLAS_NO_UNDERSCORE )
// no name mangling, use lower case
#define SUITESPARSE_FORTRAN(name,NAME) name
#define SUITESPARSE__FORTRAN(name,NAME) name
#elif defined ( BLAS_UNDERSCORE )
// append an underscore, use lower case
#define SUITESPARSE_FORTRAN(name,NAME) name ## _
#define SUITESPARSE__FORTRAN(name,NAME) name ## _
#else
// let CMake decide how C calls Fortran
#define SUITESPARSE_FORTRAN(name,NAME) name##_
#define SUITESPARSE__FORTRAN(name,NAME) name##_
#endif
//------------------------------------------------------------------------------
// SUITESPARSE_BLAS_INT: the BLAS/LAPACK integer (int32_t or int64_t)
//------------------------------------------------------------------------------
// CMake 3.22 and later allow the selection of the BLAS/LAPACK integer size.
// This information is then used to configure this file with the definition of
// this integer: int32_t or int64_t.
// When compiling SuiteSparse for a MATLAB mexFunction, the MATLAB libmwblas is
// used, which is a 64-bit integer version of the BLAS. CMake is not used to
// configure SuiteSparse in this case. The flag -DBLAS64 can be used to ensure
// a 64-bit BLAS is used. Likewise, -DBLAS32 ensures a 32-bit BLAS is used.
#if defined ( BLAS64 )
// override the BLAS found by CMake, and force a 64-bit interface
#define SUITESPARSE_BLAS_INT int64_t
#elif defined ( BLAS32 )
// override the BLAS found by CMake, and force a 32-bit interface
#define SUITESPARSE_BLAS_INT int32_t
#else
// let CMake determine the size of the integer in the Fortran BLAS
#define SUITESPARSE_BLAS_INT int32_t
#endif
// SUITESPARSE_TO_BLAS_INT: convert an integer k to a BLAS integer K and set ok
// to false if the conversion changes its value. This is implemented as a
// macro so that can work with any type of the integer k.
#define SUITESPARSE_TO_BLAS_INT(K,k,ok) \
SUITESPARSE_BLAS_INT K = (k) ; \
ok = ok && ((sizeof (K) >= sizeof (k)) || ((int64_t)(K) == (int64_t)(k))) ;
//------------------------------------------------------------------------------
// SUITESPARSE_BLAS_SUFFIX: modify the name of a Fortran BLAS/LAPACK routine
//------------------------------------------------------------------------------
// OpenBLAS can be compiled by appending a suffix to each routine, so that the
// Fortan routine dgemm becomes dgemm_64, which denotes a version of dgemm with
// 64-bit integer parameters. The Sun Performance library does the same thing,
// but without the internal underscore, as dgemm64.
// If the suffix does not contain "_", use (Sun Perf., for example):
// cd build && cmake -DBLAS64_SUFFIX="64" ..
// If the suffix contains "_" (OpenBLAS in spack for example), use the
// following:
// cd build && cmake -DBLAS64_SUFFIX="_64" ..
// This setting could be used by the spack packaging of SuiteSparse when linked
// with the spack-installed OpenBLAS with 64-bit integers. See
// https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/suite-sparse/package.py
#if defined ( BLAS64__SUFFIX )
// The suffix includes an undersore (such as "_64"), so the Fortran name
// must be processed with the SUITESPARSE__FORTRAN macro.
#define SUITESPARSE_G(name,NAME) SUITESPARSE__FORTRAN(name,NAME)
#define SUITESPARSE_F(name,NAME) \
SUITESPARSE_G (SUITESPARSE_CAT (name, BLAS64__SUFFIX), \
SUITESPARSE_CAT (NAME, BLAS64__SUFFIX))
#define SUITESPARSE_BLAS(name,NAME) SUITESPARSE_F(name,NAME)
#elif defined ( BLAS64_SUFFIX )
// The suffix does not include an undersore, and neither do the original
// names of the BLAS and LAPACK routines. Thus, the Fortran name must be
// processed with the SUITESPARSE_FORTRAN macro.
#define SUITESPARSE_G(name,NAME) SUITESPARSE_FORTRAN(name,NAME)
#define SUITESPARSE_F(name,NAME) \
SUITESPARSE_G (SUITESPARSE_CAT (name, BLAS64_SUFFIX), \
SUITESPARSE_CAT (NAME, BLAS64_SUFFIX))
#define SUITESPARSE_BLAS(name,NAME) SUITESPARSE_F(name,NAME)
#else
// No suffix is need, so the final Fortran name includes no suffix.
#define SUITESPARSE_BLAS(name,NAME) SUITESPARSE_FORTRAN(name,NAME)
#endif
//------------------------------------------------------------------------------
// C names of Fortan BLAS and LAPACK functions used by SuiteSparse
//------------------------------------------------------------------------------
// double
#define SUITESPARSE_BLAS_DTRSV SUITESPARSE_BLAS ( dtrsv , DTRSV )
#define SUITESPARSE_BLAS_DGEMV SUITESPARSE_BLAS ( dgemv , DGEMV )
#define SUITESPARSE_BLAS_DTRSM SUITESPARSE_BLAS ( dtrsm , DTRSM )
#define SUITESPARSE_BLAS_DGEMM SUITESPARSE_BLAS ( dgemm , DGEMM )
#define SUITESPARSE_BLAS_DSYRK SUITESPARSE_BLAS ( dsyrk , DSYRK )
#define SUITESPARSE_BLAS_DGER SUITESPARSE_BLAS ( dger , DGER )
#define SUITESPARSE_BLAS_DSCAL SUITESPARSE_BLAS ( dscal , DSCAL )
#define SUITESPARSE_BLAS_DNRM2 SUITESPARSE_BLAS ( dnrm2 , DNRM2 )
#define SUITESPARSE_LAPACK_DPOTRF SUITESPARSE_BLAS ( dpotrf , DPOTRF )
#define SUITESPARSE_LAPACK_DLARF SUITESPARSE_BLAS ( dlarf , DLARF )
#define SUITESPARSE_LAPACK_DLARFG SUITESPARSE_BLAS ( dlarfg , DLARFG )
#define SUITESPARSE_LAPACK_DLARFT SUITESPARSE_BLAS ( dlarft , DLARFT )
#define SUITESPARSE_LAPACK_DLARFB SUITESPARSE_BLAS ( dlarfb , DLARFB )
// double complex
#define SUITESPARSE_BLAS_ZTRSV SUITESPARSE_BLAS ( ztrsv , ZTRSV )
#define SUITESPARSE_BLAS_ZGEMV SUITESPARSE_BLAS ( zgemv , ZGEMV )
#define SUITESPARSE_BLAS_ZTRSM SUITESPARSE_BLAS ( ztrsm , ZTRSM )
#define SUITESPARSE_BLAS_ZGEMM SUITESPARSE_BLAS ( zgemm , ZGEMM )
#define SUITESPARSE_BLAS_ZHERK SUITESPARSE_BLAS ( zherk , ZHERK )
#define SUITESPARSE_BLAS_ZGERU SUITESPARSE_BLAS ( zgeru , ZGERU )
#define SUITESPARSE_BLAS_ZSCAL SUITESPARSE_BLAS ( zscal , ZSCAL )
#define SUITESPARSE_BLAS_DZNRM2 SUITESPARSE_BLAS ( dznrm2 , DZNRM2 )
#define SUITESPARSE_LAPACK_ZPOTRF SUITESPARSE_BLAS ( zpotrf , ZPOTRF )
#define SUITESPARSE_LAPACK_ZLARF SUITESPARSE_BLAS ( zlarf , ZLARF )
#define SUITESPARSE_LAPACK_ZLARFG SUITESPARSE_BLAS ( zlarfg , ZLARFG )
#define SUITESPARSE_LAPACK_ZLARFT SUITESPARSE_BLAS ( zlarft , ZLARFT )
#define SUITESPARSE_LAPACK_ZLARFB SUITESPARSE_BLAS ( zlarfb , ZLARFB )
// single
#define SUITESPARSE_BLAS_STRSV SUITESPARSE_BLAS ( strsv , STRSV )
#define SUITESPARSE_BLAS_SGEMV SUITESPARSE_BLAS ( sgemv , SGEMV )
#define SUITESPARSE_BLAS_STRSM SUITESPARSE_BLAS ( strsm , STRSM )
#define SUITESPARSE_BLAS_SGEMM SUITESPARSE_BLAS ( sgemm , SGEMM )
#define SUITESPARSE_BLAS_SSYRK SUITESPARSE_BLAS ( ssyrk , SSYRK )
#define SUITESPARSE_BLAS_SGER SUITESPARSE_BLAS ( sger , SGER )
#define SUITESPARSE_BLAS_SSCAL SUITESPARSE_BLAS ( sscal , SSCAL )
#define SUITESPARSE_BLAS_SNRM2 SUITESPARSE_BLAS ( snrm2 , SNRM2 )
#define SUITESPARSE_LAPACK_SPOTRF SUITESPARSE_BLAS ( spotrf , SPOTRF )
#define SUITESPARSE_LAPACK_SLARF SUITESPARSE_BLAS ( slarf , SLARF )
#define SUITESPARSE_LAPACK_SLARFG SUITESPARSE_BLAS ( slarfg , SLARFG )
#define SUITESPARSE_LAPACK_SLARFT SUITESPARSE_BLAS ( slarft , SLARFT )
#define SUITESPARSE_LAPACK_SLARFB SUITESPARSE_BLAS ( slarfb , SLARFB )
// single complex
#define SUITESPARSE_BLAS_CTRSV SUITESPARSE_BLAS ( ctrsv , CTRSV )
#define SUITESPARSE_BLAS_CGEMV SUITESPARSE_BLAS ( cgemv , CGEMV )
#define SUITESPARSE_BLAS_CTRSM SUITESPARSE_BLAS ( ctrsm , CTRSM )
#define SUITESPARSE_BLAS_CGEMM SUITESPARSE_BLAS ( cgemm , CGEMM )
#define SUITESPARSE_BLAS_CHERK SUITESPARSE_BLAS ( cherk , CHERK )
#define SUITESPARSE_BLAS_CGERU SUITESPARSE_BLAS ( cgeru , CGERU )
#define SUITESPARSE_BLAS_CSCAL SUITESPARSE_BLAS ( cscal , CSCAL )
#define SUITESPARSE_BLAS_SCNRM2 SUITESPARSE_BLAS ( scnrm2 , SCNRM2 )
#define SUITESPARSE_LAPACK_CPOTRF SUITESPARSE_BLAS ( cpotrf , CPOTRF )
#define SUITESPARSE_LAPACK_CLARF SUITESPARSE_BLAS ( clarf , CLARF )
#define SUITESPARSE_LAPACK_CLARFG SUITESPARSE_BLAS ( clarfg , CLARFG )
#define SUITESPARSE_LAPACK_CLARFT SUITESPARSE_BLAS ( clarft , CLARFT )
#define SUITESPARSE_LAPACK_CLARFB SUITESPARSE_BLAS ( clarfb , CLARFB )
//------------------------------------------------------------------------------
// prototypes and macros for BLAS and SUITESPARSE_LAPACK functions
//------------------------------------------------------------------------------
// For complex functions, the (void *) parameters are actually pointers to
// arrays of complex values. They are prototyped here as (void *) to allow
// them to be called from both C and C++.
// See https://netlib.org/blas/ and https://netlib.org/lapack/ for the
// definitions of the inputs/outputs of these functions.
// These prototypes need to be found by UMFPACK, CHOLMOD, and SPQR, and to do
// so, they need to appear in this public header to ensure the correct BLAS
// library and integer size is used. However, these definitions should not
// (normally) be exposed to the user application.
// If a user application wishes to use these definitions, simply add the
// following prior to #include'ing any SuiteSparse headers (amd.h, and so on):
//
// #define SUITESPARSE_BLAS_DEFINITIONS
// #include "SuiteSparse_config.h"
#if defined ( SUITESPARSE_BLAS_DEFINITIONS )
#ifndef SUITESPARSE_BLAS_PROTOTYPES
#define SUITESPARSE_BLAS_PROTOTYPES
#endif
#ifndef SUITESPARSE_BLAS_MACROS
#define SUITESPARSE_BLAS_MACROS
#endif
#endif
//------------------------------------------------------------------------------
// prototypes of BLAS and SUITESPARSE_LAPACK functions
//------------------------------------------------------------------------------
#if defined ( SUITESPARSE_BLAS_PROTOTYPES )
//------------------------------------------------------------------------------
// gemv: Y = alpha*A*x + beta*Y
//------------------------------------------------------------------------------
void SUITESPARSE_BLAS_DGEMV
(
// input:
const char *trans,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const double *alpha,
const double *A,
const SUITESPARSE_BLAS_INT *lda,
const double *X,
const SUITESPARSE_BLAS_INT *incx,
const double *beta,
// input/output:
double *Y,
// input:
const SUITESPARSE_BLAS_INT *incy
) ;
void SUITESPARSE_BLAS_SGEMV
(
// input:
const char *trans,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const float *alpha,
const float *A,
const SUITESPARSE_BLAS_INT *lda,
const float *X,
const SUITESPARSE_BLAS_INT *incx,
const float *beta,
// input/output:
float *Y,
// input:
const SUITESPARSE_BLAS_INT *incy
) ;
void SUITESPARSE_BLAS_ZGEMV
(
// input:
const char *trans,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const void *alpha,
const void *A,
const SUITESPARSE_BLAS_INT *lda,
const void *X,
const SUITESPARSE_BLAS_INT *incx,
const void *beta,
// input/output:
void *Y,
// input:
const SUITESPARSE_BLAS_INT *incy
) ;
void SUITESPARSE_BLAS_CGEMV
(
// input:
const char *trans,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const void *alpha,
const void *A,
const SUITESPARSE_BLAS_INT *lda,
const void *X,
const SUITESPARSE_BLAS_INT *incx,
const void *beta,
// input/output:
void *Y,
// input:
const SUITESPARSE_BLAS_INT *incy
) ;
//------------------------------------------------------------------------------
// trsv: solve Lx=b, Ux=b, L'x=b, or U'x=b
//------------------------------------------------------------------------------
void SUITESPARSE_BLAS_DTRSV
(
// input:
const char *uplo,
const char *trans,
const char *diag,
const SUITESPARSE_BLAS_INT *n,
const double *A,
const SUITESPARSE_BLAS_INT *lda,
// input/output:
double *X,
// input:
const SUITESPARSE_BLAS_INT *incx
) ;
void SUITESPARSE_BLAS_STRSV
(
// input:
const char *uplo,
const char *trans,
const char *diag,
const SUITESPARSE_BLAS_INT *n,
const float *A,
const SUITESPARSE_BLAS_INT *lda,
// input/output:
float *X,
// input:
const SUITESPARSE_BLAS_INT *incx
) ;
void SUITESPARSE_BLAS_ZTRSV
(
// input:
const char *uplo,
const char *trans,
const char *diag,
const SUITESPARSE_BLAS_INT *n,
const void *A,
const SUITESPARSE_BLAS_INT *lda,
// input/output:
void *X,
// input:
const SUITESPARSE_BLAS_INT *incx
) ;
void SUITESPARSE_BLAS_CTRSV
(
// input:
const char *uplo,
const char *trans,
const char *diag,
const SUITESPARSE_BLAS_INT *n,
const void *A,
const SUITESPARSE_BLAS_INT *lda,
// input/output:
void *X,
// input:
const SUITESPARSE_BLAS_INT *incx
) ;
//------------------------------------------------------------------------------
// trsm: solve LX=B, UX=B, L'X=B, or U'X=B
//------------------------------------------------------------------------------
void SUITESPARSE_BLAS_DTRSM
(
// input:
const char *side,
const char *uplo,
const char *transa,
const char *diag,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const double *alpha,
const double *A,
const SUITESPARSE_BLAS_INT *lda,
// input/output:
double *B,
// input:
const SUITESPARSE_BLAS_INT *ldb
) ;
void SUITESPARSE_BLAS_STRSM
(
// input:
const char *side,
const char *uplo,
const char *transa,
const char *diag,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const float *alpha,
const float *A,
const SUITESPARSE_BLAS_INT *lda,
// input/output:
float *B,
// input:
const SUITESPARSE_BLAS_INT *ldb
) ;
void SUITESPARSE_BLAS_ZTRSM
(
// input:
const char *side,
const char *uplo,
const char *transa,
const char *diag,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const void *alpha,
const void *A,
const SUITESPARSE_BLAS_INT *lda,
// input/output:
void *B,
// input:
const SUITESPARSE_BLAS_INT *ldb
) ;
void SUITESPARSE_BLAS_CTRSM
(
// input:
const char *side,
const char *uplo,
const char *transa,
const char *diag,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const void *alpha,
const void *A,
const SUITESPARSE_BLAS_INT *lda,
// input/output:
void *B,
// input:
const SUITESPARSE_BLAS_INT *ldb
) ;
//------------------------------------------------------------------------------
// gemm: C = alpha*A*B + beta*C
//------------------------------------------------------------------------------
void SUITESPARSE_BLAS_DGEMM
(
// input:
const char *transa,
const char *transb,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const double *alpha,
const double *A,
const SUITESPARSE_BLAS_INT *lda,
const double *B,
const SUITESPARSE_BLAS_INT *ldb,
const double *beta,
// input/output:
double *C,
// input:
const SUITESPARSE_BLAS_INT *ldc
) ;
void SUITESPARSE_BLAS_SGEMM
(
// input:
const char *transa,
const char *transb,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const float *alpha,
const float *A,
const SUITESPARSE_BLAS_INT *lda,
const float *B,
const SUITESPARSE_BLAS_INT *ldb,
const float *beta,
// input/output:
float *C,
// input:
const SUITESPARSE_BLAS_INT *ldc
) ;
void SUITESPARSE_BLAS_ZGEMM
(
// input:
const char *transa,
const char *transb,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const void *alpha,
const void *A,
const SUITESPARSE_BLAS_INT *lda,
const void *B,
const SUITESPARSE_BLAS_INT *ldb,
const void *beta,
// input/output:
void *C,
// input:
const SUITESPARSE_BLAS_INT *ldc
) ;
void SUITESPARSE_BLAS_CGEMM
(
// input:
const char *transa,
const char *transb,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const void *alpha,
const void *A,
const SUITESPARSE_BLAS_INT *lda,
const void *B,
const SUITESPARSE_BLAS_INT *ldb,
const void *beta,
// input/output:
void *C,
// input:
const SUITESPARSE_BLAS_INT *ldc
) ;
//------------------------------------------------------------------------------
// syrk/herk: C = alpha*A*A' + beta*C ; or C = alpha*A'*A + beta*C
//------------------------------------------------------------------------------
void SUITESPARSE_BLAS_DSYRK
(
// input:
const char *uplo,
const char *trans,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const double *alpha,
const double *A,
const SUITESPARSE_BLAS_INT *lda,
const double *beta,
// input/output:
double *C,
// input:
const SUITESPARSE_BLAS_INT *ldc
) ;
void SUITESPARSE_BLAS_SSYRK
(
// input:
const char *uplo,
const char *trans,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const float *alpha,
const float *A,
const SUITESPARSE_BLAS_INT *lda,
const float *beta,
// input/output:
float *C,
// input:
const SUITESPARSE_BLAS_INT *ldc
) ;
void SUITESPARSE_BLAS_ZHERK
(
// input:
const char *uplo,
const char *trans,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const void *alpha,
const void *A,
const SUITESPARSE_BLAS_INT *lda,
const void *beta,
// input/output:
void *C,
// input:
const SUITESPARSE_BLAS_INT *ldc
) ;
void SUITESPARSE_BLAS_CHERK
(
// input:
const char *uplo,
const char *trans,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const void *alpha,
const void *A,
const SUITESPARSE_BLAS_INT *lda,
const void *beta,
// input/output:
void *C,
// input:
const SUITESPARSE_BLAS_INT *ldc
) ;
//------------------------------------------------------------------------------
// potrf: Cholesky factorization
//------------------------------------------------------------------------------
void SUITESPARSE_LAPACK_DPOTRF
(
// input:
const char *uplo,
const SUITESPARSE_BLAS_INT *n,
// input/output:
double *A,
// input:
const SUITESPARSE_BLAS_INT *lda,
// output:
SUITESPARSE_BLAS_INT *info
) ;
void SUITESPARSE_LAPACK_SPOTRF
(
// input:
const char *uplo,
const SUITESPARSE_BLAS_INT *n,
// input/output:
float *A,
// input:
const SUITESPARSE_BLAS_INT *lda,
// output:
SUITESPARSE_BLAS_INT *info
) ;
void SUITESPARSE_LAPACK_ZPOTRF
(
// input:
const char *uplo,
const SUITESPARSE_BLAS_INT *n,
// input/output:
void *A,
// input:
const SUITESPARSE_BLAS_INT *lda,
// output:
SUITESPARSE_BLAS_INT *info
) ;
void SUITESPARSE_LAPACK_CPOTRF
(
// input:
const char *uplo,
const SUITESPARSE_BLAS_INT *n,
// input/output:
void *A,
// input:
const SUITESPARSE_BLAS_INT *lda,
// output:
SUITESPARSE_BLAS_INT *info
) ;
//------------------------------------------------------------------------------
// scal: Y = alpha*Y
//------------------------------------------------------------------------------
void SUITESPARSE_BLAS_DSCAL
(
// input:
const SUITESPARSE_BLAS_INT *n,
const double *alpha,
// input/output:
double *Y,
// input:
const SUITESPARSE_BLAS_INT *incy
) ;
void SUITESPARSE_BLAS_SSCAL
(
// input:
const SUITESPARSE_BLAS_INT *n,
const float *alpha,
// input/output:
float *Y,
// input:
const SUITESPARSE_BLAS_INT *incy
) ;
void SUITESPARSE_BLAS_ZSCAL
(
// input:
const SUITESPARSE_BLAS_INT *n,
const void *alpha,
// input/output:
void *Y,
// input:
const SUITESPARSE_BLAS_INT *incy
) ;
void SUITESPARSE_BLAS_CSCAL
(
// input:
const SUITESPARSE_BLAS_INT *n,
const void *alpha,
// input/output:
void *Y,
// input:
const SUITESPARSE_BLAS_INT *incy
) ;
//------------------------------------------------------------------------------
// ger/geru: A = alpha*x*y' + A
//------------------------------------------------------------------------------
void SUITESPARSE_BLAS_DGER
(
// input:
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const double *alpha,
const double *X,
const SUITESPARSE_BLAS_INT *incx,
const double *Y,
const SUITESPARSE_BLAS_INT *incy,
// input/output:
double *A,
// input:
const SUITESPARSE_BLAS_INT *lda
) ;
void SUITESPARSE_BLAS_SGER
(
// input:
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const float *alpha,
const float *X,
const SUITESPARSE_BLAS_INT *incx,
const float *Y,
const SUITESPARSE_BLAS_INT *incy,
// input/output:
float *A,
// input:
const SUITESPARSE_BLAS_INT *lda
) ;
void SUITESPARSE_BLAS_ZGERU
(
// input:
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const void *alpha,
const void *X,
const SUITESPARSE_BLAS_INT *incx,
const void *Y,
const SUITESPARSE_BLAS_INT *incy,
// input/output:
void *A,
// input:
const SUITESPARSE_BLAS_INT *lda
) ;
void SUITESPARSE_BLAS_CGERU
(
// input:
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const void *alpha,
const void *X,
const SUITESPARSE_BLAS_INT *incx,
const void *Y,
const SUITESPARSE_BLAS_INT *incy,
// input/output:
void *A,
// input:
const SUITESPARSE_BLAS_INT *lda
) ;
//------------------------------------------------------------------------------
// larft: T = block Householder factor
//------------------------------------------------------------------------------
void SUITESPARSE_LAPACK_DLARFT
(
// input:
const char *direct,
const char *storev,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const double *V,
const SUITESPARSE_BLAS_INT *ldv,
const double *Tau,
// output:
double *T,
// input:
const SUITESPARSE_BLAS_INT *ldt
) ;
void SUITESPARSE_LAPACK_SLARFT
(
// input:
const char *direct,
const char *storev,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const float *V,
const SUITESPARSE_BLAS_INT *ldv,
const float *Tau,
// output:
float *T,
// input:
const SUITESPARSE_BLAS_INT *ldt
) ;
void SUITESPARSE_LAPACK_ZLARFT
(
// input:
const char *direct,
const char *storev,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const void *V,
const SUITESPARSE_BLAS_INT *ldv,
const void *Tau,
// output:
void *T,
// input:
const SUITESPARSE_BLAS_INT *ldt
) ;
void SUITESPARSE_LAPACK_CLARFT
(
// input:
const char *direct,
const char *storev,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const void *V,
const SUITESPARSE_BLAS_INT *ldv,
const void *Tau,
// output:
void *T,
// input:
const SUITESPARSE_BLAS_INT *ldt
) ;
//------------------------------------------------------------------------------
// larfb: apply block Householder reflector
//------------------------------------------------------------------------------
void SUITESPARSE_LAPACK_DLARFB
(
// input:
const char *side,
const char *trans,
const char *direct,
const char *storev,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const double *V,
const SUITESPARSE_BLAS_INT *ldv,
const double *T,
const SUITESPARSE_BLAS_INT *ldt,
// input/output:
double *C,
// input:
const SUITESPARSE_BLAS_INT *ldc,
// workspace:
double *Work,
// input:
const SUITESPARSE_BLAS_INT *ldwork
) ;
void SUITESPARSE_LAPACK_SLARFB
(
// input:
const char *side,
const char *trans,
const char *direct,
const char *storev,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const float *V,
const SUITESPARSE_BLAS_INT *ldv,
const float *T,
const SUITESPARSE_BLAS_INT *ldt,
// input/output:
float *C,
// input:
const SUITESPARSE_BLAS_INT *ldc,
// workspace:
float *Work,
// input:
const SUITESPARSE_BLAS_INT *ldwork
) ;
void SUITESPARSE_LAPACK_ZLARFB
(
// input:
const char *side,
const char *trans,
const char *direct,
const char *storev,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const void *V,
const SUITESPARSE_BLAS_INT *ldv,
const void *T,
const SUITESPARSE_BLAS_INT *ldt,
// input/output:
void *C,
// input:
const SUITESPARSE_BLAS_INT *ldc,
// workspace:
void *Work,
// input:
const SUITESPARSE_BLAS_INT *ldwork
) ;
void SUITESPARSE_LAPACK_CLARFB
(
// input:
const char *side,
const char *trans,
const char *direct,
const char *storev,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const SUITESPARSE_BLAS_INT *k,
const void *V,
const SUITESPARSE_BLAS_INT *ldv,
const void *T,
const SUITESPARSE_BLAS_INT *ldt,
// input/output:
void *C,
// input:
const SUITESPARSE_BLAS_INT *ldc,
// workspace:
void *Work,
// input:
const SUITESPARSE_BLAS_INT *ldwork
) ;
//------------------------------------------------------------------------------
// nrm2: vector 2-norm
//------------------------------------------------------------------------------
double SUITESPARSE_BLAS_DNRM2
(
// input:
const SUITESPARSE_BLAS_INT *n,
const double *X,
const SUITESPARSE_BLAS_INT *incx
) ;
float SUITESPARSE_BLAS_SNRM2
(
// input:
const SUITESPARSE_BLAS_INT *n,
const float *X,
const SUITESPARSE_BLAS_INT *incx
) ;
double SUITESPARSE_BLAS_DZNRM2
(
// input:
const SUITESPARSE_BLAS_INT *n,
const void *X,
const SUITESPARSE_BLAS_INT *incx
) ;
float SUITESPARSE_BLAS_SCNRM2
(
// input:
const SUITESPARSE_BLAS_INT *n,
const void *X,
const SUITESPARSE_BLAS_INT *incx
) ;
//------------------------------------------------------------------------------
// larfg: generate Householder reflector
//------------------------------------------------------------------------------
void SUITESPARSE_LAPACK_DLARFG
(
// input:
const SUITESPARSE_BLAS_INT *n,
// input/output:
double *alpha,
double *X,
// input:
const SUITESPARSE_BLAS_INT *incx,
// output:
double *tau
) ;
void SUITESPARSE_LAPACK_SLARFG
(
// input:
const SUITESPARSE_BLAS_INT *n,
// input/output:
float *alpha,
float *X,
// input:
const SUITESPARSE_BLAS_INT *incx,
// output:
float *tau
) ;
void SUITESPARSE_LAPACK_ZLARFG
(
// input:
const SUITESPARSE_BLAS_INT *n,
// input/output:
void *alpha,
void *X,
// input:
const SUITESPARSE_BLAS_INT *incx,
// output:
void *tau
) ;
void SUITESPARSE_LAPACK_CLARFG
(
// input:
const SUITESPARSE_BLAS_INT *n,
// input/output:
void *alpha,
void *X,
// input:
const SUITESPARSE_BLAS_INT *incx,
// output:
void *tau
) ;
//------------------------------------------------------------------------------
// larf: apply Householder reflector
//------------------------------------------------------------------------------
void SUITESPARSE_LAPACK_DLARF
(
// input:
const char *side,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const double *V,
const SUITESPARSE_BLAS_INT *incv,
const double *tau,
// input/output:
double *C,
// input:
const SUITESPARSE_BLAS_INT *ldc,
// workspace:
double *Work
) ;
void SUITESPARSE_LAPACK_SLARF
(
// input:
const char *side,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const float *V,
const SUITESPARSE_BLAS_INT *incv,
const float *tau,
// input/output:
float *C,
// input:
const SUITESPARSE_BLAS_INT *ldc,
// workspace:
float *Work
) ;
void SUITESPARSE_LAPACK_ZLARF
(
// input:
const char *side,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const void *V,
const SUITESPARSE_BLAS_INT *incv,
const void *tau,
// input/output:
void *C,
// input:
const SUITESPARSE_BLAS_INT *ldc,
// workspace:
void *Work
) ;
void SUITESPARSE_LAPACK_CLARF
(
// input:
const char *side,
const SUITESPARSE_BLAS_INT *m,
const SUITESPARSE_BLAS_INT *n,
const void *V,
const SUITESPARSE_BLAS_INT *incv,
const void *tau,
// input/output:
void *C,
// input:
const SUITESPARSE_BLAS_INT *ldc,
// workspace:
void *Work
) ;
#endif
//------------------------------------------------------------------------------
// macros for BLAS and SUITESPARSE_LAPACK functions
//------------------------------------------------------------------------------
#if defined ( SUITESPARSE_BLAS_MACROS )
#define SUITESPARSE_BLAS_dgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_DGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \
&LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_sgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_SGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \
&LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_zgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_ZGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \
&LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_cgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_CGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \
&LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_dtrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_DTRSV (uplo, trans, diag, &N_blas_int, A, \
&LDA_blas_int, X, &INCX_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_strsv(uplo,trans,diag,n,A,lda,X,incx,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_STRSV (uplo, trans, diag, &N_blas_int, A, \
&LDA_blas_int, X, &INCX_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_ztrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_ZTRSV (uplo, trans, diag, &N_blas_int, A, \
&LDA_blas_int, X, &INCX_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_ctrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_CTRSV (uplo, trans, diag, &N_blas_int, A, \
&LDA_blas_int, X, &INCX_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_dtrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_DTRSM (side, uplo, transa, diag, &M_blas_int, \
&N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_strsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_STRSM (side, uplo, transa, diag, &M_blas_int, \
&N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_ztrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_ZTRSM (side, uplo, transa, diag, &M_blas_int, \
&N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_ctrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_CTRSM (side, uplo, transa, diag, &M_blas_int, \
&N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_dgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \
C,ldc,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_DGEMM (transa, transb, &M_blas_int, &N_blas_int, \
&K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \
&LDC_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_sgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \
C,ldc,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_SGEMM (transa, transb, &M_blas_int, &N_blas_int, \
&K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \
&LDC_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_zgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \
C,ldc,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_ZGEMM (transa, transb, &M_blas_int, &N_blas_int, \
&K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \
&LDC_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_cgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \
C,ldc,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_CGEMM (transa, transb, &M_blas_int, &N_blas_int, \
&K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \
&LDC_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_dsyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_DSYRK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \
A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_ssyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_SSYRK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \
A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_zherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_ZHERK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \
A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_cherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_CHERK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \
A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \
} \
}
#define SUITESPARSE_LAPACK_dpotrf(uplo,n,A,lda,info,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
info = 1 ; \
if (ok) \
{ \
SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \
SUITESPARSE_LAPACK_DPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \
&LAPACK_Info) ; \
info = (Int) LAPACK_Info ; \
} \
}
#define SUITESPARSE_LAPACK_spotrf(uplo,n,A,lda,info,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
info = 1 ; \
if (ok) \
{ \
SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \
SUITESPARSE_LAPACK_SPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \
&LAPACK_Info) ; \
info = (Int) LAPACK_Info ; \
} \
}
#define SUITESPARSE_LAPACK_zpotrf(uplo,n,A,lda,info,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
info = 1 ; \
if (ok) \
{ \
SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \
SUITESPARSE_LAPACK_ZPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \
&LAPACK_Info) ; \
info = LAPACK_Info ; \
} \
}
#define SUITESPARSE_LAPACK_cpotrf(uplo,n,A,lda,info,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
info = 1 ; \
if (ok) \
{ \
SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \
SUITESPARSE_LAPACK_CPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \
&LAPACK_Info) ; \
info = LAPACK_Info ; \
} \
}
#define SUITESPARSE_BLAS_dscal(n,alpha,Y,incy,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_DSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_sscal(n,alpha,Y,incy,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_SSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_zscal(n,alpha,Y,incy,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_ZSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_cscal(n,alpha,Y,incy,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_CSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_dger(m,n,alpha,X,incx,Y,incy,A,lda,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_DGER (&M_blas_int, &N_blas_int, alpha, X, \
&INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_sger(m,n,alpha,X,incx,Y,incy,A,lda,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_SGER (&M_blas_int, &N_blas_int, alpha, X, \
&INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_zgeru(m,n,alpha,X,incx,Y,incy,A,lda,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_ZGERU (&M_blas_int, &N_blas_int, alpha, X, \
&INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_cgeru(m,n,alpha,X,incx,Y,incy,A,lda,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \
if (ok) \
{ \
SUITESPARSE_BLAS_CGERU (&M_blas_int, &N_blas_int, alpha, X, \
&INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \
} \
}
#define SUITESPARSE_LAPACK_dlarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_DLARFT (direct, storev, &N_blas_int, &K_blas_int, \
V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \
} \
}
#define SUITESPARSE_LAPACK_slarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_SLARFT (direct, storev, &N_blas_int, &K_blas_int, \
V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \
} \
}
#define SUITESPARSE_LAPACK_zlarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_ZLARFT (direct, storev, &N_blas_int, &K_blas_int, \
V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \
} \
}
#define SUITESPARSE_LAPACK_clarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_CLARFT (direct, storev, &N_blas_int, &K_blas_int, \
V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \
} \
}
#define SUITESPARSE_LAPACK_dlarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \
C,ldc,Work,ldwork,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_DLARFB (side, trans, direct, storev, &M_blas_int, \
&N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \
&LDC_blas_int, Work, &LDWORK_blas_int) ; \
} \
}
#define SUITESPARSE_LAPACK_slarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \
C,ldc,Work,ldwork,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_SLARFB (side, trans, direct, storev, &M_blas_int, \
&N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \
&LDC_blas_int, Work, &LDWORK_blas_int) ; \
} \
}
#define SUITESPARSE_LAPACK_zlarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \
C,ldc,Work,ldwork,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_ZLARFB (side, trans, direct, storev, &M_blas_int, \
&N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \
&LDC_blas_int, Work, &LDWORK_blas_int) ; \
} \
}
#define SUITESPARSE_LAPACK_clarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \
C,ldc,Work,ldwork,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_CLARFB (side, trans, direct, storev, &M_blas_int, \
&N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \
&LDC_blas_int, Work, &LDWORK_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_dnrm2(result,n,X,incx,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
result = 0 ; \
if (ok) \
{ \
result = SUITESPARSE_BLAS_DNRM2 (&N_blas_int, X, &INCX_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_snrm2(result,n,X,incx,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
result = 0 ; \
if (ok) \
{ \
result = SUITESPARSE_BLAS_SNRM2 (&N_blas_int, X, &INCX_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_dznrm2(result,n,X,incx,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
result = 0 ; \
if (ok) \
{ \
result = SUITESPARSE_BLAS_DZNRM2 (&N_blas_int, X, &INCX_blas_int) ; \
} \
}
#define SUITESPARSE_BLAS_scnrm2(result,n,X,incx,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
result = 0 ; \
if (ok) \
{ \
result = SUITESPARSE_BLAS_SCNRM2 (&N_blas_int, X, &INCX_blas_int) ; \
} \
}
#define SUITESPARSE_LAPACK_dlarfg(n,alpha,X,incx,tau,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_DLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \
tau) ; \
} \
}
#define SUITESPARSE_LAPACK_slarfg(n,alpha,X,incx,tau,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_SLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \
tau) ; \
} \
}
#define SUITESPARSE_LAPACK_zlarfg(n,alpha,X,incx,tau,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_ZLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \
tau) ; \
} \
}
#define SUITESPARSE_LAPACK_clarfg(n,alpha,X,incx,tau,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_CLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \
tau) ; \
} \
}
#define SUITESPARSE_LAPACK_dlarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_DLARF (side, &M_blas_int, &N_blas_int, V, \
&INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \
} \
}
#define SUITESPARSE_LAPACK_slarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_SLARF (side, &M_blas_int, &N_blas_int, V, \
&INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \
} \
}
#define SUITESPARSE_LAPACK_zlarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_ZLARF (side, &M_blas_int, &N_blas_int, V, \
&INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \
} \
}
#define SUITESPARSE_LAPACK_clarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \
{ \
SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \
SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \
SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \
SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \
if (ok) \
{ \
SUITESPARSE_LAPACK_CLARF (side, &M_blas_int, &N_blas_int, V, \
&INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \
} \
}
#endif
//------------------------------------------------------------------------------
// SuiteSparse_BLAS_library: return name of BLAS library found
//------------------------------------------------------------------------------
// Returns the name of the BLAS library found by SuiteSparse_config
const char *SuiteSparse_BLAS_library ( void ) ;
//------------------------------------------------------------------------------
// SuiteSparse_BLAS_integer_size: return sizeof (SUITESPARSE_BLAS_INT)
//------------------------------------------------------------------------------
size_t SuiteSparse_BLAS_integer_size ( void ) ;
#ifdef __cplusplus
}
#endif
#endif
|