File: usermanual.rst

package info (click to toggle)
rocsparse 5.3.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,540 kB
  • sloc: cpp: 157,515; f90: 9,304; sh: 1,689; python: 1,596; xml: 206; makefile: 26
file content (3083 lines) | stat: -rw-r--r-- 106,236 bytes parent folder | download
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
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
.. _user_manual:

***********
User Manual
***********

.. toctree::
   :maxdepth: 3
   :caption: Contents:

Introduction
============

rocSPARSE is a library that contains basic linear algebra subroutines for sparse matrices and vectors written in HiP for GPU devices. It is designed to be used from C and C++ code. The functionality of rocSPARSE is organized in the following categories:

* :ref:`rocsparse_auxiliary_functions_` describe available helper functions that are required for subsequent library calls.
* :ref:`rocsparse_level1_functions_` describe operations between a vector in sparse format and a vector in dense format.
* :ref:`rocsparse_level2_functions_` describe operations between a matrix in sparse format and a vector in dense format.
* :ref:`rocsparse_level3_functions_` describe operations between a matrix in sparse format and multiple vectors in dense format.
* :ref:`rocsparse_extra_functions_` describe operations that manipulate sparse matrices.
* :ref:`rocsparse_precond_functions_` describe manipulations on a matrix in sparse format to obtain a preconditioner.
* :ref:`rocsparse_conversion_functions_` describe operations on a matrix in sparse format to obtain a different matrix format.
* :ref:`rocsparse_reordering_functions_` describe operations on a matrix in sparse format to obtain a reordering.

The code is open and hosted here: https://github.com/ROCmSoftwarePlatform/rocSPARSE

.. _rocsparse_building:

Building and Installing
=======================

Prerequisites
-------------
rocSPARSE requires a ROCm enabled platform, more information `here <https://rocm.github.io/>`_.

Installing pre-built packages
-----------------------------
rocSPARSE can be installed from `AMD ROCm repository <https://rocm.github.io/ROCmInstall.html#installing-from-amd-rocm-repositories>`_.
For detailed instructions on how to set up ROCm on different platforms, see the `AMD ROCm Platform Installation Guide for Linux <https://rocm.github.io/ROCmInstall.html>`_.

rocSPARSE can be installed on e.g. Ubuntu using

::

    $ sudo apt-get update
    $ sudo apt-get install rocsparse

Once installed, rocSPARSE can be used just like any other library with a C API.
The header file will need to be included in the user code in order to make calls into rocSPARSE, and the rocSPARSE shared library will become link-time and run-time dependent for the user application.

Building rocSPARSE from source
------------------------------
Building from source is not necessary, as rocSPARSE can be used after installing the pre-built packages as described above.
If desired, the following instructions can be used to build rocSPARSE from source.
Furthermore, the following compile-time dependencies must be met

- `git <https://git-scm.com/>`_
- `CMake <https://cmake.org/>`_ 3.5 or later
- `AMD ROCm <https://github.com/RadeonOpenCompute/ROCm>`_
- `rocPRIM <https://github.com/ROCmSoftwarePlatform/rocPRIM>`_
- `googletest <https://github.com/google/googletest>`_ (optional, for clients)

Download rocSPARSE
``````````````````
The rocSPARSE source code is available at the `rocSPARSE GitHub page <https://github.com/ROCmSoftwarePlatform/rocSPARSE>`_.
Download the master branch using:

::

  $ git clone -b master https://github.com/ROCmSoftwarePlatform/rocSPARSE.git
  $ cd rocSPARSE

Below are steps to build different packages of the library, including dependencies and clients.
It is recommended to install rocSPARSE using the `install.sh` script.

Using `install.sh` to build rocSPARSE with dependencies
```````````````````````````````````````````````````````
The following table lists common uses of `install.sh` to build dependencies + library.

.. tabularcolumns::
      |\X{1}{6}|\X{5}{6}|

================= ====
Command           Description
================= ====
`./install.sh -h` Print help information.
`./install.sh -d` Build dependencies and library in your local directory. The `-d` flag only needs to be used once. For subsequent invocations of `install.sh` it is not necessary to rebuild the dependencies.
`./install.sh`    Build library in your local directory. It is assumed dependencies are available.
`./install.sh -i` Build library, then build and install rocSPARSE package in `/opt/rocm/rocsparse`. You will be prompted for sudo access. This will install for all users.
================= ====

Using `install.sh` to build rocSPARSE with dependencies and clients
```````````````````````````````````````````````````````````````````
The client contains example code, unit tests and benchmarks. Common uses of `install.sh` to build them are listed in the table below.

.. tabularcolumns::
      |\X{1}{6}|\X{5}{6}|

=================== ====
Command             Description
=================== ====
`./install.sh -h`   Print help information.
`./install.sh -dc`  Build dependencies, library and client in your local directory. The `-d` flag only needs to be used once. For subsequent invocations of `install.sh` it is not necessary to rebuild the dependencies.
`./install.sh -c`   Build library and client in your local directory. It is assumed dependencies are available.
`./install.sh -idc` Build library, dependencies and client, then build and install rocSPARSE package in `/opt/rocm/rocsparse`. You will be prompted for sudo access. This will install for all users.
`./install.sh -ic`  Build library and client, then build and install rocSPARSE package in `opt/rocm/rocsparse`. You will be prompted for sudo access. This will install for all users.
=================== ====

Using individual commands to build rocSPARSE
````````````````````````````````````````````
CMake 3.5 or later is required in order to build rocSPARSE.
The rocSPARSE library contains both, host and device code, therefore the HIP compiler must be specified during cmake configuration process.

rocSPARSE can be built using the following commands:

::

  # Create and change to build directory
  $ mkdir -p build/release ; cd build/release

  # Default install path is /opt/rocm, use -DCMAKE_INSTALL_PREFIX=<path> to adjust it
  $ CXX=/opt/rocm/bin/hipcc cmake ../..

  # Compile rocSPARSE library
  $ make -j$(nproc)

  # Install rocSPARSE to /opt/rocm
  $ make install

GoogleTest is required in order to build rocSPARSE clients.

rocSPARSE with dependencies and clients can be built using the following commands:

::

  # Install googletest
  $ mkdir -p build/release/deps ; cd build/release/deps
  $ cmake ../../../deps
  $ make -j$(nproc) install

  # Change to build directory
  $ cd ..

  # Default install path is /opt/rocm, use -DCMAKE_INSTALL_PREFIX=<path> to adjust it
  $ CXX=/opt/rocm/bin/hipcc cmake ../.. -DBUILD_CLIENTS_TESTS=ON \
                                        -DBUILD_CLIENTS_BENCHMARKS=ON \
                                        -DBUILD_CLIENTS_SAMPLES=ON

  # Compile rocSPARSE library
  $ make -j$(nproc)

  # Install rocSPARSE to /opt/rocm
  $ make install

Common build problems
`````````````````````
#. **Issue:** Could not find a package configuration file provided by "ROCM" with any of the following names: ROCMConfig.cmake, rocm-config.cmake

   **Solution:** Install `ROCm cmake modules <https://github.com/RadeonOpenCompute/rocm-cmake>`_

Simple Test
```````````
You can test the installation by running one of the rocSPARSE examples, after successfully compiling the library with clients.

::

   # Navigate to clients binary directory
   $ cd rocSPARSE/build/release/clients/staging

   # Execute rocSPARSE example
   $ ./example_csrmv 1000

Supported Targets
-----------------
Currently, rocSPARSE is supported under the following operating systems

- `Ubuntu 16.04 <https://ubuntu.com/>`_
- `Ubuntu 18.04 <https://ubuntu.com/>`_
- `CentOS 7 <https://www.centos.org/>`_
- `SLES 15 <https://www.suse.com/solutions/enterprise-linux/>`_

To compile and run rocSPARSE, `AMD ROCm Platform <https://github.com/RadeonOpenCompute/ROCm>`_ is required.

The following HIP capable devices are currently supported

- gfx803 (e.g. Fiji)
- gfx900 (e.g. Vega10, MI25)
- gfx906 (e.g. Vega20, MI50, MI60)
- gfx908

Device and Stream Management
============================
:cpp:func:`hipSetDevice` and :cpp:func:`hipGetDevice` are HIP device management APIs.
They are NOT part of the rocSPARSE API.

Asynchronous Execution
----------------------
All rocSPARSE library functions, unless otherwise stated, are non blocking and executed asynchronously with respect to the host. They may return before the actual computation has finished. To force synchronization, :cpp:func:`hipDeviceSynchronize` or :cpp:func:`hipStreamSynchronize` can be used. This will ensure that all previously executed rocSPARSE functions on the device / this particular stream have completed.

HIP Device Management
---------------------
Before a HIP kernel invocation, users need to call :cpp:func:`hipSetDevice` to set a device, e.g. device 1. If users do not explicitly call it, the system by default sets it as device 0. Unless users explicitly call :cpp:func:`hipSetDevice` to set to another device, their HIP kernels are always launched on device 0.

The above is a HIP (and CUDA) device management approach and has nothing to do with rocSPARSE. rocSPARSE honors the approach above and assumes users have already set the device before a rocSPARSE routine call.

Once users set the device, they create a handle with :ref:`rocsparse_create_handle_`.

Subsequent rocSPARSE routines take this handle as an input parameter. rocSPARSE ONLY queries (by :cpp:func:`hipGetDevice`) the user's device; rocSPARSE does NOT set the device for users. If rocSPARSE does not see a valid device, it returns an error message. It is the users' responsibility to provide a valid device to rocSPARSE and ensure the device safety.

Users CANNOT switch devices between :ref:`rocsparse_create_handle_` and :ref:`rocsparse_destroy_handle_`. If users want to change device, they must destroy the current handle and create another rocSPARSE handle.

HIP Stream Management
---------------------
HIP kernels are always launched in a queue (also known as stream).

If users do not explicitly specify a stream, the system provides a default stream, maintained by the system. Users cannot create or destroy the default stream. However, users can freely create new streams (with :cpp:func:`hipStreamCreate`) and bind it to the rocSPARSE handle using :ref:`rocsparse_set_stream_`. HIP kernels are invoked in rocSPARSE routines. The rocSPARSE handle is always associated with a stream, and rocSPARSE passes its stream to the kernels inside the routine. One rocSPARSE routine only takes one stream in a single invocation. If users create a stream, they are responsible for destroying it.

Multiple Streams and Multiple Devices
-------------------------------------
If the system under test has multiple HIP devices, users can run multiple rocSPARSE handles concurrently, but can NOT run a single rocSPARSE handle on different discrete devices. Each handle is associated with a particular singular device, and a new handle should be created for each additional device.

Storage Formats
===============

COO storage format
------------------
The Coordinate (COO) storage format represents a :math:`m \times n` matrix by

=========== ==================================================================
m           number of rows (integer).
n           number of columns (integer).
nnz         number of non-zero elements (integer).
coo_val     array of ``nnz`` elements containing the data (floating point).
coo_row_ind array of ``nnz`` elements containing the row indices (integer).
coo_col_ind array of ``nnz`` elements containing the column indices (integer).
=========== ==================================================================

The COO matrix is expected to be sorted by row indices and column indices per row. Furthermore, each pair of indices should appear only once.
Consider the following :math:`3 \times 5` matrix and the corresponding COO structures, with :math:`m = 3, n = 5` and :math:`\text{nnz} = 8` using zero based indexing:

.. math::

  A = \begin{pmatrix}
        1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\
        0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\
        6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\
      \end{pmatrix}

where

.. math::

  \begin{array}{ll}
    \text{coo_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\
    \text{coo_row_ind}[8] & = \{0, 0, 0, 1, 1, 2, 2, 2\} \\
    \text{coo_col_ind}[8] & = \{0, 1, 3, 1, 2, 0, 3, 4\}
  \end{array}

COO (AoS) storage format
------------------------
The Coordinate (COO) Array of Structure (AoS) storage format represents a :math:`m \times n` matrix by

======= ==========================================================================================
m           number of rows (integer).
n           number of columns (integer).
nnz         number of non-zero elements (integer).
coo_val     array of ``nnz`` elements containing the data (floating point).
coo_ind     array of ``2 * nnz`` elements containing alternating row and column indices (integer).
======= ==========================================================================================

The COO (AoS) matrix is expected to be sorted by row indices and column indices per row. Furthermore, each pair of indices should appear only once.
Consider the following :math:`3 \times 5` matrix and the corresponding COO (AoS) structures, with :math:`m = 3, n = 5` and :math:`\text{nnz} = 8` using zero based indexing:

.. math::

  A = \begin{pmatrix}
        1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\
        0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\
        6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\
      \end{pmatrix}

where

.. math::

  \begin{array}{ll}
    \text{coo_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\
    \text{coo_ind}[16] & = \{0, 0, 0, 1, 0, 3, 1, 1, 1, 2, 2, 0, 2, 3, 2, 4\} \\
  \end{array}

CSR storage format
------------------
The Compressed Sparse Row (CSR) storage format represents a :math:`m \times n` matrix by

=========== =========================================================================
m           number of rows (integer).
n           number of columns (integer).
nnz         number of non-zero elements (integer).
csr_val     array of ``nnz`` elements containing the data (floating point).
csr_row_ptr array of ``m+1`` elements that point to the start of every row (integer).
csr_col_ind array of ``nnz`` elements containing the column indices (integer).
=========== =========================================================================

The CSR matrix is expected to be sorted by column indices within each row. Furthermore, each pair of indices should appear only once.
Consider the following :math:`3 \times 5` matrix and the corresponding CSR structures, with :math:`m = 3, n = 5` and :math:`\text{nnz} = 8` using one based indexing:

.. math::

  A = \begin{pmatrix}
        1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\
        0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\
        6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\
      \end{pmatrix}

where

.. math::

  \begin{array}{ll}
    \text{csr_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\
    \text{csr_row_ptr}[4] & = \{1, 4, 6, 9\} \\
    \text{csr_col_ind}[8] & = \{1, 2, 4, 2, 3, 1, 4, 5\}
  \end{array}

BSR storage format
------------------
The Block Compressed Sparse Row (BSR) storage format represents a :math:`(mb \cdot \text{bsr_dim}) \times (nb \cdot \text{bsr_dim})` matrix by

=========== ====================================================================================================================================
mb          number of block rows (integer)
nb          number of block columns (integer)
nnzb        number of non-zero blocks (integer)
bsr_val     array of ``nnzb * bsr_dim * bsr_dim`` elements containing the data (floating point). Blocks can be stored column-major or row-major.
bsr_row_ptr array of ``mb+1`` elements that point to the start of every block row (integer).
bsr_col_ind array of ``nnzb`` elements containing the block column indices (integer).
bsr_dim     dimension of each block (integer).
=========== ====================================================================================================================================

The BSR matrix is expected to be sorted by column indices within each row. If :math:`m` or :math:`n` are not evenly divisible by the block dimension, then zeros are padded to the matrix, such that :math:`mb = (m + \text{bsr_dim} - 1) / \text{bsr_dim}` and :math:`nb = (n + \text{bsr_dim} - 1) / \text{bsr_dim}`.
Consider the following :math:`4 \times 3` matrix and the corresponding BSR structures, with :math:`\text{bsr_dim} = 2, mb = 2, nb = 2` and :math:`\text{nnzb} = 4` using zero based indexing and column-major storage:

.. math::

  A = \begin{pmatrix}
        1.0 & 0.0 & 2.0 \\
        3.0 & 0.0 & 4.0 \\
        5.0 & 6.0 & 0.0 \\
        7.0 & 0.0 & 8.0 \\
      \end{pmatrix}

with the blocks :math:`A_{ij}`

.. math::

  A_{00} = \begin{pmatrix}
             1.0 & 0.0 \\
             3.0 & 0.0 \\
           \end{pmatrix},
  A_{01} = \begin{pmatrix}
             2.0 & 0.0 \\
             4.0 & 0.0 \\
           \end{pmatrix},
  A_{10} = \begin{pmatrix}
             5.0 & 6.0 \\
             7.0 & 0.0 \\
           \end{pmatrix},
  A_{11} = \begin{pmatrix}
             0.0 & 0.0 \\
             8.0 & 0.0 \\
           \end{pmatrix}

such that

.. math::

  A = \begin{pmatrix}
        A_{00} & A_{01} \\
        A_{10} & A_{11} \\
      \end{pmatrix}

with arrays representation

.. math::

  \begin{array}{ll}
    \text{bsr_val}[16] & = \{1.0, 3.0, 0.0, 0.0, 2.0, 4.0, 0.0, 0.0, 5.0, 7.0, 6.0, 0.0, 0.0, 8.0, 0.0, 0.0\} \\
    \text{bsr_row_ptr}[3] & = \{0, 2, 4\} \\
    \text{bsr_col_ind}[4] & = \{0, 1, 0, 1\}
  \end{array}

GEBSR storage format
--------------------
The General Block Compressed Sparse Row (GEBSR) storage format represents a :math:`(mb \cdot \text{bsr_row_dim}) \times (nb \cdot \text{bsr_col_dim})` matrix by

=========== ====================================================================================================================================
mb          number of block rows (integer)
nb          number of block columns (integer)
nnzb        number of non-zero blocks (integer)
bsr_val     array of ``nnzb * bsr_row_dim * bsr_col_dim`` elements containing the data (floating point). Blocks can be stored column-major or row-major.
bsr_row_ptr array of ``mb+1`` elements that point to the start of every block row (integer).
bsr_col_ind array of ``nnzb`` elements containing the block column indices (integer).
bsr_row_dim row dimension of each block (integer).
bsr_col_dim column dimension of each block (integer).
=========== ====================================================================================================================================

The GEBSR matrix is expected to be sorted by column indices within each row. If :math:`m` is not evenly divisible by the row block dimension or :math:`n` is not evenly
divisible by the column block dimension, then zeros are padded to the matrix, such that :math:`mb = (m + \text{bsr_row_dim} - 1) / \text{bsr_row_dim}` and
:math:`nb = (n + \text{bsr_col_dim} - 1) / \text{bsr_col_dim}`. Consider the following :math:`4 \times 5` matrix and the corresponding GEBSR structures,
with :math:`\text{bsr_row_dim} = 2`, :math:`\text{bsr_col_dim} = 3`, mb = 2, nb = 2` and :math:`\text{nnzb} = 4` using zero based indexing and column-major storage:

.. math::

  A = \begin{pmatrix}
        1.0 & 0.0 & 0.0 & 2.0 & 0.0 \\
        3.0 & 0.0 & 4.0 & 0.0 & 0.0 \\
        5.0 & 6.0 & 0.0 & 7.0 & 0.0 \\
        0.0 & 0.0 & 8.0 & 0.0 & 9.0 \\
      \end{pmatrix}

with the blocks :math:`A_{ij}`

.. math::

  A_{00} = \begin{pmatrix}
             1.0 & 0.0 & 0.0 \\
             3.0 & 0.0 & 4.0 \\
           \end{pmatrix},
  A_{01} = \begin{pmatrix}
             2.0 & 0.0 & 0.0 \\
             0.0 & 0.0 & 0.0 \\
           \end{pmatrix},
  A_{10} = \begin{pmatrix}
             5.0 & 6.0 & 0.0 \\
             0.0 & 0.0 & 8.0 \\
           \end{pmatrix},
  A_{11} = \begin{pmatrix}
             7.0 & 0.0 & 0.0 \\
             0.0 & 9.0 & 0.0 \\
           \end{pmatrix}

such that

.. math::

  A = \begin{pmatrix}
        A_{00} & A_{01} \\
        A_{10} & A_{11} \\
      \end{pmatrix}

with arrays representation

.. math::

  \begin{array}{ll}
    \text{bsr_val}[24] & = \{1.0, 3.0, 0.0, 0.0, 0.0, 4.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 6.0, 0.0, 0.0, 8.0, 7.0, 0.0, 0.0, 9.0, 0.0, 0.0\} \\
    \text{bsr_row_ptr}[3] & = \{0, 2, 4\} \\
    \text{bsr_col_ind}[4] & = \{0, 1, 0, 1\}
  \end{array}

ELL storage format
------------------
The Ellpack-Itpack (ELL) storage format represents a :math:`m \times n` matrix by

=========== ================================================================================
m           number of rows (integer).
n           number of columns (integer).
ell_width   maximum number of non-zero elements per row (integer)
ell_val     array of ``m times ell_width`` elements containing the data (floating point).
ell_col_ind array of ``m times ell_width`` elements containing the column indices (integer).
=========== ================================================================================

The ELL matrix is assumed to be stored in column-major format. Rows with less than ``ell_width`` non-zero elements are padded with zeros (``ell_val``) and :math:`-1` (``ell_col_ind``).
Consider the following :math:`3 \times 5` matrix and the corresponding ELL structures, with :math:`m = 3, n = 5` and :math:`\text{ell_width} = 3` using zero based indexing:

.. math::

  A = \begin{pmatrix}
        1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\
        0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\
        6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\
      \end{pmatrix}

where

.. math::

  \begin{array}{ll}
    \text{ell_val}[9] & = \{1.0, 4.0, 6.0, 2.0, 5.0, 7.0, 3.0, 0.0, 8.0\} \\
    \text{ell_col_ind}[9] & = \{0, 1, 0, 1, 2, 3, 3, -1, 4\}
  \end{array}

.. _HYB storage format:

HYB storage format
------------------
The Hybrid (HYB) storage format represents a :math:`m \times n` matrix by

=========== =========================================================================================
m           number of rows (integer).
n           number of columns (integer).
nnz         number of non-zero elements of the COO part (integer)
ell_width   maximum number of non-zero elements per row of the ELL part (integer)
ell_val     array of ``m times ell_width`` elements containing the ELL part data (floating point).
ell_col_ind array of ``m times ell_width`` elements containing the ELL part column indices (integer).
coo_val     array of ``nnz`` elements containing the COO part data (floating point).
coo_row_ind array of ``nnz`` elements containing the COO part row indices (integer).
coo_col_ind array of ``nnz`` elements containing the COO part column indices (integer).
=========== =========================================================================================

The HYB format is a combination of the ELL and COO sparse matrix formats. Typically, the regular part of the matrix is stored in ELL storage format, and the irregular part of the matrix is stored in COO storage format. Three different partitioning schemes can be applied when converting a CSR matrix to a matrix in HYB storage format. For further details on the partitioning schemes, see :ref:`rocsparse_hyb_partition_`.

Types
=====

rocsparse_handle
----------------

.. doxygentypedef:: rocsparse_handle

rocsparse_mat_descr
-------------------

.. doxygentypedef:: rocsparse_mat_descr


.. _rocsparse_mat_info_:

rocsparse_mat_info
------------------

.. doxygentypedef:: rocsparse_mat_info

rocsparse_hyb_mat
-----------------

.. doxygentypedef:: rocsparse_hyb_mat

For more details on the HYB format, see :ref:`HYB storage format`.

.. _rocsparse_action_:

rocsparse_action
----------------

.. doxygenenum:: rocsparse_action

.. _rocsparse_direction_:

rocsparse_direction
-------------------

.. doxygenenum:: rocsparse_direction

.. _rocsparse_hyb_partition_:

rocsparse_hyb_partition
-----------------------

.. doxygenenum:: rocsparse_hyb_partition

.. _rocsparse_index_base_:

rocsparse_index_base
--------------------

.. doxygenenum:: rocsparse_index_base

.. _rocsparse_matrix_type_:

rocsparse_matrix_type
---------------------

.. doxygenenum:: rocsparse_matrix_type

.. _rocsparse_fill_mode_:

rocsparse_fill_mode
-------------------

.. doxygenenum:: rocsparse_fill_mode

.. _rocsparse_storage_mode_:

rocsparse_storage_mode
----------------------

.. doxygenenum:: rocsparse_storage_mode

.. _rocsparse_diag_type_:

rocsparse_diag_type
-------------------

.. doxygenenum:: rocsparse_diag_type

.. _rocsparse_operation_:

rocsparse_operation
-------------------

.. doxygenenum:: rocsparse_operation

.. _rocsparse_pointer_mode_:

rocsparse_pointer_mode
----------------------

.. doxygenenum:: rocsparse_pointer_mode

.. _rocsparse_analysis_policy_:

rocsparse_analysis_policy
-------------------------

.. doxygenenum:: rocsparse_analysis_policy

.. _rocsparse_solve_policy_:

rocsparse_solve_policy
----------------------

.. doxygenenum:: rocsparse_solve_policy

.. _rocsparse_layer_mode_:

rocsparse_layer_mode
--------------------

.. doxygenenum:: rocsparse_layer_mode

For more details on logging, see :ref:`rocsparse_logging`.

rocsparse_status
----------------

.. doxygenenum:: rocsparse_status

rocsparse_indextype
-------------------

.. doxygenenum:: rocsparse_indextype

rocsparse_datatype
------------------

.. doxygenenum:: rocsparse_datatype

rocsparse_format
----------------

.. doxygenenum:: rocsparse_format

rocsparse_order
---------------

.. doxygenenum:: rocsparse_order

rocsparse_spmv_alg
------------------

.. doxygenenum:: rocsparse_spmv_alg

rocsparse_spsv_alg
------------------

.. doxygenenum:: rocsparse_spsv_alg

rocsparse_spsv_stage
--------------------

.. doxygenenum:: rocsparse_spsv_stage

rocsparse_spsm_alg
------------------

.. doxygenenum:: rocsparse_spsm_alg

rocsparse_spsm_stage
--------------------

.. doxygenenum:: rocsparse_spsm_stage

rocsparse_spmm_alg
------------------

.. doxygenenum:: rocsparse_spmm_alg


rocsparse_spmm_stage
--------------------

.. doxygenenum:: rocsparse_spmm_stage


rocsparse_sddmm_alg
-------------------

.. doxygenenum:: rocsparse_sddmm_alg

rocsparse_spgemm_stage
----------------------

.. doxygenenum:: rocsparse_spgemm_stage

rocsparse_spgemm_alg
--------------------

.. doxygenenum:: rocsparse_spgemm_alg


rocsparse_sparse_to_dense_alg
-----------------------------

.. doxygenenum:: rocsparse_sparse_to_dense_alg

rocsparse_dense_to_sparse_alg
-----------------------------

.. doxygenenum:: rocsparse_dense_to_sparse_alg

rocsparse_gtsv_interleaved_alg
------------------------------

.. doxygenenum:: rocsparse_gtsv_interleaved_alg

.. _rocsparse_logging:

Logging
=======
Three different environment variables can be set to enable logging in rocSPARSE: ``ROCSPARSE_LAYER``, ``ROCSPARSE_LOG_TRACE_PATH``, ``ROCSPARSE_LOG_BENCH_PATH`` and ``ROCSPARSE_LOG_DEBUG_PATH``.

``ROCSPARSE_LAYER`` is a bit mask, where several logging modes (:ref:`rocsparse_layer_mode_`) can be combined as follows:

================================  =============================================================
``ROCSPARSE_LAYER`` unset         logging is disabled.
``ROCSPARSE_LAYER`` set to ``1``  trace logging is enabled.
``ROCSPARSE_LAYER`` set to ``2``  bench logging is enabled.
``ROCSPARSE_LAYER`` set to ``3``  trace logging and bench logging is enabled.
``ROCSPARSE_LAYER`` set to ``4``  debug logging is enabled.
``ROCSPARSE_LAYER`` set to ``5``  trace logging and debug logging is enabled.
``ROCSPARSE_LAYER`` set to ``6``  bench logging and debug logging is enabled.
``ROCSPARSE_LAYER`` set to ``7``  trace logging and bench logging and debug logging is enabled.
================================  =============================================================

When logging is enabled, each rocSPARSE function call will write the function name as well as function arguments to the logging stream. The default logging stream is ``stderr``.

If the user sets the environment variable ``ROCSPARSE_LOG_TRACE_PATH`` to the full path name for a file, the file is opened and trace logging is streamed to that file. If the user sets the environment variable ``ROCSPARSE_LOG_BENCH_PATH`` to the full path name for a file, the file is opened and bench logging is streamed to that file. If the file cannot be opened, logging output is stream to ``stderr``.

Note that performance will degrade when logging is enabled. By default, the environment variable ``ROCSPARSE_LAYER`` is unset and logging is disabled.

.. _api:

Exported Sparse Functions
=========================

Auxiliary Functions
-------------------

+---------------------------------------------+
|Function name                                |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_handle`          |
+---------------------------------------------+
|:cpp:func:`rocsparse_destroy_handle`         |
+---------------------------------------------+
|:cpp:func:`rocsparse_set_stream`             |
+---------------------------------------------+
|:cpp:func:`rocsparse_get_stream`             |
+---------------------------------------------+
|:cpp:func:`rocsparse_set_pointer_mode`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_get_pointer_mode`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_get_version`            |
+---------------------------------------------+
|:cpp:func:`rocsparse_get_git_rev`            |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_mat_descr`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_destroy_mat_descr`      |
+---------------------------------------------+
|:cpp:func:`rocsparse_copy_mat_descr`         |
+---------------------------------------------+
|:cpp:func:`rocsparse_set_mat_index_base`     |
+---------------------------------------------+
|:cpp:func:`rocsparse_get_mat_index_base`     |
+---------------------------------------------+
|:cpp:func:`rocsparse_set_mat_type`           |
+---------------------------------------------+
|:cpp:func:`rocsparse_get_mat_type`           |
+---------------------------------------------+
|:cpp:func:`rocsparse_set_mat_fill_mode`      |
+---------------------------------------------+
|:cpp:func:`rocsparse_get_mat_fill_mode`      |
+---------------------------------------------+
|:cpp:func:`rocsparse_set_mat_diag_type`      |
+---------------------------------------------+
|:cpp:func:`rocsparse_get_mat_diag_type`      |
+---------------------------------------------+
|:cpp:func:`rocsparse_set_mat_storage_mode`   |
+---------------------------------------------+
|:cpp:func:`rocsparse_get_mat_storage_mode`   |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_hyb_mat`         |
+---------------------------------------------+
|:cpp:func:`rocsparse_destroy_hyb_mat`        |
+---------------------------------------------+
|:cpp:func:`rocsparse_copy_hyb_mat`           |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_mat_info`        |
+---------------------------------------------+
|:cpp:func:`rocsparse_copy_mat_info`          |
+---------------------------------------------+
|:cpp:func:`rocsparse_destroy_mat_info`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_color_info`      |
+---------------------------------------------+
|:cpp:func:`rocsparse_destroy_color_info`     |
+---------------------------------------------+
|:cpp:func:`rocsparse_copy_color_info`        |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_spvec_descr`     |
+---------------------------------------------+
|:cpp:func:`rocsparse_destroy_spvec_descr`    |
+---------------------------------------------+
|:cpp:func:`rocsparse_spvec_get`              |
+---------------------------------------------+
|:cpp:func:`rocsparse_spvec_get_index_base`   |
+---------------------------------------------+
|:cpp:func:`rocsparse_spvec_get_values`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_spvec_set_values`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_coo_descr`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_coo_aos_descr`   |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_csr_descr`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_csc_descr`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_ell_descr`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_bell_descr`      |
+---------------------------------------------+
|:cpp:func:`rocsparse_destroy_spmat_descr`    |
+---------------------------------------------+
|:cpp:func:`rocsparse_coo_get`                |
+---------------------------------------------+
|:cpp:func:`rocsparse_coo_aos_get`            |
+---------------------------------------------+
|:cpp:func:`rocsparse_csr_get`                |
+---------------------------------------------+
|:cpp:func:`rocsparse_ell_get`                |
+---------------------------------------------+
|:cpp:func:`rocsparse_bell_get`               |
+---------------------------------------------+
|:cpp:func:`rocsparse_coo_set_pointers`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_coo_aos_set_pointers`   |
+---------------------------------------------+
|:cpp:func:`rocsparse_csr_set_pointers`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_csc_set_pointers`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_ell_set_pointers`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_spmat_get_size`         |
+---------------------------------------------+
|:cpp:func:`rocsparse_spmat_get_format`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_spmat_get_index_base`   |
+---------------------------------------------+
|:cpp:func:`rocsparse_spmat_get_values`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_spmat_set_values`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_spmat_get_strided_batch`|
+---------------------------------------------+
|:cpp:func:`rocsparse_spmat_set_strided_batch`|
+---------------------------------------------+
|:cpp:func:`rocsparse_coo_set_strided_batch`  |
+---------------------------------------------+
|:cpp:func:`rocsparse_csr_set_strided_batch`  |
+---------------------------------------------+
|:cpp:func:`rocsparse_csc_set_strided_batch`  |
+---------------------------------------------+
|:cpp:func:`rocsparse_spmat_get_attribute`    |
+---------------------------------------------+
|:cpp:func:`rocsparse_spmat_set_attribute`    |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_dnvec_descr`     |
+---------------------------------------------+
|:cpp:func:`rocsparse_destroy_dnvec_descr`    |
+---------------------------------------------+
|:cpp:func:`rocsparse_dnvec_get`              |
+---------------------------------------------+
|:cpp:func:`rocsparse_dnvec_get_values`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_dnvec_set_values`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_create_dnmat_descr`     |
+---------------------------------------------+
|:cpp:func:`rocsparse_destroy_dnmat_descr`    |
+---------------------------------------------+
|:cpp:func:`rocsparse_dnmat_get`              |
+---------------------------------------------+
|:cpp:func:`rocsparse_dnmat_get_values`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_dnmat_set_values`       |
+---------------------------------------------+
|:cpp:func:`rocsparse_dnmat_get_strided_batch`|
+---------------------------------------------+
|:cpp:func:`rocsparse_dnmat_set_strided_batch`|
+---------------------------------------------+

Sparse Level 1 Functions
------------------------

================================================= ====== ====== ============== ==============
Function name                                     single double single complex double complex
================================================= ====== ====== ============== ==============
:cpp:func:`rocsparse_Xaxpyi() <rocsparse_saxpyi>` x      x      x              x
:cpp:func:`rocsparse_Xdoti() <rocsparse_sdoti>`   x      x      x              x
:cpp:func:`rocsparse_Xdotci() <rocsparse_cdotci>`               x              x
:cpp:func:`rocsparse_Xgthr() <rocsparse_sgthr>`   x      x      x              x
:cpp:func:`rocsparse_Xgthrz() <rocsparse_sgthrz>` x      x      x              x
:cpp:func:`rocsparse_Xroti() <rocsparse_sroti>`   x      x
:cpp:func:`rocsparse_Xsctr() <rocsparse_ssctr>`   x      x      x              x
================================================= ====== ====== ============== ==============

Sparse Level 2 Functions
------------------------

========================================================================= ====== ====== ============== ==============
Function name                                                             single double single complex double complex
========================================================================= ====== ====== ============== ==============
:cpp:func:`rocsparse_Xbsrmv() <rocsparse_sbsrmv>`                         x      x      x              x
:cpp:func:`rocsparse_Xbsrxmv() <rocsparse_sbsrxmv>`                       x      x      x              x
:cpp:func:`rocsparse_Xbsrsv_buffer_size() <rocsparse_sbsrsv_buffer_size>` x      x      x              x
:cpp:func:`rocsparse_Xbsrsv_analysis() <rocsparse_sbsrsv_analysis>`       x      x      x              x
:cpp:func:`rocsparse_bsrsv_zero_pivot`
:cpp:func:`rocsparse_bsrsv_clear`
:cpp:func:`rocsparse_Xbsrsv_solve() <rocsparse_sbsrsv_solve>`             x      x      x              x
:cpp:func:`rocsparse_Xcoomv() <rocsparse_scoomv>`                         x      x      x              x
:cpp:func:`rocsparse_Xcsrmv_analysis() <rocsparse_scsrmv_analysis>`       x      x      x              x
:cpp:func:`rocsparse_csrmv_clear`
:cpp:func:`rocsparse_Xcsrmv() <rocsparse_scsrmv>`                         x      x      x              x
:cpp:func:`rocsparse_Xcsrsv_buffer_size() <rocsparse_scsrsv_buffer_size>` x      x      x              x
:cpp:func:`rocsparse_Xcsrsv_analysis() <rocsparse_scsrsv_analysis>`       x      x      x              x
:cpp:func:`rocsparse_csrsv_zero_pivot`
:cpp:func:`rocsparse_csrsv_clear`
:cpp:func:`rocsparse_Xcsrsv_solve() <rocsparse_scsrsv_solve>`             x      x      x              x
:cpp:func:`rocsparse_Xellmv() <rocsparse_sellmv>`                         x      x      x              x
:cpp:func:`rocsparse_Xhybmv() <rocsparse_shybmv>`                         x      x      x              x
:cpp:func:`rocsparse_Xgebsrmv() <rocsparse_sgebsrmv>`                     x      x      x              x
:cpp:func:`rocsparse_Xgemvi_buffer_size() <rocsparse_sgemvi_buffer_size>` x      x      x              x
:cpp:func:`rocsparse_Xgemvi() <rocsparse_sgemvi>`                         x      x      x              x
========================================================================= ====== ====== ============== ==============

Sparse Level 3 Functions
------------------------

========================================================================= ====== ====== ============== ==============
Function name                                                             single double single complex double complex
========================================================================= ====== ====== ============== ==============
:cpp:func:`rocsparse_Xbsrmm() <rocsparse_sbsrmm>`                         x      x      x              x
:cpp:func:`rocsparse_Xgebsrmm() <rocsparse_sgebsrmm>`                     x      x      x              x
:cpp:func:`rocsparse_Xcsrmm() <rocsparse_scsrmm>`                         x      x      x              x
:cpp:func:`rocsparse_Xcsrsm_buffer_size() <rocsparse_scsrsm_buffer_size>` x      x      x              x
:cpp:func:`rocsparse_Xcsrsm_analysis() <rocsparse_scsrsm_analysis>`       x      x      x              x
:cpp:func:`rocsparse_csrsm_zero_pivot`
:cpp:func:`rocsparse_csrsm_clear`
:cpp:func:`rocsparse_Xcsrsm_solve() <rocsparse_scsrsm_solve>`             x      x      x              x
:cpp:func:`rocsparse_Xbsrsm_buffer_size() <rocsparse_sbsrsm_buffer_size>` x      x      x              x
:cpp:func:`rocsparse_Xbsrsm_analysis() <rocsparse_sbsrsm_analysis>`       x      x      x              x
:cpp:func:`rocsparse_bsrsm_zero_pivot`
:cpp:func:`rocsparse_bsrsm_clear`
:cpp:func:`rocsparse_Xbsrsm_solve() <rocsparse_sbsrsm_solve>`             x      x      x              x
:cpp:func:`rocsparse_Xgemmi() <rocsparse_sgemmi>`                         x      x      x              x
========================================================================= ====== ====== ============== ==============

Sparse Extra Functions
----------------------

============================================================================= ====== ====== ============== ==============
Function name                                                                 single double single complex double complex
============================================================================= ====== ====== ============== ==============
:cpp:func:`rocsparse_csrgeam_nnz`
:cpp:func:`rocsparse_Xcsrgeam() <rocsparse_scsrgeam>`                         x      x      x              x
:cpp:func:`rocsparse_Xcsrgemm_buffer_size() <rocsparse_scsrgemm_buffer_size>` x      x      x              x
:cpp:func:`rocsparse_csrgemm_nnz`
:cpp:func:`rocsparse_csrgemm_symbolic`
:cpp:func:`rocsparse_Xcsrgemm() <rocsparse_scsrgemm>`                         x      x      x              x
:cpp:func:`rocsparse_Xcsrgemm_numeric() <rocsparse_scsrgemm_numeric>`         x      x      x              x
============================================================================= ====== ====== ============== ==============

Preconditioner Functions
------------------------

===================================================================================================================== ====== ====== ============== ==============
Function name                                                                                                         single double single complex double complex
===================================================================================================================== ====== ====== ============== ==============
:cpp:func:`rocsparse_Xbsric0_buffer_size() <rocsparse_sbsric0_buffer_size>`                                           x      x      x              x
:cpp:func:`rocsparse_Xbsric0_analysis() <rocsparse_sbsric0_analysis>`                                                 x      x      x              x
:cpp:func:`rocsparse_bsric0_zero_pivot`
:cpp:func:`rocsparse_bsric0_clear`
:cpp:func:`rocsparse_Xbsric0() <rocsparse_sbsric0>`                                                                   x      x      x              x
:cpp:func:`rocsparse_Xbsrilu0_buffer_size() <rocsparse_sbsrilu0_buffer_size>`                                         x      x      x              x
:cpp:func:`rocsparse_Xbsrilu0_analysis() <rocsparse_sbsrilu0_analysis>`                                               x      x      x              x
:cpp:func:`rocsparse_bsrilu0_zero_pivot`
:cpp:func:`rocsparse_Xbsrilu0_numeric_boost() <rocsparse_sbsrilu0_numeric_boost>`                                     x      x      x              x
:cpp:func:`rocsparse_bsrilu0_clear`
:cpp:func:`rocsparse_Xbsrilu0() <rocsparse_sbsrilu0>`                                                                 x      x      x              x
:cpp:func:`rocsparse_Xcsric0_buffer_size() <rocsparse_scsric0_buffer_size>`                                           x      x      x              x
:cpp:func:`rocsparse_Xcsric0_analysis() <rocsparse_scsric0_analysis>`                                                 x      x      x              x
:cpp:func:`rocsparse_csric0_zero_pivot`
:cpp:func:`rocsparse_csric0_clear`
:cpp:func:`rocsparse_Xcsric0() <rocsparse_scsric0>`                                                                   x      x      x              x
:cpp:func:`rocsparse_Xcsrilu0_buffer_size() <rocsparse_scsrilu0_buffer_size>`                                         x      x      x              x
:cpp:func:`rocsparse_Xcsrilu0_numeric_boost() <rocsparse_scsrilu0_numeric_boost>`                                     x      x      x              x
:cpp:func:`rocsparse_Xcsrilu0_analysis() <rocsparse_scsrilu0_analysis>`                                               x      x      x              x
:cpp:func:`rocsparse_csrilu0_zero_pivot`
:cpp:func:`rocsparse_csrilu0_clear`
:cpp:func:`rocsparse_Xcsrilu0() <rocsparse_scsrilu0>`                                                                 x      x      x              x
:cpp:func:`rocsparse_Xgtsv_buffer_size() <rocsparse_sgtsv_buffer_size>`                                               x      x      x              x
:cpp:func:`rocsparse_Xgtsv() <rocsparse_sgtsv>`                                                                       x      x      x              x
:cpp:func:`rocsparse_Xgtsv_no_pivot_buffer_size() <rocsparse_sgtsv_no_pivot_buffer_size>`                             x      x      x              x
:cpp:func:`rocsparse_Xgtsv_no_pivot() <rocsparse_sgtsv_no_pivot>`                                                     x      x      x              x
:cpp:func:`rocsparse_Xgtsv_no_pivot_strided_batch_buffer_size() <rocsparse_sgtsv_no_pivot_strided_batch_buffer_size>` x      x      x              x
:cpp:func:`rocsparse_Xgtsv_no_pivot_strided_batch() <rocsparse_sgtsv_no_pivot_strided_batch>`                         x      x      x              x
:cpp:func:`rocsparse_Xgtsv_interleaved_batch_buffer_size() <rocsparse_sgtsv_interleaved_batch_buffer_size>`           x      x      x              x
:cpp:func:`rocsparse_Xgtsv_interleaved_batch() <rocsparse_sgtsv_interleaved_batch>`                                   x      x      x              x
:cpp:func:`rocsparse_Xgpsv_interleaved_batch_buffer_size() <rocsparse_sgpsv_interleaved_batch_buffer_size>`           x      x      x              x
:cpp:func:`rocsparse_Xgpsv_interleaved_batch() <rocsparse_sgpsv_interleaved_batch>`                                   x      x      x              x
===================================================================================================================== ====== ====== ============== ==============

Conversion Functions
--------------------

========================================================================================================================= ====== ====== ============== ==============
Function name                                                                                                             single double single complex double complex
========================================================================================================================= ====== ====== ============== ==============
:cpp:func:`rocsparse_csr2coo`
:cpp:func:`rocsparse_csr2csc_buffer_size`
:cpp:func:`rocsparse_Xcsr2csc() <rocsparse_scsr2csc>`                                                                     x      x      x              x
:cpp:func:`rocsparse_Xgebsr2gebsc_buffer_size`                                                                            x      x      x              x
:cpp:func:`rocsparse_Xgebsr2gebsc() <rocsparse_sgebsr2gebsc>`                                                             x      x      x              x
:cpp:func:`rocsparse_csr2ell_width`
:cpp:func:`rocsparse_Xcsr2ell() <rocsparse_scsr2ell>`                                                                     x      x      x              x
:cpp:func:`rocsparse_Xcsr2hyb() <rocsparse_scsr2hyb>`                                                                     x      x      x              x
:cpp:func:`rocsparse_csr2bsr_nnz`
:cpp:func:`rocsparse_Xcsr2bsr() <rocsparse_scsr2bsr>`                                                                     x      x      x              x
:cpp:func:`rocsparse_csr2gebsr_nnz`
:cpp:func:`rocsparse_Xcsr2gebsr_buffer_size() <rocsparse_scsr2gebsr_buffer_size>`                                         x      x      x              x
:cpp:func:`rocsparse_Xcsr2gebsr() <rocsparse_scsr2gebsr>`                                                                 x      x      x              x
:cpp:func:`rocsparse_coo2csr`
:cpp:func:`rocsparse_ell2csr_nnz`
:cpp:func:`rocsparse_Xell2csr() <rocsparse_sell2csr>`                                                                     x      x      x              x
:cpp:func:`rocsparse_hyb2csr_buffer_size`
:cpp:func:`rocsparse_Xhyb2csr() <rocsparse_shyb2csr>`                                                                     x      x      x              x
:cpp:func:`rocsparse_Xbsr2csr() <rocsparse_sbsr2csr>`                                                                     x      x      x              x
:cpp:func:`rocsparse_Xgebsr2csr() <rocsparse_sgebsr2csr>`                                                                 x      x      x              x
:cpp:func:`rocsparse_Xgebsr2gebsr_buffer_size() <rocsparse_sgebsr2gebsr_buffer_size>`                                     x      x      x              x
:cpp:func:`rocsparse_gebsr2gebsr_nnz()`
:cpp:func:`rocsparse_Xgebsr2gebsr() <rocsparse_sgebsr2gebsr>`                                                             x      x      x              x
:cpp:func:`rocsparse_Xcsr2csr_compress() <rocsparse_scsr2csr_compress>`                                                   x      x      x              x
:cpp:func:`rocsparse_create_identity_permutation`
:cpp:func:`rocsparse_cscsort_buffer_size`
:cpp:func:`rocsparse_cscsort`
:cpp:func:`rocsparse_csrsort_buffer_size`
:cpp:func:`rocsparse_csrsort`
:cpp:func:`rocsparse_coosort_buffer_size`
:cpp:func:`rocsparse_coosort_by_row`
:cpp:func:`rocsparse_coosort_by_column`
:cpp:func:`rocsparse_Xdense2csr() <rocsparse_sdense2csr>`                                                                 x      x      x              x
:cpp:func:`rocsparse_Xdense2csc() <rocsparse_sdense2csc>`                                                                 x      x      x              x
:cpp:func:`rocsparse_Xdense2coo() <rocsparse_sdense2coo>`                                                                 x      x      x              x
:cpp:func:`rocsparse_Xcsr2dense() <rocsparse_scsr2dense>`                                                                 x      x      x              x
:cpp:func:`rocsparse_Xcsc2dense() <rocsparse_scsc2dense>`                                                                 x      x      x              x
:cpp:func:`rocsparse_Xcoo2dense() <rocsparse_scoo2dense>`                                                                 x      x      x              x
:cpp:func:`rocsparse_Xnnz_compress() <rocsparse_snnz_compress>`                                                           x      x      x              x
:cpp:func:`rocsparse_Xnnz() <rocsparse_snnz>`                                                                             x      x      x              x
:cpp:func:`rocsparse_Xprune_dense2csr_buffer_size() <rocsparse_sprune_dense2csr_buffer_size>`                             x      x
:cpp:func:`rocsparse_Xprune_dense2csr_nnz() <rocsparse_sprune_dense2csr_nnz>`                                             x      x
:cpp:func:`rocsparse_Xprune_dense2csr() <rocsparse_sprune_dense2csr>`                                                     x      x
:cpp:func:`rocsparse_Xprune_csr2csr_buffer_size() <rocsparse_sprune_csr2csr_buffer_size>`                                 x      x
:cpp:func:`rocsparse_Xprune_csr2csr_nnz() <rocsparse_sprune_csr2csr_nnz>`                                                 x      x
:cpp:func:`rocsparse_Xprune_csr2csr() <rocsparse_sprune_csr2csr>`                                                         x      x
:cpp:func:`rocsparse_Xprune_dense2csr_by_percentage_buffer_size() <rocsparse_sprune_dense2csr_by_percentage_buffer_size>` x      x
:cpp:func:`rocsparse_Xprune_dense2csr_nnz_by_percentage() <rocsparse_sprune_dense2csr_nnz_by_percentage>`                 x      x
:cpp:func:`rocsparse_Xprune_dense2csr_by_percentage() <rocsparse_sprune_dense2csr_by_percentage>`                         x      x
:cpp:func:`rocsparse_Xprune_csr2csr_by_percentage_buffer_size() <rocsparse_sprune_csr2csr_by_percentage_buffer_size>`     x      x
:cpp:func:`rocsparse_Xprune_csr2csr_nnz_by_percentage() <rocsparse_sprune_csr2csr_nnz_by_percentage>`                     x      x
:cpp:func:`rocsparse_Xprune_csr2csr_by_percentage() <rocsparse_sprune_csr2csr_by_percentage>`                             x      x
========================================================================================================================= ====== ====== ============== ==============

Reordering Functions
--------------------

======================================================= ====== ====== ============== ==============
Function name                                           single double single complex double complex
======================================================= ====== ====== ============== ==============
:cpp:func:`rocsparse_Xcsrcolor() <rocsparse_scsrcolor>` x      x      x              x
======================================================= ====== ====== ============== ==============

Utility Functions
-----------------

=================================================================================================== ====== ====== ============== ==============
Function name                                                                                       single double single complex double complex
=================================================================================================== ====== ====== ============== ==============
:cpp:func:`rocsparse_Xcheck_matrix_csr_buffer_size() <rocsparse_scheck_matrix_csr_buffer_size>`     x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_csr() <rocsparse_scheck_matrix_csr>`                             x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_csc_buffer_size() <rocsparse_scheck_matrix_csc_buffer_size>`     x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_csc() <rocsparse_scheck_matrix_csc>`                             x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_coo_buffer_size() <rocsparse_scheck_matrix_coo_buffer_size>`     x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_coo() <rocsparse_scheck_matrix_coo>`                             x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_gebsr_buffer_size() <rocsparse_scheck_matrix_gebsr_buffer_size>` x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_gebsr() <rocsparse_scheck_matrix_gebsr>`                         x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_gebsc_buffer_size() <rocsparse_scheck_matrix_gebsc_buffer_size>` x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_gebsc() <rocsparse_scheck_matrix_gebsc>`                         x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_ell_buffer_size() <rocsparse_scheck_matrix_ell_buffer_size>`     x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_ell() <rocsparse_scheck_matrix_ell>`                             x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_hyb_buffer_size() <rocsparse_scheck_matrix_hyb_buffer_size>`     x      x      x              x
:cpp:func:`rocsparse_Xcheck_matrix_hyb() <rocsparse_scheck_matrix_hyb>`                             x      x      x              x
=================================================================================================== ====== ====== ============== ==============

Sparse Generic Functions
------------------------

======================================= ====== ====== ============== ==============
Function name                           single double single complex double complex
======================================= ====== ====== ============== ==============
:cpp:func:`rocsparse_axpby()`           x      x      x              x
:cpp:func:`rocsparse_gather()`          x      x      x              x
:cpp:func:`rocsparse_scatter()`         x      x      x              x
:cpp:func:`rocsparse_rot()`             x      x      x              x
:cpp:func:`rocsparse_spvv()`            x      x      x              x
:cpp:func:`rocsparse_sparse_to_dense()` x      x      x              x
:cpp:func:`rocsparse_dense_to_sparse()` x      x      x              x
:cpp:func:`rocsparse_spmv()`            x      x      x              x
:cpp:func:`rocsparse_spsv()`            x      x      x              x
:cpp:func:`rocsparse_spmm()`            x      x      x              x
:cpp:func:`rocsparse_spsm()`            x      x      x              x
:cpp:func:`rocsparse_spgemm()`          x      x      x              x
:cpp:func:`rocsparse_sddmm()`           x      x      x              x
======================================= ====== ====== ============== ==============


Storage schemes and indexing base
---------------------------------
rocSPARSE supports 0 and 1 based indexing.
The index base is selected by the :cpp:enum:`rocsparse_index_base` type which is either passed as standalone parameter or as part of the :cpp:type:`rocsparse_mat_descr` type.

Furthermore, dense vectors are represented with a 1D array, stored linearly in memory.
Sparse vectors are represented by a 1D data array stored linearly in memory that hold all non-zero elements and a 1D indexing array stored linearly in memory that hold the positions of the corresponding non-zero elements.

Pointer mode
------------
The auxiliary functions :cpp:func:`rocsparse_set_pointer_mode` and :cpp:func:`rocsparse_get_pointer_mode` are used to set and get the value of the state variable :cpp:enum:`rocsparse_pointer_mode`.
If :cpp:enum:`rocsparse_pointer_mode` is equal to :cpp:enumerator:`rocsparse_pointer_mode_host`, then scalar parameters must be allocated on the host.
If :cpp:enum:`rocsparse_pointer_mode` is equal to :cpp:enumerator:`rocsparse_pointer_mode_device`, then scalar parameters must be allocated on the device.

There are two types of scalar parameter:

  1. Scaling parameters, such as `alpha` and `beta` used in e.g. :cpp:func:`rocsparse_scsrmv`, :cpp:func:`rocsparse_scoomv`, ...
  2. Scalar results from functions such as :cpp:func:`rocsparse_sdoti`, :cpp:func:`rocsparse_cdotci`, ...

For scalar parameters such as alpha and beta, memory can be allocated on the host heap or stack, when :cpp:enum:`rocsparse_pointer_mode` is equal to :cpp:enumerator:`rocsparse_pointer_mode_host`.
The kernel launch is asynchronous, and if the scalar parameter is on the heap, it can be freed after the return from the kernel launch.
When :cpp:enum:`rocsparse_pointer_mode` is equal to :cpp:enumerator:`rocsparse_pointer_mode_device`, the scalar parameter must not be changed till the kernel completes.

For scalar results, when :cpp:enum:`rocsparse_pointer_mode` is equal to :cpp:enumerator:`rocsparse_pointer_mode_host`, the function blocks the CPU till the GPU has copied the result back to the host.
Using :cpp:enum:`rocsparse_pointer_mode` equal to :cpp:enumerator:`rocsparse_pointer_mode_device`, the function will return after the asynchronous launch.
Similarly to vector and matrix results, the scalar result is only available when the kernel has completed execution.

Asynchronous API
----------------
Except a functions having memory allocation inside preventing asynchronicity, all rocSPARSE functions are configured to operate in non-blocking fashion with respect to CPU, meaning these library functions return immediately.

hipSPARSE
---------
hipSPARSE is a SPARSE marshalling library, with multiple supported backends.
It sits between the application and a `worker` SPARSE library, marshalling inputs into the backend library and marshalling results back to the application.
hipSPARSE exports an interface that does not require the client to change, regardless of the chosen backend.
Currently, hipSPARSE supports rocSPARSE and cuSPARSE as backends.
hipSPARSE focuses on convenience and portability.
If performance outweighs these factors, then using rocSPARSE itself is highly recommended.
hipSPARSE can be found on `GitHub <https://github.com/ROCmSoftwarePlatform/hipSPARSE/>`_.

.. _rocsparse_auxiliary_functions_:

Sparse Auxiliary Functions
==========================

This module holds all sparse auxiliary functions.

The functions that are contained in the auxiliary module describe all available helper functions that are required for subsequent library calls.

.. _rocsparse_create_handle_:

rocsparse_create_handle()
-------------------------

.. doxygenfunction:: rocsparse_create_handle

.. _rocsparse_destroy_handle_:

rocsparse_destroy_handle()
--------------------------

.. doxygenfunction:: rocsparse_destroy_handle

.. _rocsparse_set_stream_:

rocsparse_set_stream()
----------------------

.. doxygenfunction:: rocsparse_set_stream

rocsparse_get_stream()
----------------------

.. doxygenfunction:: rocsparse_get_stream

rocsparse_set_pointer_mode()
----------------------------

.. doxygenfunction:: rocsparse_set_pointer_mode

rocsparse_get_pointer_mode()
----------------------------

.. doxygenfunction:: rocsparse_get_pointer_mode

rocsparse_get_version()
-----------------------

.. doxygenfunction:: rocsparse_get_version

rocsparse_get_git_rev()
-----------------------

.. doxygenfunction:: rocsparse_get_git_rev

rocsparse_create_mat_descr()
----------------------------

.. doxygenfunction:: rocsparse_create_mat_descr

rocsparse_destroy_mat_descr()
-----------------------------

.. doxygenfunction:: rocsparse_destroy_mat_descr

rocsparse_copy_mat_descr()
--------------------------

.. doxygenfunction:: rocsparse_copy_mat_descr

rocsparse_set_mat_index_base()
------------------------------

.. doxygenfunction:: rocsparse_set_mat_index_base

rocsparse_get_mat_index_base()
------------------------------

.. doxygenfunction:: rocsparse_get_mat_index_base

rocsparse_set_mat_type()
------------------------

.. doxygenfunction:: rocsparse_set_mat_type

rocsparse_get_mat_type()
------------------------

.. doxygenfunction:: rocsparse_get_mat_type

rocsparse_set_mat_fill_mode()
-----------------------------

.. doxygenfunction:: rocsparse_set_mat_fill_mode

rocsparse_get_mat_fill_mode()
-----------------------------

.. doxygenfunction:: rocsparse_get_mat_fill_mode

rocsparse_set_mat_diag_type()
-----------------------------

.. doxygenfunction:: rocsparse_set_mat_diag_type

rocsparse_get_mat_diag_type()
-----------------------------

.. doxygenfunction:: rocsparse_get_mat_diag_type

rocsparse_set_mat_storage_mode()
--------------------------------

.. doxygenfunction:: rocsparse_set_mat_storage_mode

rocsparse_get_mat_storage_mode()
--------------------------------

.. doxygenfunction:: rocsparse_get_mat_storage_mode

.. _rocsparse_create_hyb_mat_:

rocsparse_create_hyb_mat()
--------------------------

.. doxygenfunction:: rocsparse_create_hyb_mat

rocsparse_destroy_hyb_mat()
---------------------------

.. doxygenfunction:: rocsparse_destroy_hyb_mat

rocsparse_copy_hyb_mat()
------------------------

.. doxygenfunction:: rocsparse_copy_hyb_mat

rocsparse_create_mat_info()
---------------------------

.. doxygenfunction:: rocsparse_create_mat_info

rocsparse_copy_mat_info()
-------------------------

.. doxygenfunction:: rocsparse_copy_mat_info

.. _rocsparse_destroy_mat_info_:

rocsparse_destroy_mat_info()
----------------------------

.. doxygenfunction:: rocsparse_destroy_mat_info

rocsparse_create_color_info()
-----------------------------

.. doxygenfunction:: rocsparse_create_color_info

rocsparse_destroy_color_info()
------------------------------

.. doxygenfunction:: rocsparse_destroy_color_info

rocsparse_copy_color_info()
---------------------------

.. doxygenfunction:: rocsparse_copy_color_info

rocsparse_create_spvec_descr()
------------------------------

.. doxygenfunction:: rocsparse_create_spvec_descr

rocsparse_destroy_spvec_descr()
-------------------------------

.. doxygenfunction:: rocsparse_destroy_spvec_descr

rocsparse_spvec_get()
---------------------

.. doxygenfunction:: rocsparse_spvec_get

rocsparse_spvec_get_index_base()
--------------------------------

.. doxygenfunction:: rocsparse_spvec_get_index_base

rocsparse_spvec_get_values()
----------------------------

.. doxygenfunction:: rocsparse_spvec_get_values

rocsparse_spvec_set_values()
----------------------------

.. doxygenfunction:: rocsparse_spvec_set_values

rocsparse_create_coo_descr
--------------------------

.. doxygenfunction:: rocsparse_create_coo_descr

rocsparse_create_coo_aos_descr
------------------------------

.. doxygenfunction:: rocsparse_create_coo_aos_descr

rocsparse_create_csr_descr
--------------------------

.. doxygenfunction:: rocsparse_create_csr_descr

rocsparse_create_csc_descr
--------------------------

.. doxygenfunction:: rocsparse_create_csc_descr

rocsparse_create_ell_descr
--------------------------

.. doxygenfunction:: rocsparse_create_ell_descr

rocsparse_create_bell_descr
---------------------------

.. doxygenfunction:: rocsparse_create_bell_descr

rocsparse_destroy_spmat_descr
-----------------------------

.. doxygenfunction:: rocsparse_destroy_spmat_descr

rocsparse_coo_get
-----------------

.. doxygenfunction:: rocsparse_coo_get

rocsparse_coo_aos_get
---------------------

.. doxygenfunction:: rocsparse_coo_aos_get

rocsparse_csr_get
-----------------

.. doxygenfunction:: rocsparse_csr_get

rocsparse_ell_get
-----------------

.. doxygenfunction:: rocsparse_ell_get

rocsparse_bell_get
------------------

.. doxygenfunction:: rocsparse_bell_get

rocsparse_coo_set_pointers
--------------------------

.. doxygenfunction:: rocsparse_coo_set_pointers

rocsparse_coo_aos_set_pointers
------------------------------

.. doxygenfunction:: rocsparse_coo_aos_set_pointers

rocsparse_csr_set_pointers
--------------------------

.. doxygenfunction:: rocsparse_csr_set_pointers

rocsparse_csc_set_pointers
--------------------------

.. doxygenfunction:: rocsparse_csc_set_pointers

rocsparse_ell_set_pointers
--------------------------

.. doxygenfunction:: rocsparse_ell_set_pointers

rocsparse_spmat_get_size
------------------------

.. doxygenfunction:: rocsparse_spmat_get_size

rocsparse_spmat_get_format
--------------------------

.. doxygenfunction:: rocsparse_spmat_get_format

rocsparse_spmat_get_index_base
------------------------------

.. doxygenfunction:: rocsparse_spmat_get_index_base

rocsparse_spmat_get_values
--------------------------

.. doxygenfunction:: rocsparse_spmat_get_values

rocsparse_spmat_set_values
--------------------------

.. doxygenfunction:: rocsparse_spmat_set_values

rocsparse_spmat_get_strided_batch
---------------------------------

.. doxygenfunction:: rocsparse_spmat_get_strided_batch

rocsparse_spmat_set_strided_batch
---------------------------------

.. doxygenfunction:: rocsparse_spmat_set_strided_batch

rocsparse_coo_set_strided_batch
-------------------------------

.. doxygenfunction:: rocsparse_coo_set_strided_batch

rocsparse_csr_set_strided_batch
-------------------------------

.. doxygenfunction:: rocsparse_csr_set_strided_batch

rocsparse_csc_set_strided_batch
-------------------------------

.. doxygenfunction:: rocsparse_csc_set_strided_batch

rocsparse_spmat_get_attribute
-----------------------------

.. doxygenfunction:: rocsparse_spmat_get_attribute

rocsparse_spmat_set_attribute
-----------------------------

.. doxygenfunction:: rocsparse_spmat_set_attribute

rocsparse_create_dnvec_descr
----------------------------

.. doxygenfunction:: rocsparse_create_dnvec_descr

rocsparse_destroy_dnvec_descr
-----------------------------

.. doxygenfunction:: rocsparse_destroy_dnvec_descr

rocsparse_dnvec_get
-------------------

.. doxygenfunction:: rocsparse_dnvec_get

rocsparse_dnvec_get_values
--------------------------

.. doxygenfunction:: rocsparse_dnvec_get_values

rocsparse_dnvec_set_values
--------------------------

.. doxygenfunction:: rocsparse_dnvec_set_values

rocsparse_create_dnmat_descr
----------------------------

.. doxygenfunction:: rocsparse_create_dnmat_descr

rocsparse_destroy_dnmat_descr
-----------------------------

.. doxygenfunction:: rocsparse_destroy_dnmat_descr

rocsparse_dnmat_get
-------------------

.. doxygenfunction:: rocsparse_dnmat_get

rocsparse_dnmat_get_values
--------------------------

.. doxygenfunction:: rocsparse_dnmat_get_values

rocsparse_dnmat_set_values
--------------------------

.. doxygenfunction:: rocsparse_dnmat_set_values

rocsparse_dnmat_get_strided_batch
---------------------------------

.. doxygenfunction:: rocsparse_dnmat_get_strided_batch

rocsparse_dnmat_set_strided_batch
---------------------------------

.. doxygenfunction:: rocsparse_dnmat_set_strided_batch

.. _rocsparse_level1_functions_:

Sparse Level 1 Functions
========================

The sparse level 1 routines describe operations between a vector in sparse format and a vector in dense format. This section describes all rocSPARSE level 1 sparse linear algebra functions.

rocsparse_axpyi()
-----------------

.. doxygenfunction:: rocsparse_saxpyi
  :outline:
.. doxygenfunction:: rocsparse_daxpyi
  :outline:
.. doxygenfunction:: rocsparse_caxpyi
  :outline:
.. doxygenfunction:: rocsparse_zaxpyi

rocsparse_doti()
----------------

.. doxygenfunction:: rocsparse_sdoti
  :outline:
.. doxygenfunction:: rocsparse_ddoti
  :outline:
.. doxygenfunction:: rocsparse_cdoti
  :outline:
.. doxygenfunction:: rocsparse_zdoti

rocsparse_dotci()
-----------------

.. doxygenfunction:: rocsparse_cdotci
  :outline:
.. doxygenfunction:: rocsparse_zdotci

rocsparse_gthr()
----------------

.. doxygenfunction:: rocsparse_sgthr
  :outline:
.. doxygenfunction:: rocsparse_dgthr
  :outline:
.. doxygenfunction:: rocsparse_cgthr
  :outline:
.. doxygenfunction:: rocsparse_zgthr

rocsparse_gthrz()
-----------------

.. doxygenfunction:: rocsparse_sgthrz
  :outline:
.. doxygenfunction:: rocsparse_dgthrz
  :outline:
.. doxygenfunction:: rocsparse_cgthrz
  :outline:
.. doxygenfunction:: rocsparse_zgthrz

rocsparse_roti()
----------------

.. doxygenfunction:: rocsparse_sroti
  :outline:
.. doxygenfunction:: rocsparse_droti

rocsparse_sctr()
----------------

.. doxygenfunction:: rocsparse_ssctr
  :outline:
.. doxygenfunction:: rocsparse_dsctr
  :outline:
.. doxygenfunction:: rocsparse_csctr
  :outline:
.. doxygenfunction:: rocsparse_zsctr

.. _rocsparse_level2_functions_:

Sparse Level 2 Functions
========================

This module holds all sparse level 2 routines.

The sparse level 2 routines describe operations between a matrix in sparse format and a vector in dense format.

rocsparse_bsrmv()
-----------------

.. doxygenfunction:: rocsparse_sbsrmv
  :outline:
.. doxygenfunction:: rocsparse_dbsrmv
  :outline:
.. doxygenfunction:: rocsparse_cbsrmv
  :outline:
.. doxygenfunction:: rocsparse_zbsrmv

rocsparse_bsrxmv()
------------------

.. doxygenfunction:: rocsparse_sbsrxmv
  :outline:
.. doxygenfunction:: rocsparse_dbsrxmv
  :outline:
.. doxygenfunction:: rocsparse_cbsrxmv
  :outline:
.. doxygenfunction:: rocsparse_zbsrxmv

rocsparse_bsrsv_zero_pivot()
----------------------------

.. doxygenfunction:: rocsparse_bsrsv_zero_pivot

rocsparse_bsrsv_buffer_size()
-----------------------------

.. doxygenfunction:: rocsparse_sbsrsv_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dbsrsv_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cbsrsv_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zbsrsv_buffer_size

rocsparse_bsrsv_analysis()
--------------------------

.. doxygenfunction:: rocsparse_sbsrsv_analysis
  :outline:
.. doxygenfunction:: rocsparse_dbsrsv_analysis
  :outline:
.. doxygenfunction:: rocsparse_cbsrsv_analysis
  :outline:
.. doxygenfunction:: rocsparse_zbsrsv_analysis

rocsparse_bsrsv_solve()
-----------------------

.. doxygenfunction:: rocsparse_sbsrsv_solve
  :outline:
.. doxygenfunction:: rocsparse_dbsrsv_solve
  :outline:
.. doxygenfunction:: rocsparse_cbsrsv_solve
  :outline:
.. doxygenfunction:: rocsparse_zbsrsv_solve

rocsparse_bsrsv_clear()
-----------------------

.. doxygenfunction:: rocsparse_bsrsv_clear

rocsparse_coomv()
-----------------

.. doxygenfunction:: rocsparse_scoomv
  :outline:
.. doxygenfunction:: rocsparse_dcoomv
  :outline:
.. doxygenfunction:: rocsparse_ccoomv
  :outline:
.. doxygenfunction:: rocsparse_zcoomv

rocsparse_csrmv_analysis()
--------------------------

.. doxygenfunction:: rocsparse_scsrmv_analysis
  :outline:
.. doxygenfunction:: rocsparse_dcsrmv_analysis
  :outline:
.. doxygenfunction:: rocsparse_ccsrmv_analysis
  :outline:
.. doxygenfunction:: rocsparse_zcsrmv_analysis

rocsparse_csrmv()
-----------------

.. doxygenfunction:: rocsparse_scsrmv
  :outline:
.. doxygenfunction:: rocsparse_dcsrmv
  :outline:
.. doxygenfunction:: rocsparse_ccsrmv
  :outline:
.. doxygenfunction:: rocsparse_zcsrmv

rocsparse_csrmv_analysis_clear()
--------------------------------

.. doxygenfunction:: rocsparse_csrmv_clear

rocsparse_csrsv_zero_pivot()
----------------------------

.. doxygenfunction:: rocsparse_csrsv_zero_pivot

rocsparse_csrsv_buffer_size()
-----------------------------

.. doxygenfunction:: rocsparse_scsrsv_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcsrsv_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccsrsv_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcsrsv_buffer_size

rocsparse_csrsv_analysis()
--------------------------

.. doxygenfunction:: rocsparse_scsrsv_analysis
  :outline:
.. doxygenfunction:: rocsparse_dcsrsv_analysis
  :outline:
.. doxygenfunction:: rocsparse_ccsrsv_analysis
  :outline:
.. doxygenfunction:: rocsparse_zcsrsv_analysis

rocsparse_csrsv_solve()
-----------------------

.. doxygenfunction:: rocsparse_scsrsv_solve
  :outline:
.. doxygenfunction:: rocsparse_dcsrsv_solve
  :outline:
.. doxygenfunction:: rocsparse_ccsrsv_solve
  :outline:
.. doxygenfunction:: rocsparse_zcsrsv_solve

rocsparse_csrsv_clear()
-----------------------

.. doxygenfunction:: rocsparse_csrsv_clear

rocsparse_ellmv()
-----------------

.. doxygenfunction:: rocsparse_sellmv
  :outline:
.. doxygenfunction:: rocsparse_dellmv
  :outline:
.. doxygenfunction:: rocsparse_cellmv
  :outline:
.. doxygenfunction:: rocsparse_zellmv

rocsparse_hybmv()
-----------------

.. doxygenfunction:: rocsparse_shybmv
  :outline:
.. doxygenfunction:: rocsparse_dhybmv
  :outline:
.. doxygenfunction:: rocsparse_chybmv
  :outline:
.. doxygenfunction:: rocsparse_zhybmv

rocsparse_gebsrmv()
-------------------

.. doxygenfunction:: rocsparse_sgebsrmv
  :outline:
.. doxygenfunction:: rocsparse_dgebsrmv
  :outline:
.. doxygenfunction:: rocsparse_cgebsrmv
  :outline:
.. doxygenfunction:: rocsparse_zgebsrmv

rocsparse_gemvi_buffer_size()
-----------------------------

.. doxygenfunction:: rocsparse_sgemvi_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dgemvi_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cgemvi_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zgemvi_buffer_size

rocsparse_gemvi()
-----------------

.. doxygenfunction:: rocsparse_sgemvi
  :outline:
.. doxygenfunction:: rocsparse_dgemvi
  :outline:
.. doxygenfunction:: rocsparse_cgemvi
  :outline:
.. doxygenfunction:: rocsparse_zgemvi

.. _rocsparse_level3_functions_:

Sparse Level 3 Functions
========================

This module holds all sparse level 3 routines.

The sparse level 3 routines describe operations between a matrix in sparse format and multiple vectors in dense format that can also be seen as a dense matrix.

rocsparse_bsrmm()
-----------------

.. doxygenfunction:: rocsparse_sbsrmm
  :outline:
.. doxygenfunction:: rocsparse_dbsrmm
  :outline:
.. doxygenfunction:: rocsparse_cbsrmm
  :outline:
.. doxygenfunction:: rocsparse_zbsrmm


rocsparse_gebsrmm()
-------------------

.. doxygenfunction:: rocsparse_sgebsrmm
  :outline:
.. doxygenfunction:: rocsparse_dgebsrmm
  :outline:
.. doxygenfunction:: rocsparse_cgebsrmm
  :outline:
.. doxygenfunction:: rocsparse_zgebsrmm


rocsparse_csrmm()
-----------------

.. doxygenfunction:: rocsparse_scsrmm
  :outline:
.. doxygenfunction:: rocsparse_dcsrmm
  :outline:
.. doxygenfunction:: rocsparse_ccsrmm
  :outline:
.. doxygenfunction:: rocsparse_zcsrmm

rocsparse_csrsm_zero_pivot()
----------------------------

.. doxygenfunction:: rocsparse_csrsm_zero_pivot

rocsparse_csrsm_buffer_size()
-----------------------------

.. doxygenfunction:: rocsparse_scsrsm_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcsrsm_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccsrsm_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcsrsm_buffer_size

rocsparse_csrsm_analysis()
--------------------------

.. doxygenfunction:: rocsparse_scsrsm_analysis
  :outline:
.. doxygenfunction:: rocsparse_dcsrsm_analysis
  :outline:
.. doxygenfunction:: rocsparse_ccsrsm_analysis
  :outline:
.. doxygenfunction:: rocsparse_zcsrsm_analysis

rocsparse_csrsm_solve()
-----------------------

.. doxygenfunction:: rocsparse_scsrsm_solve
  :outline:
.. doxygenfunction:: rocsparse_dcsrsm_solve
  :outline:
.. doxygenfunction:: rocsparse_ccsrsm_solve
  :outline:
.. doxygenfunction:: rocsparse_zcsrsm_solve

rocsparse_csrsm_clear()
-----------------------

.. doxygenfunction:: rocsparse_csrsm_clear

rocsparse_bsrsm_zero_pivot()
----------------------------

.. doxygenfunction:: rocsparse_bsrsm_zero_pivot

rocsparse_bsrsm_buffer_size()
-----------------------------

.. doxygenfunction:: rocsparse_sbsrsm_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dbsrsm_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cbsrsm_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zbsrsm_buffer_size

rocsparse_bsrsm_analysis()
--------------------------

.. doxygenfunction:: rocsparse_sbsrsm_analysis
  :outline:
.. doxygenfunction:: rocsparse_dbsrsm_analysis
  :outline:
.. doxygenfunction:: rocsparse_cbsrsm_analysis
  :outline:
.. doxygenfunction:: rocsparse_zbsrsm_analysis

rocsparse_bsrsm_solve()
-----------------------

.. doxygenfunction:: rocsparse_sbsrsm_solve
  :outline:
.. doxygenfunction:: rocsparse_dbsrsm_solve
  :outline:
.. doxygenfunction:: rocsparse_cbsrsm_solve
  :outline:
.. doxygenfunction:: rocsparse_zbsrsm_solve

rocsparse_bsrsm_clear()
-----------------------

.. doxygenfunction:: rocsparse_bsrsm_clear

.. _rocsparse_extra_functions_:

rocsparse_gemmi()
-----------------

.. doxygenfunction:: rocsparse_sgemmi
  :outline:
.. doxygenfunction:: rocsparse_dgemmi
  :outline:
.. doxygenfunction:: rocsparse_cgemmi
  :outline:
.. doxygenfunction:: rocsparse_zgemmi

Sparse Extra Functions
======================

This module holds all sparse extra routines.

The sparse extra routines describe operations that manipulate sparse matrices.

rocsparse_csrgeam_nnz()
-----------------------

.. doxygenfunction:: rocsparse_csrgeam_nnz

rocsparse_csrgeam()
-------------------

.. doxygenfunction:: rocsparse_scsrgeam
  :outline:
.. doxygenfunction:: rocsparse_dcsrgeam
  :outline:
.. doxygenfunction:: rocsparse_ccsrgeam
  :outline:
.. doxygenfunction:: rocsparse_zcsrgeam

rocsparse_csrgemm_buffer_size()
-------------------------------

.. doxygenfunction:: rocsparse_scsrgemm_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcsrgemm_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccsrgemm_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcsrgemm_buffer_size

rocsparse_csrgemm_nnz()
-----------------------

.. doxygenfunction:: rocsparse_csrgemm_nnz

rocsparse_csrgemm_symbolic()
----------------------------

.. doxygenfunction:: rocsparse_csrgemm_symbolic

rocsparse_csrgemm()
-------------------

.. doxygenfunction:: rocsparse_scsrgemm
  :outline:
.. doxygenfunction:: rocsparse_dcsrgemm
  :outline:
.. doxygenfunction:: rocsparse_ccsrgemm
  :outline:
.. doxygenfunction:: rocsparse_zcsrgemm

rocsparse_csrgemm_numeric()
---------------------------

.. doxygenfunction:: rocsparse_scsrgemm_numeric
  :outline:
.. doxygenfunction:: rocsparse_dcsrgemm_numeric
  :outline:
.. doxygenfunction:: rocsparse_ccsrgemm_numeric
  :outline:
.. doxygenfunction:: rocsparse_zcsrgemm_numeric

.. _rocsparse_precond_functions_:

Preconditioner Functions
========================

This module holds all sparse preconditioners.

The sparse preconditioners describe manipulations on a matrix in sparse format to obtain a sparse preconditioner matrix.

rocsparse_bsric0_zero_pivot()
-----------------------------

.. doxygenfunction:: rocsparse_bsric0_zero_pivot

rocsparse_bsric0_buffer_size()
------------------------------

.. doxygenfunction:: rocsparse_sbsric0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dbsric0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cbsric0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zbsric0_buffer_size

rocsparse_bsric0_analysis()
---------------------------

.. doxygenfunction:: rocsparse_sbsric0_analysis
  :outline:
.. doxygenfunction:: rocsparse_dbsric0_analysis
  :outline:
.. doxygenfunction:: rocsparse_cbsric0_analysis
  :outline:
.. doxygenfunction:: rocsparse_zbsric0_analysis

rocsparse_bsric0()
------------------

.. doxygenfunction:: rocsparse_sbsric0
  :outline:
.. doxygenfunction:: rocsparse_dbsric0
  :outline:
.. doxygenfunction:: rocsparse_cbsric0
  :outline:
.. doxygenfunction:: rocsparse_zbsric0

rocsparse_bsric0_clear()
------------------------

.. doxygenfunction:: rocsparse_bsric0_clear

rocsparse_bsrilu0_zero_pivot()
------------------------------

.. doxygenfunction:: rocsparse_bsrilu0_zero_pivot

rocsparse_bsrilu0_numeric_boost()
---------------------------------

.. doxygenfunction:: rocsparse_sbsrilu0_numeric_boost
  :outline:
.. doxygenfunction:: rocsparse_dbsrilu0_numeric_boost
  :outline:
.. doxygenfunction:: rocsparse_cbsrilu0_numeric_boost
  :outline:
.. doxygenfunction:: rocsparse_zbsrilu0_numeric_boost

rocsparse_bsrilu0_buffer_size()
-------------------------------

.. doxygenfunction:: rocsparse_sbsrilu0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dbsrilu0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cbsrilu0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zbsrilu0_buffer_size

rocsparse_bsrilu0_analysis()
----------------------------

.. doxygenfunction:: rocsparse_sbsrilu0_analysis
  :outline:
.. doxygenfunction:: rocsparse_dbsrilu0_analysis
  :outline:
.. doxygenfunction:: rocsparse_cbsrilu0_analysis
  :outline:
.. doxygenfunction:: rocsparse_zbsrilu0_analysis

rocsparse_bsrilu0()
-------------------

.. doxygenfunction:: rocsparse_sbsrilu0
  :outline:
.. doxygenfunction:: rocsparse_dbsrilu0
  :outline:
.. doxygenfunction:: rocsparse_cbsrilu0
  :outline:
.. doxygenfunction:: rocsparse_zbsrilu0

rocsparse_bsrilu0_clear()
-------------------------

.. doxygenfunction:: rocsparse_bsrilu0_clear

rocsparse_csric0_zero_pivot()
-----------------------------

.. doxygenfunction:: rocsparse_csric0_zero_pivot

rocsparse_csric0_buffer_size()
------------------------------

.. doxygenfunction:: rocsparse_scsric0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcsric0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccsric0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcsric0_buffer_size

rocsparse_csric0_analysis()
---------------------------

.. doxygenfunction:: rocsparse_scsric0_analysis
  :outline:
.. doxygenfunction:: rocsparse_dcsric0_analysis
  :outline:
.. doxygenfunction:: rocsparse_ccsric0_analysis
  :outline:
.. doxygenfunction:: rocsparse_zcsric0_analysis

rocsparse_csric0()
------------------

.. doxygenfunction:: rocsparse_scsric0
  :outline:
.. doxygenfunction:: rocsparse_dcsric0
  :outline:
.. doxygenfunction:: rocsparse_ccsric0
  :outline:
.. doxygenfunction:: rocsparse_zcsric0

rocsparse_csric0_clear()
------------------------

.. doxygenfunction:: rocsparse_csric0_clear

rocsparse_csrilu0_zero_pivot()
------------------------------

.. doxygenfunction:: rocsparse_csrilu0_zero_pivot

rocsparse_csrilu0_numeric_boost()
---------------------------------

.. doxygenfunction:: rocsparse_scsrilu0_numeric_boost
  :outline:
.. doxygenfunction:: rocsparse_dcsrilu0_numeric_boost
  :outline:
.. doxygenfunction:: rocsparse_ccsrilu0_numeric_boost
  :outline:
.. doxygenfunction:: rocsparse_zcsrilu0_numeric_boost

rocsparse_csrilu0_buffer_size()
-------------------------------

.. doxygenfunction:: rocsparse_scsrilu0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcsrilu0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccsrilu0_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcsrilu0_buffer_size

rocsparse_csrilu0_analysis()
----------------------------

.. doxygenfunction:: rocsparse_scsrilu0_analysis
  :outline:
.. doxygenfunction:: rocsparse_dcsrilu0_analysis
  :outline:
.. doxygenfunction:: rocsparse_ccsrilu0_analysis
  :outline:
.. doxygenfunction:: rocsparse_zcsrilu0_analysis

rocsparse_csrilu0()
-------------------

.. doxygenfunction:: rocsparse_scsrilu0
  :outline:
.. doxygenfunction:: rocsparse_dcsrilu0
  :outline:
.. doxygenfunction:: rocsparse_ccsrilu0
  :outline:
.. doxygenfunction:: rocsparse_zcsrilu0

rocsparse_csrilu0_clear()
-------------------------

.. doxygenfunction:: rocsparse_csrilu0_clear

rocsparse_gtsv_buffer_size()
----------------------------

.. doxygenfunction:: rocsparse_sgtsv_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dgtsv_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cgtsv_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zgtsv_buffer_size

rocsparse_gtsv()
----------------

.. doxygenfunction:: rocsparse_sgtsv
  :outline:
.. doxygenfunction:: rocsparse_dgtsv
  :outline:
.. doxygenfunction:: rocsparse_cgtsv
  :outline:
.. doxygenfunction:: rocsparse_zgtsv

rocsparse_gtsv_no_pivot_buffer_size()
-------------------------------------

.. doxygenfunction:: rocsparse_sgtsv_no_pivot_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dgtsv_no_pivot_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cgtsv_no_pivot_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zgtsv_no_pivot_buffer_size

rocsparse_gtsv_no_pivot()
-------------------------

.. doxygenfunction:: rocsparse_sgtsv_no_pivot
  :outline:
.. doxygenfunction:: rocsparse_dgtsv_no_pivot
  :outline:
.. doxygenfunction:: rocsparse_cgtsv_no_pivot
  :outline:
.. doxygenfunction:: rocsparse_zgtsv_no_pivot

rocsparse_gtsv_no_pivot_strided_batch_buffer_size()
---------------------------------------------------

.. doxygenfunction:: rocsparse_sgtsv_no_pivot_strided_batch_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dgtsv_no_pivot_strided_batch_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cgtsv_no_pivot_strided_batch_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zgtsv_no_pivot_strided_batch_buffer_size

rocsparse_gtsv_no_pivot_strided_batch()
---------------------------------------

.. doxygenfunction:: rocsparse_sgtsv_no_pivot_strided_batch
  :outline:
.. doxygenfunction:: rocsparse_dgtsv_no_pivot_strided_batch
  :outline:
.. doxygenfunction:: rocsparse_cgtsv_no_pivot_strided_batch
  :outline:
.. doxygenfunction:: rocsparse_zgtsv_no_pivot_strided_batch

rocsparse_gtsv_interleaved_batch_buffer_size()
----------------------------------------------

.. doxygenfunction:: rocsparse_sgtsv_interleaved_batch_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dgtsv_interleaved_batch_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cgtsv_interleaved_batch_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zgtsv_interleaved_batch_buffer_size

rocsparse_gtsv_interleaved_batch()
----------------------------------

.. doxygenfunction:: rocsparse_sgtsv_interleaved_batch
  :outline:
.. doxygenfunction:: rocsparse_dgtsv_interleaved_batch
  :outline:
.. doxygenfunction:: rocsparse_cgtsv_interleaved_batch
  :outline:
.. doxygenfunction:: rocsparse_zgtsv_interleaved_batch

rocsparse_gpsv_interleaved_batch_buffer_size()
----------------------------------------------

.. doxygenfunction:: rocsparse_sgpsv_interleaved_batch_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dgpsv_interleaved_batch_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cgpsv_interleaved_batch_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zgpsv_interleaved_batch_buffer_size

rocsparse_gpsv_interleaved_batch()
----------------------------------

.. doxygenfunction:: rocsparse_sgpsv_interleaved_batch
  :outline:
.. doxygenfunction:: rocsparse_dgpsv_interleaved_batch
  :outline:
.. doxygenfunction:: rocsparse_cgpsv_interleaved_batch
  :outline:
.. doxygenfunction:: rocsparse_zgpsv_interleaved_batch

.. _rocsparse_conversion_functions_:

Sparse Conversion Functions
===========================

This module holds all sparse conversion routines.

The sparse conversion routines describe operations on a matrix in sparse format to obtain a matrix in a different sparse format.

rocsparse_csr2coo()
-------------------

.. doxygenfunction:: rocsparse_csr2coo

rocsparse_coo2csr()
-------------------

.. doxygenfunction:: rocsparse_coo2csr

rocsparse_csr2csc_buffer_size()
-------------------------------

.. doxygenfunction:: rocsparse_csr2csc_buffer_size

rocsparse_csr2csc()
-------------------

.. doxygenfunction:: rocsparse_scsr2csc
  :outline:
.. doxygenfunction:: rocsparse_dcsr2csc
  :outline:
.. doxygenfunction:: rocsparse_ccsr2csc
  :outline:
.. doxygenfunction:: rocsparse_zcsr2csc

rocsparse_gebsr2gebsc_buffer_size()
-----------------------------------

.. doxygenfunction:: rocsparse_sgebsr2gebsc_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dgebsr2gebsc_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cgebsr2gebsc_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zgebsr2gebsc_buffer_size

rocsparse_gebsr2gebsc()
-----------------------

.. doxygenfunction:: rocsparse_sgebsr2gebsc
  :outline:
.. doxygenfunction:: rocsparse_dgebsr2gebsc
  :outline:
.. doxygenfunction:: rocsparse_cgebsr2gebsc
  :outline:
.. doxygenfunction:: rocsparse_zgebsr2gebsc

rocsparse_csr2ell_width()
-------------------------

.. doxygenfunction:: rocsparse_csr2ell_width

rocsparse_csr2ell()
-------------------

.. doxygenfunction:: rocsparse_scsr2ell
  :outline:
.. doxygenfunction:: rocsparse_dcsr2ell
  :outline:
.. doxygenfunction:: rocsparse_ccsr2ell
  :outline:
.. doxygenfunction:: rocsparse_zcsr2ell

rocsparse_ell2csr_nnz()
-----------------------

.. doxygenfunction:: rocsparse_ell2csr_nnz

rocsparse_ell2csr()
-------------------

.. doxygenfunction:: rocsparse_sell2csr
  :outline:
.. doxygenfunction:: rocsparse_dell2csr
  :outline:
.. doxygenfunction:: rocsparse_cell2csr
  :outline:
.. doxygenfunction:: rocsparse_zell2csr

rocsparse_csr2hyb()
-------------------

.. doxygenfunction:: rocsparse_scsr2hyb
  :outline:
.. doxygenfunction:: rocsparse_dcsr2hyb
  :outline:
.. doxygenfunction:: rocsparse_ccsr2hyb
  :outline:
.. doxygenfunction:: rocsparse_zcsr2hyb

rocsparse_hyb2csr_buffer_size()
-------------------------------

.. doxygenfunction:: rocsparse_hyb2csr_buffer_size

rocsparse_hyb2csr()
-------------------

.. doxygenfunction:: rocsparse_shyb2csr
  :outline:
.. doxygenfunction:: rocsparse_dhyb2csr
  :outline:
.. doxygenfunction:: rocsparse_chyb2csr
  :outline:
.. doxygenfunction:: rocsparse_zhyb2csr

rocsparse_bsr2csr()
-------------------

.. doxygenfunction:: rocsparse_sbsr2csr
  :outline:
.. doxygenfunction:: rocsparse_dbsr2csr
  :outline:
.. doxygenfunction:: rocsparse_cbsr2csr
  :outline:
.. doxygenfunction:: rocsparse_zbsr2csr

rocsparse_gebsr2csr()
---------------------

.. doxygenfunction:: rocsparse_sgebsr2csr
  :outline:
.. doxygenfunction:: rocsparse_dgebsr2csr
  :outline:
.. doxygenfunction:: rocsparse_cgebsr2csr
  :outline:
.. doxygenfunction:: rocsparse_zgebsr2csr

rocsparse_gebsr2gebsr_buffer_size()
-----------------------------------

.. doxygenfunction:: rocsparse_sgebsr2gebsr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dgebsr2gebsr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_cgebsr2gebsr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zgebsr2gebsr_buffer_size

rocsparse_gebsr2gebsr_nnz()
---------------------------

.. doxygenfunction:: rocsparse_gebsr2gebsr_nnz

rocsparse_gebsr2gebsr()
-----------------------

.. doxygenfunction:: rocsparse_sgebsr2gebsr
  :outline:
.. doxygenfunction:: rocsparse_dgebsr2gebsr
  :outline:
.. doxygenfunction:: rocsparse_cgebsr2gebsr
  :outline:
.. doxygenfunction:: rocsparse_zgebsr2gebsr


rocsparse_csr2bsr_nnz()
-----------------------

.. doxygenfunction:: rocsparse_csr2bsr_nnz

rocsparse_csr2bsr()
-------------------

.. doxygenfunction:: rocsparse_scsr2bsr
  :outline:
.. doxygenfunction:: rocsparse_dcsr2bsr
  :outline:
.. doxygenfunction:: rocsparse_ccsr2bsr
  :outline:
.. doxygenfunction:: rocsparse_zcsr2bsr

rocsparse_csr2gebsr_nnz()
-------------------------

.. doxygenfunction:: rocsparse_csr2gebsr_nnz

rocsparse_csr2gebsr_buffer_size()
---------------------------------

.. doxygenfunction:: rocsparse_scsr2gebsr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcsr2gebsr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccsr2gebsr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcsr2gebsr_buffer_size

rocsparse_csr2gebsr()
---------------------

.. doxygenfunction:: rocsparse_scsr2gebsr
  :outline:
.. doxygenfunction:: rocsparse_dcsr2gebsr
  :outline:
.. doxygenfunction:: rocsparse_ccsr2gebsr
  :outline:
.. doxygenfunction:: rocsparse_zcsr2gebsr

rocsparse_csr2csr_compress()
----------------------------

.. doxygenfunction:: rocsparse_scsr2csr_compress
  :outline:
.. doxygenfunction:: rocsparse_dcsr2csr_compress
  :outline:
.. doxygenfunction:: rocsparse_ccsr2csr_compress
  :outline:
.. doxygenfunction:: rocsparse_zcsr2csr_compress

rocsparse_create_identity_permutation()
---------------------------------------

.. doxygenfunction:: rocsparse_create_identity_permutation

rocsparse_csrsort_buffer_size()
-------------------------------

.. doxygenfunction:: rocsparse_csrsort_buffer_size

rocsparse_csrsort()
-------------------

.. doxygenfunction:: rocsparse_csrsort

rocsparse_cscsort_buffer_size()
-------------------------------

.. doxygenfunction:: rocsparse_cscsort_buffer_size

rocsparse_cscsort()
-------------------

.. doxygenfunction:: rocsparse_cscsort

rocsparse_coosort_buffer_size()
-------------------------------

.. doxygenfunction:: rocsparse_coosort_buffer_size

rocsparse_coosort_by_row()
--------------------------

.. doxygenfunction:: rocsparse_coosort_by_row

rocsparse_coosort_by_column()
-----------------------------

.. doxygenfunction:: rocsparse_coosort_by_column

rocsparse_nnz_compress()
------------------------

.. doxygenfunction:: rocsparse_snnz_compress
  :outline:
.. doxygenfunction:: rocsparse_dnnz_compress
  :outline:
.. doxygenfunction:: rocsparse_cnnz_compress
  :outline:
.. doxygenfunction:: rocsparse_znnz_compress

rocsparse_nnz()
---------------

.. doxygenfunction:: rocsparse_snnz
  :outline:
.. doxygenfunction:: rocsparse_dnnz
  :outline:
.. doxygenfunction:: rocsparse_cnnz
  :outline:
.. doxygenfunction:: rocsparse_znnz


rocsparse_dense2csr()
---------------------

.. doxygenfunction:: rocsparse_sdense2csr
  :outline:
.. doxygenfunction:: rocsparse_ddense2csr
  :outline:
.. doxygenfunction:: rocsparse_cdense2csr
  :outline:
.. doxygenfunction:: rocsparse_zdense2csr


rocsparse_dense2csc()
---------------------

.. doxygenfunction:: rocsparse_sdense2csc
  :outline:
.. doxygenfunction:: rocsparse_ddense2csc
  :outline:
.. doxygenfunction:: rocsparse_cdense2csc
  :outline:
.. doxygenfunction:: rocsparse_zdense2csc


rocsparse_dense2coo()
---------------------

.. doxygenfunction:: rocsparse_sdense2coo
  :outline:
.. doxygenfunction:: rocsparse_ddense2coo
  :outline:
.. doxygenfunction:: rocsparse_cdense2coo
  :outline:
.. doxygenfunction:: rocsparse_zdense2coo


rocsparse_csr2dense()
---------------------

.. doxygenfunction:: rocsparse_scsr2dense
  :outline:
.. doxygenfunction:: rocsparse_dcsr2dense
  :outline:
.. doxygenfunction:: rocsparse_ccsr2dense
  :outline:
.. doxygenfunction:: rocsparse_zcsr2dense


rocsparse_csc2dense()
---------------------

.. doxygenfunction:: rocsparse_scsc2dense
  :outline:
.. doxygenfunction:: rocsparse_dcsc2dense
  :outline:
.. doxygenfunction:: rocsparse_ccsc2dense
  :outline:
.. doxygenfunction:: rocsparse_zcsc2dense

rocsparse_coo2dense()
---------------------

.. doxygenfunction:: rocsparse_scoo2dense
  :outline:
.. doxygenfunction:: rocsparse_dcoo2dense
  :outline:
.. doxygenfunction:: rocsparse_ccoo2dense
  :outline:
.. doxygenfunction:: rocsparse_zcoo2dense

rocsparse_prune_dense2csr_buffer_size()
---------------------------------------

.. doxygenfunction:: rocsparse_sprune_dense2csr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dprune_dense2csr_buffer_size

rocsparse_prune_dense2csr_nnz()
-------------------------------

.. doxygenfunction:: rocsparse_sprune_dense2csr_nnz
  :outline:
.. doxygenfunction:: rocsparse_dprune_dense2csr_nnz

rocsparse_prune_dense2csr()
---------------------------

.. doxygenfunction:: rocsparse_sprune_dense2csr
  :outline:
.. doxygenfunction:: rocsparse_dprune_dense2csr

rocsparse_prune_csr2csr_buffer_size()
-------------------------------------

.. doxygenfunction:: rocsparse_sprune_csr2csr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dprune_csr2csr_buffer_size

rocsparse_prune_csr2csr_nnz()
-----------------------------

.. doxygenfunction:: rocsparse_sprune_csr2csr_nnz
  :outline:
.. doxygenfunction:: rocsparse_dprune_csr2csr_nnz

rocsparse_prune_csr2csr()
-------------------------

.. doxygenfunction:: rocsparse_sprune_csr2csr
  :outline:
.. doxygenfunction:: rocsparse_dprune_csr2csr

rocsparse_prune_dense2csr_by_percentage_buffer_size()
-----------------------------------------------------

.. doxygenfunction:: rocsparse_sprune_dense2csr_by_percentage_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dprune_dense2csr_by_percentage_buffer_size

rocsparse_prune_dense2csr_nnz_by_percentage()
---------------------------------------------

.. doxygenfunction:: rocsparse_sprune_dense2csr_nnz_by_percentage
  :outline:
.. doxygenfunction:: rocsparse_dprune_dense2csr_nnz_by_percentage

rocsparse_prune_dense2csr_by_percentage()
-----------------------------------------

.. doxygenfunction:: rocsparse_sprune_dense2csr_by_percentage
  :outline:
.. doxygenfunction:: rocsparse_dprune_dense2csr_by_percentage

rocsparse_prune_csr2csr_by_percentage_buffer_size()
---------------------------------------------------

.. doxygenfunction:: rocsparse_sprune_csr2csr_by_percentage_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dprune_csr2csr_by_percentage_buffer_size

rocsparse_prune_csr2csr_nnz_by_percentage()
-------------------------------------------

.. doxygenfunction:: rocsparse_sprune_csr2csr_nnz_by_percentage
  :outline:
.. doxygenfunction:: rocsparse_dprune_csr2csr_nnz_by_percentage

rocsparse_prune_csr2csr_by_percentage()
---------------------------------------

.. doxygenfunction:: rocsparse_sprune_csr2csr_by_percentage
  :outline:
.. doxygenfunction:: rocsparse_dprune_csr2csr_by_percentage


.. _rocsparse_reordering_functions_:

Reordering Functions
========================

This module holds all sparse reordering routines.

The sparse reordering routines describe algorithm for reordering sparse matrices.

rocsparse_csrcolor()
--------------------

.. doxygenfunction:: rocsparse_scsrcolor
  :outline:
.. doxygenfunction:: rocsparse_dcsrcolor
  :outline:
.. doxygenfunction:: rocsparse_ccsrcolor
  :outline:
.. doxygenfunction:: rocsparse_zcsrcolor

Utility Functions
=================

This module holds all sparse utility routines.

The sparse utility routines allow for testing whether matrix data is valid for different matrix formats

rocsparse_check_matrix_csr_buffer_size()
----------------------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_csr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_csr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_csr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_csr_buffer_size

rocsparse_check_matrix_csr()
----------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_csr
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_csr
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_csr
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_csr

rocsparse_check_matrix_csc_buffer_size()
----------------------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_csc_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_csc_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_csc_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_csc_buffer_size

rocsparse_check_matrix_csc()
----------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_csc
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_csc
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_csc
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_csc

rocsparse_check_matrix_coo_buffer_size()
----------------------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_coo_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_coo_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_coo_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_coo_buffer_size

rocsparse_check_matrix_coo()
----------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_coo
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_coo
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_coo
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_coo

rocsparse_check_matrix_gebsr_buffer_size()
------------------------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_gebsr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_gebsr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_gebsr_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_gebsr_buffer_size

rocsparse_check_matrix_gebsr()
------------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_gebsr
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_gebsr
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_gebsr
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_gebsr

rocsparse_check_matrix_gebsc_buffer_size()
------------------------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_gebsc_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_gebsc_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_gebsc_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_gebsc_buffer_size

rocsparse_check_matrix_gebsc()
------------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_gebsc
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_gebsc
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_gebsc
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_gebsc

rocsparse_check_matrix_ell_buffer_size()
----------------------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_ell_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_ell_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_ell_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_ell_buffer_size

rocsparse_check_matrix_ell()
----------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_ell
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_ell
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_ell
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_ell

rocsparse_check_matrix_hyb_buffer_size()
----------------------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_hyb_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_hyb_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_hyb_buffer_size
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_hyb_buffer_size

rocsparse_check_matrix_hyb()
----------------------------

.. doxygenfunction:: rocsparse_scheck_matrix_hyb
  :outline:
.. doxygenfunction:: rocsparse_dcheck_matrix_hyb
  :outline:
.. doxygenfunction:: rocsparse_ccheck_matrix_hyb
  :outline:
.. doxygenfunction:: rocsparse_zcheck_matrix_hyb

Sparse Generic Functions
========================

This module holds all sparse generic routines.

The sparse generic routines describe operations that manipulate sparse matrices.

rocsparse_axpby()
-----------------

.. doxygenfunction:: rocsparse_axpby

rocsparse_gather()
------------------

.. doxygenfunction:: rocsparse_gather

rocsparse_scatter()
-------------------

.. doxygenfunction:: rocsparse_scatter

rocsparse_rot()
---------------

.. doxygenfunction:: rocsparse_rot

rocsparse_spvv()
----------------

.. doxygenfunction:: rocsparse_spvv

rocsparse_spmv()
----------------

.. doxygenfunction:: rocsparse_spmv

rocsparse_spsv()
----------------

.. doxygenfunction:: rocsparse_spsv

rocsparse_spsm()
----------------

.. doxygenfunction:: rocsparse_spsm

rocsparse_spmm()
----------------

.. doxygenfunction:: rocsparse_spmm

rocsparse_spgemm()
------------------

.. doxygenfunction:: rocsparse_spgemm

rocsparse_sddmm()
-----------------

.. doxygenfunction:: rocsparse_sddmm