hanzo-rocm 0.5.2

Rust bindings for AMD ROCm libraries
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
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
/* automatically generated by rust-bindgen 0.71.1 */

#[doc = " \\brief Struct to represent a complex number with float precision real and imaginary parts."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rocsparse_float_complex {
    #[doc = "< real part."]
    pub x: f32,
    #[doc = "< imaginary part."]
    pub y: f32,
}
#[doc = " \\brief Struct to represent a complex number with double precision real and imaginary parts."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rocsparse_double_complex {
    #[doc = "< real part."]
    pub x: f64,
    #[doc = "< imaginary part."]
    pub y: f64,
}
#[doc = " \\brief Struct to represent a 16-bit brain floating-point number."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rocsparse_bfloat16 {
    #[doc = "< brain float storage."]
    pub data: u16,
}
pub type rocsparse_int = i32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ihipStream_t {
    _unused: [u8; 0],
}
#[doc = " \\cond DO_NOT_DOCUMENT"]
pub type hipStream_t = *mut ihipStream_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_handle {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n  \\brief Handle to the rocSPARSE library context queue.\n\n  \\details\n  The rocSPARSE handle is a structure holding the rocSPARSE library context. It must\n  be initialized using rocsparse_create_handle(), and the returned handle must be\n  passed to all subsequent library function calls. It should be destroyed at the end\n  using rocsparse_destroy_handle()."]
pub type rocsparse_handle = *mut _rocsparse_handle;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_error {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n  \\brief Descriptor of the error.\n\n  \\details\n  The rocSPARSE error descriptor is a structure holding the information related to an error\n  that occurred during the execution of a rocSPARSE routine.\n  It should be destroyed using rocsparse_destroy_error()."]
pub type rocsparse_error = *mut _rocsparse_error;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_mat_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n  \\brief Descriptor of the matrix.\n\n  \\details\n  The rocSPARSE matrix descriptor is a structure holding all properties of a matrix.\n  It must be initialized using rocsparse_create_mat_descr(), and the returned\n  descriptor must be passed to all subsequent library calls that involve the matrix.\n  It should be destroyed at the end using rocsparse_destroy_mat_descr()."]
pub type rocsparse_mat_descr = *mut _rocsparse_mat_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_hyb_mat {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n  \\brief HYB matrix storage format.\n\n  \\details\n  The rocSPARSE HYB matrix structure holds the HYB matrix. It must be initialized using\n  rocsparse_create_hyb_mat(), and the returned HYB matrix must be passed to all\n  subsequent library calls that involve the matrix. It should be destroyed at the end\n  using rocsparse_destroy_hyb_mat()."]
pub type rocsparse_hyb_mat = *mut _rocsparse_hyb_mat;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_mat_info {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n  \\brief Info structure to hold all matrix meta data.\n\n  \\details\n  The rocSPARSE matrix info is a structure holding all matrix information that is\n  gathered during analysis routines. It must be initialized using\n  rocsparse_create_mat_info(), and the returned info structure must be passed to all\n  subsequent library calls that require additional matrix information. It should be\n  destroyed at the end using rocsparse_destroy_mat_info()."]
pub type rocsparse_mat_info = *mut _rocsparse_mat_info;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_spvec_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n  \\brief Generic API descriptor of the sparse vector.\n\n  \\details\n  The rocSPARSE sparse vector descriptor is a structure holding all properties of a sparse vector.\n  It must be initialized using rocsparse_create_spvec_descr(), and the returned\n  descriptor must be passed to all subsequent generic API library calls that involve the sparse vector.\n  It should be destroyed at the end using rocsparse_destroy_spvec_descr()."]
pub type rocsparse_spvec_descr = *mut _rocsparse_spvec_descr;
#[doc = " \\ingroup types_module\n  \\brief Generic API descriptor of the sparse vector.\n\n  \\details\n  The rocSPARSE constant sparse vector descriptor is a structure holding all properties of a sparse vector.\n  It must be initialized using \\ref rocsparse_create_const_spvec_descr(), and the returned\n  descriptor must be passed to all subsequent generic API library calls that involve the sparse vector.\n  It should be destroyed at the end using rocsparse_destroy_spvec_descr()."]
pub type rocsparse_const_spvec_descr = *const _rocsparse_spvec_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_spmat_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n  \\brief Generic API descriptor of the sparse matrix.\n\n  \\details\n  The rocSPARSE sparse matrix descriptor is a structure holding all properties of a sparse matrix.\n  It must be initialized using rocsparse_create_coo_descr(), rocsparse_create_coo_aos_descr(),\n  rocsparse_create_bsr_descr(), rocsparse_create_csr_descr(), rocsparse_create_csc_descr(),\n  rocsparse_create_ell_descr(), or rocsparse_create_bell_descr(), and the returned\n  descriptor must be passed to all subsequent generic API library calls that involve the sparse matrix.\n  It should be destroyed at the end using rocsparse_destroy_spmat_descr()."]
pub type rocsparse_spmat_descr = *mut _rocsparse_spmat_descr;
#[doc = " \\ingroup types_module\n  \\brief Generic API descriptor of the sparse matrix.\n\n  \\details\n  The rocSPARSE constant sparse matrix descriptor is a structure holding all properties of a sparse matrix.\n  It must be initialized using rocsparse_create_const_coo_descr(),\n  rocsparse_create_const_csr_descr(), rocsparse_create_const_csc_descr(),\n  rocsparse_create_const_bsr_descr(), or rocsparse_create_const_bell_descr(), and the returned\n  descriptor must be passed to all subsequent generic API library calls that involve the sparse matrix.\n  It should be destroyed at the end using rocsparse_destroy_spmat_descr()."]
pub type rocsparse_const_spmat_descr = *const _rocsparse_spmat_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_dnvec_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n  \\brief Generic API descriptor of the dense vector.\n\n  \\details\n  The rocSPARSE dense vector descriptor is a structure holding all properties of a dense vector.\n  It must be initialized using rocsparse_create_dnvec_descr(), and the returned\n  descriptor must be passed to all subsequent generic API library calls that involve the dense vector.\n  It should be destroyed at the end using rocsparse_destroy_dnvec_descr()."]
pub type rocsparse_dnvec_descr = *mut _rocsparse_dnvec_descr;
#[doc = " \\ingroup types_module\n  \\brief Generic API descriptor of the dense vector.\n\n  \\details\n  The rocSPARSE constant dense vector descriptor is a structure holding all properties of a dense vector.\n  It must be initialized using rocsparse_create_const_dnvec_descr(), and the returned\n  descriptor must be passed to all subsequent generic API library calls that involve the dense vector.\n  It should be destroyed at the end using rocsparse_destroy_dnvec_descr()."]
pub type rocsparse_const_dnvec_descr = *const _rocsparse_dnvec_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_dnmat_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n  \\brief Generic API descriptor of the dense matrix.\n\n  \\details\n  The rocSPARSE dense matrix descriptor is a structure holding all properties of a dense matrix.\n  It must be initialized using rocsparse_create_dnmat_descr(), and the returned\n  descriptor must be passed to all subsequent generic API library calls that involve the dense matrix.\n  It should be destroyed at the end using rocsparse_destroy_dnmat_descr()."]
pub type rocsparse_dnmat_descr = *mut _rocsparse_dnmat_descr;
#[doc = " \\ingroup types_module\n  \\brief Generic API descriptor of the dense matrix.\n\n  \\details\n  The rocSPARSE constant dense matrix descriptor is a structure holding all properties of a dense matrix.\n  It must be initialized using rocsparse_create_const_dnmat_descr(), and the returned\n  descriptor must be passed to all subsequent generic API library calls that involve the dense matrix.\n  It should be destroyed at the end using rocsparse_destroy_dnmat_descr()."]
pub type rocsparse_const_dnmat_descr = *const _rocsparse_dnmat_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_color_info {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n  \\brief Coloring info structure to hold data gathered during analysis and later used in\n  rocSPARSE sparse matrix coloring routines.\n\n  \\details\n  The rocSPARSE color info is a structure holding coloring data that is\n  gathered during analysis routines. It must be initialized using\n  rocsparse_create_color_info(), and the returned info structure must be passed to all\n  subsequent library calls that require coloring information. It should be\n  destroyed at the end using rocsparse_destroy_color_info()."]
pub type rocsparse_color_info = *mut _rocsparse_color_info;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_sparse_to_sparse_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n \\brief \\p rocsparse_sparse_to_sparse_descr is a structure holding the rocSPARSE sparse_to_sparse\n descriptor data. It must be initialized using\n the rocsparse_create_sparse_to_sparse_descr() routine. It should be destroyed at the\n end using rocsparse_destroy_sparse_to_sparse_descr()."]
pub type rocsparse_sparse_to_sparse_descr = *mut _rocsparse_sparse_to_sparse_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_extract_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n \\brief \\p rocsparse_extract_descr is a structure holding the rocSPARSE extract\n descriptor data. It must be initialized using\n the rocsparse_create_extract_descr() routine. It should be destroyed at the\n end using rocsparse_destroy_extract_descr()."]
pub type rocsparse_extract_descr = *mut _rocsparse_extract_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_spgeam_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n \\brief \\p rocsparse_spgeam_descr is a structure holding the rocSPARSE spgeam\n descriptor data. It must be initialized using\n the rocsparse_create_spgeam_descr() routine. It should be destroyed at the\n end using rocsparse_destroy_spgeam_descr()."]
pub type rocsparse_spgeam_descr = *mut _rocsparse_spgeam_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_spmv_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n \\brief \\p rocsparse_spmv_descr is a structure holding the rocSPARSE spmv\n descriptor data. It must be initialized using\n the rocsparse_create_spmv_descr() routine. It should be destroyed at the\n end using rocsparse_destroy_spmv_descr()."]
pub type rocsparse_spmv_descr = *mut _rocsparse_spmv_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_sptrsv_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n \\brief \\p rocsparse_sptrsv_descr is a structure holding the rocSPARSE sptrsv\n descriptor data. It must be initialized using\n the rocsparse_create_sptrsv_descr() or rocsparse_sptrsv_descr_create() routine. It should be destroyed at the\n end using rocsparse_destroy_sptrsv_descr() or rocsparse_sptrsv_descr_destroy()."]
pub type rocsparse_sptrsv_descr = *mut _rocsparse_sptrsv_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_sptrsm_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n \\brief \\p rocsparse_sptrsm_descr is a structure holding the rocSPARSE sptrsm\n descriptor data. It must be initialized using\n the rocsparse_create_sptrsm_descr() routine. It should be destroyed at the\n end using rocsparse_destroy_sptrsm_descr()."]
pub type rocsparse_sptrsm_descr = *mut _rocsparse_sptrsm_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_spic0_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n \\brief \\p rocsparse_spic0_descr is a structure holding the rocSPARSE spic0\n descriptor data. It must be initialized using\n the rocsparse_spic0_descr_create() routine. It should be destroyed at the\n end using rocsparse_spic0_descr_destroy()."]
pub type rocsparse_spic0_descr = *mut _rocsparse_spic0_descr;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _rocsparse_spilu0_descr {
    _unused: [u8; 0],
}
#[doc = " \\ingroup types_module\n \\brief \\p rocsparse_spilu0_descr is a structure holding the rocSPARSE spilu0\n descriptor data. It must be initialized using\n the rocsparse_spilu0_descr_create() routine. It should be destroyed at the\n end using rocsparse_spilu0_descr_destroy()."]
pub type rocsparse_spilu0_descr = *mut _rocsparse_spilu0_descr;
#[doc = "< Operate with matrix."]
pub const rocsparse_operation__rocsparse_operation_none: rocsparse_operation_ = 111;
#[doc = "< Operate with transpose."]
pub const rocsparse_operation__rocsparse_operation_transpose: rocsparse_operation_ = 112;
#[doc = "< Operate with conj. transpose."]
pub const rocsparse_operation__rocsparse_operation_conjugate_transpose: rocsparse_operation_ = 113;
#[doc = " \\ingroup types_module\n  \\brief Specify whether the matrix is to be transposed or not.\n\n  \\details\n  The \\ref rocsparse_operation indicates the operation performed with the given matrix."]
pub type rocsparse_operation_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief Specify whether the matrix is to be transposed or not.\n\n  \\details\n  The \\ref rocsparse_operation indicates the operation performed with the given matrix."]
pub use self::rocsparse_operation_ as rocsparse_operation;
#[doc = "< Zero-based indexing."]
pub const rocsparse_index_base__rocsparse_index_base_zero: rocsparse_index_base_ = 0;
#[doc = "< One-based indexing."]
pub const rocsparse_index_base__rocsparse_index_base_one: rocsparse_index_base_ = 1;
#[doc = " \\ingroup types_module\n  \\brief Specify the matrix index base.\n\n  \\details\n  The \\ref rocsparse_index_base indicates the index base of the indices. For a\n  given \\ref rocsparse_mat_descr, the \\ref rocsparse_index_base can be set using\n  rocsparse_set_mat_index_base(). The current \\ref rocsparse_index_base of a matrix\n  can be obtained by rocsparse_get_mat_index_base()."]
pub type rocsparse_index_base_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief Specify the matrix index base.\n\n  \\details\n  The \\ref rocsparse_index_base indicates the index base of the indices. For a\n  given \\ref rocsparse_mat_descr, the \\ref rocsparse_index_base can be set using\n  rocsparse_set_mat_index_base(). The current \\ref rocsparse_index_base of a matrix\n  can be obtained by rocsparse_get_mat_index_base()."]
pub use self::rocsparse_index_base_ as rocsparse_index_base;
#[doc = "< General matrix type."]
pub const rocsparse_matrix_type__rocsparse_matrix_type_general: rocsparse_matrix_type_ = 0;
#[doc = "< Symmetric matrix type."]
pub const rocsparse_matrix_type__rocsparse_matrix_type_symmetric: rocsparse_matrix_type_ = 1;
#[doc = "< Hermitian matrix type."]
pub const rocsparse_matrix_type__rocsparse_matrix_type_hermitian: rocsparse_matrix_type_ = 2;
#[doc = "< Triangular matrix type."]
pub const rocsparse_matrix_type__rocsparse_matrix_type_triangular: rocsparse_matrix_type_ = 3;
#[doc = " \\ingroup types_module\n  \\brief Specify the matrix type.\n\n  \\details\n  The \\ref rocsparse_matrix_type indicates the type of a matrix. For a given\n  \\ref rocsparse_mat_descr, the \\ref rocsparse_matrix_type can be set using\n  rocsparse_set_mat_type(). The current \\ref rocsparse_matrix_type of a matrix can be\n  obtained by rocsparse_get_mat_type().\n\n  For the matrix types \\ref rocsparse_matrix_type_symmetric, \\ref rocsparse_matrix_type_hermitian,\n  and \\ref rocsparse_matrix_type_triangular, only the upper or lower part of the matrix\n  (specified by setting the \\ref rocsparse_fill_mode) is assumed to be stored. The purpose of this\n  is to minimize the amount of memory required to store the matrix.\n\n  Routines that accept \\ref rocsparse_matrix_type_symmetric or \\ref rocsparse_matrix_type_hermitian\n  will only read from the stored upper or lower part of the matrix but will perform the computation\n  as if the full symmetric/Hermitian matrix existed. For example, when computing \\f$y=A*x\\f$, where\n  A is symmetric and only the lower part is stored, internally the multiplication will be performed\n  in two steps. First, the computation \\f$y=(L+D)*x\\f$ will be performed. Secondly, the multiplication\n  will be completed by performing \\f$y=L^T*x + y\\f$. This second step involves a transposed\n  multiplication, which is slower. For this reason, where space allows, it is faster to store the\n  entire symmetric matrix and use \\ref rocsparse_matrix_type_general instead of\n  \\ref rocsparse_matrix_type_symmetric."]
pub type rocsparse_matrix_type_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief Specify the matrix type.\n\n  \\details\n  The \\ref rocsparse_matrix_type indicates the type of a matrix. For a given\n  \\ref rocsparse_mat_descr, the \\ref rocsparse_matrix_type can be set using\n  rocsparse_set_mat_type(). The current \\ref rocsparse_matrix_type of a matrix can be\n  obtained by rocsparse_get_mat_type().\n\n  For the matrix types \\ref rocsparse_matrix_type_symmetric, \\ref rocsparse_matrix_type_hermitian,\n  and \\ref rocsparse_matrix_type_triangular, only the upper or lower part of the matrix\n  (specified by setting the \\ref rocsparse_fill_mode) is assumed to be stored. The purpose of this\n  is to minimize the amount of memory required to store the matrix.\n\n  Routines that accept \\ref rocsparse_matrix_type_symmetric or \\ref rocsparse_matrix_type_hermitian\n  will only read from the stored upper or lower part of the matrix but will perform the computation\n  as if the full symmetric/Hermitian matrix existed. For example, when computing \\f$y=A*x\\f$, where\n  A is symmetric and only the lower part is stored, internally the multiplication will be performed\n  in two steps. First, the computation \\f$y=(L+D)*x\\f$ will be performed. Secondly, the multiplication\n  will be completed by performing \\f$y=L^T*x + y\\f$. This second step involves a transposed\n  multiplication, which is slower. For this reason, where space allows, it is faster to store the\n  entire symmetric matrix and use \\ref rocsparse_matrix_type_general instead of\n  \\ref rocsparse_matrix_type_symmetric."]
pub use self::rocsparse_matrix_type_ as rocsparse_matrix_type;
#[doc = "< Diagonal entries are non-unity."]
pub const rocsparse_diag_type__rocsparse_diag_type_non_unit: rocsparse_diag_type_ = 0;
#[doc = "< Diagonal entries are unity."]
pub const rocsparse_diag_type__rocsparse_diag_type_unit: rocsparse_diag_type_ = 1;
#[doc = " \\ingroup types_module\n  \\brief Indicates if the diagonal entries are unity.\n\n  \\details\n  The \\ref rocsparse_diag_type indicates whether the diagonal entries of a matrix are\n  unity or not. If \\ref rocsparse_diag_type_unit is specified, all present diagonal\n  values will be ignored. For a given \\ref rocsparse_mat_descr, the\n  \\ref rocsparse_diag_type can be set using rocsparse_set_mat_diag_type(). The current\n  \\ref rocsparse_diag_type of a matrix can be obtained by\n  rocsparse_get_mat_diag_type()."]
pub type rocsparse_diag_type_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief Indicates if the diagonal entries are unity.\n\n  \\details\n  The \\ref rocsparse_diag_type indicates whether the diagonal entries of a matrix are\n  unity or not. If \\ref rocsparse_diag_type_unit is specified, all present diagonal\n  values will be ignored. For a given \\ref rocsparse_mat_descr, the\n  \\ref rocsparse_diag_type can be set using rocsparse_set_mat_diag_type(). The current\n  \\ref rocsparse_diag_type of a matrix can be obtained by\n  rocsparse_get_mat_diag_type()."]
pub use self::rocsparse_diag_type_ as rocsparse_diag_type;
#[doc = "< Lower triangular part is stored."]
pub const rocsparse_fill_mode__rocsparse_fill_mode_lower: rocsparse_fill_mode_ = 0;
#[doc = "< Upper triangular part is stored."]
pub const rocsparse_fill_mode__rocsparse_fill_mode_upper: rocsparse_fill_mode_ = 1;
#[doc = " \\ingroup types_module\n  \\brief Specify the matrix fill mode.\n\n  \\details\n  The \\ref rocsparse_fill_mode indicates whether the lower or the upper part is stored\n  in a sparse triangular matrix. For a given \\ref rocsparse_mat_descr, the\n  \\ref rocsparse_fill_mode can be set using rocsparse_set_mat_fill_mode(). The current\n  \\ref rocsparse_fill_mode of a matrix can be obtained by\n  rocsparse_get_mat_fill_mode()."]
pub type rocsparse_fill_mode_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief Specify the matrix fill mode.\n\n  \\details\n  The \\ref rocsparse_fill_mode indicates whether the lower or the upper part is stored\n  in a sparse triangular matrix. For a given \\ref rocsparse_mat_descr, the\n  \\ref rocsparse_fill_mode can be set using rocsparse_set_mat_fill_mode(). The current\n  \\ref rocsparse_fill_mode of a matrix can be obtained by\n  rocsparse_get_mat_fill_mode()."]
pub use self::rocsparse_fill_mode_ as rocsparse_fill_mode;
#[doc = "< Matrix is sorted."]
pub const rocsparse_storage_mode__rocsparse_storage_mode_sorted: rocsparse_storage_mode_ = 0;
#[doc = "< Matrix is unsorted."]
pub const rocsparse_storage_mode__rocsparse_storage_mode_unsorted: rocsparse_storage_mode_ = 1;
#[doc = " \\ingroup types_module\n  \\brief Specify whether the matrix is stored sorted or not.\n\n  \\details\n  The \\ref rocsparse_storage_mode indicates whether the matrix is stored as sorted or not.\n  For a given \\ref rocsparse_mat_descr, the \\ref rocsparse_storage_mode can be set\n  using rocsparse_set_mat_storage_mode(). The current \\ref rocsparse_storage_mode of a\n  matrix can be obtained by rocsparse_get_mat_storage_mode()."]
pub type rocsparse_storage_mode_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief Specify whether the matrix is stored sorted or not.\n\n  \\details\n  The \\ref rocsparse_storage_mode indicates whether the matrix is stored as sorted or not.\n  For a given \\ref rocsparse_mat_descr, the \\ref rocsparse_storage_mode can be set\n  using rocsparse_set_mat_storage_mode(). The current \\ref rocsparse_storage_mode of a\n  matrix can be obtained by rocsparse_get_mat_storage_mode()."]
pub use self::rocsparse_storage_mode_ as rocsparse_storage_mode;
#[doc = "< Operate only on indices."]
pub const rocsparse_action__rocsparse_action_symbolic: rocsparse_action_ = 0;
#[doc = "< Operate on data and indices."]
pub const rocsparse_action__rocsparse_action_numeric: rocsparse_action_ = 1;
#[doc = " \\ingroup types_module\n  \\brief Specify where the operation is performed on.\n\n  \\details\n  The \\ref rocsparse_action indicates whether the operation is performed on the full\n  matrix or only on the sparsity pattern of the matrix."]
pub type rocsparse_action_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief Specify where the operation is performed on.\n\n  \\details\n  The \\ref rocsparse_action indicates whether the operation is performed on the full\n  matrix or only on the sparsity pattern of the matrix."]
pub use self::rocsparse_action_ as rocsparse_action;
#[doc = "< Parse the matrix by rows."]
pub const rocsparse_direction__rocsparse_direction_row: rocsparse_direction_ = 0;
#[doc = "< Parse the matrix by columns."]
pub const rocsparse_direction__rocsparse_direction_column: rocsparse_direction_ = 1;
#[doc = " \\ingroup types_module\n  \\brief Specify the matrix direction.\n\n  \\details\n  The \\ref rocsparse_direction indicates whether a dense matrix should be parsed by\n  rows or by columns, assuming column-major storage."]
pub type rocsparse_direction_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief Specify the matrix direction.\n\n  \\details\n  The \\ref rocsparse_direction indicates whether a dense matrix should be parsed by\n  rows or by columns, assuming column-major storage."]
pub use self::rocsparse_direction_ as rocsparse_direction;
#[doc = "< Automatically decide on ELL nnz per row."]
pub const rocsparse_hyb_partition__rocsparse_hyb_partition_auto: rocsparse_hyb_partition_ = 0;
#[doc = "< User-provided ELL nnz per row."]
pub const rocsparse_hyb_partition__rocsparse_hyb_partition_user: rocsparse_hyb_partition_ = 1;
#[doc = "< Max ELL nnz per row, no COO part."]
pub const rocsparse_hyb_partition__rocsparse_hyb_partition_max: rocsparse_hyb_partition_ = 2;
#[doc = " \\ingroup types_module\n  \\brief HYB matrix partitioning type.\n\n  \\details\n  The \\ref rocsparse_hyb_partition type indicates how the hybrid format partitioning\n  between COO and ELL storage formats is performed."]
pub type rocsparse_hyb_partition_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief HYB matrix partitioning type.\n\n  \\details\n  The \\ref rocsparse_hyb_partition type indicates how the hybrid format partitioning\n  between COO and ELL storage formats is performed."]
pub use self::rocsparse_hyb_partition_ as rocsparse_hyb_partition;
#[doc = "< Try to reuse meta data."]
pub const rocsparse_analysis_policy__rocsparse_analysis_policy_reuse: rocsparse_analysis_policy_ =
    0;
#[doc = "< Force to rebuild meta data."]
pub const rocsparse_analysis_policy__rocsparse_analysis_policy_force: rocsparse_analysis_policy_ =
    1;
#[doc = " \\ingroup types_module\n  \\brief Specify policy in analysis functions.\n\n  \\details\n  The \\ref rocsparse_analysis_policy specifies whether gathered analysis data should be\n  reused or not. If meta data from, for example, a previous \\ref rocsparse_scsrilu0_analysis\n  \"rocsparse_Xcsrilu0_analysis()\" call is available, it can be reused for subsequent calls to, for example,\n  \\ref rocsparse_scsrsv_analysis \"rocsparse_Xcsrsv_analysis()\" and greatly improve performance\n  of the analysis function."]
pub type rocsparse_analysis_policy_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief Specify policy in analysis functions.\n\n  \\details\n  The \\ref rocsparse_analysis_policy specifies whether gathered analysis data should be\n  reused or not. If meta data from, for example, a previous \\ref rocsparse_scsrilu0_analysis\n  \"rocsparse_Xcsrilu0_analysis()\" call is available, it can be reused for subsequent calls to, for example,\n  \\ref rocsparse_scsrsv_analysis \"rocsparse_Xcsrsv_analysis()\" and greatly improve performance\n  of the analysis function."]
pub use self::rocsparse_analysis_policy_ as rocsparse_analysis_policy;
#[doc = "< Automatically decide on level information."]
pub const rocsparse_solve_policy__rocsparse_solve_policy_auto: rocsparse_solve_policy_ = 0;
#[doc = " \\ingroup types_module\n  \\brief Specify policy in triangular solvers and factorizations.\n\n  \\details\n  This is a placeholder."]
pub type rocsparse_solve_policy_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief Specify policy in triangular solvers and factorizations.\n\n  \\details\n  This is a placeholder."]
pub use self::rocsparse_solve_policy_ as rocsparse_solve_policy;
#[doc = "< Scalar pointers are in host memory."]
pub const rocsparse_pointer_mode__rocsparse_pointer_mode_host: rocsparse_pointer_mode_ = 0;
#[doc = "< Scalar pointers are in device memory."]
pub const rocsparse_pointer_mode__rocsparse_pointer_mode_device: rocsparse_pointer_mode_ = 1;
#[doc = " \\ingroup types_module\n  \\brief Indicates if the pointer is a device pointer or host pointer.\n\n  \\details\n  The \\ref rocsparse_pointer_mode indicates whether scalar values are passed by\n  reference on the host or device. The \\ref rocsparse_pointer_mode can be changed by\n  rocsparse_set_pointer_mode(). The current pointer mode in use can be obtained by\n  rocsparse_get_pointer_mode()."]
pub type rocsparse_pointer_mode_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief Indicates if the pointer is a device pointer or host pointer.\n\n  \\details\n  The \\ref rocsparse_pointer_mode indicates whether scalar values are passed by\n  reference on the host or device. The \\ref rocsparse_pointer_mode can be changed by\n  rocsparse_set_pointer_mode(). The current pointer mode in use can be obtained by\n  rocsparse_get_pointer_mode()."]
pub use self::rocsparse_pointer_mode_ as rocsparse_pointer_mode;
#[doc = "< Layer is not active."]
pub const rocsparse_layer_mode_rocsparse_layer_mode_none: rocsparse_layer_mode = 0;
#[doc = "< Layer is in logging mode."]
pub const rocsparse_layer_mode_rocsparse_layer_mode_log_trace: rocsparse_layer_mode = 1;
#[doc = "< Layer is in benchmarking mode (deprecated)."]
pub const rocsparse_layer_mode_rocsparse_layer_mode_log_bench: rocsparse_layer_mode = 2;
#[doc = "< Layer is in debug mode."]
pub const rocsparse_layer_mode_rocsparse_layer_mode_log_debug: rocsparse_layer_mode = 4;
#[doc = " \\ingroup types_module\n  \\brief Indicates if the layer is active through the use of a bitmask.\n\n  \\details\n  The \\ref rocsparse_layer_mode bit mask indicates the logging characteristics."]
pub type rocsparse_layer_mode = ::std::os::raw::c_uint;
#[doc = "< success."]
pub const rocsparse_status__rocsparse_status_success: rocsparse_status_ = 0;
#[doc = "< handle not initialized, invalid, or null."]
pub const rocsparse_status__rocsparse_status_invalid_handle: rocsparse_status_ = 1;
#[doc = "< function is not implemented."]
pub const rocsparse_status__rocsparse_status_not_implemented: rocsparse_status_ = 2;
#[doc = "< invalid pointer parameter."]
pub const rocsparse_status__rocsparse_status_invalid_pointer: rocsparse_status_ = 3;
#[doc = "< invalid size parameter."]
pub const rocsparse_status__rocsparse_status_invalid_size: rocsparse_status_ = 4;
#[doc = "< failed memory allocation, copy or dealloc."]
pub const rocsparse_status__rocsparse_status_memory_error: rocsparse_status_ = 5;
#[doc = "< other internal library failure."]
pub const rocsparse_status__rocsparse_status_internal_error: rocsparse_status_ = 6;
#[doc = "< invalid value parameter."]
pub const rocsparse_status__rocsparse_status_invalid_value: rocsparse_status_ = 7;
#[doc = "< device arch is not supported."]
pub const rocsparse_status__rocsparse_status_arch_mismatch: rocsparse_status_ = 8;
#[doc = "< encountered zero pivot."]
pub const rocsparse_status__rocsparse_status_zero_pivot: rocsparse_status_ = 9;
#[doc = "< descriptor has not been initialized."]
pub const rocsparse_status__rocsparse_status_not_initialized: rocsparse_status_ = 10;
#[doc = "< index types do not match."]
pub const rocsparse_status__rocsparse_status_type_mismatch: rocsparse_status_ = 11;
#[doc = "< sorted storage required."]
pub const rocsparse_status__rocsparse_status_requires_sorted_storage: rocsparse_status_ = 12;
#[doc = "< exception being thrown."]
pub const rocsparse_status__rocsparse_status_thrown_exception: rocsparse_status_ = 13;
#[doc = "< Nothing preventing the function to proceed"]
pub const rocsparse_status__rocsparse_status_continue: rocsparse_status_ = 14;
#[doc = " \\ingroup types_module\n  \\brief List of rocSPARSE status codes definition.\n\n  \\details\n  This is a list of the \\ref rocsparse_status types that are used by the rocSPARSE\n  library."]
pub type rocsparse_status_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of rocSPARSE status codes definition.\n\n  \\details\n  This is a list of the \\ref rocsparse_status types that are used by the rocSPARSE\n  library."]
pub use self::rocsparse_status_ as rocsparse_status;
#[doc = "< Success."]
pub const rocsparse_data_status__rocsparse_data_status_success: rocsparse_data_status_ = 0;
#[doc = "< An inf value detected."]
pub const rocsparse_data_status__rocsparse_data_status_inf: rocsparse_data_status_ = 1;
#[doc = "< A nan value detected."]
pub const rocsparse_data_status__rocsparse_data_status_nan: rocsparse_data_status_ = 2;
#[doc = "< An invalid row pointer offset detected."]
pub const rocsparse_data_status__rocsparse_data_status_invalid_offset_ptr: rocsparse_data_status_ =
    3;
#[doc = "< An invalid row index detected."]
pub const rocsparse_data_status__rocsparse_data_status_invalid_index: rocsparse_data_status_ = 4;
#[doc = "< Duplicate indices detected."]
pub const rocsparse_data_status__rocsparse_data_status_duplicate_entry: rocsparse_data_status_ = 5;
#[doc = "< Incorrect sorting detected."]
pub const rocsparse_data_status__rocsparse_data_status_invalid_sorting: rocsparse_data_status_ = 6;
#[doc = "< Incorrect fill mode detected."]
pub const rocsparse_data_status__rocsparse_data_status_invalid_fill: rocsparse_data_status_ = 7;
#[doc = " \\ingroup types_module\n  \\brief List of rocSPARSE data status code definitions.\n\n  \\details\n  This is a list of the \\ref rocsparse_data_status types that are used by the rocSPARSE\n  library in the matrix check routines."]
pub type rocsparse_data_status_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of rocSPARSE data status code definitions.\n\n  \\details\n  This is a list of the \\ref rocsparse_data_status types that are used by the rocSPARSE\n  library in the matrix check routines."]
pub use self::rocsparse_data_status_ as rocsparse_data_status;
#[doc = "< 16-bit unsigned integer."]
pub const rocsparse_indextype__rocsparse_indextype_u16: rocsparse_indextype_ = 1;
#[doc = "< 32-bit signed integer."]
pub const rocsparse_indextype__rocsparse_indextype_i32: rocsparse_indextype_ = 2;
#[doc = "< 64-bit signed integer."]
pub const rocsparse_indextype__rocsparse_indextype_i64: rocsparse_indextype_ = 3;
#[doc = " \\ingroup types_module\n  \\brief List of rocSPARSE index types.\n\n  \\details\n  Indicates the index width of a rocSPARSE index type."]
pub type rocsparse_indextype_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of rocSPARSE index types.\n\n  \\details\n  Indicates the index width of a rocSPARSE index type."]
pub use self::rocsparse_indextype_ as rocsparse_indextype;
#[doc = "< 16-bit floating point, real."]
pub const rocsparse_datatype__rocsparse_datatype_f16_r: rocsparse_datatype_ = 150;
#[doc = "< 32-bit floating point, real."]
pub const rocsparse_datatype__rocsparse_datatype_f32_r: rocsparse_datatype_ = 151;
#[doc = "< 64-bit floating point, real."]
pub const rocsparse_datatype__rocsparse_datatype_f64_r: rocsparse_datatype_ = 152;
#[doc = "< 32-bit floating point, complex."]
pub const rocsparse_datatype__rocsparse_datatype_f32_c: rocsparse_datatype_ = 154;
#[doc = "< 64-bit floating point, complex."]
pub const rocsparse_datatype__rocsparse_datatype_f64_c: rocsparse_datatype_ = 155;
#[doc = "<  8-bit signed integer, real"]
pub const rocsparse_datatype__rocsparse_datatype_i8_r: rocsparse_datatype_ = 160;
#[doc = "<  8-bit unsigned integer, real"]
pub const rocsparse_datatype__rocsparse_datatype_u8_r: rocsparse_datatype_ = 161;
#[doc = "< 32-bit signed integer, real"]
pub const rocsparse_datatype__rocsparse_datatype_i32_r: rocsparse_datatype_ = 162;
#[doc = "< 32-bit unsigned integer, real"]
pub const rocsparse_datatype__rocsparse_datatype_u32_r: rocsparse_datatype_ = 163;
#[doc = "< 16-bit brain floating point, real"]
pub const rocsparse_datatype__rocsparse_datatype_bf16_r: rocsparse_datatype_ = 168;
#[doc = " \\ingroup types_module\n  \\brief List of rocSPARSE data types.\n\n  \\details\n  Indicates the precision width of data stored in a rocSPARSE type."]
pub type rocsparse_datatype_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of rocSPARSE data types.\n\n  \\details\n  Indicates the precision width of data stored in a rocSPARSE type."]
pub use self::rocsparse_datatype_ as rocsparse_datatype;
#[doc = "< COO sparse matrix format."]
pub const rocsparse_format__rocsparse_format_coo: rocsparse_format_ = 0;
#[doc = "< COO AoS sparse matrix format."]
pub const rocsparse_format__rocsparse_format_coo_aos: rocsparse_format_ = 1;
#[doc = "< CSR sparse matrix format."]
pub const rocsparse_format__rocsparse_format_csr: rocsparse_format_ = 2;
#[doc = "< CSC sparse matrix format."]
pub const rocsparse_format__rocsparse_format_csc: rocsparse_format_ = 3;
#[doc = "< ELL sparse matrix format."]
pub const rocsparse_format__rocsparse_format_ell: rocsparse_format_ = 4;
#[doc = "< Blocked ELL sparse matrix format."]
pub const rocsparse_format__rocsparse_format_bell: rocsparse_format_ = 5;
#[doc = "< BSR sparse matrix format."]
pub const rocsparse_format__rocsparse_format_bsr: rocsparse_format_ = 6;
#[doc = "< Sliced ELL sparse matrix format."]
pub const rocsparse_format__rocsparse_format_sell: rocsparse_format_ = 7;
#[doc = " \\ingroup types_module\n  \\brief List of sparse matrix formats.\n\n  \\details\n  This is a list of supported \\ref rocsparse_format types that are used to describe a\n  sparse matrix."]
pub type rocsparse_format_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of sparse matrix formats.\n\n  \\details\n  This is a list of supported \\ref rocsparse_format types that are used to describe a\n  sparse matrix."]
pub use self::rocsparse_format_ as rocsparse_format;
#[doc = "< Row major."]
pub const rocsparse_order__rocsparse_order_row: rocsparse_order_ = 0;
#[doc = "< Column major."]
pub const rocsparse_order__rocsparse_order_column: rocsparse_order_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of dense matrix ordering.\n\n  \\details\n  This is a list of supported \\ref rocsparse_order types that are used to describe the\n  memory layout of a dense matrix."]
pub type rocsparse_order_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of dense matrix ordering.\n\n  \\details\n  This is a list of supported \\ref rocsparse_order types that are used to describe the\n  memory layout of a dense matrix."]
pub use self::rocsparse_order_ as rocsparse_order;
#[doc = "< Fill mode attribute."]
pub const rocsparse_spmat_attribute__rocsparse_spmat_fill_mode: rocsparse_spmat_attribute_ = 0;
#[doc = "< Diag type attribute."]
pub const rocsparse_spmat_attribute__rocsparse_spmat_diag_type: rocsparse_spmat_attribute_ = 1;
#[doc = "< Matrix type attribute."]
pub const rocsparse_spmat_attribute__rocsparse_spmat_matrix_type: rocsparse_spmat_attribute_ = 2;
#[doc = "< Matrix storage attribute."]
pub const rocsparse_spmat_attribute__rocsparse_spmat_storage_mode: rocsparse_spmat_attribute_ = 3;
#[doc = " \\ingroup types_module\n  \\brief List of sparse matrix attributes."]
pub type rocsparse_spmat_attribute_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of sparse matrix attributes."]
pub use self::rocsparse_spmat_attribute_ as rocsparse_spmat_attribute;
pub const rocsparse_sparse_to_sparse_alg__rocsparse_sparse_to_sparse_alg_default:
    rocsparse_sparse_to_sparse_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of sparse-to-sparse algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_sparse_to_sparse_alg types that are used to perform\n  sparse-to-sparse conversion."]
pub type rocsparse_sparse_to_sparse_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of sparse-to-sparse algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_sparse_to_sparse_alg types that are used to perform\n  sparse-to-sparse conversion."]
pub use self::rocsparse_sparse_to_sparse_alg_ as rocsparse_sparse_to_sparse_alg;
#[doc = "< Data analysis."]
pub const rocsparse_sparse_to_sparse_stage__rocsparse_sparse_to_sparse_stage_analysis:
    rocsparse_sparse_to_sparse_stage_ = 0;
#[doc = "< Performs the actual conversion."]
pub const rocsparse_sparse_to_sparse_stage__rocsparse_sparse_to_sparse_stage_compute:
    rocsparse_sparse_to_sparse_stage_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of sparse-to-sparse stages.\n\n  \\details\n  This is a list of possible stages during sparse-to-sparse conversion. The typical order is\n  \\ref rocsparse_sparse_to_sparse_stage_analysis, then \\ref rocsparse_sparse_to_sparse_stage_compute."]
pub type rocsparse_sparse_to_sparse_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of sparse-to-sparse stages.\n\n  \\details\n  This is a list of possible stages during sparse-to-sparse conversion. The typical order is\n  \\ref rocsparse_sparse_to_sparse_stage_analysis, then \\ref rocsparse_sparse_to_sparse_stage_compute."]
pub use self::rocsparse_sparse_to_sparse_stage_ as rocsparse_sparse_to_sparse_stage;
#[doc = "< Default extract algorithm for the given format."]
pub const rocsparse_extract_alg__rocsparse_extract_alg_default: rocsparse_extract_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of extract algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_extract_alg types that are used to perform\n  the submatrix extraction."]
pub type rocsparse_extract_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of extract algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_extract_alg types that are used to perform\n  the submatrix extraction."]
pub use self::rocsparse_extract_alg_ as rocsparse_extract_alg;
#[doc = "< Data analysis."]
pub const rocsparse_extract_stage__rocsparse_extract_stage_analysis: rocsparse_extract_stage_ = 0;
#[doc = "< Performs the actual extraction."]
pub const rocsparse_extract_stage__rocsparse_extract_stage_compute: rocsparse_extract_stage_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of extract stages.\n\n  \\details\n  The analysis \\ref rocsparse_extract_stage_analysis must be done before the first call of the calculation function \\ref rocsparse_extract_stage_compute."]
pub type rocsparse_extract_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of extract stages.\n\n  \\details\n  The analysis \\ref rocsparse_extract_stage_analysis must be done before the first call of the calculation function \\ref rocsparse_extract_stage_compute."]
pub use self::rocsparse_extract_stage_ as rocsparse_extract_stage;
#[doc = "< Asynchronous ITILU0 algorithm with in-place storage."]
pub const rocsparse_itilu0_alg__rocsparse_itilu0_alg_default: rocsparse_itilu0_alg_ = 0;
pub const rocsparse_itilu0_alg__rocsparse_itilu0_alg_async_inplace: rocsparse_itilu0_alg_ = 1;
pub const rocsparse_itilu0_alg__rocsparse_itilu0_alg_async_split: rocsparse_itilu0_alg_ = 2;
pub const rocsparse_itilu0_alg__rocsparse_itilu0_alg_sync_split: rocsparse_itilu0_alg_ = 3;
pub const rocsparse_itilu0_alg__rocsparse_itilu0_alg_sync_split_fusion: rocsparse_itilu0_alg_ = 4;
#[doc = " \\ingroup types_module\n  \\brief List of Iterative ILU0 algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_itilu0_alg types that are used to perform\n  the iterative ILU0 algorithm."]
pub type rocsparse_itilu0_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of Iterative ILU0 algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_itilu0_alg types that are used to perform\n  the iterative ILU0 algorithm."]
pub use self::rocsparse_itilu0_alg_ as rocsparse_itilu0_alg;
#[doc = "< Compute a stopping criteria."]
pub const rocsparse_itilu0_option__rocsparse_itilu0_option_verbose: rocsparse_itilu0_option_ = 1;
#[doc = "< Compute a stopping criteria."]
pub const rocsparse_itilu0_option__rocsparse_itilu0_option_stopping_criteria:
    rocsparse_itilu0_option_ = 2;
#[doc = "< Compute correction."]
pub const rocsparse_itilu0_option__rocsparse_itilu0_option_compute_nrm_correction:
    rocsparse_itilu0_option_ = 4;
#[doc = "< Compute residual."]
pub const rocsparse_itilu0_option__rocsparse_itilu0_option_compute_nrm_residual:
    rocsparse_itilu0_option_ = 8;
#[doc = "< Log convergence history."]
pub const rocsparse_itilu0_option__rocsparse_itilu0_option_convergence_history:
    rocsparse_itilu0_option_ = 16;
#[doc = "< Use internal coordinate format."]
pub const rocsparse_itilu0_option__rocsparse_itilu0_option_coo_format: rocsparse_itilu0_option_ =
    32;
#[doc = " \\ingroup types_module\n  \\brief List of iterative ILU0 options.\n\n  \\details\n  This is a list of supported \\ref rocsparse_itilu0_option options that are used to perform\n  the iterative ILU0 algorithm."]
pub type rocsparse_itilu0_option_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of iterative ILU0 options.\n\n  \\details\n  This is a list of supported \\ref rocsparse_itilu0_option options that are used to perform\n  the iterative ILU0 algorithm."]
pub use self::rocsparse_itilu0_option_ as rocsparse_itilu0_option;
pub const rocsparse_gtsv_interleaved_alg__rocsparse_gtsv_interleaved_alg_default:
    rocsparse_gtsv_interleaved_alg_ = 0;
pub const rocsparse_gtsv_interleaved_alg__rocsparse_gtsv_interleaved_alg_thomas:
    rocsparse_gtsv_interleaved_alg_ = 1;
pub const rocsparse_gtsv_interleaved_alg__rocsparse_gtsv_interleaved_alg_lu:
    rocsparse_gtsv_interleaved_alg_ = 2;
pub const rocsparse_gtsv_interleaved_alg__rocsparse_gtsv_interleaved_alg_qr:
    rocsparse_gtsv_interleaved_alg_ = 3;
#[doc = " \\ingroup types_module\n  \\brief List of interleaved gtsv algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_gtsv_interleaved_alg types that are used to perform\n  interleaved tridiagonal solve."]
pub type rocsparse_gtsv_interleaved_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of interleaved gtsv algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_gtsv_interleaved_alg types that are used to perform\n  interleaved tridiagonal solve."]
pub use self::rocsparse_gtsv_interleaved_alg_ as rocsparse_gtsv_interleaved_alg;
#[doc = "< Returns the required buffer size."]
pub const rocsparse_check_spmat_stage__rocsparse_check_spmat_stage_buffer_size:
    rocsparse_check_spmat_stage_ = 0;
#[doc = "< Performs check."]
pub const rocsparse_check_spmat_stage__rocsparse_check_spmat_stage_compute:
    rocsparse_check_spmat_stage_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of check matrix stages.\n\n  \\details\n  This is a list of possible stages during check matrix computation. The typical order is\n  \\ref rocsparse_check_spmat_stage_buffer_size, then \\ref rocsparse_check_spmat_stage_compute."]
pub type rocsparse_check_spmat_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of check matrix stages.\n\n  \\details\n  This is a list of possible stages during check matrix computation. The typical order is\n  \\ref rocsparse_check_spmat_stage_buffer_size, then \\ref rocsparse_check_spmat_stage_compute."]
pub use self::rocsparse_check_spmat_stage_ as rocsparse_check_spmat_stage;
#[doc = "< Select algorithm for input on a SpMV descriptor."]
pub const rocsparse_spmv_input__rocsparse_spmv_input_alg: rocsparse_spmv_input_ = 0;
#[doc = "< Select matrix transpose operation for input on a SpMV descriptor."]
pub const rocsparse_spmv_input__rocsparse_spmv_input_operation: rocsparse_spmv_input_ = 1;
#[doc = "< Select scalar datatype for input on a SpMV descriptor."]
pub const rocsparse_spmv_input__rocsparse_spmv_input_scalar_datatype: rocsparse_spmv_input_ = 2;
#[doc = "< Select compute datatype for input on a SpMV descriptor."]
pub const rocsparse_spmv_input__rocsparse_spmv_input_compute_datatype: rocsparse_spmv_input_ = 3;
#[doc = "< Configure usage of starting block IDs for non-zero split."]
pub const rocsparse_spmv_input__rocsparse_spmv_input_nnz_use_starting_block_ids:
    rocsparse_spmv_input_ = 4;
#[doc = "< Enable/disable extra vectors computation for SpMV descriptor."]
pub const rocsparse_spmv_input__rocsparse_spmv_input_enable_extra: rocsparse_spmv_input_ = 5;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpMV descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpMV descriptor."]
pub type rocsparse_spmv_input_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpMV descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpMV descriptor."]
pub use self::rocsparse_spmv_input_ as rocsparse_spmv_input;
#[doc = "< Analysis of the data."]
pub const rocsparse_v2_spmv_stage__rocsparse_v2_spmv_stage_analysis: rocsparse_v2_spmv_stage_ = 0;
#[doc = "< Performs the actual SpMV computation."]
pub const rocsparse_v2_spmv_stage__rocsparse_v2_spmv_stage_compute: rocsparse_v2_spmv_stage_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of SpMV-Version2 stages.\n\n  \\details\n  This is a list of possible stages during SpMV-Version2 computation."]
pub type rocsparse_v2_spmv_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpMV-Version2 stages.\n\n  \\details\n  This is a list of possible stages during SpMV-Version2 computation."]
pub use self::rocsparse_v2_spmv_stage_ as rocsparse_v2_spmv_stage;
#[doc = "< Returns the required buffer size."]
pub const rocsparse_spmv_stage__rocsparse_spmv_stage_buffer_size: rocsparse_spmv_stage_ = 1;
#[doc = "< Preprocess data."]
pub const rocsparse_spmv_stage__rocsparse_spmv_stage_preprocess: rocsparse_spmv_stage_ = 2;
#[doc = "< Performs the actual SpMV computation."]
pub const rocsparse_spmv_stage__rocsparse_spmv_stage_compute: rocsparse_spmv_stage_ = 3;
#[doc = " \\ingroup types_module\n  \\brief List of SpMV stages.\n\n  \\details\n  This is a list of possible stages during SpMV computation. The typical order is\n  \\ref rocsparse_spmv_stage_buffer_size, \\ref rocsparse_spmv_stage_preprocess, and \\ref rocsparse_spmv_stage_compute."]
pub type rocsparse_spmv_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpMV stages.\n\n  \\details\n  This is a list of possible stages during SpMV computation. The typical order is\n  \\ref rocsparse_spmv_stage_buffer_size, \\ref rocsparse_spmv_stage_preprocess, and \\ref rocsparse_spmv_stage_compute."]
pub use self::rocsparse_spmv_stage_ as rocsparse_spmv_stage;
#[doc = "< Default SpMV algorithm for the given format."]
pub const rocsparse_spmv_alg__rocsparse_spmv_alg_default: rocsparse_spmv_alg_ = 0;
#[doc = "< COO SpMV algorithm 1 (segmented) for COO matrices."]
pub const rocsparse_spmv_alg__rocsparse_spmv_alg_coo: rocsparse_spmv_alg_ = 1;
#[doc = "< CSR SpMV algorithm 1 (adaptive) for CSR matrices."]
pub const rocsparse_spmv_alg__rocsparse_spmv_alg_csr_adaptive: rocsparse_spmv_alg_ = 2;
#[doc = "< CSR SpMV algorithm 2 (rowsplit) for CSR matrices."]
pub const rocsparse_spmv_alg__rocsparse_spmv_alg_csr_rowsplit: rocsparse_spmv_alg_ = 3;
#[doc = "< ELL SpMV algorithm for ELL matrices."]
pub const rocsparse_spmv_alg__rocsparse_spmv_alg_ell: rocsparse_spmv_alg_ = 4;
#[doc = "< COO SpMV algorithm 2 (atomic) for COO matrices."]
pub const rocsparse_spmv_alg__rocsparse_spmv_alg_coo_atomic: rocsparse_spmv_alg_ = 5;
#[doc = "< BSR SpMV algorithm 1 for BSR matrices."]
pub const rocsparse_spmv_alg__rocsparse_spmv_alg_bsr: rocsparse_spmv_alg_ = 6;
#[doc = "< CSR SpMV algorithm 3 (LRB) for CSR matrices."]
pub const rocsparse_spmv_alg__rocsparse_spmv_alg_csr_lrb: rocsparse_spmv_alg_ = 7;
#[doc = "< CSR SpMV algorithm 4 (nnzsplit) for CSR matrices."]
pub const rocsparse_spmv_alg__rocsparse_spmv_alg_csr_nnzsplit: rocsparse_spmv_alg_ = 8;
#[doc = "< SLICED ELL SpMV algorithm for SLICED ELL matrices."]
pub const rocsparse_spmv_alg__rocsparse_spmv_alg_sell: rocsparse_spmv_alg_ = 9;
pub const rocsparse_spmv_alg__rocsparse_spmv_alg_csr_stream: rocsparse_spmv_alg_ = 3;
#[doc = " \\ingroup types_module\n  \\brief List of SpMV algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spmv_alg types that are used to perform\n  matrix vector product."]
pub type rocsparse_spmv_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpMV algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spmv_alg types that are used to perform\n  matrix vector product."]
pub use self::rocsparse_spmv_alg_ as rocsparse_spmv_alg;
#[doc = "< Default SpSV algorithm for the given format."]
pub const rocsparse_spsv_alg__rocsparse_spsv_alg_default: rocsparse_spsv_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of SpSV algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spsv_alg types that are used to perform\n  triangular solve."]
pub type rocsparse_spsv_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpSV algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spsv_alg types that are used to perform\n  triangular solve."]
pub use self::rocsparse_spsv_alg_ as rocsparse_spsv_alg;
#[doc = "< Returns the required buffer size."]
pub const rocsparse_spsv_stage__rocsparse_spsv_stage_buffer_size: rocsparse_spsv_stage_ = 1;
#[doc = "< Preprocess data."]
pub const rocsparse_spsv_stage__rocsparse_spsv_stage_preprocess: rocsparse_spsv_stage_ = 2;
#[doc = "< Performs the actual SpSV computation."]
pub const rocsparse_spsv_stage__rocsparse_spsv_stage_compute: rocsparse_spsv_stage_ = 3;
#[doc = " \\ingroup types_module\n  \\brief List of SpSV stages.\n\n  \\details\n  This is a list of possible stages during SpSV computation. The typical order is\n  \\ref rocsparse_spsv_stage_buffer_size, \\ref rocsparse_spsv_stage_preprocess, and \\ref rocsparse_spsv_stage_compute."]
pub type rocsparse_spsv_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpSV stages.\n\n  \\details\n  This is a list of possible stages during SpSV computation. The typical order is\n  \\ref rocsparse_spsv_stage_buffer_size, \\ref rocsparse_spsv_stage_preprocess, and \\ref rocsparse_spsv_stage_compute."]
pub use self::rocsparse_spsv_stage_ as rocsparse_spsv_stage;
#[doc = "< Default SpITSV algorithm for the given format."]
pub const rocsparse_spitsv_alg__rocsparse_spitsv_alg_default: rocsparse_spitsv_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of SpITSV algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spitsv_alg types that are used to perform\n  triangular solve."]
pub type rocsparse_spitsv_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpITSV algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spitsv_alg types that are used to perform\n  triangular solve."]
pub use self::rocsparse_spitsv_alg_ as rocsparse_spitsv_alg;
#[doc = "< Returns the required buffer size."]
pub const rocsparse_spitsv_stage__rocsparse_spitsv_stage_buffer_size: rocsparse_spitsv_stage_ = 1;
#[doc = "< Preprocess data."]
pub const rocsparse_spitsv_stage__rocsparse_spitsv_stage_preprocess: rocsparse_spitsv_stage_ = 2;
#[doc = "< Performs the actual SpITSV computation."]
pub const rocsparse_spitsv_stage__rocsparse_spitsv_stage_compute: rocsparse_spitsv_stage_ = 3;
#[doc = " \\ingroup types_module\n  \\brief List of SpITSV stages.\n\n  \\details\n  This is a list of possible stages during SpITSV computation. The typical order is\n  \\ref rocsparse_spitsv_stage_buffer_size, \\ref rocsparse_spitsv_stage_preprocess, and \\ref rocsparse_spitsv_stage_compute."]
pub type rocsparse_spitsv_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpITSV stages.\n\n  \\details\n  This is a list of possible stages during SpITSV computation. The typical order is\n  \\ref rocsparse_spitsv_stage_buffer_size, \\ref rocsparse_spitsv_stage_preprocess, and \\ref rocsparse_spitsv_stage_compute."]
pub use self::rocsparse_spitsv_stage_ as rocsparse_spitsv_stage;
#[doc = "< Default SpSM algorithm for the given format."]
pub const rocsparse_spsm_alg__rocsparse_spsm_alg_default: rocsparse_spsm_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of SpSM algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spsm_alg types that are used to perform\n  triangular solve."]
pub type rocsparse_spsm_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpSM algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spsm_alg types that are used to perform\n  triangular solve."]
pub use self::rocsparse_spsm_alg_ as rocsparse_spsm_alg;
#[doc = "< Returns the required buffer size."]
pub const rocsparse_spsm_stage__rocsparse_spsm_stage_buffer_size: rocsparse_spsm_stage_ = 1;
#[doc = "< Preprocess data."]
pub const rocsparse_spsm_stage__rocsparse_spsm_stage_preprocess: rocsparse_spsm_stage_ = 2;
#[doc = "< Performs the actual SpSM computation."]
pub const rocsparse_spsm_stage__rocsparse_spsm_stage_compute: rocsparse_spsm_stage_ = 3;
#[doc = " \\ingroup types_module\n  \\brief List of SpSM stages.\n\n  \\details\n  This is a list of possible stages during SpSM computation. The typical order is\n  \\ref rocsparse_spsm_stage_buffer_size, \\ref rocsparse_spsm_stage_preprocess, and \\ref rocsparse_spsm_stage_compute."]
pub type rocsparse_spsm_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpSM stages.\n\n  \\details\n  This is a list of possible stages during SpSM computation. The typical order is\n  \\ref rocsparse_spsm_stage_buffer_size, \\ref rocsparse_spsm_stage_preprocess, and \\ref rocsparse_spsm_stage_compute."]
pub use self::rocsparse_spsm_stage_ as rocsparse_spsm_stage;
#[doc = "< Default SpMM algorithm for the given format."]
pub const rocsparse_spmm_alg__rocsparse_spmm_alg_default: rocsparse_spmm_alg_ = 0;
#[doc = "< SpMM algorithm for the CSR format using row split and shared memory."]
pub const rocsparse_spmm_alg__rocsparse_spmm_alg_csr: rocsparse_spmm_alg_ = 1;
#[doc = "< SpMM algorithm for the COO format using segmented scan."]
pub const rocsparse_spmm_alg__rocsparse_spmm_alg_coo_segmented: rocsparse_spmm_alg_ = 2;
#[doc = "< SpMM algorithm for the COO format using atomics."]
pub const rocsparse_spmm_alg__rocsparse_spmm_alg_coo_atomic: rocsparse_spmm_alg_ = 3;
#[doc = "< SpMM algorithm for the CSR format using row split and shfl."]
pub const rocsparse_spmm_alg__rocsparse_spmm_alg_csr_row_split: rocsparse_spmm_alg_ = 4;
#[doc = "< SpMM algorithm for CSR format using the nnz split algorithm. This is the same as \\p rocsparse_spmm_alg_csr_nnz_split."]
pub const rocsparse_spmm_alg__rocsparse_spmm_alg_csr_merge: rocsparse_spmm_alg_ = 5;
#[doc = "< SpMM algorithm for the COO format using segmented scan and atomics."]
pub const rocsparse_spmm_alg__rocsparse_spmm_alg_coo_segmented_atomic: rocsparse_spmm_alg_ = 6;
#[doc = "< SpMM algorithm for the Blocked ELL format."]
pub const rocsparse_spmm_alg__rocsparse_spmm_alg_bell: rocsparse_spmm_alg_ = 7;
#[doc = "< SpMM algorithm for the BSR format."]
pub const rocsparse_spmm_alg__rocsparse_spmm_alg_bsr: rocsparse_spmm_alg_ = 8;
#[doc = "< SpMM algorithm for the CSR format using the merge path algorithm."]
pub const rocsparse_spmm_alg__rocsparse_spmm_alg_csr_merge_path: rocsparse_spmm_alg_ = 9;
pub const rocsparse_spmm_alg__rocsparse_spmm_alg_csr_nnz_split: rocsparse_spmm_alg_ = 5;
#[doc = " \\ingroup types_module\n  \\brief List of SpMM algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spmm_alg types that are used to perform\n  matrix vector product."]
pub type rocsparse_spmm_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpMM algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spmm_alg types that are used to perform\n  matrix vector product."]
pub use self::rocsparse_spmm_alg_ as rocsparse_spmm_alg;
#[doc = "< Default sddmm algorithm for the given format."]
pub const rocsparse_sddmm_alg__rocsparse_sddmm_alg_default: rocsparse_sddmm_alg_ = 0;
#[doc = "< Sddmm algorithm using dense blas operations."]
pub const rocsparse_sddmm_alg__rocsparse_sddmm_alg_dense: rocsparse_sddmm_alg_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of sddmm algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_sddmm_alg types that are used to perform\n  matrix vector product."]
pub type rocsparse_sddmm_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of sddmm algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_sddmm_alg types that are used to perform\n  matrix vector product."]
pub use self::rocsparse_sddmm_alg_ as rocsparse_sddmm_alg;
pub const rocsparse_sparse_to_dense_alg__rocsparse_sparse_to_dense_alg_default:
    rocsparse_sparse_to_dense_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of sparse-to-dense algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_sparse_to_dense_alg types that are used to perform\n  sparse-to-dense conversion."]
pub type rocsparse_sparse_to_dense_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of sparse-to-dense algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_sparse_to_dense_alg types that are used to perform\n  sparse-to-dense conversion."]
pub use self::rocsparse_sparse_to_dense_alg_ as rocsparse_sparse_to_dense_alg;
pub const rocsparse_dense_to_sparse_alg__rocsparse_dense_to_sparse_alg_default:
    rocsparse_dense_to_sparse_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of dense-to-sparse algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_dense_to_sparse_alg types that are used to perform\n  dense-to-sparse conversion."]
pub type rocsparse_dense_to_sparse_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of dense-to-sparse algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_dense_to_sparse_alg types that are used to perform\n  dense-to-sparse conversion."]
pub use self::rocsparse_dense_to_sparse_alg_ as rocsparse_dense_to_sparse_alg;
#[doc = "< Returns the required buffer size."]
pub const rocsparse_spmm_stage__rocsparse_spmm_stage_buffer_size: rocsparse_spmm_stage_ = 1;
#[doc = "< Preprocess data."]
pub const rocsparse_spmm_stage__rocsparse_spmm_stage_preprocess: rocsparse_spmm_stage_ = 2;
#[doc = "< Performs the actual SpMM computation."]
pub const rocsparse_spmm_stage__rocsparse_spmm_stage_compute: rocsparse_spmm_stage_ = 3;
#[doc = " \\ingroup types_module\n  \\brief List of SpMM stages.\n\n  \\details\n  This is a list of possible stages during SpMM computation. The typical order is\n  \\ref rocsparse_spmm_stage_buffer_size, \\ref rocsparse_spmm_stage_preprocess, and \\ref rocsparse_spmm_stage_compute."]
pub type rocsparse_spmm_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpMM stages.\n\n  \\details\n  This is a list of possible stages during SpMM computation. The typical order is\n  \\ref rocsparse_spmm_stage_buffer_size, \\ref rocsparse_spmm_stage_preprocess, and \\ref rocsparse_spmm_stage_compute."]
pub use self::rocsparse_spmm_stage_ as rocsparse_spmm_stage;
#[doc = "< Returns the required buffer size."]
pub const rocsparse_spgemm_stage__rocsparse_spgemm_stage_buffer_size: rocsparse_spgemm_stage_ = 1;
#[doc = "< Computes the number of non-zero entries."]
pub const rocsparse_spgemm_stage__rocsparse_spgemm_stage_nnz: rocsparse_spgemm_stage_ = 2;
#[doc = "< Performs the actual SpGEMM computation."]
pub const rocsparse_spgemm_stage__rocsparse_spgemm_stage_compute: rocsparse_spgemm_stage_ = 3;
#[doc = "< Performs the actual SpGEMM symbolic computation."]
pub const rocsparse_spgemm_stage__rocsparse_spgemm_stage_symbolic: rocsparse_spgemm_stage_ = 4;
#[doc = "< Performs the actual SpGEMM numeric computation."]
pub const rocsparse_spgemm_stage__rocsparse_spgemm_stage_numeric: rocsparse_spgemm_stage_ = 5;
#[doc = " \\ingroup types_module\n  \\brief List of SpGEMM stages.\n\n  \\details\n  This is a list of possible stages during SpGEMM computation. The typical order is\n  \\ref rocsparse_spgemm_stage_buffer_size, \\ref rocsparse_spgemm_stage_nnz, and \\ref rocsparse_spgemm_stage_compute."]
pub type rocsparse_spgemm_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpGEMM stages.\n\n  \\details\n  This is a list of possible stages during SpGEMM computation. The typical order is\n  \\ref rocsparse_spgemm_stage_buffer_size, \\ref rocsparse_spgemm_stage_nnz, and \\ref rocsparse_spgemm_stage_compute."]
pub use self::rocsparse_spgemm_stage_ as rocsparse_spgemm_stage;
#[doc = "< Default SpGEMM algorithm for the given format."]
pub const rocsparse_spgemm_alg__rocsparse_spgemm_alg_default: rocsparse_spgemm_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of SpGEMM algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spgemm_alg types that are used to perform a\n  sparse matrix sparse matrix product."]
pub type rocsparse_spgemm_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpGEMM algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spgemm_alg types that are used to perform a\n  sparse matrix sparse matrix product."]
pub use self::rocsparse_spgemm_alg_ as rocsparse_spgemm_alg;
#[doc = "< No singularity detected."]
pub const rocsparse_singularity__rocsparse_singularity_none: rocsparse_singularity_ = 0;
#[doc = "< The sparsity pattern inherently prevents a full rank, for example, a missing diagonal element."]
pub const rocsparse_singularity__rocsparse_singularity_symbolic: rocsparse_singularity_ = 1;
#[doc = "< An exact zero was encountered during numerical calculation."]
pub const rocsparse_singularity__rocsparse_singularity_numeric_exact: rocsparse_singularity_ = 2;
#[doc = "< A near zero was encountered during numerical calculation, that is, within a given tolerance."]
pub const rocsparse_singularity__rocsparse_singularity_numeric_near: rocsparse_singularity_ = 3;
#[doc = " \\ingroup types_module\n  \\brief List of singularity types encountered in triangular solves and incomplete factorizations."]
pub type rocsparse_singularity_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of singularity types encountered in triangular solves and incomplete factorizations."]
pub use self::rocsparse_singularity_ as rocsparse_singularity;
#[doc = "< Default SpTRSV algorithm for the given format."]
pub const rocsparse_sptrsv_alg__rocsparse_sptrsv_alg_default: rocsparse_sptrsv_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of SpTRSV algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_sptrsv_alg types that are used to perform\n  triangular solve."]
pub type rocsparse_sptrsv_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpTRSV algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_sptrsv_alg types that are used to perform\n  triangular solve."]
pub use self::rocsparse_sptrsv_alg_ as rocsparse_sptrsv_alg;
#[doc = "< Analysis."]
pub const rocsparse_sptrsv_stage__rocsparse_sptrsv_stage_analysis: rocsparse_sptrsv_stage_ = 0;
#[doc = "< Performs the actual SpTRSV computation."]
pub const rocsparse_sptrsv_stage__rocsparse_sptrsv_stage_compute: rocsparse_sptrsv_stage_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of SpTRSV stages.\n\n  \\details\n  This is a list of possible stages during SpTRSV computation."]
pub type rocsparse_sptrsv_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpTRSV stages.\n\n  \\details\n  This is a list of possible stages during SpTRSV computation."]
pub use self::rocsparse_sptrsv_stage_ as rocsparse_sptrsv_stage;
#[doc = "< Select algorithm \\ref rocsparse_sptrsv_alg for input on a SpTRSV descriptor."]
pub const rocsparse_sptrsv_input__rocsparse_sptrsv_input_alg: rocsparse_sptrsv_input_ = 0;
#[doc = "< Select matrix operation \\ref rocsparse_operation for input on a SpTRSV descriptor."]
pub const rocsparse_sptrsv_input__rocsparse_sptrsv_input_operation: rocsparse_sptrsv_input_ = 1;
#[doc = "< Select scalar datatype \\ref rocsparse_datatype for input on a SpTRSV descriptor."]
pub const rocsparse_sptrsv_input__rocsparse_sptrsv_input_scalar_datatype: rocsparse_sptrsv_input_ =
    2;
#[doc = "< Select compute datatype \\ref rocsparse_datatype for input on a SpTRSV descriptor."]
pub const rocsparse_sptrsv_input__rocsparse_sptrsv_input_compute_datatype: rocsparse_sptrsv_input_ =
    3;
#[doc = "< Select scalar alpha pointer for input on a SpTRSV descriptor."]
pub const rocsparse_sptrsv_input__rocsparse_sptrsv_input_scalar_alpha: rocsparse_sptrsv_input_ = 4;
#[doc = "< Select the analysis policy \\ref rocsparse_analysis_policy for input on a SpTRSV descriptor."]
pub const rocsparse_sptrsv_input__rocsparse_sptrsv_input_analysis_policy: rocsparse_sptrsv_input_ =
    5;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpTRSV descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpTRSV descriptor."]
pub type rocsparse_sptrsv_input_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpTRSV descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpTRSV descriptor."]
pub use self::rocsparse_sptrsv_input_ as rocsparse_sptrsv_input;
#[doc = "< Get zero pivot \\p int64_t based position for output from the SpTRSV descriptor."]
pub const rocsparse_sptrsv_output__rocsparse_sptrsv_output_zero_pivot_position:
    rocsparse_sptrsv_output_ = 0;
#[doc = "< Get the type of \\ref rocsparse_singularity detected during SpTRSV calculation for output from the SpTRSV descriptor."]
pub const rocsparse_sptrsv_output__rocsparse_sptrsv_output_singularity: rocsparse_sptrsv_output_ =
    1;
#[doc = "< Get the singularity \\p int64_t based position for output from the SpTRSV descriptor."]
pub const rocsparse_sptrsv_output__rocsparse_sptrsv_output_singularity_position:
    rocsparse_sptrsv_output_ = 2;
#[doc = " \\ingroup types_module\n  \\brief List of outputs to SpTRSV descriptor.\n\n  \\details\n  This is a list of possible outputs to the SpTRSV descriptor."]
pub type rocsparse_sptrsv_output_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of outputs to SpTRSV descriptor.\n\n  \\details\n  This is a list of possible outputs to the SpTRSV descriptor."]
pub use self::rocsparse_sptrsv_output_ as rocsparse_sptrsv_output;
#[doc = "< Default SpTRSM algorithm for the given format."]
pub const rocsparse_sptrsm_alg__rocsparse_sptrsm_alg_default: rocsparse_sptrsm_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of SpTRSM algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_sptrsm_alg types that are used to perform\n  triangular solve."]
pub type rocsparse_sptrsm_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpTRSM algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_sptrsm_alg types that are used to perform\n  triangular solve."]
pub use self::rocsparse_sptrsm_alg_ as rocsparse_sptrsm_alg;
#[doc = "< Analysis."]
pub const rocsparse_sptrsm_stage__rocsparse_sptrsm_stage_analysis: rocsparse_sptrsm_stage_ = 0;
#[doc = "< Performs the actual SpTRSM computation."]
pub const rocsparse_sptrsm_stage__rocsparse_sptrsm_stage_compute: rocsparse_sptrsm_stage_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of SpTRSM stages.\n\n  \\details\n  This is a list of possible stages during SpTRSM computation."]
pub type rocsparse_sptrsm_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpTRSM stages.\n\n  \\details\n  This is a list of possible stages during SpTRSM computation."]
pub use self::rocsparse_sptrsm_stage_ as rocsparse_sptrsm_stage;
#[doc = "< Select algorithm \\ref rocsparse_sptrsm_alg for input on a SpTRSM descriptor."]
pub const rocsparse_sptrsm_input__rocsparse_sptrsm_input_alg: rocsparse_sptrsm_input_ = 0;
#[doc = "< Select matrix A operation \\ref rocsparse_operation for input on a SpTRSM descriptor."]
pub const rocsparse_sptrsm_input__rocsparse_sptrsm_input_operation_A: rocsparse_sptrsm_input_ = 1;
#[doc = "< Select matrix X operation \\ref rocsparse_operation for input on a SpTRSM descriptor."]
pub const rocsparse_sptrsm_input__rocsparse_sptrsm_input_operation_X: rocsparse_sptrsm_input_ = 2;
#[doc = "< Select compute datatype \\ref rocsparse_datatype for input on a SpTRSM descriptor."]
pub const rocsparse_sptrsm_input__rocsparse_sptrsm_input_compute_datatype: rocsparse_sptrsm_input_ =
    3;
#[doc = "< Select scalar datatype \\ref rocsparse_datatype for input on a SpTRSM descriptor."]
pub const rocsparse_sptrsm_input__rocsparse_sptrsm_input_scalar_datatype: rocsparse_sptrsm_input_ =
    4;
#[doc = "< Select scalar alpha pointer for input on a SpTRSM descriptor. This datatype is used as the compute type."]
pub const rocsparse_sptrsm_input__rocsparse_sptrsm_input_scalar_alpha: rocsparse_sptrsm_input_ = 5;
#[doc = "< Select the analysis policy \\ref rocsparse_analysis_policy for input on a SpTRSM descriptor."]
pub const rocsparse_sptrsm_input__rocsparse_sptrsm_input_analysis_policy: rocsparse_sptrsm_input_ =
    6;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpTRSM descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpTRSM descriptor."]
pub type rocsparse_sptrsm_input_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpTRSM descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpTRSM descriptor."]
pub use self::rocsparse_sptrsm_input_ as rocsparse_sptrsm_input;
#[doc = "< Get zero pivot \\p int64_t based position for output from the SpTRSM descriptor and synchronously return zero_pivot."]
pub const rocsparse_sptrsm_output__rocsparse_sptrsm_output_zero_pivot_position:
    rocsparse_sptrsm_output_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of outputs to SpTRSM descriptor.\n\n  \\details\n  This is a list of possible outputs to the SpTRSM descriptor."]
pub type rocsparse_sptrsm_output_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of outputs to SpTRSM descriptor.\n\n  \\details\n  This is a list of possible outputs to the SpTRSM descriptor."]
pub use self::rocsparse_sptrsm_output_ as rocsparse_sptrsm_output;
pub const rocsparse_spic0_alg__rocsparse_spic0_alg_default: rocsparse_spic0_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of SpIC0 algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spic0_alg types that are used to perform the incomplete Cholesky factorization\n  of level 0."]
pub type rocsparse_spic0_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpIC0 algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spic0_alg types that are used to perform the incomplete Cholesky factorization\n  of level 0."]
pub use self::rocsparse_spic0_alg_ as rocsparse_spic0_alg;
#[doc = "< Analysis."]
pub const rocsparse_spic0_stage__rocsparse_spic0_stage_analysis: rocsparse_spic0_stage_ = 0;
#[doc = "< Performs the actual SpIC0 computation."]
pub const rocsparse_spic0_stage__rocsparse_spic0_stage_compute: rocsparse_spic0_stage_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of SpIC0 stages.\n\n  \\details\n  This is a list of possible stages during SpIC0 computation."]
pub type rocsparse_spic0_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpIC0 stages.\n\n  \\details\n  This is a list of possible stages during SpIC0 computation."]
pub use self::rocsparse_spic0_stage_ as rocsparse_spic0_stage;
#[doc = "< Select algorithm \\ref rocsparse_spic0_alg for input on a SpIC0 descriptor."]
pub const rocsparse_spic0_input__rocsparse_spic0_input_alg: rocsparse_spic0_input_ = 0;
#[doc = "< Select the analysis policy \\ref rocsparse_analysis_policy for input on a SpIC0 descriptor."]
pub const rocsparse_spic0_input__rocsparse_spic0_input_analysis_policy: rocsparse_spic0_input_ = 1;
#[doc = "< Select compute datatype \\ref rocsparse_datatype for input on a SpIC0 descriptor."]
pub const rocsparse_spic0_input__rocsparse_spic0_input_compute_datatype: rocsparse_spic0_input_ = 2;
#[doc = "< Enable diagonal boosting for input on a SpIC0 descriptor."]
pub const rocsparse_spic0_input__rocsparse_spic0_input_boost_enable: rocsparse_spic0_input_ = 3;
#[doc = "< Select diagonal boosting tolerance on a SpIC0 descriptor."]
pub const rocsparse_spic0_input__rocsparse_spic0_input_boost_tolerance: rocsparse_spic0_input_ = 4;
#[doc = "< Select diagonal boosting value on a SpIC0 descriptor."]
pub const rocsparse_spic0_input__rocsparse_spic0_input_boost_value: rocsparse_spic0_input_ = 5;
#[doc = "< Select singularity tolerance for input on a SpIC0 descriptor."]
pub const rocsparse_spic0_input__rocsparse_spic0_input_singularity_tolerance:
    rocsparse_spic0_input_ = 6;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpIC0 descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpIC0 descriptor."]
pub type rocsparse_spic0_input_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpIC0 descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpIC0 descriptor."]
pub use self::rocsparse_spic0_input_ as rocsparse_spic0_input;
#[doc = "< Get the type of \\ref rocsparse_singularity detected during SpIC0 calculation for output from the SpIC0 descriptor."]
pub const rocsparse_spic0_output__rocsparse_spic0_output_singularity: rocsparse_spic0_output_ = 0;
#[doc = "< Get the singularity \\p int64_t based position for output from the SpIC0 descriptor."]
pub const rocsparse_spic0_output__rocsparse_spic0_output_singularity_position:
    rocsparse_spic0_output_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of outputs to SpIC0 descriptor.\n\n  \\details\n  This is a list of possible outputs to the SpIC0 descriptor."]
pub type rocsparse_spic0_output_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of outputs to SpIC0 descriptor.\n\n  \\details\n  This is a list of possible outputs to the SpIC0 descriptor."]
pub use self::rocsparse_spic0_output_ as rocsparse_spic0_output;
pub const rocsparse_spilu0_alg__rocsparse_spilu0_alg_default: rocsparse_spilu0_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of SpILU0 algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spilu0_alg types that are used to perform the incomplete LU factorization\n  of level 0."]
pub type rocsparse_spilu0_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpILU0 algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spilu0_alg types that are used to perform the incomplete LU factorization\n  of level 0."]
pub use self::rocsparse_spilu0_alg_ as rocsparse_spilu0_alg;
#[doc = "< Analysis."]
pub const rocsparse_spilu0_stage__rocsparse_spilu0_stage_analysis: rocsparse_spilu0_stage_ = 0;
#[doc = "< Performs the actual SpILU0 computation."]
pub const rocsparse_spilu0_stage__rocsparse_spilu0_stage_compute: rocsparse_spilu0_stage_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of SpILU0 stages.\n\n  \\details\n  This is a list of possible stages during SpILU0 computation."]
pub type rocsparse_spilu0_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpILU0 stages.\n\n  \\details\n  This is a list of possible stages during SpILU0 computation."]
pub use self::rocsparse_spilu0_stage_ as rocsparse_spilu0_stage;
#[doc = "< Select algorithm \\ref rocsparse_spilu0_alg for input on a SpILU0 descriptor."]
pub const rocsparse_spilu0_input__rocsparse_spilu0_input_alg: rocsparse_spilu0_input_ = 0;
#[doc = "< Select the analysis policy \\ref rocsparse_analysis_policy for input on a SpILU0 descriptor."]
pub const rocsparse_spilu0_input__rocsparse_spilu0_input_analysis_policy: rocsparse_spilu0_input_ =
    1;
#[doc = "< Select compute datatype \\ref rocsparse_datatype for input on a SpILU0 descriptor."]
pub const rocsparse_spilu0_input__rocsparse_spilu0_input_compute_datatype: rocsparse_spilu0_input_ =
    2;
#[doc = "< Enable diagonal boosting for input on a SpILU0 descriptor."]
pub const rocsparse_spilu0_input__rocsparse_spilu0_input_boost_enable: rocsparse_spilu0_input_ = 3;
#[doc = "< Select diagonal boosting tolerance on a SpILU0 descriptor."]
pub const rocsparse_spilu0_input__rocsparse_spilu0_input_boost_tolerance: rocsparse_spilu0_input_ =
    4;
#[doc = "< Select diagonal boosting value on a SpILU0 descriptor."]
pub const rocsparse_spilu0_input__rocsparse_spilu0_input_boost_value: rocsparse_spilu0_input_ = 5;
#[doc = "< Select singularity tolerance for input on a SpILU0 descriptor."]
pub const rocsparse_spilu0_input__rocsparse_spilu0_input_singularity_tolerance:
    rocsparse_spilu0_input_ = 6;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpILU0 descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpILU0 descriptor."]
pub type rocsparse_spilu0_input_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpILU0 descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpILU0 descriptor."]
pub use self::rocsparse_spilu0_input_ as rocsparse_spilu0_input;
#[doc = "< Get the type of \\ref rocsparse_singularity detected during SpILU0 calculation for output from the SpILU0 descriptor."]
pub const rocsparse_spilu0_output__rocsparse_spilu0_output_singularity: rocsparse_spilu0_output_ =
    0;
#[doc = "< Get the singularity \\p int64_t based position for output from the SpILU0 descriptor."]
pub const rocsparse_spilu0_output__rocsparse_spilu0_output_singularity_position:
    rocsparse_spilu0_output_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of outputs to the SpILU0 descriptor.\n\n  \\details\n  This is a list of possible outputs to the SpILU0 descriptor."]
pub type rocsparse_spilu0_output_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of outputs to the SpILU0 descriptor.\n\n  \\details\n  This is a list of possible outputs to the SpILU0 descriptor."]
pub use self::rocsparse_spilu0_output_ as rocsparse_spilu0_output;
#[doc = "< Computes number of non-zero entries."]
pub const rocsparse_spgeam_stage__rocsparse_spgeam_stage_analysis: rocsparse_spgeam_stage_ = 1;
#[doc = "< Performs the actual SpGEAM computation."]
pub const rocsparse_spgeam_stage__rocsparse_spgeam_stage_compute: rocsparse_spgeam_stage_ = 2;
pub const rocsparse_spgeam_stage__rocsparse_spgeam_stage_symbolic_analysis:
    rocsparse_spgeam_stage_ = 3;
pub const rocsparse_spgeam_stage__rocsparse_spgeam_stage_symbolic_compute: rocsparse_spgeam_stage_ =
    4;
pub const rocsparse_spgeam_stage__rocsparse_spgeam_stage_numeric_analysis: rocsparse_spgeam_stage_ =
    5;
pub const rocsparse_spgeam_stage__rocsparse_spgeam_stage_numeric_compute: rocsparse_spgeam_stage_ =
    6;
#[doc = " \\ingroup types_module\n  \\brief List of SpGEAM stages.\n\n  \\details\n  This is a list of possible stages during SpGEAM computation. The typical order is\n  \\p rocsparse_spgeam_stage_buffer_size, \\p rocsparse_spgeam_stage_analysis, and \\p rocsparse_spgeam_stage_compute."]
pub type rocsparse_spgeam_stage_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpGEAM stages.\n\n  \\details\n  This is a list of possible stages during SpGEAM computation. The typical order is\n  \\p rocsparse_spgeam_stage_buffer_size, \\p rocsparse_spgeam_stage_analysis, and \\p rocsparse_spgeam_stage_compute."]
pub use self::rocsparse_spgeam_stage_ as rocsparse_spgeam_stage;
#[doc = "< Select algorithm for input on a SpGEAM descriptor."]
pub const rocsparse_spgeam_input__rocsparse_spgeam_input_alg: rocsparse_spgeam_input_ = 0;
#[doc = "< Select scalar data type for input on a SpGEAM descriptor."]
pub const rocsparse_spgeam_input__rocsparse_spgeam_input_scalar_datatype: rocsparse_spgeam_input_ =
    1;
#[doc = "< Select compute data type for input on a SpGEAM descriptor."]
pub const rocsparse_spgeam_input__rocsparse_spgeam_input_compute_datatype: rocsparse_spgeam_input_ =
    2;
#[doc = "< Select A matrix transpose operation for input on a SpGEAM descriptor."]
pub const rocsparse_spgeam_input__rocsparse_spgeam_input_operation_A: rocsparse_spgeam_input_ = 3;
#[doc = "< Select B matrix transpose operation for input on a SpGEAM descriptor."]
pub const rocsparse_spgeam_input__rocsparse_spgeam_input_operation_B: rocsparse_spgeam_input_ = 4;
#[doc = "< Select scalar multiplier alpha for input on a SpGEAM descriptor."]
pub const rocsparse_spgeam_input__rocsparse_spgeam_input_scalar_alpha: rocsparse_spgeam_input_ = 5;
#[doc = "< Select scalar multiplier beta for input on a SpGEAM descriptor."]
pub const rocsparse_spgeam_input__rocsparse_spgeam_input_scalar_beta: rocsparse_spgeam_input_ = 6;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpGEAM descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpGEAM descriptor."]
pub type rocsparse_spgeam_input_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of inputs to the SpGEAM descriptor.\n\n  \\details\n  This is a list of possible inputs to the SpGEAM descriptor."]
pub use self::rocsparse_spgeam_input_ as rocsparse_spgeam_input;
#[doc = "< Select nnz count for output from the SpGEAM descriptor."]
pub const rocsparse_spgeam_output__rocsparse_spgeam_output_nnz: rocsparse_spgeam_output_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of outputs to SpGEAM descriptor.\n\n  \\details\n  This is a list of possible outputs to the SpGEAM descriptor."]
pub type rocsparse_spgeam_output_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of outputs to SpGEAM descriptor.\n\n  \\details\n  This is a list of possible outputs to the SpGEAM descriptor."]
pub use self::rocsparse_spgeam_output_ as rocsparse_spgeam_output;
#[doc = "< Default SpGEAM algorithm for the given format."]
pub const rocsparse_spgeam_alg__rocsparse_spgeam_alg_default: rocsparse_spgeam_alg_ = 0;
#[doc = " \\ingroup types_module\n  \\brief List of SpGEAM algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spgeam_alg types that are used to perform\n  sparse matrix sparse matrix product."]
pub type rocsparse_spgeam_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of SpGEAM algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_spgeam_alg types that are used to perform\n  sparse matrix sparse matrix product."]
pub use self::rocsparse_spgeam_alg_ as rocsparse_spgeam_alg;
#[doc = "< Default gpsv algorithm."]
pub const rocsparse_gpsv_interleaved_alg__rocsparse_gpsv_interleaved_alg_default:
    rocsparse_gpsv_interleaved_alg_ = 0;
#[doc = "< QR algorithm."]
pub const rocsparse_gpsv_interleaved_alg__rocsparse_gpsv_interleaved_alg_qr:
    rocsparse_gpsv_interleaved_alg_ = 1;
#[doc = " \\ingroup types_module\n  \\brief List of gpsv algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_gpsv_interleaved_alg types that are used to solve\n  pentadiagonal linear systems."]
pub type rocsparse_gpsv_interleaved_alg_ = ::std::os::raw::c_uint;
#[doc = " \\ingroup types_module\n  \\brief List of gpsv algorithms.\n\n  \\details\n  This is a list of supported \\ref rocsparse_gpsv_interleaved_alg types that are used to solve\n  pentadiagonal linear systems."]
pub use self::rocsparse_gpsv_interleaved_alg_ as rocsparse_gpsv_interleaved_alg;
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a rocSPARSE handle.\n\n  \\details\n  \\p rocsparse_create_handle creates the rocSPARSE library context. It must be\n  initialized before any other rocSPARSE API function is invoked and must be passed to\n  all subsequent library function calls. The handle should be destroyed at the end\n  using rocsparse_destroy_handle().\n\n  @param[out]\n  handle  the pointer to the handle to the rocSPARSE library context.\n\n  \\retval rocsparse_status_success the initialization succeeded.\n  \\retval rocsparse_status_invalid_handle \\p handle pointer is invalid.\n  \\retval rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_create_handle(handle: *mut rocsparse_handle) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a rocSPARSE handle.\n\n  \\details\n  \\p rocsparse_destroy_handle destroys the rocSPARSE library context and releases all\n  resources used by the rocSPARSE library.\n\n  @param[in]\n  handle  the handle to the rocSPARSE library context.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle \\p handle is invalid.\n  \\retval rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_destroy_handle(handle: rocsparse_handle) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a rocSPARSE error descriptor.\n\n  \\details\n  \\p rocsparse_destroy_error destroys the rocSPARSE error descriptor.\n\n  @param[in]\n  error  the pointer to the rocSPARSE error descriptor, which can be a null pointer.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_destroy_error(error: rocsparse_error) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Error message from a rocSPARSE error descriptor.\n\n  \\details\n  \\p rocsparse_error_message returns a C-style string that provides details for the error.\n\n  @param[in]\n  error  the error to the rocSPARSE error descriptor.\n\n  @return an error message from a rocSPARSE error descriptor.\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_error_get_message(error: rocsparse_error) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Return the string representation of a rocSPARSE status code enum name.\n\n  \\details\n  \\p rocsparse_get_status_name takes a rocSPARSE status as input and returns the string representation of this status.\n  If the status is not recognized, the function returns \"Unrecognized status code\".\n\n  @param[in]\n  status  a rocSPARSE status.\n\n  \\retval pointer to null-terminated string."]
    pub fn rocsparse_get_status_name(status: rocsparse_status) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Return the rocSPARSE status code description as a string.\n\n  \\details\n  \\p rocsparse_get_status_description takes a rocSPARSE status as input and returns the status description as a string.\n  If the status is not recognized, the function returns \"Unrecognized status code\"\n\n  @param[in]\n  status  a rocSPARSE status.\n\n  \\retval pointer to null-terminated string."]
    pub fn rocsparse_get_status_description(
        status: rocsparse_status,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Specify user-defined HIP stream.\n\n  \\details\n  \\p rocsparse_set_stream specifies the stream to be used by the rocSPARSE library\n  context and all subsequent function calls.\n\n  @param[inout]\n  handle  the handle to the rocSPARSE library context.\n  @param[in]\n  stream  the stream to be used by the rocSPARSE library context.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle \\p handle is invalid.\n\n  \\par Example\n  This example illustrates how a user-defined stream can be used in rocSPARSE.\n  \\code{.c}\n      // Create rocSPARSE handle\n      rocsparse_handle handle;\n      rocsparse_create_handle(&handle);\n\n      // Create stream\n      hipStream_t stream;\n      hipStreamCreate(&stream);\n\n      // Set stream to rocSPARSE handle\n      rocsparse_set_stream(handle, stream);\n\n      // Do some work\n      // ...\n\n      // Clean up\n      rocsparse_destroy_handle(handle);\n      hipStreamDestroy(stream);\n  \\endcode"]
    pub fn rocsparse_set_stream(handle: rocsparse_handle, stream: hipStream_t) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the current stream from the library context.\n\n  \\details\n  \\p rocsparse_get_stream gets the rocSPARSE library context stream which will\n  be used for all subsequent function calls.\n\n  @param[in]\n  handle the handle to the rocSPARSE library context.\n  @param[out]\n  stream the stream currently used by the rocSPARSE library context.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle \\p handle is invalid."]
    pub fn rocsparse_get_stream(
        handle: rocsparse_handle,
        stream: *mut hipStream_t,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Specify the pointer mode.\n\n  \\details\n  \\p rocsparse_set_pointer_mode specifies the pointer mode to be used by the rocSPARSE\n  library context and all subsequent function calls. For example, many rocSPARSE routines take\n  \\f$\\alpha\\f$ and \\f$\\beta\\f$ pointers as parameters. These can be either host memory pointers\n  or device memory pointers, depending on what the pointer mode is set to. By default, all values are passed\n  using host pointer mode. Valid pointer modes are \\ref rocsparse_pointer_mode_host\n  or \\ref rocsparse_pointer_mode_device.\n\n  @param[in]\n  handle          the handle to the rocSPARSE library context.\n  @param[in]\n  pointer_mode    the pointer mode to be used by the rocSPARSE library context.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle \\p handle is invalid."]
    pub fn rocsparse_set_pointer_mode(
        handle: rocsparse_handle,
        pointer_mode: rocsparse_pointer_mode,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the current pointer mode from the library context.\n\n  \\details\n  \\p rocsparse_get_pointer_mode gets the rocSPARSE library context pointer mode which\n  will be used for all subsequent function calls.\n\n  @param[in]\n  handle          the handle to the rocSPARSE library context.\n  @param[out]\n  pointer_mode    the pointer mode that is currently used by the rocSPARSE library\n                  context.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle \\p handle is invalid."]
    pub fn rocsparse_get_pointer_mode(
        handle: rocsparse_handle,
        pointer_mode: *mut rocsparse_pointer_mode,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get rocSPARSE version\n\n  \\details\n  \\p rocsparse_get_version gets the rocSPARSE library version number.\n  - patch = version % 100\n  - minor = version / 100 % 1000\n  - major = version / 100000\n\n  @param[in]\n  handle  the handle to the rocSPARSE library context.\n  @param[out]\n  version the version number of the rocSPARSE library.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle \\p handle is invalid.\n  \\par Example\n  \\code{.c}\n   rocsparse_handle handle;\n   rocsparse_create_handle(&handle);\n   rocsparse_get_version(handle, &rocsparse_ver);\n   rocsparse_destroy_handle(handle);\n  \\endcode"]
    pub fn rocsparse_get_version(
        handle: rocsparse_handle,
        version: *mut ::std::os::raw::c_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the rocSPARSE git revision.\n\n  \\details\n  \\p rocsparse_get_git_rev gets the rocSPARSE library git commit revision (SHA-1).\n\n  @param[in]\n  handle  the handle to the rocSPARSE library context.\n  @param[out]\n  rev     the git commit revision (SHA-1).\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle \\p handle is invalid.\n  \\par Example\n  \\code{.c}\n   rocsparse_handle handle;\n   rocsparse_create_handle(&handle);\n   rocsparse_get_git_rev(handle, rocsparse_rev);\n   rocsparse_destroy_handle(handle);\n  \\endcode"]
    pub fn rocsparse_get_git_rev(
        handle: rocsparse_handle,
        rev: *mut ::std::os::raw::c_char,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a matrix descriptor.\n  \\details\n  \\p rocsparse_create_mat_descr creates a matrix descriptor. It initializes\n  \\ref rocsparse_matrix_type to \\ref rocsparse_matrix_type_general, \\ref rocsparse_fill_mode\n  to \\ref rocsparse_fill_mode_lower, \\ref rocsparse_diag_type to \\ref rocsparse_diag_type_non_unit,\n  \\ref rocsparse_index_base to \\ref rocsparse_index_base_zero, and \\ref rocsparse_storage_mode\n  to \\ref rocsparse_storage_mode_sorted.  It should be destroyed at the end using\n  \\ref rocsparse_destroy_mat_descr().\n\n  The matrix type, fill mode, diag type, index base, and storage mode can be set using the\n  \\ref rocsparse_set_mat_type, \\ref rocsparse_set_mat_fill_mode, \\ref rocsparse_set_mat_diag_type,\n  \\ref rocsparse_set_mat_index_base, and \\ref rocsparse_set_mat_storage_mode APIs respectively.\n\n  @param[out]\n  descr   the pointer to the matrix descriptor.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr pointer is invalid."]
    pub fn rocsparse_create_mat_descr(descr: *mut rocsparse_mat_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Copy a matrix descriptor.\n  \\details\n  \\p rocsparse_copy_mat_descr copies a matrix descriptor. Both source and destination\n  matrix descriptors must be initialized prior to calling \\p rocsparse_copy_mat_descr.\n\n  @param[out]\n  dest    the pointer to the destination matrix descriptor.\n  @param[in]\n  src     the pointer to the source matrix descriptor.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p src or \\p dest pointer is invalid."]
    pub fn rocsparse_copy_mat_descr(
        dest: rocsparse_mat_descr,
        src: rocsparse_mat_descr,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a matrix descriptor.\n\n  \\details\n  \\p rocsparse_destroy_mat_descr destroys a matrix descriptor and releases all\n  resources used by the descriptor.\n\n  @param[in]\n  descr   the matrix descriptor.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr is invalid."]
    pub fn rocsparse_destroy_mat_descr(descr: rocsparse_mat_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Specify the index base of a matrix descriptor.\n\n  \\details\n  \\p rocsparse_set_mat_index_base sets the index base of a matrix descriptor. Valid\n  options are \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  @param[inout]\n  descr   the matrix descriptor.\n  @param[in]\n  base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr pointer is invalid.\n  \\retval rocsparse_status_invalid_value \\p base is invalid."]
    pub fn rocsparse_set_mat_index_base(
        descr: rocsparse_mat_descr,
        base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the index base of a matrix descriptor.\n\n  \\details\n  \\p rocsparse_get_mat_index_base returns the index base of a matrix descriptor.\n\n  @param[in]\n  descr   the matrix descriptor.\n\n  \\returns \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one."]
    pub fn rocsparse_get_mat_index_base(descr: rocsparse_mat_descr) -> rocsparse_index_base;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Specify the matrix type of a matrix descriptor.\n\n  \\details\n  \\p rocsparse_set_mat_type sets the matrix type of a matrix descriptor. Valid\n  matrix types are \\ref rocsparse_matrix_type_general,\n  \\ref rocsparse_matrix_type_symmetric, \\ref rocsparse_matrix_type_hermitian, or\n  \\ref rocsparse_matrix_type_triangular.\n\n  @param[inout]\n  descr   the matrix descriptor.\n  @param[in]\n  type    \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n          \\ref rocsparse_matrix_type_hermitian, or\n          \\ref rocsparse_matrix_type_triangular.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr pointer is invalid.\n  \\retval rocsparse_status_invalid_value \\p type is invalid."]
    pub fn rocsparse_set_mat_type(
        descr: rocsparse_mat_descr,
        type_: rocsparse_matrix_type,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the matrix type of a matrix descriptor.\n\n  \\details\n  \\p rocsparse_get_mat_type returns the matrix type of a matrix descriptor.\n\n  @param[in]\n  descr   the matrix descriptor.\n\n  \\returns    \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or\n              \\ref rocsparse_matrix_type_triangular."]
    pub fn rocsparse_get_mat_type(descr: rocsparse_mat_descr) -> rocsparse_matrix_type;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Specify the matrix fill mode of a matrix descriptor.\n\n  \\details\n  \\p rocsparse_set_mat_fill_mode sets the matrix fill mode of a matrix descriptor.\n  Valid fill modes are \\ref rocsparse_fill_mode_lower or\n  \\ref rocsparse_fill_mode_upper.\n\n  @param[inout]\n  descr       the matrix descriptor.\n  @param[in]\n  fill_mode   \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr pointer is invalid.\n  \\retval rocsparse_status_invalid_value \\p fill_mode is invalid."]
    pub fn rocsparse_set_mat_fill_mode(
        descr: rocsparse_mat_descr,
        fill_mode: rocsparse_fill_mode,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the matrix fill mode of a matrix descriptor.\n\n  \\details\n  \\p rocsparse_get_mat_fill_mode returns the matrix fill mode of a matrix descriptor.\n\n  @param[in]\n  descr   the matrix descriptor.\n\n  \\returns    \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper."]
    pub fn rocsparse_get_mat_fill_mode(descr: rocsparse_mat_descr) -> rocsparse_fill_mode;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Specify the matrix diagonal type of a matrix descriptor.\n\n  \\details\n  \\p rocsparse_set_mat_diag_type sets the matrix diagonal type of a matrix\n  descriptor. Valid diagonal types are \\ref rocsparse_diag_type_unit or\n  \\ref rocsparse_diag_type_non_unit.\n\n  @param[inout]\n  descr       the matrix descriptor.\n  @param[in]\n  diag_type   \\ref rocsparse_diag_type_unit or \\ref rocsparse_diag_type_non_unit.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr pointer is invalid.\n  \\retval rocsparse_status_invalid_value \\p diag_type is invalid."]
    pub fn rocsparse_set_mat_diag_type(
        descr: rocsparse_mat_descr,
        diag_type: rocsparse_diag_type,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the matrix diagonal type of a matrix descriptor.\n\n  \\details\n  \\p rocsparse_get_mat_diag_type returns the matrix diagonal type of a matrix\n  descriptor.\n\n  @param[in]\n  descr   the matrix descriptor.\n\n  \\returns \\ref rocsparse_diag_type_unit or \\ref rocsparse_diag_type_non_unit."]
    pub fn rocsparse_get_mat_diag_type(descr: rocsparse_mat_descr) -> rocsparse_diag_type;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Specify the matrix storage mode of a matrix descriptor.\n\n  \\details\n  \\p rocsparse_set_mat_storage_mode sets the matrix storage mode of a matrix descriptor.\n  Valid fill modes are \\ref rocsparse_storage_mode_sorted or\n  \\ref rocsparse_storage_mode_unsorted.\n\n  @param[inout]\n  descr           the matrix descriptor.\n  @param[in]\n  storage_mode    \\ref rocsparse_storage_mode_sorted or\n                  \\ref rocsparse_storage_mode_unsorted.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr pointer is invalid.\n  \\retval rocsparse_status_invalid_value \\p storage_mode is invalid."]
    pub fn rocsparse_set_mat_storage_mode(
        descr: rocsparse_mat_descr,
        storage_mode: rocsparse_storage_mode,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the matrix storage mode of a matrix descriptor.\n\n  \\details\n  \\p rocsparse_get_mat_storage_mode returns the matrix storage mode of a matrix descriptor.\n\n  @param[in]\n  descr   the matrix descriptor.\n\n  \\returns    \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_unsorted."]
    pub fn rocsparse_get_mat_storage_mode(descr: rocsparse_mat_descr) -> rocsparse_storage_mode;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a \\p HYB matrix structure\n\n  \\details\n  \\p rocsparse_create_hyb_mat creates a structure that holds the matrix in \\p HYB\n  storage format. It should be destroyed at the end using rocsparse_destroy_hyb_mat().\n\n  @param[inout]\n  hyb the pointer to the hybrid matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p hyb pointer is invalid."]
    pub fn rocsparse_create_hyb_mat(hyb: *mut rocsparse_hyb_mat) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Copy a \\p HYB matrix structure.\n\n  \\details\n  \\p rocsparse_copy_hyb_mat copies a matrix info structure. Both source and destination\n  matrix info structure must be initialized prior to calling \\p rocsparse_copy_hyb_mat.\n\n  @param[out]\n  dest    the pointer to the destination matrix info structure.\n  @param[in]\n  src     the pointer to the source matrix info structure.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p hyb pointer is invalid."]
    pub fn rocsparse_copy_hyb_mat(
        dest: rocsparse_hyb_mat,
        src: rocsparse_hyb_mat,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a \\p HYB matrix structure.\n\n  \\details\n  \\p rocsparse_destroy_hyb_mat destroys a \\p HYB structure.\n\n  @param[in]\n  hyb the hybrid matrix structure.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p hyb pointer is invalid.\n  \\retval rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_destroy_hyb_mat(hyb: rocsparse_hyb_mat) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a matrix info structure.\n\n  \\details\n  \\p rocsparse_create_mat_info creates a structure that holds the matrix info data\n  that is gathered during the analysis routines available. It should be destroyed\n  at the end using rocsparse_destroy_mat_info().\n\n  @param[inout]\n  info    the pointer to the info structure.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p info pointer is invalid."]
    pub fn rocsparse_create_mat_info(info: *mut rocsparse_mat_info) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Copy a matrix info structure.\n  \\details\n  \\p rocsparse_copy_mat_info copies a matrix info structure. Both source and destination\n  matrix info structure must be initialized prior to calling \\p rocsparse_copy_mat_info.\n\n  @param[out]\n  dest    the pointer to the destination matrix info structure.\n  @param[in]\n  src     the pointer to the source matrix info structure.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p src or \\p dest pointer is invalid."]
    pub fn rocsparse_copy_mat_info(
        dest: rocsparse_mat_info,
        src: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a matrix info structure\n\n  \\details\n  \\p rocsparse_destroy_mat_info destroys a matrix info structure.\n\n  @param[in]\n  info    the info structure.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_destroy_mat_info(info: rocsparse_mat_info) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a color info structure\n\n  \\details\n  \\p rocsparse_create_color_info creates a structure that holds the color info data\n  that is gathered during the analysis routines. It should be destroyed\n  at the end using rocsparse_destroy_color_info().\n\n  @param[inout]\n  info    the pointer to the info structure.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p info pointer is invalid."]
    pub fn rocsparse_create_color_info(info: *mut rocsparse_color_info) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Copy a color info structure.\n  \\details\n  \\p rocsparse_copy_color_info copies a color info structure. Both source and destination\n  color info structure must be initialized prior to calling \\p rocsparse_copy_color_info.\n\n  @param[out]\n  dest    the pointer to the destination color info structure.\n  @param[in]\n  src     the pointer to the source color info structure.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p src or \\p dest pointer is invalid."]
    pub fn rocsparse_copy_color_info(
        dest: rocsparse_color_info,
        src: rocsparse_color_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a color info structure.\n\n  \\details\n  \\p rocsparse_destroy_color_info destroys a color info structure.\n\n  @param[in]\n  info    the info structure.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_destroy_color_info(info: rocsparse_color_info) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a sparse vector descriptor.\n  \\details\n  \\p rocsparse_create_spvec_descr creates a sparse vector descriptor. It should be\n  destroyed at the end using rocsparse_destroy_mat_descr().\n\n  @param[out]\n  descr   the pointer to the sparse vector descriptor.\n  @param[in]\n  size   size of the sparse vector.\n  @param[in]\n  nnz   number of non-zeros in sparse vector.\n  @param[in]\n  indices   indices of the sparse vector where non-zeros occur. Must be an array of length \\p nnz.\n  @param[in]\n  values   non-zero values in the sparse vector. Must be an array of length \\p nnz.\n  @param[in]\n  idx_type   \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  idx_base   \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  data_type   \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n              \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p indices, or \\p values is invalid.\n  \\retval rocsparse_status_invalid_size if \\p size or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_create_spvec_descr(
        descr: *mut rocsparse_spvec_descr,
        size: i64,
        nnz: i64,
        indices: *mut ::std::os::raw::c_void,
        values: *mut ::std::os::raw::c_void,
        idx_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_create_const_spvec_descr(
        descr: *mut rocsparse_const_spvec_descr,
        size: i64,
        nnz: i64,
        indices: *const ::std::os::raw::c_void,
        values: *const ::std::os::raw::c_void,
        idx_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a sparse vector descriptor.\n\n  \\details\n  \\p rocsparse_destroy_spvec_descr destroys a sparse vector descriptor and releases all\n  resources used by the descriptor.\n\n  @param[in]\n  descr   the matrix descriptor.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr is invalid."]
    pub fn rocsparse_destroy_spvec_descr(descr: rocsparse_const_spvec_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the fields of the sparse vector descriptor.\n  \\details\n  \\p rocsparse_spvec_get gets the fields of the sparse vector descriptor.\n\n  @param[in]\n  descr   the pointer to the sparse vector descriptor.\n  @param[out]\n  size   size of the sparse vector.\n  @param[out]\n  nnz   number of non-zeros in sparse vector.\n  @param[out]\n  indices   indices of the sparse vector where non-zeros occur. Must be an array of length \\p nnz.\n  @param[out]\n  values   non-zero values in the sparse vector. Must be an array of length \\p nnz.\n  @param[out]\n  idx_type   \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  idx_base   \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[out]\n  data_type   \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n              \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p indices, or \\p values is invalid.\n  \\retval rocsparse_status_invalid_size if \\p size or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_spvec_get(
        descr: rocsparse_spvec_descr,
        size: *mut i64,
        nnz: *mut i64,
        indices: *mut *mut ::std::os::raw::c_void,
        values: *mut *mut ::std::os::raw::c_void,
        idx_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_spvec_get(
        descr: rocsparse_const_spvec_descr,
        size: *mut i64,
        nnz: *mut i64,
        indices: *mut *const ::std::os::raw::c_void,
        values: *mut *const ::std::os::raw::c_void,
        idx_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the index base stored in the sparse vector descriptor.\n\n  @param[in]\n  descr   the pointer to the sparse vector descriptor.\n  @param[out]\n  idx_base   \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_base is invalid."]
    pub fn rocsparse_spvec_get_index_base(
        descr: rocsparse_const_spvec_descr,
        idx_base: *mut rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the values array stored in the sparse vector descriptor\n\n  @param[in]\n  descr   the pointer to the sparse vector descriptor.\n  @param[out]\n  values   non-zero values in the sparse vector. Must be an array of length \\p nnz.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p values is invalid.\n/\n/**@{"]
    pub fn rocsparse_spvec_get_values(
        descr: rocsparse_spvec_descr,
        values: *mut *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_spvec_get_values(
        descr: rocsparse_const_spvec_descr,
        values: *mut *const ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the values array in the sparse vector descriptor.\n\n  @param[inout]\n  descr   the pointer to the sparse vector descriptor.\n  @param[in]\n  values   non-zero values in the sparse vector. Must be an array of length \\p nnz.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p values is invalid."]
    pub fn rocsparse_spvec_set_values(
        descr: rocsparse_spvec_descr,
        values: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a sparse COO matrix descriptor.\n  \\details\n  \\p rocsparse_create_coo_descr creates a sparse COO matrix descriptor. It should be\n  destroyed at the end using \\p rocsparse_destroy_spmat_descr.\n\n  @param[out]\n  descr       the pointer to the sparse COO matrix descriptor.\n  @param[in]\n  rows        number of rows in the COO matrix.\n  @param[in]\n  cols        number of columns in the COO matrix\n  @param[in]\n  nnz         number of non-zeros in the COO matrix.\n  @param[in]\n  coo_row_ind row indices of the COO matrix. Must be an array of length \\p nnz.\n  @param[in]\n  coo_col_ind column indices of the COO matrix. Must be an array of length \\p nnz.\n  @param[in]\n  coo_val     values of the COO matrix. Must be an array of length \\p nnz.\n  @param[in]\n  idx_type    \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  data_type   \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n              \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p coo_row_ind, \\p coo_col_ind, or \\p coo_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_create_coo_descr(
        descr: *mut rocsparse_spmat_descr,
        rows: i64,
        cols: i64,
        nnz: i64,
        coo_row_ind: *mut ::std::os::raw::c_void,
        coo_col_ind: *mut ::std::os::raw::c_void,
        coo_val: *mut ::std::os::raw::c_void,
        idx_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_create_const_coo_descr(
        descr: *mut rocsparse_const_spmat_descr,
        rows: i64,
        cols: i64,
        nnz: i64,
        coo_row_ind: *const ::std::os::raw::c_void,
        coo_col_ind: *const ::std::os::raw::c_void,
        coo_val: *const ::std::os::raw::c_void,
        idx_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a sparse COO AoS matrix descriptor.\n  \\details\n  \\p rocsparse_create_coo_aos_descr creates a sparse COO AoS matrix descriptor. It should be\n  destroyed at the end using \\p rocsparse_destroy_spmat_descr.\n\n  @param[out]\n  descr       the pointer to the sparse COO AoS matrix descriptor.\n  @param[in]\n  rows        number of rows in the COO AoS matrix.\n  @param[in]\n  cols        number of columns in the COO AoS matrix\n  @param[in]\n  nnz         number of non-zeros in the COO AoS matrix.\n  @param[in]\n  coo_ind     <row, column> indices of the COO AoS matrix. Must be an array of length \\p nnz.\n  @param[in]\n  coo_val     values of the COO AoS matrix. Must be an array of length \\p nnz.\n  @param[in]\n  idx_type    \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  data_type   \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n              \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p coo_ind, or \\p coo_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_type, \\p idx_base, or \\p data_type is invalid."]
    pub fn rocsparse_create_coo_aos_descr(
        descr: *mut rocsparse_spmat_descr,
        rows: i64,
        cols: i64,
        nnz: i64,
        coo_ind: *mut ::std::os::raw::c_void,
        coo_val: *mut ::std::os::raw::c_void,
        idx_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a sparse BSR matrix descriptor.\n  \\details\n  \\p rocsparse_create_bsr_descr creates a sparse BSR matrix descriptor. It should be\n  destroyed at the end using \\p rocsparse_destroy_spmat_descr.\n\n  @param[out]\n  descr        the pointer to the sparse BSR matrix descriptor.\n  @param[in]\n  brows        number of block rows in the BSR matrix.\n  @param[in]\n  bcols        number of block columns in the BSR matrix.\n  @param[in]\n  bnnz         number of non-zero blocks in the BSR matrix.\n  @param[in]\n  block_dir    direction of the internal block storage.\n  @param[in]\n  block_dim    dimension of the blocks.\n  @param[in]\n  bsr_row_ptr  row offsets of the BSR matrix (must be array of length \\p brows+1 ).\n  @param[in]\n  bsr_col_ind  column indices of the BSR matrix (must be array of length \\p bnnz ).\n  @param[in]\n  bsr_val      values of the BSR matrix (must be array of length \\p bnnz * \\p block_dim * \\p block_dim ).\n  @param[in]\n  row_ptr_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  col_ind_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  idx_base     \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  data_type    \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n               \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p bsr_row_ptr, \\p bsr_col_ind, or \\p bsr_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p brows, \\p bcols, \\p bnnz, or \\p block_dim is invalid.\n  \\retval rocsparse_status_invalid_value if \\p row_ptr_type, \\p col_ind_type, \\p idx_base, \\p data_type, or \\p block_dir is invalid.\n/\n/**@{"]
    pub fn rocsparse_create_bsr_descr(
        descr: *mut rocsparse_spmat_descr,
        brows: i64,
        bcols: i64,
        bnnz: i64,
        block_dir: rocsparse_direction,
        block_dim: i64,
        bsr_row_ptr: *mut ::std::os::raw::c_void,
        bsr_col_ind: *mut ::std::os::raw::c_void,
        bsr_val: *mut ::std::os::raw::c_void,
        row_ptr_type: rocsparse_indextype,
        col_ind_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_create_const_bsr_descr(
        descr: *mut rocsparse_const_spmat_descr,
        brows: i64,
        bcols: i64,
        bnnz: i64,
        block_dir: rocsparse_direction,
        block_dim: i64,
        bsr_row_ptr: *const ::std::os::raw::c_void,
        bsr_col_ind: *const ::std::os::raw::c_void,
        bsr_val: *const ::std::os::raw::c_void,
        row_ptr_type: rocsparse_indextype,
        col_ind_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a sparse CSR matrix descriptor.\n  \\details\n  \\p rocsparse_create_csr_descr creates a sparse CSR matrix descriptor. It should be\n  destroyed at the end using \\p rocsparse_destroy_spmat_descr.\n\n  @param[out]\n  descr        the pointer to the sparse CSR matrix descriptor.\n  @param[in]\n  rows         number of rows in the CSR matrix.\n  @param[in]\n  cols         number of columns in the CSR matrix\n  @param[in]\n  nnz          number of non-zeros in the CSR matrix.\n  @param[in]\n  csr_row_ptr  row offsets of the CSR matrix. Must be an array of length \\p rows+1.\n  @param[in]\n  csr_col_ind  column indices of the CSR matrix. Must be an array of length \\p nnz.\n  @param[in]\n  csr_val      values of the CSR matrix. Must be an array of length \\p nnz.\n  @param[in]\n  row_ptr_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  col_ind_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  idx_base     \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  data_type    \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n               \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p csr_row_ptr, \\p csr_col_ind, or \\p csr_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_value if \\p row_ptr_type, \\p col_ind_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_create_csr_descr(
        descr: *mut rocsparse_spmat_descr,
        rows: i64,
        cols: i64,
        nnz: i64,
        csr_row_ptr: *mut ::std::os::raw::c_void,
        csr_col_ind: *mut ::std::os::raw::c_void,
        csr_val: *mut ::std::os::raw::c_void,
        row_ptr_type: rocsparse_indextype,
        col_ind_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_create_const_csr_descr(
        descr: *mut rocsparse_const_spmat_descr,
        rows: i64,
        cols: i64,
        nnz: i64,
        csr_row_ptr: *const ::std::os::raw::c_void,
        csr_col_ind: *const ::std::os::raw::c_void,
        csr_val: *const ::std::os::raw::c_void,
        row_ptr_type: rocsparse_indextype,
        col_ind_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a sparse CSC matrix descriptor.\n  \\details\n  \\p rocsparse_create_csc_descr creates a sparse CSC matrix descriptor. It should be\n  destroyed at the end using \\p rocsparse_destroy_spmat_descr.\n\n  @param[out]\n  descr       the pointer to the sparse CSC matrix descriptor.\n  @param[in]\n  rows         number of rows in the CSC matrix.\n  @param[in]\n  cols         number of columns in the CSC matrix.\n  @param[in]\n  nnz          number of non-zeros in the CSC matrix.\n  @param[in]\n  csc_col_ptr  column offsets of the CSC matrix. Must be an array of length \\p cols+1.\n  @param[in]\n  csc_row_ind  row indices of the CSC matrix. Must be an array of length \\p nnz.\n  @param[in]\n  csc_val      values of the CSC matrix. Must be an array of length \\p nnz.\n  @param[in]\n  col_ptr_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  row_ind_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  idx_base     \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  data_type    \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n               \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p csc_col_ptr, \\p csc_row_ind, or \\p csc_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_value if \\p col_ptr_type, \\p row_ind_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_create_csc_descr(
        descr: *mut rocsparse_spmat_descr,
        rows: i64,
        cols: i64,
        nnz: i64,
        csc_col_ptr: *mut ::std::os::raw::c_void,
        csc_row_ind: *mut ::std::os::raw::c_void,
        csc_val: *mut ::std::os::raw::c_void,
        col_ptr_type: rocsparse_indextype,
        row_ind_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_create_const_csc_descr(
        descr: *mut rocsparse_const_spmat_descr,
        rows: i64,
        cols: i64,
        nnz: i64,
        csc_col_ptr: *const ::std::os::raw::c_void,
        csc_row_ind: *const ::std::os::raw::c_void,
        csc_val: *const ::std::os::raw::c_void,
        col_ptr_type: rocsparse_indextype,
        row_ind_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a sparse ELL matrix descriptor.\n  \\details\n  \\p rocsparse_create_ell_descr creates a sparse ELL matrix descriptor. It should be\n  destroyed at the end using \\p rocsparse_destroy_spmat_descr.\n\n  @param[out]\n  descr       the pointer to the sparse ELL matrix descriptor.\n  @param[in]\n  rows        number of rows in the ELL matrix.\n  @param[in]\n  cols        number of columns in the ELL matrix.\n  @param[in]\n  ell_col_ind column indices of the ELL matrix. Must be an array of length \\p rows*ell_width.\n  @param[in]\n  ell_val     values of the ELL matrix. Must be an array of length \\p rows*ell_width.\n  @param[in]\n  ell_width   width of the ELL matrix.\n  @param[in]\n  idx_type    \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  data_type   \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n              \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p ell_col_ind, or \\p ell_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, \\p ell_width is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_type, \\p idx_base, or \\p data_type is invalid."]
    pub fn rocsparse_create_ell_descr(
        descr: *mut rocsparse_spmat_descr,
        rows: i64,
        cols: i64,
        ell_col_ind: *mut ::std::os::raw::c_void,
        ell_val: *mut ::std::os::raw::c_void,
        ell_width: i64,
        idx_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a sparse blocked ELL matrix descriptor.\n  \\details\n  \\p rocsparse_create_bell_descr creates a sparse blocked ELL matrix descriptor. It should be\n  destroyed at the end using \\p rocsparse_destroy_spmat_descr.\n\n  Currently the only routine that supports the Blocked ELL format is \\ref rocsparse_spmm.\n\n  @param[out]\n  descr         the pointer to the sparse blocked ELL matrix descriptor.\n  @param[in]\n  rows          number of rows in the blocked ELL matrix.\n  @param[in]\n  cols          number of columns in the blocked ELL matrix\n  @param[in]\n  ell_block_dir \\ref rocsparse_direction_row or \\ref rocsparse_direction_column.\n  @param[in]\n  ell_block_dim block dimension of the sparse blocked ELL matrix.\n  @param[in]\n  ell_cols      column indices of the blocked ELL matrix. Must be an array of length \\p rows*ell_width.\n  @param[in]\n  ell_col_ind   column indices of the blocked ELL matrix. Must be an array of length \\p rows*ell_width.\n  @param[in]\n  ell_val       values of the blocked ELL matrix. Must be an array of length \\p rows*ell_width.\n  @param[in]\n  idx_type      \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  idx_base      \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  data_type     \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n                \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p ell_cols, \\p ell_col_ind, or \\p ell_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows or \\p cols is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_create_bell_descr(
        descr: *mut rocsparse_spmat_descr,
        rows: i64,
        cols: i64,
        ell_block_dir: rocsparse_direction,
        ell_block_dim: i64,
        ell_cols: i64,
        ell_col_ind: *mut ::std::os::raw::c_void,
        ell_val: *mut ::std::os::raw::c_void,
        idx_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_create_const_bell_descr(
        descr: *mut rocsparse_const_spmat_descr,
        rows: i64,
        cols: i64,
        ell_block_dir: rocsparse_direction,
        ell_block_dim: i64,
        ell_cols: i64,
        ell_col_ind: *const ::std::os::raw::c_void,
        ell_val: *const ::std::os::raw::c_void,
        idx_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a sparse sliced ELL matrix descriptor.\n  \\details\n  \\p rocsparse_create_sell_descr creates a sparse sliced ELL matrix descriptor. It should be\n  destroyed at the end using \\p rocsparse_destroy_spmat_descr.\n\n  Currently the only routine that supports the sliced ELL format is \\ref rocsparse_spmv.\n\n  @param[out]\n  descr                   the pointer to the sparse sliced ELL matrix descriptor.\n  @param[in]\n  rows                    number of rows in the sliced ELL matrix.\n  @param[in]\n  cols                    number of columns in the sliced ELL matrix.\n  @param[in]\n  nnz                     number of non-zeros in the sliced ELL matrix.\n  @param[in]\n  sell_slice_size         slice size in the sliced ELL matrix.\n  @param[in]\n  sell_colval_size        size of the column and value arrays in the sliced ELL matrix.\n  @param[in]\n  sell_slice_offsets      slice offsets into column and value matrix. Must be an array of length \\p nslices+1 where \\p nslice=m/sell_slice_size.\n  @param[in]\n  sell_col_ind            column indices of the sliced ELL matrix. Must be an array of length \\p sell_colval_size.\n  @param[in]\n  sell_val                values of the sliced ELL matrix. Must be an array of length \\p sell_colval_size.\n  @param[in]\n  sell_slice_offsets_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  sell_col_ind_type       \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[in]\n  idx_base                \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  data_type               \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n                          \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p sell_slice_offsets, \\p sell_col_ind, or \\p sell_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, \\p nnz, \\p sell_slice_size, or \\p sell_colval_size is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_create_sell_descr(
        descr: *mut rocsparse_spmat_descr,
        rows: i64,
        cols: i64,
        nnz: i64,
        sell_slice_size: i64,
        sell_colval_size: i64,
        sell_slice_offsets: *mut ::std::os::raw::c_void,
        sell_col_ind: *mut ::std::os::raw::c_void,
        sell_val: *mut ::std::os::raw::c_void,
        sell_slice_offsets_type: rocsparse_indextype,
        sell_col_ind_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_create_const_sell_descr(
        descr: *mut rocsparse_const_spmat_descr,
        rows: i64,
        cols: i64,
        nnz: i64,
        sell_slice_size: i64,
        sell_colval_size: i64,
        sell_slice_offsets: *const ::std::os::raw::c_void,
        sell_col_ind: *const ::std::os::raw::c_void,
        sell_val: *const ::std::os::raw::c_void,
        sell_slice_offsets_type: rocsparse_indextype,
        sell_col_ind_type: rocsparse_indextype,
        idx_base: rocsparse_index_base,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a sparse matrix descriptor.\n\n  \\details\n  \\p rocsparse_destroy_spmat_descr destroys a sparse matrix descriptor and releases all\n  resources used by the descriptor.\n\n  Currently the only routine that supports the Blocked ELL format is \\ref rocsparse_spmm.\n\n  @param[in]\n  descr   the matrix descriptor.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr is invalid."]
    pub fn rocsparse_destroy_spmat_descr(descr: rocsparse_const_spmat_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Sparse matrix to sparse matrix conversion.\n\n  \\details\n  \\p rocsparse_create_sparse_to_sparse_descr creates the descriptor of the sparse_to_sparse algorithm.\n\n  @param[out]\n  descr        pointer to the descriptor of the sparse_to_sparse algorithm.\n  @param[in]\n  source       source sparse matrix descriptor.\n  @param[in]\n  target       target sparse matrix descriptor.\n  @param[in]\n  alg          algorithm for the sparse_to_sparse computation.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_value if any required enumeration is invalid.\n  \\retval      rocsparse_status_invalid_pointer \\p descr, \\p source, or \\p target\n               pointer is invalid."]
    pub fn rocsparse_create_sparse_to_sparse_descr(
        descr: *mut rocsparse_sparse_to_sparse_descr,
        source: rocsparse_const_spmat_descr,
        target: rocsparse_spmat_descr,
        alg: rocsparse_sparse_to_sparse_alg,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Sparse matrix to sparse matrix conversion.\n\n  \\details\n  \\p rocsparse_sparse_to_sparse_permissive allows the routine to allocate an intermediate sparse matrix\n  to perform the conversion. By default, the routine is not permissive.\n  @param[in]\n  descr        descriptor of the sparse_to_sparse algorithm.\n  \\retval      rocsparse_status_success the operation completed successfully."]
    pub fn rocsparse_sparse_to_sparse_permissive(
        descr: rocsparse_sparse_to_sparse_descr,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Sparse matrix to sparse matrix conversion.\n\n  \\details\n  \\p rocsparse_destroy_sparse_to_sparse_descr destroys the descriptor of the sparse_to_sparse algorithm.\n\n  @param[in]\n  descr        descriptor of the sparse_to_sparse algorithm.\n  \\retval      rocsparse_status_success the operation completed successfully."]
    pub fn rocsparse_destroy_sparse_to_sparse_descr(
        descr: rocsparse_sparse_to_sparse_descr,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Sparse matrix extraction.\n\n  \\details\n  \\p rocsparse_create_extract_descr creates the descriptor of the extract algorithm.\n\n  @param[out]\n  descr        pointer to the descriptor of the extract algorithm.\n  @param[in]\n  source       source sparse matrix descriptor.\n  @param[in]\n  target       target sparse matrix descriptor.\n  @param[in]\n  alg          algorithm for the extract computation.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_value if any required enumeration is invalid.\n  \\retval      rocsparse_status_invalid_pointer \\p descr, \\p source, or \\p target\n               pointer is invalid."]
    pub fn rocsparse_create_extract_descr(
        descr: *mut rocsparse_extract_descr,
        source: rocsparse_const_spmat_descr,
        target: rocsparse_spmat_descr,
        alg: rocsparse_extract_alg,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Sparse matrix extraction.\n\n  \\details\n  \\p rocsparse_destroy_extract_descr destroys the descriptor of the \\ref rocsparse_extract routine.\n\n  @param[in]\n  descr        descriptor of the extract routine.\n  \\retval      rocsparse_status_success the operation completed successfully."]
    pub fn rocsparse_destroy_extract_descr(descr: rocsparse_extract_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Sparse matrix SpGEAM routine descriptor creation.\n\n  \\details\n  \\p rocsparse_create_spgeam_descr creates the descriptor of the \\ref rocsparse_spgeam_buffer_size and\n  \\ref rocsparse_spgeam routines.\n\n  @param[out]\n  descr        pointer to the descriptor of the SpGEAM routine.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_pointer \\p descr pointer is invalid."]
    pub fn rocsparse_create_spgeam_descr(descr: *mut rocsparse_spgeam_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a sparse matrix SpGEAM.\n\n  \\details\n  \\p rocsparse_destroy_spgeam_descr destroys the descriptor of the \\ref rocsparse_spgeam_buffer_size and\n  \\ref rocsparse_spgeam routines.\n\n  @param[in]\n  descr        descriptor of the SpGEAM routine.\n  \\retval      rocsparse_status_success the operation completed successfully."]
    pub fn rocsparse_destroy_spgeam_descr(descr: rocsparse_spgeam_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the requested \\ref rocsparse_spgeam_input data in the SpGEAM descriptor.\n\n  @param[in]\n  handle      the pointer to the handle to the rocSPARSE library context.\n  @param[inout]\n  descr       the pointer to the SpGEAM descriptor.\n  @param[in]\n  input       one of the values from \\ref rocsparse_spgeam_input.\n  @param[in]\n  data        input data.\n  @param[in]\n  data_size_in_bytes   input data size.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p input is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size_in_bytes is invalid."]
    pub fn rocsparse_spgeam_set_input(
        handle: rocsparse_handle,
        descr: rocsparse_spgeam_descr,
        input: rocsparse_spgeam_input,
        data: *const ::std::os::raw::c_void,
        data_size_in_bytes: usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the requested \\ref rocsparse_spgeam_output data from the SpGEAM descriptor.\n\n  @param[in]\n  handle      the pointer to the handle to the rocSPARSE library context.\n  @param[inout]\n  descr       the pointer to the SpGEAM descriptor.\n  @param[in]\n  output      \\ref rocsparse_spgeam_output_nnz.\n  @param[in]\n  data        output data.\n  @param[in]\n  data_size_in_bytes   output data size.\n  @param[out]\n  error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p output is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size_in_bytes is invalid."]
    pub fn rocsparse_spgeam_get_output(
        handle: rocsparse_handle,
        descr: rocsparse_spgeam_descr,
        output: rocsparse_spgeam_output,
        data: *mut ::std::os::raw::c_void,
        data_size_in_bytes: usize,
        error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Sparse matrix SpMV routine descriptor creation.\n\n  \\details\n  \\p rocsparse_create_spmv_descr creates the descriptor of the \\ref rocsparse_v2_spmv_buffer_size and\n  \\ref rocsparse_v2_spmv routines.\n\n  @param[out]\n  descr        pointer to the descriptor of the SpMV routine.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_pointer \\p descr pointer is invalid."]
    pub fn rocsparse_create_spmv_descr(descr: *mut rocsparse_spmv_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a sparse matrix SpMV routine descriptor.\n\n  \\details\n  \\p rocsparse_destroy_spmv_descr destroys the descriptor of the \\ref rocsparse_v2_spmv_buffer_size and\n  \\ref rocsparse_v2_spmv routines.\n\n  @param[in]\n  descr        descriptor of the v2_spmv routine.\n  \\retval      rocsparse_status_success the operation completed successfully."]
    pub fn rocsparse_destroy_spmv_descr(descr: rocsparse_spmv_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the requested \\ref rocsparse_spmv_input data in the SpMV descriptor.\n\n  @param[in]\n  handle      the pointer to the handle to the rocSPARSE library context.\n  @param[inout]\n  descr       the pointer to the SpMV descriptor.\n  @param[in]\n  input       one possible value of \\ref rocsparse_spmv_input.\n  @param[in]\n  in          input value.\n  @param[in]\n  size_in_bytes input value size in bytes.\n  @param[out]\n  error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p in is invalid.\n  \\retval rocsparse_status_invalid_value if \\p input is invalid.\n  \\retval rocsparse_status_invalid_size if \\p size_in_bytes is zero."]
    pub fn rocsparse_spmv_set_input(
        handle: rocsparse_handle,
        descr: rocsparse_spmv_descr,
        input: rocsparse_spmv_input,
        in_: *const ::std::os::raw::c_void,
        size_in_bytes: usize,
        error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Sparse matrix sptrsv routine descriptor creation.\n\n  \\details\n  \\p rocsparse_create_sptrsv_descr creates the descriptor of the \\ref rocsparse_sptrsv_buffer_size and\n  \\ref rocsparse_sptrsv routines.\n\n  @param[in]\n  handle  the handle to the rocSPARSE library context.\n  @param[out]\n  p_sptrsv_descr        pointer to the descriptor of the sptrsv routine.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval      rocsparse_status_invalid_handle \\p handle pointer is invalid.\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_pointer \\p descr pointer is invalid."]
    pub fn rocsparse_sptrsv_descr_create(
        handle: rocsparse_handle,
        p_sptrsv_descr: *mut rocsparse_sptrsv_descr,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a sparse matrix sptrsv routine descriptor.\n\n  \\details\n  \\p rocsparse_destroy_sptrsv_descr destroys the descriptor of the \\ref rocsparse_sptrsv_buffer_size and\n  \\ref rocsparse_sptrsv routines.\n\n  @param[in]\n  handle  the handle to the rocSPARSE library context.\n  @param[in]\n  sptrsv_descr        descriptor of the sptrsv routine.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval      rocsparse_status_invalid_handle \\p handle pointer is invalid.\n  \\retval      rocsparse_status_success the operation completed successfully."]
    pub fn rocsparse_sptrsv_descr_destroy(
        handle: rocsparse_handle,
        sptrsv_descr: rocsparse_sptrsv_descr,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Sparse matrix sptrsv routine descriptor creation.\n\n  \\details\n  \\p rocsparse_create_sptrsv_descr creates the descriptor of the \\ref rocsparse_sptrsv_buffer_size and\n  \\ref rocsparse_sptrsv routines.\n\n  @param[out]\n  descr        pointer to the descriptor of the sptrsv routine.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_pointer \\p descr pointer is invalid."]
    pub fn rocsparse_create_sptrsv_descr(descr: *mut rocsparse_sptrsv_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a sparse matrix sptrsv routine descriptor.\n\n  \\details\n  \\p rocsparse_destroy_sptrsv_descr destroys the descriptor of the \\ref rocsparse_sptrsv_buffer_size and\n  \\ref rocsparse_sptrsv routines.\n\n  @param[in]\n  descr        descriptor of the sptrsv routine.\n  \\retval      rocsparse_status_success the operation completed successfully."]
    pub fn rocsparse_destroy_sptrsv_descr(descr: rocsparse_sptrsv_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the requested \\ref rocsparse_sptrsv_input data in the sptrsv descriptor.\n\n  @param[in]\n  handle      the pointer to the handle to the rocSPARSE library context.\n  @param[inout]\n  descr       the pointer to the sptrsv descriptor.\n  @param[in]\n  input       value of \\ref rocsparse_sptrsv_input.\n  @param[in]\n  data        input data.\n  @param[in]\n  data_size_in_bytes   input data size in bytes.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p input is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size_in_bytes is invalid."]
    pub fn rocsparse_sptrsv_set_input(
        handle: rocsparse_handle,
        descr: rocsparse_sptrsv_descr,
        input: rocsparse_sptrsv_input,
        data: *const ::std::os::raw::c_void,
        data_size_in_bytes: usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the requested \\ref rocsparse_sptrsv_output data from the sptrsv descriptor.\n\n  @param[in]\n  handle      the pointer to the handle to the rocSPARSE library context.\n  @param[inout]\n  descr       the pointer to the sptrsv descriptor.\n  @param[in]\n  output      value of \\ref rocsparse_sptrsv_output.\n  @param[out]\n  data        output data.\n  @param[in]\n  data_size_in_bytes   output data size in bytes.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p output is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size_in_bytes is invalid."]
    pub fn rocsparse_sptrsv_get_output(
        handle: rocsparse_handle,
        descr: rocsparse_sptrsv_descr,
        output: rocsparse_sptrsv_output,
        data: *mut ::std::os::raw::c_void,
        data_size_in_bytes: usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Sparse matrix sptrsm routine descriptor creation.\n\n  \\details\n  \\p rocsparse_create_sptrsm_descr creates the descriptor of the \\ref rocsparse_sptrsm_buffer_size and\n  \\ref rocsparse_sptrsm routines.\n\n  @param[out]\n  descr        pointer to the descriptor of the sptrsm routine.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_pointer \\p descr pointer is invalid."]
    pub fn rocsparse_create_sptrsm_descr(descr: *mut rocsparse_sptrsm_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy sparse matrix sptrsm routine descriptor.\n\n  \\details\n  \\p rocsparse_destroy_sptrsm_descr destroys the descriptor of the \\ref rocsparse_sptrsm_buffer_size and\n  \\ref rocsparse_sptrsm routines.\n\n  @param[in]\n  descr        descriptor of the sptrsm routine.\n  \\retval      rocsparse_status_success the operation completed successfully."]
    pub fn rocsparse_destroy_sptrsm_descr(descr: rocsparse_sptrsm_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the requested \\ref rocsparse_sptrsm_input data in the sptrsm descriptor.\n\n  @param[in]\n  handle      the pointer to the handle to the rocSPARSE library context.\n  @param[inout]\n  descr       the pointer to the sptrsm descriptor.\n  @param[in]\n  input      value of \\ref rocsparse_sptrsm_input.\n  @param[in]\n  data        input data.\n  @param[in]\n  data_size   input data size.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p input is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size is invalid."]
    pub fn rocsparse_sptrsm_set_input(
        handle: rocsparse_handle,
        descr: rocsparse_sptrsm_descr,
        input: rocsparse_sptrsm_input,
        data: *const ::std::os::raw::c_void,
        data_size: usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the requested \\ref rocsparse_sptrsm_output data from the sptrsm descriptor.\n\n  @param[in]\n  handle      the pointer to the handle to the rocSPARSE library context.\n  @param[inout]\n  descr       the pointer to the sptrsm descriptor.\n  @param[in]\n  output      value of \\ref rocsparse_sptrsm_output.\n  @param[out]\n  data        output data.\n  @param[in]\n  data_size_in_bytes   output data size in bytes.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p output is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size_in_bytes is invalid."]
    pub fn rocsparse_sptrsm_get_output(
        handle: rocsparse_handle,
        descr: rocsparse_sptrsm_descr,
        output: rocsparse_sptrsm_output,
        data: *mut ::std::os::raw::c_void,
        data_size_in_bytes: usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create SpIC0 descriptor.\n\n  \\details\n  \\p rocsparse_spic0_descr_create creates the descriptor of the configuration of the sparse Incomplete Cholesky of level 0.\n  @param[in]\n  handle  the handle to the rocSPARSE library context.\n  @param[out]\n  p_spic0_descr        pointer to the descriptor of the Spic0 routine.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval      rocsparse_status_invalid_handle \\p handle pointer is invalid.\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_pointer \\p descr pointer is invalid."]
    pub fn rocsparse_spic0_descr_create(
        handle: rocsparse_handle,
        p_spic0_descr: *mut rocsparse_spic0_descr,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy SpIC0 descriptor.\n\n  \\details\n  \\p rocsparse_spic0_descr_destroy destroys the descriptor of the configuration of the sparse Incomplete Cholesky of level 0.\n\n  @param[in]\n  handle  the handle to the rocSPARSE library context.\n  @param[in]\n  spic0_descr        descriptor of the spic0 routine.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n  \\retval      rocsparse_status_invalid_handle \\p handle pointer is invalid.\n  \\retval      rocsparse_status_success the operation completed successfully."]
    pub fn rocsparse_spic0_descr_destroy(
        handle: rocsparse_handle,
        spic0_descr: rocsparse_spic0_descr,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the requested \\ref rocsparse_spic0_input data in the SpIC0 descriptor.\n\n  \\note\n  -     \\ref rocsparse_spic0_input_alg is \\ref rocsparse_spic0_alg. It can only be set before applying any phase.\n  -     \\ref rocsparse_spic0_input_compute_datatype is \\ref rocsparse_datatype. It can only be set before applying any phase. For now, it must be of value type of A.\n  -     \\ref rocsparse_spic0_input_analysis_policy is \\ref rocsparse_analysis_policy. It can only be set before applying any phase.\n  -     \\ref rocsparse_spic0_input_singularity_tolerance is a device/host double pointer. Its device mode is determined from the \\ref rocsparse_handle.\n  -     \\ref rocsparse_spic0_input_boost_enable is an \\p int32_t.\n  -     \\ref rocsparse_spic0_input_boost_value is a pointer to a scalar of value type A. Its device mode is determined from the \\ref rocsparse_handle.\n  -     \\ref rocsparse_spic0_input_boost_tolerance is a double pointer. Its device mode is determined from the \\ref rocsparse_handle.\n\n  @param[in]\n  handle      the pointer to the handle to the rocSPARSE library context.\n  @param[inout]\n  spic0_descr       the pointer to the SpIC0 descriptor.\n  @param[in]\n  spic0_input       value of \\ref rocsparse_spic0_input.\n  @param[in]\n  input        input data.\n  @param[in]\n  input_size_in_bytes   input data size in bytes.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success.  A null pointer can be passed if an error descriptor is not required.\n\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p input is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size_in_bytes is invalid."]
    pub fn rocsparse_spic0_set_input(
        handle: rocsparse_handle,
        spic0_descr: rocsparse_spic0_descr,
        spic0_input: rocsparse_spic0_input,
        input: *const ::std::os::raw::c_void,
        input_size_in_bytes: usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the requested \\ref rocsparse_spic0_output data from the SpIC0 descriptor.\n  \\note\n  -     \\ref rocsparse_spic0_output_singularity is \\ref rocsparse_singularity. It will be considered as an array of size \\p batch_count.\n  -     \\ref rocsparse_spic0_output_singularity_position is \\p int64_t. It will be considered as an array of size \\p batch_count.\n  @param[in]\n  handle      the pointer to the handle to the rocSPARSE library context.\n  @param[inout]\n  spic0_descr       the pointer to the SpIC0 descriptor.\n  @param[in]\n  spic0_output      value of \\ref rocsparse_spic0_output.\n  @param[out]\n  output        output data\n  @param[in]\n  output_size_in_bytes   output data size in bytes.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p output is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size_in_bytes is invalid."]
    pub fn rocsparse_spic0_get_output(
        handle: rocsparse_handle,
        spic0_descr: rocsparse_spic0_descr,
        spic0_output: rocsparse_spic0_output,
        output: *mut ::std::os::raw::c_void,
        output_size_in_bytes: usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create SpILU0 descriptor.\n\n  \\details\n  \\p rocsparse_spilu0_descr_create creates the descriptor of the configuration of the sparse Incomplete LU of level 0.\n\n  @param[in]\n  handle  the handle to the rocSPARSE library context.\n  @param[out]\n  p_spilu0_descr        pointer to the descriptor of the Spilu0 routine.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success.  A null pointer can be passed if an error descriptor is not required.\n\n  \\retval      rocsparse_status_invalid_handle \\p handle pointer is invalid.\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_pointer \\p descr pointer is invalid."]
    pub fn rocsparse_spilu0_descr_create(
        handle: rocsparse_handle,
        p_spilu0_descr: *mut rocsparse_spilu0_descr,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy SpILU0 descriptor.\n\n  \\details\n  \\p rocsparse_spilu0_descr_destroy destroys the descriptor of the configuration of the sparse Incomplete LU of level 0.\n\n  @param[in]\n  handle  the handle to the rocSPARSE library context.\n  @param[in]\n  spilu0_descr        descriptor of the spilu0 routine.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n  \\retval      rocsparse_status_invalid_handle \\p handle pointer is invalid.\n  \\retval      rocsparse_status_success the operation completed successfully."]
    pub fn rocsparse_spilu0_descr_destroy(
        handle: rocsparse_handle,
        spilu0_descr: rocsparse_spilu0_descr,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the requested \\ref rocsparse_spilu0_input data in the SpILU0 descriptor.\n\n  \\note\n  -     \\ref rocsparse_spilu0_input_alg is \\ref rocsparse_spilu0_alg. It can only be set before applying any phase.\n  -     \\ref rocsparse_spilu0_input_compute_datatype is \\ref rocsparse_datatype. It can only be set before applying any phase. For now, it must be of value type of A.\n  -     \\ref rocsparse_spilu0_input_analysis_policy is \\ref rocsparse_analysis_policy. It can only be set before applying any phase.\n  -     \\ref rocsparse_spilu0_input_singularity_tolerance is a device/host double pointer. Its device mode is determined from the \\ref rocsparse_handle. No batched tolerances can be specified.\n  -     \\ref rocsparse_spilu0_input_boost_enable is a host \\p int32_t. Set to 1 to enable and 0 to disable.\n  -     \\ref rocsparse_spilu0_input_boost_value is a pointer to a scalar of value type of A. Its device mode is determined from the \\ref rocsparse_handle. No batched boost values can be specified.\n  -     \\ref rocsparse_spilu0_input_boost_tolerance is a double pointer. Its device mode is determined from the \\ref rocsparse_handle. No batched boost tolerances can be specified.\n\n  @param[in]\n  handle      the pointer to the handle to the rocSPARSE library context.\n  @param[inout]\n  spilu0_descr       the pointer to the SpILU0 descriptor.\n  @param[in]\n  spilu0_input       value of \\ref rocsparse_spilu0_input.\n  @param[in]\n  input        input data.\n  @param[in]\n  input_size_in_bytes   input data size in bytes.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p input is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size_in_bytes is invalid."]
    pub fn rocsparse_spilu0_set_input(
        handle: rocsparse_handle,
        spilu0_descr: rocsparse_spilu0_descr,
        spilu0_input: rocsparse_spilu0_input,
        input: *const ::std::os::raw::c_void,
        input_size_in_bytes: usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the requested \\ref rocsparse_spilu0_output data from the SpILU0 descriptor.\n  \\note\n  -     \\ref rocsparse_spilu0_output_singularity is \\ref rocsparse_singularity. It will be considered as an array of size \\p batch_count.\n  -     \\ref rocsparse_spilu0_output_singularity_position is int64_t. It will be considered as an array of size \\p batch_count.\n  @param[in]\n  handle      the pointer to the handle to the rocSPARSE library context.\n  @param[inout]\n  spilu0_descr       the pointer to the SpILU0 descriptor.\n  @param[in]\n  spilu0_output      value of \\ref rocsparse_spilu0_output.\n  @param[out]\n  output        output data.\n  @param[in]\n  output_size_in_bytes   output data size in bytes.\n  @param[out]\n  p_error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p output is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size_in_bytes is invalid."]
    pub fn rocsparse_spilu0_get_output(
        handle: rocsparse_handle,
        spilu0_descr: rocsparse_spilu0_descr,
        spilu0_output: rocsparse_spilu0_output,
        output: *mut ::std::os::raw::c_void,
        output_size_in_bytes: usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the fields of the sparse COO matrix descriptor.\n  \\details\n  \\p rocsparse_coo_get gets the fields of the sparse COO matrix descriptor.\n\n  @param[in]\n  descr       the pointer to the sparse COO matrix descriptor.\n  @param[out]\n  rows        number of rows in the sparse COO matrix.\n  @param[out]\n  cols        number of columns in the sparse COO matrix.\n  @param[out]\n  nnz         number of non-zeros in sparse COO matrix.\n  @param[out]\n  coo_row_ind row indices of the COO matrix. Must be an array of length \\p nnz.\n  @param[out]\n  coo_col_ind column indices of the COO matrix. Must be an array of length \\p nnz.\n  @param[out]\n  coo_val     values of the COO matrix. Must be an array of length \\p nnz.\n  @param[out]\n  idx_type    \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[out]\n  data_type   \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n              \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p coo_row_ind, \\p coo_col_ind, or \\p coo_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_coo_get(
        descr: rocsparse_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        nnz: *mut i64,
        coo_row_ind: *mut *mut ::std::os::raw::c_void,
        coo_col_ind: *mut *mut ::std::os::raw::c_void,
        coo_val: *mut *mut ::std::os::raw::c_void,
        idx_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_coo_get(
        descr: rocsparse_const_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        nnz: *mut i64,
        coo_row_ind: *mut *const ::std::os::raw::c_void,
        coo_col_ind: *mut *const ::std::os::raw::c_void,
        coo_val: *mut *const ::std::os::raw::c_void,
        idx_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the fields of the sparse COO AoS matrix descriptor.\n  \\details\n  \\p rocsparse_coo_aos_get gets the fields of the sparse COO AoS matrix descriptor.\n\n  @param[in]\n  descr       the pointer to the sparse COO AoS matrix descriptor.\n  @param[out]\n  rows        number of rows in the sparse COO AoS matrix.\n  @param[out]\n  cols        number of columns in the sparse COO AoS matrix.\n  @param[out]\n  nnz         number of non-zeros in the sparse COO AoS matrix.\n  @param[out]\n  coo_ind     <row, columns> indices of the COO AoS matrix. Must be an array of length \\p nnz.\n  @param[out]\n  coo_val     values of the COO AoS matrix. Must be an array of length \\p nnz.\n  @param[out]\n  idx_type    \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[out]\n  data_type   \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n              \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p coo_ind, or \\p coo_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_coo_aos_get(
        descr: rocsparse_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        nnz: *mut i64,
        coo_ind: *mut *mut ::std::os::raw::c_void,
        coo_val: *mut *mut ::std::os::raw::c_void,
        idx_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_coo_aos_get(
        descr: rocsparse_const_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        nnz: *mut i64,
        coo_ind: *mut *const ::std::os::raw::c_void,
        coo_val: *mut *const ::std::os::raw::c_void,
        idx_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = "@}*/\n/*! \\ingroup aux_module\n  \\brief Get the fields of the sparse CSR matrix descriptor.\n  \\details\n  \\p rocsparse_csr_get gets the fields of the sparse CSR matrix descriptor.\n\n  @param[in]\n  descr        the pointer to the sparse CSR matrix descriptor.\n  @param[out]\n  rows         number of rows in the CSR matrix.\n  @param[out]\n  cols         number of columns in the CSR matrix.\n  @param[out]\n  nnz          number of non-zeros in the CSR matrix.\n  @param[out]\n  csr_row_ptr  row offsets of the CSR matrix. Must be an array of length \\p rows+1.\n  @param[out]\n  csr_col_ind  column indices of the CSR matrix. Must be an array of length \\p nnz.\n  @param[out]\n  csr_val      values of the CSR matrix. Must be an array of length \\p nnz.\n  @param[out]\n  row_ptr_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  col_ind_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  idx_base     \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[out]\n  data_type    \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n               \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p csr_row_ptr, \\p csr_col_ind, or \\p csr_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_value if \\p row_ptr_type, \\p col_ind_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_csr_get(
        descr: rocsparse_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        nnz: *mut i64,
        csr_row_ptr: *mut *mut ::std::os::raw::c_void,
        csr_col_ind: *mut *mut ::std::os::raw::c_void,
        csr_val: *mut *mut ::std::os::raw::c_void,
        row_ptr_type: *mut rocsparse_indextype,
        col_ind_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_csr_get(
        descr: rocsparse_const_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        nnz: *mut i64,
        csr_row_ptr: *mut *const ::std::os::raw::c_void,
        csr_col_ind: *mut *const ::std::os::raw::c_void,
        csr_val: *mut *const ::std::os::raw::c_void,
        row_ptr_type: *mut rocsparse_indextype,
        col_ind_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the fields of the sparse CSC matrix descriptor.\n  \\details\n  \\p rocsparse_csc_get gets the fields of the sparse CSC matrix descriptor.\n\n  @param[in]\n  descr        the pointer to the sparse CSC matrix descriptor.\n  @param[out]\n  rows         number of rows in the CSC matrix.\n  @param[out]\n  cols         number of columns in the CSC matrix\n  @param[out]\n  nnz          number of non-zeros in the CSC matrix.\n  @param[out]\n  csc_col_ptr  column offsets of the CSC matrix. Must be an array of length \\p cols+1.\n  @param[out]\n  csc_row_ind  row indices of the CSC matrix. Must be an array of length \\p nnz.\n  @param[out]\n  csc_val      values of the CSC matrix. Must be an array of length \\p nnz.\n  @param[out]\n  col_ptr_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  row_ind_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  idx_base     \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[out]\n  data_type    \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n               \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p csc_col_ptr, \\p csc_row_ind, or \\p csr_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_value if \\p col_ptr_type, \\p row_ind_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_csc_get(
        descr: rocsparse_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        nnz: *mut i64,
        csc_col_ptr: *mut *mut ::std::os::raw::c_void,
        csc_row_ind: *mut *mut ::std::os::raw::c_void,
        csc_val: *mut *mut ::std::os::raw::c_void,
        col_ptr_type: *mut rocsparse_indextype,
        row_ind_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_csc_get(
        descr: rocsparse_const_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        nnz: *mut i64,
        csc_col_ptr: *mut *const ::std::os::raw::c_void,
        csc_row_ind: *mut *const ::std::os::raw::c_void,
        csc_val: *mut *const ::std::os::raw::c_void,
        col_ptr_type: *mut rocsparse_indextype,
        row_ind_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the fields of the sparse ELL matrix descriptor.\n  \\details\n  \\p rocsparse_ell_get gets the fields of the sparse ELL matrix descriptor.\n\n  @param[in]\n  descr       the pointer to the sparse ELL matrix descriptor.\n  @param[out]\n  rows        number of rows in the ELL matrix.\n  @param[out]\n  cols        number of columns in the ELL matrix.\n  @param[out]\n  ell_col_ind column indices of the ELL matrix. Must be an array of length \\p rows*ell_width.\n  @param[out]\n  ell_val     values of the ELL matrix. Must be an array of length \\p rows*ell_width.\n  @param[out]\n  ell_width   width of the ELL matrix.\n  @param[out]\n  idx_type    \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[out]\n  data_type   \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n              \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p ell_col_ind, or \\p ell_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p ell_width is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_ell_get(
        descr: rocsparse_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        ell_col_ind: *mut *mut ::std::os::raw::c_void,
        ell_val: *mut *mut ::std::os::raw::c_void,
        ell_width: *mut i64,
        idx_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_ell_get(
        descr: rocsparse_const_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        ell_col_ind: *mut *const ::std::os::raw::c_void,
        ell_val: *mut *const ::std::os::raw::c_void,
        ell_width: *mut i64,
        idx_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the fields of the sparse blocked ELL matrix descriptor.\n  \\details\n  \\p rocsparse_bell_get gets the fields of the sparse blocked ELL matrix descriptor.\n\n  @param[in]\n  descr         the pointer to the sparse blocked ELL matrix descriptor.\n  @param[out]\n  rows          number of rows in the blocked ELL matrix.\n  @param[out]\n  cols          number of columns in the blocked ELL matrix.\n  @param[out]\n  ell_block_dir \\ref rocsparse_direction_row or \\ref rocsparse_direction_column.\n  @param[out]\n  ell_block_dim block dimension of the sparse blocked ELL matrix.\n  @param[out]\n  ell_cols      column indices of the blocked ELL matrix. Must be an array of length \\p rows*ell_width.\n  @param[out]\n  ell_col_ind   column indices of the blocked ELL matrix. Must be an array of length \\p rows*ell_width.\n  @param[out]\n  ell_val       values of the blocked ELL matrix. Must be an array of length \\p rows*ell_width.\n  @param[out]\n  idx_type      \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  idx_base      \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[out]\n  data_type     \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n                \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p ell_cols, \\p ell_col_ind, or \\p ell_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p ell_block_dim is invalid.\n  \\retval rocsparse_status_invalid_value if \\p ell_block_dir, \\p idx_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_bell_get(
        descr: rocsparse_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        ell_block_dir: *mut rocsparse_direction,
        ell_block_dim: *mut i64,
        ell_cols: *mut i64,
        ell_col_ind: *mut *mut ::std::os::raw::c_void,
        ell_val: *mut *mut ::std::os::raw::c_void,
        idx_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_bell_get(
        descr: rocsparse_const_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        ell_block_dir: *mut rocsparse_direction,
        ell_block_dim: *mut i64,
        ell_cols: *mut i64,
        ell_col_ind: *mut *const ::std::os::raw::c_void,
        ell_val: *mut *const ::std::os::raw::c_void,
        idx_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the fields of the sparse sliced ELL matrix descriptor.\n  \\details\n  \\p rocsparse_sell_get gets the fields of the sparse sliced ELL matrix descriptor.\n\n  @param[in]\n  descr                  the pointer to the sparse sliced ELL matrix descriptor.\n  @param[out]\n  rows                   number of rows in the sliced ELL matrix.\n  @param[out]\n  cols                   number of columns in the sliced ELL matrix.\n  @param[out]\n  nnz                    number of non-zeros in the sliced ELL matrix.\n  @param[out]\n  sell_slice_size        slice size in the sliced ELL matrix.\n  @param[out]\n  sell_colval_size       actual number of elements stored in the sliced ELL matrix.\n  @param[out]\n  sell_slice_offsets     slice offsets array in the sliced ELL matrix. Must be an array of length \\p nslices + 1\n                         where \\p nslices=(rows-1)/sell_slice_size+1.\n  @param[out]\n  sell_col_ind            column indices of the sliced ELL matrix. Must be an array of length \\p sell_colval_size.\n  @param[out]\n  sell_val                values of the sliced ELL matrix. Must be an array of length \\p sell_colval_size.\n  @param[out]\n  sell_slice_offsets_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  sell_col_ind_type       \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  idx_base                \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[out]\n  data_type               \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n                          \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p sell_slice_offsets, \\p sell_col_ind, or \\p sell_val is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, \\p nnz, \\p sell_colval_size, or \\p sell_slice_size is invalid.\n  \\retval rocsparse_status_invalid_value if \\p sell_slice_offsets_type, \\p sell_col_ind_type, \\p idx_base, or \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_sell_get(
        descr: rocsparse_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        nnz: *mut i64,
        sell_slice_size: *mut i64,
        sell_colval_size: *mut i64,
        sell_slice_offsets: *mut *mut ::std::os::raw::c_void,
        sell_col_ind: *mut *mut ::std::os::raw::c_void,
        sell_val: *mut *mut ::std::os::raw::c_void,
        sell_slice_offsets_type: *mut rocsparse_indextype,
        sell_col_ind_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_sell_get(
        descr: rocsparse_const_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        nnz: *mut i64,
        sell_slice_size: *mut i64,
        sell_colval_size: *mut i64,
        sell_slice_offsets: *mut *const ::std::os::raw::c_void,
        sell_col_ind: *mut *const ::std::os::raw::c_void,
        sell_val: *mut *const ::std::os::raw::c_void,
        sell_slice_offsets_type: *mut rocsparse_indextype,
        sell_col_ind_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the fields of the sparse BSR matrix descriptor.\n  \\details\n  \\p rocsparse_bsr_get gets the fields of the sparse BSR matrix descriptor.\n\n  @param[in]\n  descr        the pointer to the sparse BSR matrix descriptor.\n  @param[out]\n  brows        number of block rows in the BSR matrix.\n  @param[out]\n  bcols        number of block columns in the BSR matrix.\n  @param[out]\n  bnnz         number of non-zero blocks in the BSR matrix.\n  @param[out]\n  block_dir    storage layout of the dense block matrices.\n  @param[out]\n  block_dim    block dimension.\n  @param[out]\n  bsr_row_ptr  row offsets of the BSR matrix. Must be an array of length \\p brows+1.\n  @param[out]\n  bsr_col_ind  column indices of the BSR matrix. Must be an array of length \\p bnnz.\n  @param[out]\n  bsr_val      values of the BSR matrix (must be array of length \\p bnnz * \\p block_dim * \\p block_dim ).\n  @param[out]\n  row_ptr_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  col_ind_type \\ref rocsparse_indextype_i32 or \\ref rocsparse_indextype_i64.\n  @param[out]\n  idx_base     \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[out]\n  data_type    \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n               \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p brows, \\p bcols, \\p bnnz,\n          \\p block_dir, \\p block_dim, \\p bsr_row_ptr, \\p bsr_col_ind, \\p bsr_val,\n          \\p row_ptr_type, \\p col_ind_type, \\p idx_base, or \\p data_type is invalid.\n  \\retval rocsparse_status_not_initialized if \\p descr has not been initialized.\n/\n/**@{"]
    pub fn rocsparse_bsr_get(
        descr: rocsparse_spmat_descr,
        brows: *mut i64,
        bcols: *mut i64,
        bnnz: *mut i64,
        block_dir: *mut rocsparse_direction,
        block_dim: *mut i64,
        bsr_row_ptr: *mut *mut ::std::os::raw::c_void,
        bsr_col_ind: *mut *mut ::std::os::raw::c_void,
        bsr_val: *mut *mut ::std::os::raw::c_void,
        row_ptr_type: *mut rocsparse_indextype,
        col_ind_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_bsr_get(
        descr: rocsparse_const_spmat_descr,
        brows: *mut i64,
        bcols: *mut i64,
        bnnz: *mut i64,
        block_dir: *mut rocsparse_direction,
        block_dim: *mut i64,
        bsr_row_ptr: *mut *const ::std::os::raw::c_void,
        bsr_col_ind: *mut *const ::std::os::raw::c_void,
        bsr_val: *mut *const ::std::os::raw::c_void,
        row_ptr_type: *mut rocsparse_indextype,
        col_ind_type: *mut rocsparse_indextype,
        idx_base: *mut rocsparse_index_base,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the row indices, column indices, and values array in the sparse COO matrix descriptor.\n\n  @param[inout]\n  descr   the pointer to the sparse vector descriptor.\n  @param[in]\n  coo_row_ind row indices of the COO matrix. Must be an array of length \\p nnz.\n  @param[in]\n  coo_col_ind column indices of the COO matrix. Must be an array of length \\p nnz.\n  @param[in]\n  coo_val     values of the COO matrix. Must be an array of length \\p nnz.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p coo_row_ind, \\p coo_col_ind, or \\p coo_val is invalid."]
    pub fn rocsparse_coo_set_pointers(
        descr: rocsparse_spmat_descr,
        coo_row_ind: *mut ::std::os::raw::c_void,
        coo_col_ind: *mut ::std::os::raw::c_void,
        coo_val: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the <row, column> indices and values array in the sparse COO AoS matrix descriptor.\n\n  @param[inout]\n  descr   the pointer to the sparse vector descriptor.\n  @param[in]\n  coo_ind <row, column> indices of the COO matrix. Must be an array of length \\p nnz.\n  @param[in]\n  coo_val values of the COO matrix. Must be an array of length \\p nnz.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p coo_ind, or \\p coo_val is invalid."]
    pub fn rocsparse_coo_aos_set_pointers(
        descr: rocsparse_spmat_descr,
        coo_ind: *mut ::std::os::raw::c_void,
        coo_val: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the row offsets, column indices, and values array in the sparse CSR matrix descriptor.\n\n  @param[inout]\n  descr   the pointer to the sparse vector descriptor.\n  @param[in]\n  csr_row_ptr  row offsets of the CSR matrix. Must be an array of length \\p rows+1.\n  @param[in]\n  csr_col_ind  column indices of the CSR matrix. Must be an array of length \\p nnz.\n  @param[in]\n  csr_val      values of the CSR matrix. Must be an array of length \\p nnz.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p coo_ind, or \\p coo_val is invalid."]
    pub fn rocsparse_csr_set_pointers(
        descr: rocsparse_spmat_descr,
        csr_row_ptr: *mut ::std::os::raw::c_void,
        csr_col_ind: *mut ::std::os::raw::c_void,
        csr_val: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the column offsets, row indices, and values array in the sparse CSC matrix descriptor.\n\n  @param[inout]\n  descr       the pointer to the sparse vector descriptor.\n  @param[in]\n  csc_col_ptr column offsets of the CSC matrix. Must be an array of length \\p cols+1.\n  @param[in]\n  csc_row_ind row indices of the CSC matrix. Must be an array of length \\p nnz.\n  @param[in]\n  csc_val     values of the CSC matrix. Must be an array of length \\p nnz.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p csc_col_ptr, \\p csc_row_ind, or \\p csc_val is invalid."]
    pub fn rocsparse_csc_set_pointers(
        descr: rocsparse_spmat_descr,
        csc_col_ptr: *mut ::std::os::raw::c_void,
        csc_row_ind: *mut ::std::os::raw::c_void,
        csc_val: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the column indices and values array in the sparse ELL matrix descriptor.\n\n  @param[inout]\n  descr       the pointer to the sparse vector descriptor.\n  @param[in]\n  ell_col_ind column indices of the ELL matrix. Must be an array of length \\p rows*ell_width.\n  @param[in]\n  ell_val     values of the ELL matrix. Must be an array of length \\p rows*ell_width.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p ell_col_ind, or \\p ell_val is invalid."]
    pub fn rocsparse_ell_set_pointers(
        descr: rocsparse_spmat_descr,
        ell_col_ind: *mut ::std::os::raw::c_void,
        ell_val: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the row offsets, column indices, and values array in the sparse BSR matrix descriptor\n\n  @param[inout]\n  descr   the pointer to the sparse vector descriptor.\n  @param[in]\n  bsr_row_ptr  row offsets of the BSR matrix. Must be an array of length \\p rows+1.\n  @param[in]\n  bsr_col_ind  column indices of the BSR matrix. Must be an array of length \\p nnzb.\n  @param[in]\n  bsr_val      values of the BSR matrix. Must be an array of length \\p nnzb*block_dim*block_dim.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr, \\p bsr_row_ptr, \\p bsr_col_ind, or \\p bsr_val is invalid."]
    pub fn rocsparse_bsr_set_pointers(
        descr: rocsparse_spmat_descr,
        bsr_row_ptr: *mut ::std::os::raw::c_void,
        bsr_col_ind: *mut ::std::os::raw::c_void,
        bsr_val: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the number of rows, columns, and non-zeros from the sparse matrix descriptor.\n\n  @param[in]\n  descr       the pointer to the sparse matrix descriptor.\n  @param[out]\n  rows        number of rows in the sparse matrix.\n  @param[out]\n  cols        number of columns in the sparse matrix.\n  @param[out]\n  nnz         number of non-zeros in sparse matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p nnz is invalid."]
    pub fn rocsparse_spmat_get_size(
        descr: rocsparse_const_spmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        nnz: *mut i64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the sparse matrix format from the sparse matrix descriptor.\n\n  @param[in]\n  descr       the pointer to the sparse matrix descriptor.\n  @param[out]\n  format      \\ref rocsparse_format_coo, \\ref rocsparse_format_coo_aos,\n              \\ref rocsparse_format_csr, \\ref rocsparse_format_csc, or\n              \\ref rocsparse_format_ell\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_value if \\p format is invalid."]
    pub fn rocsparse_spmat_get_format(
        descr: rocsparse_const_spmat_descr,
        format: *mut rocsparse_format,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the sparse matrix index base from the sparse matrix descriptor.\n\n  @param[in]\n  descr       the pointer to the sparse matrix descriptor.\n  @param[out]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_value if \\p idx_base is invalid."]
    pub fn rocsparse_spmat_get_index_base(
        descr: rocsparse_const_spmat_descr,
        idx_base: *mut rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the values array from the sparse matrix descriptor.\n\n  @param[in]\n  descr     the pointer to the sparse matrix descriptor.\n  @param[out]\n  values    values array of the sparse matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p values is invalid.\n/\n/**@{"]
    pub fn rocsparse_spmat_get_values(
        descr: rocsparse_spmat_descr,
        values: *mut *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_spmat_get_values(
        descr: rocsparse_const_spmat_descr,
        values: *mut *const ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the values array in the sparse matrix descriptor.\n\n  @param[inout]\n  descr     the pointer to the sparse matrix descriptor.\n  @param[in]\n  values    values array of the sparse matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p values is invalid."]
    pub fn rocsparse_spmat_set_values(
        descr: rocsparse_spmat_descr,
        values: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the number of non-zeros from the sparse matrix descriptor.\n\n  \\note The returned number of non-zeros is the number of elements of the array of values of the sparse matrix.\n\n  @param[in]\n  descr       the pointer to the sparse matrix descriptor.\n  @param[out]\n  nnz the number of non-zeros of the sparse matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p nnz is invalid."]
    pub fn rocsparse_spmat_get_nnz(
        descr: rocsparse_const_spmat_descr,
        nnz: *mut i64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the number of non-zeros in the sparse matrix descriptor.\n\n  \\note In the case of a sparse matrix with the format \\ref rocsparse_format_bsr, \\p nnz is the number of blocks.\n  \\note In the case of a sparse matrix with the format \\ref rocsparse_format_ell, the operation will return an error.\n  \\note In the case of a sparse matrix with the format \\ref rocsparse_format_bell, the operation will return an error.\n\n  @param[in]\n  descr       the pointer to the sparse matrix descriptor.\n  @param[in]\n  nnz         number of non-zeros of the sparse matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_size if \\p nnz is invalid."]
    pub fn rocsparse_spmat_set_nnz(descr: rocsparse_spmat_descr, nnz: i64) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the strided batch count from the sparse matrix descriptor.\n\n  @param[in]\n  descr       the pointer to the sparse matrix descriptor.\n  @param[out]\n  batch_count batch_count of the sparse matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_size if \\p batch_count is invalid."]
    pub fn rocsparse_spmat_get_strided_batch(
        descr: rocsparse_const_spmat_descr,
        batch_count: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the strided batch count in the sparse matrix descriptor.\n\n  @param[in]\n  descr       the pointer to the sparse matrix descriptor.\n  @param[in]\n  batch_count batch_count of the sparse matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_size if \\p batch_count is invalid."]
    pub fn rocsparse_spmat_set_strided_batch(
        descr: rocsparse_spmat_descr,
        batch_count: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the batch count and batch stride in the sparse COO matrix descriptor\n\n  @param[inout]\n  descr        the pointer to the sparse COO matrix descriptor.\n  @param[in]\n  batch_count  batch_count of the sparse COO matrix.\n  @param[in]\n  batch_stride batch stride of the sparse COO matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_size if \\p batch_count or \\p batch_stride is invalid."]
    pub fn rocsparse_coo_set_strided_batch(
        descr: rocsparse_spmat_descr,
        batch_count: rocsparse_int,
        batch_stride: i64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the batch count, row offset batch stride, and the column indices batch stride in the sparse CSR matrix descriptor.\n\n  @param[inout]\n  descr                       the pointer to the sparse CSR matrix descriptor.\n  @param[in]\n  batch_count                 batch_count of the sparse CSR matrix.\n  @param[in]\n  offsets_batch_stride        row offset batch stride of the sparse CSR matrix.\n  @param[in]\n  columns_values_batch_stride column indices batch stride of the sparse CSR matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_size if \\p batch_count, \\p offsets_batch_stride, or \\p columns_values_batch_stride is invalid."]
    pub fn rocsparse_csr_set_strided_batch(
        descr: rocsparse_spmat_descr,
        batch_count: rocsparse_int,
        offsets_batch_stride: i64,
        columns_values_batch_stride: i64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the batch count, column offset batch stride, and the row indices batch stride in the sparse CSC matrix descriptor.\n\n  @param[inout]\n  descr                       the pointer to the sparse CSC matrix descriptor.\n  @param[in]\n  batch_count                 batch_count of the sparse CSC matrix.\n  @param[in]\n  offsets_batch_stride        column offset batch stride of the sparse CSC matrix.\n  @param[in]\n  rows_values_batch_stride    row indices batch stride of the sparse CSC matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_size if \\p batch_count, \\p offsets_batch_stride, or \\p rows_values_batch_stride is invalid."]
    pub fn rocsparse_csc_set_strided_batch(
        descr: rocsparse_spmat_descr,
        batch_count: rocsparse_int,
        offsets_batch_stride: i64,
        rows_values_batch_stride: i64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the requested attribute data from the sparse matrix descriptor.\n\n  @param[in]\n  descr       the pointer to the sparse matrix descriptor.\n  @param[in]\n  attribute \\ref rocsparse_spmat_fill_mode, \\ref rocsparse_spmat_diag_type,\n            \\ref rocsparse_spmat_matrix_type, or \\ref rocsparse_spmat_storage_mode.\n  @param[out]\n  data      attribute data.\n  @param[in]\n  data_size attribute data size.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p attribute is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size is invalid."]
    pub fn rocsparse_spmat_get_attribute(
        descr: rocsparse_const_spmat_descr,
        attribute: rocsparse_spmat_attribute,
        data: *mut ::std::os::raw::c_void,
        data_size: usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the requested attribute data in the sparse matrix descriptor.\n\n  @param[inout]\n  descr       the pointer to the sparse matrix descriptor.\n  @param[in]\n  attribute \\ref rocsparse_spmat_fill_mode, \\ref rocsparse_spmat_diag_type,\n            \\ref rocsparse_spmat_matrix_type, or \\ref rocsparse_spmat_storage_mode.\n  @param[in]\n  data      attribute data.\n  @param[in]\n  data_size attribute data size.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p data is invalid.\n  \\retval rocsparse_status_invalid_value if \\p attribute is invalid.\n  \\retval rocsparse_status_invalid_size if \\p data_size is invalid."]
    pub fn rocsparse_spmat_set_attribute(
        descr: rocsparse_spmat_descr,
        attribute: rocsparse_spmat_attribute,
        data: *const ::std::os::raw::c_void,
        data_size: usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a dense vector descriptor.\n  \\details\n  \\p rocsparse_create_dnvec_descr creates a dense vector descriptor. It should be\n  destroyed at the end using rocsparse_destroy_dnvec_descr().\n\n  @param[out]\n  descr   the pointer to the dense vector descriptor.\n  @param[in]\n  size   size of the dense vector.\n  @param[in]\n  values   non-zero values in the dense vector. Must be an array of length \\p size.\n  @param[in]\n  data_type   \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n              \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p values is invalid.\n  \\retval rocsparse_status_invalid_size if \\p size is invalid.\n  \\retval rocsparse_status_invalid_value if \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_create_dnvec_descr(
        descr: *mut rocsparse_dnvec_descr,
        size: i64,
        values: *mut ::std::os::raw::c_void,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_create_const_dnvec_descr(
        descr: *mut rocsparse_const_dnvec_descr,
        size: i64,
        values: *const ::std::os::raw::c_void,
        data_type: rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a dense vector descriptor.\n\n  \\details\n  \\p rocsparse_destroy_dnvec_descr destroys a dense vector descriptor and releases all\n  resources used by the descriptor.\n\n  @param[in]\n  descr   the matrix descriptor.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr is invalid."]
    pub fn rocsparse_destroy_dnvec_descr(descr: rocsparse_const_dnvec_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the fields of the dense vector descriptor.\n  \\details\n  \\p rocsparse_dnvec_get gets the fields of the dense vector descriptor.\n\n  @param[in]\n  descr   the pointer to the dense vector descriptor.\n  @param[out]\n  size   size of the dense vector.\n  @param[out]\n  values   non-zero values in the dense vector. Must be an array of length \\p size.\n  @param[out]\n  data_type   \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n              \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p values is invalid.\n  \\retval rocsparse_status_invalid_size if \\p size is invalid.\n  \\retval rocsparse_status_invalid_value if \\p data_type is invalid.\n/\n/**@{"]
    pub fn rocsparse_dnvec_get(
        descr: rocsparse_dnvec_descr,
        size: *mut i64,
        values: *mut *mut ::std::os::raw::c_void,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_dnvec_get(
        descr: rocsparse_const_dnvec_descr,
        size: *mut i64,
        values: *mut *const ::std::os::raw::c_void,
        data_type: *mut rocsparse_datatype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the values array from a dense vector descriptor.\n\n  @param[in]\n  descr   the matrix descriptor.\n  @param[out]\n  values   non-zero values in the dense vector. Must be an array of length \\p size.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr or \\p values is invalid.\n/\n/**@{"]
    pub fn rocsparse_dnvec_get_values(
        descr: rocsparse_dnvec_descr,
        values: *mut *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_dnvec_get_values(
        descr: rocsparse_const_dnvec_descr,
        values: *mut *const ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the values array in a dense vector descriptor.\n\n  @param[inout]\n  descr   the matrix descriptor.\n  @param[in]\n  values   non-zero values in the dense vector. Must be an array of length \\p size.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr or \\p values is invalid."]
    pub fn rocsparse_dnvec_set_values(
        descr: rocsparse_dnvec_descr,
        values: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Create a dense matrix descriptor.\n  \\details\n  \\p rocsparse_create_dnmat_descr creates a dense matrix descriptor. It should be\n  destroyed at the end using rocsparse_destroy_dnmat_descr().\n\n  @param[out]\n  descr     the pointer to the dense matrix descriptor.\n  @param[in]\n  rows      number of rows in the dense matrix.\n  @param[in]\n  cols      number of columns in the dense matrix.\n  @param[in]\n  ld        leading dimension of the dense matrix.\n  @param[in]\n  values    non-zero values in the dense vector. Must be an array of length\n            \\p ld*rows if \\p order=rocsparse_order_column or \\p ld*cols if \\p order=rocsparse_order_row.\n  @param[in]\n  data_type \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n            \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n  @param[in]\n  order     \\ref rocsparse_order_row or \\ref rocsparse_order_column.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p values is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p ld is invalid.\n  \\retval rocsparse_status_invalid_value if \\p data_type or \\p order is invalid.\n/\n/**@{"]
    pub fn rocsparse_create_dnmat_descr(
        descr: *mut rocsparse_dnmat_descr,
        rows: i64,
        cols: i64,
        ld: i64,
        values: *mut ::std::os::raw::c_void,
        data_type: rocsparse_datatype,
        order: rocsparse_order,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_create_const_dnmat_descr(
        descr: *mut rocsparse_const_dnmat_descr,
        rows: i64,
        cols: i64,
        ld: i64,
        values: *const ::std::os::raw::c_void,
        data_type: rocsparse_datatype,
        order: rocsparse_order,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Destroy a dense matrix descriptor.\n\n  \\details\n  \\p rocsparse_destroy_dnmat_descr destroys a dense matrix descriptor and releases all\n  resources used by the descriptor.\n\n  @param[in]\n  descr   the matrix descriptor.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr is invalid."]
    pub fn rocsparse_destroy_dnmat_descr(descr: rocsparse_const_dnmat_descr) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the fields of the dense matrix descriptor.\n\n  @param[in]\n  descr   the pointer to the dense matrix descriptor.\n  @param[out]\n  rows   number of rows in the dense matrix.\n  @param[out]\n  cols   number of columns in the dense matrix.\n  @param[out]\n  ld        leading dimension of the dense matrix.\n  @param[out]\n  values    non-zero values in the dense matrix. Must be an array of length\n            \\p ld*rows if \\p order=rocsparse_order_column or \\p ld*cols if \\p order=rocsparse_order_row.\n  @param[out]\n  data_type   \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r,\n              \\ref rocsparse_datatype_f32_c, or \\ref rocsparse_datatype_f64_c.\n  @param[out]\n  order     \\ref rocsparse_order_row or \\ref rocsparse_order_column.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p values is invalid.\n  \\retval rocsparse_status_invalid_size if \\p rows, \\p cols, or \\p ld is invalid.\n  \\retval rocsparse_status_invalid_value if \\p data_type or \\p order is invalid.\n/\n/**@{"]
    pub fn rocsparse_dnmat_get(
        descr: rocsparse_dnmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        ld: *mut i64,
        values: *mut *mut ::std::os::raw::c_void,
        data_type: *mut rocsparse_datatype,
        order: *mut rocsparse_order,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_dnmat_get(
        descr: rocsparse_const_dnmat_descr,
        rows: *mut i64,
        cols: *mut i64,
        ld: *mut i64,
        values: *mut *const ::std::os::raw::c_void,
        data_type: *mut rocsparse_datatype,
        order: *mut rocsparse_order,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the values array from the dense matrix descriptor.\n\n  @param[in]\n  descr   the pointer to the dense matrix descriptor.\n  @param[out]\n  values    non-zero values in the dense matrix. Must be an array of length\n            \\p ld*rows if \\p order=rocsparse_order_column or \\p ld*cols if \\p order=rocsparse_order_row.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr or \\p values is invalid.\n/\n/**@{"]
    pub fn rocsparse_dnmat_get_values(
        descr: rocsparse_dnmat_descr,
        values: *mut *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_const_dnmat_get_values(
        descr: rocsparse_const_dnmat_descr,
        values: *mut *const ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the values array in a dense matrix descriptor.\n\n  @param[inout]\n  descr   the matrix descriptor.\n  @param[in]\n  values    non-zero values in the dense matrix. Must be an array of length\n            \\p ld*rows if \\p order=rocsparse_order_column or \\p ld*cols if \\p order=rocsparse_order_row.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer \\p descr or \\p values is invalid."]
    pub fn rocsparse_dnmat_set_values(
        descr: rocsparse_dnmat_descr,
        values: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the batch count and batch stride from the dense matrix descriptor.\n\n  @param[in]\n  descr        the pointer to the dense matrix descriptor.\n  @param[out]\n  batch_count  the batch count in the dense matrix.\n  @param[out]\n  batch_stride the batch stride in the dense matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_size if \\p batch_count or \\p batch_stride is invalid."]
    pub fn rocsparse_dnmat_get_strided_batch(
        descr: rocsparse_const_dnmat_descr,
        batch_count: *mut rocsparse_int,
        batch_stride: *mut i64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the batch count and batch stride in the dense matrix descriptor.\n\n  @param[inout]\n  descr        the pointer to the dense matrix descriptor.\n  @param[in]\n  batch_count  the batch count in the dense matrix.\n  @param[in]\n  batch_stride the batch stride in the dense matrix.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_size if \\p batch_count or \\p batch_stride is invalid."]
    pub fn rocsparse_dnmat_set_strided_batch(
        descr: rocsparse_dnmat_descr,
        batch_count: rocsparse_int,
        batch_stride: i64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Get the batch count and batch stride from the dense vector descriptor.\n\n  @param[in]\n  descr        the pointer to the dense vector descriptor.\n  @param[out]\n  batch_count  the batch count in the dense vector.\n  @param[out]\n  batch_stride the batch stride in the dense vector.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_size if \\p batch_count or \\p batch_stride is invalid."]
    pub fn rocsparse_dnvec_get_strided_batch(
        descr: rocsparse_const_dnvec_descr,
        batch_count: *mut rocsparse_int,
        batch_stride: *mut i64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Set the batch count and batch stride in the dense vector descriptor.\n\n  @param[inout]\n  descr        the pointer to the dense vector descriptor.\n  @param[in]\n  batch_count  the batch count in the dense vector.\n  @param[in]\n  batch_stride the batch stride in the dense vector.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_pointer if \\p descr is invalid.\n  \\retval rocsparse_status_invalid_size if \\p batch_count or \\p batch_stride is invalid."]
    pub fn rocsparse_dnvec_set_strided_batch(
        descr: rocsparse_dnvec_descr,
        batch_count: rocsparse_int,
        batch_stride: i64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n \\brief Enable debug kernel launch.\n \\details If the debug kernel launch is enabled, then HIP errors are checked before and\n          after every kernel launch.\n \\note This routine ignores the environment variable \\p ROCSPARSE_DEBUG_KERNEL_LAUNCH."]
    pub fn rocsparse_enable_debug_kernel_launch();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n \\brief Disable debug kernel launch.\n  \\note This routine ignores the environment variable \\p ROCSPARSE_DEBUG_KERNEL_LAUNCH."]
    pub fn rocsparse_disable_debug_kernel_launch();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n \\details Query whether debugging for kernel launch has been enabled. See \\ref rocsparse_enable_debug_kernel_launch.\n \\return 1 if enabled, 0 otherwise."]
    pub fn rocsparse_state_debug_kernel_launch() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Enable debug arguments.\n \\details If the debug arguments is enabled, then messages are displayed when errors occur during argument checking.\n          It provides information to the user depending on the verbosity setup for\n \\ref rocsparse_enable_debug_arguments_verbose, \\ref rocsparse_disable_debug_arguments_verbose, and \\ref rocsparse_state_debug_arguments_verbose.\n \\note This routine ignores the environment variable \\p ROCSPARSE_DEBUG_ARGUMENTS.\n \\note This routine enables debug arguments verbose with \\ref rocsparse_enable_debug_arguments_verbose."]
    pub fn rocsparse_enable_debug_arguments();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Disable debug arguments.\n  \\note This routine ignores the environment variable \\p ROCSPARSE_DEBUG_ARGUMENTS.\n  \\note This routine disables debug arguments."]
    pub fn rocsparse_disable_debug_arguments();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\details Query whether debugging arguments have been enabled. See \\ref rocsparse_enable_debug_arguments.\n \\return 1 if enabled, 0 otherwise."]
    pub fn rocsparse_state_debug_arguments() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Enable debug arguments verbose.\n  \\details If the debug arguments (verbose) is enabled, then messages are displayed when errors occur during argument checking.\n           It provides information to the user depending on the verbosity setup.\n  \\note This routine ignores the environment variable \\p ROCSPARSE_DEBUG_ARGUMENTS_VERBOSE."]
    pub fn rocsparse_enable_debug_arguments_verbose();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Disable debug arguments verbose mode.\n  \\note This routine ignores the environment variable \\p ROCSPARSE_DEBUG_ARGUMENTS_VERBOSE."]
    pub fn rocsparse_disable_debug_arguments_verbose();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n \\details Query whether debugging arguments in verbose mode has been enabled. See \\ref rocsparse_enable_debug_arguments_verbose.\n \\return 1 if enabled, 0 otherwise."]
    pub fn rocsparse_state_debug_arguments_verbose() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Enable debug.\n \\details If the debug is enabled, then code traces are generated when unsuccessful status returns occur. It provides information to the user depending on the verbosity setup\n (\\ref rocsparse_enable_debug_verbose, \\ref rocsparse_disable_debug_verbose, and \\ref rocsparse_state_debug_verbose).\n  \\note This routine ignores the environment variable ROCSPARSE_DEBUG.\n \\note \\ref rocsparse_enable_debug_verbose and \\ref rocsparse_enable_debug_arguments are called."]
    pub fn rocsparse_enable_debug();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Disable debug.\n  \\note This routine disables debug arguments with \\ref rocsparse_disable_debug_arguments.\n  \\note This routine ignores the environment variable \\p ROCSPARSE_DEBUG."]
    pub fn rocsparse_disable_debug();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n \\details Query whether debug has been enabled. See \\ref rocsparse_enable_debug.\n \\return 1 if enabled, 0 otherwise."]
    pub fn rocsparse_state_debug() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Enable debug warnings\n \\details When the debug warnings are enabled, some specific warnings are printed during execution.\n  \\note This routine ignores the environment variable \\p ROCSPARSE_DEBUG_WARNINGS."]
    pub fn rocsparse_enable_debug_warnings();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Disable debug warnings\n  \\note This routine ignores the environment variable \\p ROCSPARSE_DEBUG_WARNINGS."]
    pub fn rocsparse_disable_debug_warnings();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Enable debug verbose.\n  \\details Debug in verbose mode displays a stack of code traces showing where the code handles an unsuccessful status.\n  \\note This routine enables debug arguments in verbose mode with \\ref rocsparse_enable_debug_arguments_verbose.\n  \\note This routine ignores the environment variable \\p ROCSPARSE_DEBUG_VERBOSE."]
    pub fn rocsparse_enable_debug_verbose();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Disable debug verbose.\n  \\note This routine disables debug arguments verbose with \\ref rocsparse_disable_debug_arguments.\n  \\note This routine ignores the environment variable \\p ROCSPARSE_DEBUG_VERBOSE."]
    pub fn rocsparse_disable_debug_verbose();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n \\details Query whether debug has been enabled in verbose mode. See \\ref rocsparse_enable_debug_verbose.\n \\return 1 if enabled, 0 otherwise."]
    pub fn rocsparse_state_debug_verbose() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Enable debug to force host asserts.\n  \\details Debug for force host assert forces the evaluation of asserts on the host when the compiler directive \\p NDEBUG is used."]
    pub fn rocsparse_enable_debug_force_host_assert();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n  \\brief Disable debug to force host asserts."]
    pub fn rocsparse_disable_debug_force_host_assert();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n \\details Query whether the debug command to force host asserts has been enabled. See \\ref rocsparse_enable_debug_force_host_assert.\n \\return 1 if enabled, 0 otherwise."]
    pub fn rocsparse_state_debug_force_host_assert() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse BSR matrix into a sparse CSR matrix.\n\n  \\details\n  \\p rocsparse_bsr2csr converts a BSR matrix into a CSR matrix. It is assumed\n  that \\p csr_val, \\p csr_col_ind, and \\p csr_row_ptr are allocated. The allocation size\n  for \\p csr_row_ptr is \\p m+1 where:\n  \\f[\n    m = mb * block\\_dim \\\\\n    n = nb * block\\_dim\n  \\f]\n  Allocation for \\p csr_val and \\p csr_col_ind is computed by the\n  the number of blocks in the BSR matrix multiplied by the block dimension squared:\n  \\f[\n    nnz = nnzb * block\\_dim * block\\_dim\n  \\f]\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         the storage format of the blocks, \\ref rocsparse_direction_row or \\ref rocsparse_direction_column.\n  @param[in]\n  mb          number of block rows in the sparse BSR matrix.\n  @param[in]\n  nb          number of block columns in the sparse BSR matrix.\n  @param[in]\n  bsr_descr   descriptor of the sparse BSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  bsr_val     array of \\p nnzb*block_dim*block_dim containing the values of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of the\n              sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse BSR matrix.\n  @param[in]\n  block_dim   size of the blocks in the sparse BSR matrix.\n  @param[in]\n  csr_descr   descriptor of the sparse CSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_val     array of \\p nnzb*block_dim*block_dim elements containing the values of the sparse CSR matrix.\n  @param[out]\n  csr_row_ptr array of \\p m+1 where \\p m=mb*block_dim elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[out]\n  csr_col_ind array of \\p nnzb*block_dim*block_dim elements containing the column indices of the sparse CSR matrix.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p bsr_val,\n              \\p bsr_row_ptr, \\p bsr_col_ind, \\p csr_val, \\p csr_row_ptr, or\n              \\p csr_col_ind pointer is invalid.\n\n  \\par Example\n  This example converts a BSR matrix into an CSR matrix.\n  \\snippet example_rocsparse_bsr2csr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sbsr2csr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut f32,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsr2csr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut f64,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsr2csr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut rocsparse_float_complex,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsr2csr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut rocsparse_double_complex,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Pads a value to the diagonal of the last block (if the last block is a diagonal block) in the sparse BSR matrix\n  when the matrix expands outside \\p m x \\p m.\n\n  \\details When converting from a CSR matrix to a BSR matrix, the resulting BSR matrix will be larger when \\p m < \\p mb * \\p block_dim.\n  In these situations, the CSR to BSR conversion will expand the BSR matrix to have zeros when outside \\p m x \\p m. This routine\n  converts the resulting BSR matrix to one that has a value on the last diagonal blocks diagonal if this last block is a diagonal\n  block in the BSR matrix.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse BSR matrix.\n  @param[in]\n  mb          number of block rows of the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse BSR matrix.\n  @param[in]\n  block_dim   block dimension of the sparse BSR matrix.\n  @param[in]\n  value       scalar value that is set on the diagonal of the last block when the matrix expands outside of \\p m x \\p m.\n  @param[in]\n  bsr_descr   descriptor of the sparse BSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[inout]\n  bsr_val     array of \\p nnzb blocks of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of\n              the sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse\n              BSR matrix.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p mb, \\p nnzb, or \\p block_dim is\n              invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p bsr_descr, \\p bsr_val,\n              \\p bsr_row_ind, or \\p bsr_col_ind pointer is invalid.\n/\n/**@{"]
    pub fn rocsparse_sbsrpad_value(
        handle: rocsparse_handle,
        m: rocsparse_int,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        block_dim: rocsparse_int,
        value: f32,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrpad_value(
        handle: rocsparse_handle,
        m: rocsparse_int,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        block_dim: rocsparse_int,
        value: f64,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrpad_value(
        handle: rocsparse_handle,
        m: rocsparse_int,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        block_dim: rocsparse_int,
        value: rocsparse_float_complex,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrpad_value(
        handle: rocsparse_handle,
        m: rocsparse_int,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        block_dim: rocsparse_int,
        value: rocsparse_double_complex,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse COO matrix into a sparse CSR matrix.\n\n  \\details\n  \\p rocsparse_coo2csr converts the COO array containing the row indices into a\n  CSR array of row offsets that point to the start of every row.\n  It is assumed that the COO row index array is sorted.\n\n  \\p rocsparse_coo2csr can also be used to convert a COO array containing the column\n  indices into a CSC array of column offsets that point to the start of every column.\n  In this case it is assumed that the COO column index array is sorted instead.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  coo_row_ind array of \\p nnz elements containing the row indices of the sparse COO\n              matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[out]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p coo_row_ind or \\p csr_row_ptr\n              pointer is invalid.\n\n  \\par Example\n  This example converts a COO matrix into a CSR matrix.\n  \\snippet example_rocsparse_coo2csr.cpp doc example"]
    pub fn rocsparse_coo2csr(
        handle: rocsparse_handle,
        coo_row_ind: *const rocsparse_int,
        nnz: rocsparse_int,
        m: rocsparse_int,
        csr_row_ptr: *mut rocsparse_int,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief\n  This function converts the sparse matrix in COO format into a column-oriented dense matrix.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the column-oriented dense matrix \\p A.\n  @param[in]\n  n           number of columns of the column-oriented dense matrix \\p A.\n  @param[in]\n  nnz         number of non-zero entries of the sparse COO matrix.\n  @param[in]\n  descr       the descriptor of the column-oriented dense matrix \\p A. The supported matrix type is\n              \\ref rocsparse_matrix_type_general and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  coo_val     array of \\p nnz non-zero elements of matrix \\p A.\n  @param[in]\n  coo_row_ind integer array of \\p nnz row indices of the non-zero elements of matrix \\p A.\n  @param[in]\n  coo_col_ind integer array of \\p nnz column indices of the non-zero elements of matrix \\p A.\n  @param[out]\n  A           array of dimensions (\\p ld, \\p n).\n\n  @param[out]\n  ld          leading dimension of column-oriented dense matrix \\p A.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, \\p nnz, or \\p ld is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p A, \\p coo_val, \\p coo_col_ind, or \\p coo_row_ind\n              pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_coo2dense.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scoo2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        coo_val: *const f32,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        A: *mut f32,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcoo2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        coo_val: *const f64,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        A: *mut f64,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccoo2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        coo_val: *const rocsparse_float_complex,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        A: *mut rocsparse_float_complex,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcoo2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        coo_val: *const rocsparse_double_complex,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        A: *mut rocsparse_double_complex,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_coosort_buffer_size returns the size of the temporary storage buffer that is\n  required by \\ref rocsparse_coosort_by_row() and \\ref rocsparse_coosort_by_column(). The\n  temporary storage buffer has to be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  m               number of rows of the sparse COO matrix.\n  @param[in]\n  n               number of columns of the sparse COO matrix.\n  @param[in]\n  nnz             number of non-zero entries of the sparse COO matrix.\n  @param[in]\n  coo_row_ind     array of \\p nnz elements containing the row indices of the sparse\n                  COO matrix.\n  @param[in]\n  coo_col_ind     array of \\p nnz elements containing the column indices of the sparse\n                  COO matrix.\n  @param[out]\n  buffer_size     number of bytes of the temporary storage buffer required by\n                  \\ref rocsparse_coosort_by_row() and \\ref rocsparse_coosort_by_column().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p coo_row_ind, \\p coo_col_ind, or\n              \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_coosort_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Sort a sparse COO matrix by row.\n\n  \\details\n  \\p rocsparse_coosort_by_row sorts a matrix in COO format by row. The sorted\n  permutation vector \\p perm can be used to obtain the sorted \\p coo_val array. In this\n  case, \\p perm must be initialized as the identity permutation. See\n  \\ref rocsparse_create_identity_permutation().\n\n  \\p rocsparse_coosort_by_row requires an extra temporary storage buffer that has to be\n  allocated by the user. Storage buffer size can be determined by\n  \\ref rocsparse_coosort_buffer_size().\n\n  \\note\n  \\p perm can be \\p NULL if a sorted permutation vector is not required.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  m               number of rows of the sparse COO matrix.\n  @param[in]\n  n               number of columns of the sparse COO matrix.\n  @param[in]\n  nnz             number of non-zero entries of the sparse COO matrix.\n  @param[inout]\n  coo_row_ind     array of \\p nnz elements containing the row indices of the sparse\n                  COO matrix.\n  @param[inout]\n  coo_col_ind     array of \\p nnz elements containing the column indices of the sparse\n                  COO matrix.\n  @param[inout]\n  perm            array of \\p nnz integers containing the unsorted map indices, which can be\n                  \\p NULL.\n  @param[in]\n  temp_buffer     temporary storage buffer allocated by the user. The size is returned by\n                  \\ref rocsparse_coosort_buffer_size().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p coo_row_ind, \\p coo_col_ind, or\n              \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n  \\par Example\n  The following example sorts a \\f$3 \\times 3\\f$ COO matrix by row indices.\n  \\snippet example_rocsparse_coosort_by_row.cpp doc example"]
    pub fn rocsparse_coosort_by_row(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        coo_row_ind: *mut rocsparse_int,
        coo_col_ind: *mut rocsparse_int,
        perm: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Sort a sparse COO matrix by column.\n\n  \\details\n  \\p rocsparse_coosort_by_column sorts a matrix in COO format by column. The sorted\n  permutation vector \\p perm can be used to obtain the sorted \\p coo_val array. In this\n  case, \\p perm must be initialized as the identity permutation. See\n  \\ref rocsparse_create_identity_permutation().\n\n  \\p rocsparse_coosort_by_column requires an extra temporary storage buffer that has to be\n  allocated by the user. Storage buffer size can be determined by\n  \\ref rocsparse_coosort_buffer_size().\n\n  \\note\n  \\p perm can be \\p NULL if a sorted permutation vector is not required.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  m               number of rows of the sparse COO matrix.\n  @param[in]\n  n               number of columns of the sparse COO matrix.\n  @param[in]\n  nnz             number of non-zero entries of the sparse COO matrix.\n  @param[inout]\n  coo_row_ind     array of \\p nnz elements containing the row indices of the sparse\n                  COO matrix.\n  @param[inout]\n  coo_col_ind     array of \\p nnz elements containing the column indices of the sparse\n                  COO matrix.\n  @param[inout]\n  perm            array of \\p nnz integers containing the unsorted map indices, which can be\n                  \\p NULL.\n  @param[in]\n  temp_buffer     temporary storage buffer allocated by the user. The size is returned by\n                  \\ref rocsparse_coosort_buffer_size().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p coo_row_ind, \\p coo_col_ind, or\n              \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n  \\par Example\n  The following example sorts a \\f$3 \\times 3\\f$ COO matrix by column indices.\n  \\snippet example_rocsparse_coosort_by_col.cpp doc example"]
    pub fn rocsparse_coosort_by_column(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        coo_row_ind: *mut rocsparse_int,
        coo_col_ind: *mut rocsparse_int,
        perm: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief\n  This function converts the sparse matrix in CSC format into a column-oriented dense matrix.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the column-oriented dense matrix \\p A.\n  @param[in]\n  n           number of columns of the column-oriented dense matrix \\p A.\n  @param[in]\n  descr       the descriptor of the column-oriented dense matrix \\p A. The supported matrix type is\n              \\ref rocsparse_matrix_type_general and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  csc_val     array of nnz ( = \\p csc_col_ptr[n] - \\p csc_col_ptr[0] ) non-zero elements of matrix \\p A.\n  @param[in]\n  csc_col_ptr integer array of \\p n+1 elements that contains the start of every column and the end of the last\n              column plus one.\n  @param[in]\n  csc_row_ind integer array of nnz ( = \\p csc_col_ptr[n] - \\p csc_col_ptr[0] ) column indices of the non-zero\n              elements of matrix \\p A.\n  @param[out]\n  A           array of dimensions (\\p ld, \\p n).\n  @param[out]\n  ld          leading dimension of column-oriented dense matrix \\p A.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ld is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p A, \\p csc_val, \\p csc_col_ptr, or \\p csc_row_ind\n              pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_csc2dense.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsc2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csc_val: *const f32,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        A: *mut f32,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsc2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csc_val: *const f64,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        A: *mut f64,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsc2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csc_val: *const rocsparse_float_complex,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        A: *mut rocsparse_float_complex,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsc2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csc_val: *const rocsparse_double_complex,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        A: *mut rocsparse_double_complex,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_cscsort_buffer_size returns the size of the temporary storage buffer\n  required by \\ref rocsparse_cscsort(). The temporary storage buffer must be allocated by\n  the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  m               number of rows of the sparse CSC matrix.\n  @param[in]\n  n               number of columns of the sparse CSC matrix.\n  @param[in]\n  nnz             number of non-zero entries of the sparse CSC matrix.\n  @param[in]\n  csc_col_ptr     array of \\p n+1 elements that point to the start of every column of\n                  the sparse CSC matrix.\n  @param[in]\n  csc_row_ind     array of \\p nnz elements containing the row indices of the sparse\n                  CSC matrix.\n  @param[out]\n  buffer_size     number of bytes of the temporary storage buffer required by\n                  \\ref rocsparse_cscsort().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csc_col_ptr, \\p csc_row_ind, or\n              \\p buffer_size pointer is invalid."]
    pub fn rocsparse_cscsort_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Sort a sparse CSC matrix.\n\n  \\details\n  \\p rocsparse_cscsort sorts a matrix in CSC format. The sorted permutation vector\n  \\p perm can be used to obtain the sorted \\p csc_val array. In this case, \\p perm must be\n  initialized as the identity permutation. For more information, see \\ref rocsparse_create_identity_permutation().\n\n  \\p rocsparse_cscsort requires an extra temporary storage buffer that has to be allocated by\n  the user. The storage buffer size can be determined by \\ref rocsparse_cscsort_buffer_size().\n\n  \\note\n  \\p perm can be \\p NULL if a sorted permutation vector is not required.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  m               number of rows of the sparse CSC matrix.\n  @param[in]\n  n               number of columns of the sparse CSC matrix.\n  @param[in]\n  nnz             number of non-zero entries of the sparse CSC matrix.\n  @param[in]\n  descr           descriptor of the sparse CSC matrix. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csc_col_ptr     array of \\p n+1 elements that point to the start of every column of\n                  the sparse CSC matrix.\n  @param[inout]\n  csc_row_ind     array of \\p nnz elements containing the row indices of the sparse\n                  CSC matrix.\n  @param[inout]\n  perm            array of \\p nnz integers containing the unsorted map indices, which can be\n                  \\p NULL.\n  @param[in]\n  temp_buffer     temporary storage buffer allocated by the user. The size is returned by\n                  \\ref rocsparse_cscsort_buffer_size().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csc_col_ptr, \\p csc_row_ind,\n              or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  The following example sorts a \\f$3 \\times 3\\f$ CSC matrix.\n  \\snippet example_rocsparse_cscsort.cpp doc example"]
    pub fn rocsparse_cscsort(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *mut rocsparse_int,
        perm: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  This function takes a sparse CSR matrix as input and computes the block row offset array, \\p bsr_row_ptr,\n  and the total number of non-zero blocks, \\p bsr_nnz, that will result from converting the CSR format input\n  matrix to a BSR format output matrix. This function is the first step in the conversion and is used in\n  conjunction with \\ref rocsparse_scsr2bsr \"rocsparse_Xcsr2bsr()\".\n\n  \\note\n  The routine supports asynchronous execution if the pointer mode is set to device.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n\n  @param[in]\n  dir         direction that specifies whether to count non-zero elements by \\ref rocsparse_direction_row or by\n              \\ref rocsparse_direction_column.\n\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n\n  @param[in]\n  n           number of columns of the sparse CSR matrix.\n\n  @param[in]\n  csr_descr    descriptor of the sparse CSR matrix. Currently, only\n               \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_row_ptr integer array containing \\p m+1 elements that point to the start of each row of the CSR matrix.\n\n  @param[in]\n  csr_col_ind integer array of the column indices for each non-zero element in the CSR matrix.\n\n  @param[in]\n  block_dim   the block dimension of the BSR matrix. Between 1 and min(m, n).\n\n  @param[in]\n  bsr_descr    descriptor of the sparse BSR matrix. Currently, only\n               \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  bsr_row_ptr integer array containing \\p mb+1 elements that point to the start of each block row of the BSR matrix.\n\n  @param[out]\n  bsr_nnz     total number of non-zero elements in device or host memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_row_ptr, \\p csr_col_ind, \\p bsr_row_ptr, or \\p bsr_nnz\n              pointer is invalid."]
    pub fn rocsparse_csr2bsr_nnz(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_row_ptr: *mut rocsparse_int,
        bsr_nnz: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse CSR matrix into a sparse BSR matrix.\n\n  \\details\n  \\p rocsparse_csr2bsr converts a CSR matrix into a BSR matrix. It is assumed\n  that \\p bsr_val, \\p bsr_col_ind, and \\p bsr_row_ptr are allocated. The allocation size\n  for \\p bsr_row_ptr is computed as \\p mb+1, where \\p mb is the number of block rows\n  and \\p nb is the number of block columns in the BSR matrix:\n  \\f[\n    mb = (m + block\\_dim - 1) / block\\_dim \\\\\n    nb = (n + block\\_dim - 1) / block\\_dim\n  \\f]\n  The allocation size for \\p bsr_val and \\p bsr_col_ind is computed using \\ref rocsparse_csr2bsr_nnz(),\n  which also fills in \\p bsr_row_ptr.\n\n  Converting from a sparse CSR matrix to a sparse BSR matrix requires two steps. First,\n  allocate the \\p bsr_row_ptr array to have length \\p mb+1 and pass this to the function\n  \\ref rocsparse_csr2bsr_nnz. This will fill the \\p bsr_row_ptr array and also compute the total\n  number of non-zero blocks in the BSR matrix. Now that the total number of non-zero blocks is known,\n  allocate the \\p bsr_col_ind and \\p bsr_val arrays. Finally, call\n  \\p rocsparse_csr2bsr to complete the conversion. See the example below.\n\n  \\p rocsparse_csr2bsr requires extra temporary storage that is allocated internally if \\p block_dim>16.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  dir          the storage format of the blocks, \\ref rocsparse_direction_row or \\ref rocsparse_direction_column.\n  @param[in]\n  m            number of rows in the sparse CSR matrix.\n  @param[in]\n  n            number of columns in the sparse CSR matrix.\n  @param[in]\n  csr_descr    descriptor of the sparse CSR matrix. Currently, only\n               \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val      array of \\p nnz elements containing the values of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr  array of \\p m+1 elements that point to the start of every row of the\n               sparse CSR matrix.\n  @param[in]\n  csr_col_ind  array of \\p nnz elements containing the column indices of the sparse CSR matrix.\n  @param[in]\n  block_dim    size of the blocks in the sparse BSR matrix.\n  @param[in]\n  bsr_descr    descriptor of the sparse BSR matrix. Currently, only\n               \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  bsr_val      array of \\p nnzb*block_dim*block_dim containing the values of the sparse BSR matrix.\n  @param[out]\n  bsr_row_ptr  array of \\p mb+1 elements that point to the start of every block row of the\n               sparse BSR matrix.\n  @param[out]\n  bsr_col_ind  array of \\p nnzb elements containing the block column indices of the sparse BSR matrix.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p bsr_val,\n              \\p bsr_row_ptr, \\p bsr_col_ind, \\p csr_val, \\p csr_row_ptr, or\n              \\p csr_col_ind pointer is invalid.\n\n  \\par Example\n  This example converts a CSR matrix into an BSR matrix.\n  \\snippet example_rocsparse_csr2bsr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsr2bsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut f32,
        bsr_row_ptr: *mut rocsparse_int,
        bsr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsr2bsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut f64,
        bsr_row_ptr: *mut rocsparse_int,
        bsr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsr2bsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut rocsparse_float_complex,
        bsr_row_ptr: *mut rocsparse_int,
        bsr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsr2bsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut rocsparse_double_complex,
        bsr_row_ptr: *mut rocsparse_int,
        bsr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse CSR matrix into a sparse COO matrix.\n\n  \\details\n  \\p rocsparse_csr2coo converts the CSR array containing the row offsets that point\n  to the start of every row into a COO array of row indices.\n\n  \\p rocsparse_csr2coo can also be used to convert a CSC array containing the column offsets\n  into a COO array of column indices.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row\n              of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[out]\n  coo_row_ind array of \\p nnz elements containing the row indices of the sparse COO\n              matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_row_ptr or \\p coo_row_ind\n              pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n\n  \\par Example\n  This example converts a CSR matrix into a COO matrix.\n  \\snippet example_rocsparse_csr2coo.cpp doc example"]
    pub fn rocsparse_csr2coo(
        handle: rocsparse_handle,
        csr_row_ptr: *const rocsparse_int,
        nnz: rocsparse_int,
        m: rocsparse_int,
        coo_row_ind: *mut rocsparse_int,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_csr2csc_buffer_size returns the size of the temporary storage buffer\n  required by \\ref rocsparse_scsr2csc \"rocsparse_Xcsr2csc()\".\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  n           number of columns of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[in]\n  copy_values \\ref rocsparse_action_symbolic or \\ref rocsparse_action_numeric.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_scsr2csc \"rocsparse_Xcsr2csc()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_row_ptr, \\p csr_col_ind, or\n              \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csr2csc_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        copy_values: rocsparse_action,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse CSR matrix into a sparse CSC matrix.\n\n  \\details\n  \\p rocsparse_csr2csc converts a CSR matrix into a CSC matrix. The resulting matrix can also\n  be seen as the transpose of the input matrix. \\p rocsparse_csr2csc can also be used to convert\n  a CSC matrix into a CSR matrix.\n\n  The conversion of a sparse matrix from CSR to CSC format involves two steps. First,\n  call \\ref rocsparse_csr2csc_buffer_size to determine the size of the required\n  tempory storage buffer. Then allocate this buffer. Secondly, call\n  \\p rocsparse_csr2csc to complete the conversion. After the conversion is complete,\n  free the temporary buffer.\n\n  Both \\ref rocsparse_csr2csc_buffer_size and \\p rocsparse_csr2csc take a \\ref rocsparse_action\n  parameter as input. This \\p copy_values parameter decides whether \\p csc_row_ind and \\p csc_val\n  are filled during conversion (\\ref rocsparse_action_numeric) or whether only \\p csc_row_ind is filled\n  (\\ref rocsparse_action_symbolic). Using \\ref rocsparse_action_symbolic can be useful, for example, if only\n  the sparsity pattern is required.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  n           number of columns of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[out]\n  csc_val     array of \\p nnz elements of the sparse CSC matrix.\n  @param[out]\n  csc_row_ind array of \\p nnz elements containing the row indices of the sparse CSC\n              matrix.\n  @param[out]\n  csc_col_ptr array of \\p n+1 elements that point to the start of every column of the\n              sparse CSC matrix.\n  @param[in]\n  copy_values \\ref rocsparse_action_symbolic or \\ref rocsparse_action_numeric.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user. The size is returned by\n              rocsparse_csr2csc_buffer_size().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_val, \\p csr_row_ptr,\n              \\p csr_col_ind, \\p csc_val, \\p csc_row_ind, \\p csc_col_ptr, or\n              \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n  \\par Example\n  This example computes the transpose of a CSR matrix.\n  \\code{.c}\n      //     1 2 0 3 0\n      // A = 0 4 5 0 0\n      //     6 0 0 7 8\n\n      rocsparse_int m_A   = 3;\n      rocsparse_int n_A   = 5;\n      rocsparse_int nnz_A = 8;\n\n      csr_row_ptr_A[m_A + 1] = {0, 3, 5, 8};             // device memory\n      csr_col_ind_A[nnz_A] = {0, 1, 3, 1, 2, 0, 3, 4}; // device memory\n      csr_val_A[nnz_A]     = {1, 2, 3, 4, 5, 6, 7, 8}; // device memory\n\n      // Allocate memory for transposed CSR matrix\n      rocsparse_int m_T   = n_A;\n      rocsparse_int n_T   = m_A;\n      rocsparse_int nnz_T = nnz_A;\n\n      rocsparse_int* csr_row_ptr_T;\n      rocsparse_int* csr_col_ind_T;\n      float* csr_val_T;\n\n      hipMalloc((void**)&csr_row_ptr_T, sizeof(rocsparse_int) * (m_T + 1));\n      hipMalloc((void**)&csr_col_ind_T, sizeof(rocsparse_int) * nnz_T);\n      hipMalloc((void**)&csr_val_T, sizeof(float) * nnz_T);\n\n      // Obtain the temporary buffer size\n      size_t buffer_size;\n      rocsparse_csr2csc_buffer_size(handle,\n                                    m_A,\n                                    n_A,\n                                    nnz_A,\n                                    csr_row_ptr_A,\n                                    csr_col_ind_A,\n                                    rocsparse_action_numeric,\n                                    &buffer_size);\n\n      // Allocate temporary buffer\n      void* temp_buffer;\n      hipMalloc(&temp_buffer, buffer_size);\n\n      rocsparse_scsr2csc(handle,\n                         m_A,\n                         n_A,\n                         nnz_A,\n                         csr_val_A,\n                         csr_row_ptr_A,\n                         csr_col_ind_A,\n                         csr_val_T,\n                         csr_col_ind_T,\n                         csr_row_ptr_T,\n                         rocsparse_action_numeric,\n                         rocsparse_index_base_zero,\n                         temp_buffer);\n  \\endcode\n\n  \\par Example\n  This example computes the symbolic transpose of A\n  \\snippet example_rocsparse_csr2csc.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsr2csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csc_val: *mut f32,
        csc_row_ind: *mut rocsparse_int,
        csc_col_ptr: *mut rocsparse_int,
        copy_values: rocsparse_action,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsr2csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csc_val: *mut f64,
        csc_row_ind: *mut rocsparse_int,
        csc_col_ptr: *mut rocsparse_int,
        copy_values: rocsparse_action,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsr2csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csc_val: *mut rocsparse_float_complex,
        csc_row_ind: *mut rocsparse_int,
        csc_col_ptr: *mut rocsparse_int,
        copy_values: rocsparse_action,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsr2csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csc_val: *mut rocsparse_double_complex,
        csc_row_ind: *mut rocsparse_int,
        csc_col_ptr: *mut rocsparse_int,
        copy_values: rocsparse_action,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse CSR matrix into a compressed sparse CSR matrix.\n\n  \\details\n  \\p rocsparse_csr2csr_compress converts a CSR matrix into a compressed CSR matrix by\n  removing entries in the input CSR matrix that are below a non-negative threshold \\p tol.\n\n  Compressing a CSR matrix involves two steps. First, use\n  \\ref rocsparse_snnz_compress \"rocsparse_Xnnz_compress()\" to determine how many entries will\n  be in the final compressed CSR matrix. Then call \\p rocsparse_csr2csr_compress to finish\n  the compression and fill in the column indices and values arrays of the compressed CSR matrix.\n\n  \\note\n  In the case of complex matrices, only the magnitude of the real part of \\p tol is used.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle        handle to the rocSPARSE library context queue.\n  @param[in]\n  m             number of rows of the sparse CSR matrix.\n  @param[in]\n  n             number of columns of the sparse CSR matrix.\n  @param[in]\n  descr_A       matrix descriptor for the CSR matrix.\n  @param[in]\n  csr_val_A     array of \\p nnz_A elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr_A array of \\p m+1 elements that point to the start of every row of the\n                uncompressed sparse CSR matrix.\n  @param[in]\n  csr_col_ind_A array of \\p nnz_A elements containing the column indices of the uncompressed\n                sparse CSR matrix.\n  @param[in]\n  nnz_A         number of elements in the column indices and values arrays of the uncompressed\n                sparse CSR matrix.\n  @param[in]\n  nnz_per_row   array of length \\p m containing the number of entries that will be kept per row in\n                the final compressed CSR matrix.\n  @param[out]\n  csr_val_C     array of \\p nnz_C elements of the compressed sparse CSC matrix.\n  @param[out]\n  csr_row_ptr_C array of \\p m+1 elements that point to the start of every column of the compressed\n                sparse CSR matrix.\n  @param[out]\n  csr_col_ind_C array of \\p nnz_C elements containing the row indices of the compressed\n                sparse CSR matrix.\n  @param[in]\n  tol           the non-negative tolerance used for compression. If \\p tol is complex, then only the magnitude\n                of the real part is used. Entries in the input uncompressed CSR array that are below the tolerance\n                are removed in the output-compressed CSR matrix.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz_A is invalid.\n  \\retval     rocsparse_status_invalid_value \\p tol is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_val_A, \\p csr_row_ptr_A,\n              \\p csr_col_ind_A, \\p csr_val_C, \\p csr_row_ptr_C, \\p csr_col_ind_C, or\n              \\p nnz_per_row pointer is invalid.\n\n  \\par Example\n  This example demonstrates how to compress a CSR matrix.\n  \\snippet example_rocsparse_csr2csr_compress.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsr2csr_compress(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        csr_val_A: *const f32,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        nnz_A: rocsparse_int,
        nnz_per_row: *const rocsparse_int,
        csr_val_C: *mut f32,
        csr_row_ptr_C: *mut rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        tol: f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsr2csr_compress(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        csr_val_A: *const f64,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        nnz_A: rocsparse_int,
        nnz_per_row: *const rocsparse_int,
        csr_val_C: *mut f64,
        csr_row_ptr_C: *mut rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        tol: f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsr2csr_compress(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        csr_val_A: *const rocsparse_float_complex,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        nnz_A: rocsparse_int,
        nnz_per_row: *const rocsparse_int,
        csr_val_C: *mut rocsparse_float_complex,
        csr_row_ptr_C: *mut rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        tol: rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsr2csr_compress(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        csr_val_A: *const rocsparse_double_complex,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        nnz_A: rocsparse_int,
        nnz_per_row: *const rocsparse_int,
        csr_val_C: *mut rocsparse_double_complex,
        csr_row_ptr_C: *mut rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        tol: rocsparse_double_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief\n  This function converts the sparse matrix in CSR format into a column-oriented dense matrix.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the column-oriented dense matrix \\p A.\n  @param[in]\n  n           number of columns of the column-oriented dense matrix \\p A.\n  @param[in]\n  descr       the descriptor of the column-oriented dense matrix \\p A. The supported matrix type is\n              \\ref rocsparse_matrix_type_general and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  csr_val     array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) non-zero elements of matrix \\p A.\n  @param[in]\n  csr_row_ptr integer array of \\p m+1 elements that contains the start of every row and the end of the last\n              row plus one.\n  @param[in]\n  csr_col_ind integer array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) column indices of the non-zero\n              elements of matrix \\p A.\n  @param[out]\n  A           array of dimensions (\\p ld, \\p n).\n  @param[out]\n  ld          leading dimension of column-oriented dense matrix \\p A.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ld is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p A, \\p csr_val, \\p csr_row_ptr, or \\p csr_col_ind\n              pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_csr2dense.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsr2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        A: *mut f32,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsr2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        A: *mut f64,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsr2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        A: *mut rocsparse_float_complex,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsr2dense(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        A: *mut rocsparse_double_complex,
        ld: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_csr2ell_width computes the maximum of the per row non-zero elements\n  over all rows, the \\p ell_width, for a given CSR matrix.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  csr_descr   descriptor of the sparse CSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  ell_descr   descriptor of the sparse ELL matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  ell_width   pointer to the number of non-zero elements per row in ELL storage\n              format.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_descr, \\p csr_row_ptr, or\n              \\p ell_width pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general."]
    pub fn rocsparse_csr2ell_width(
        handle: rocsparse_handle,
        m: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_row_ptr: *const rocsparse_int,
        ell_descr: rocsparse_mat_descr,
        ell_width: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse CSR matrix into a sparse ELL matrix.\n\n  \\details\n  \\p rocsparse_csr2ell converts a CSR matrix into an ELL matrix. It is assumed,\n  that \\p ell_val and \\p ell_col_ind are allocated. Allocation size is computed by the\n  number of rows times the number of ELL non-zero elements per row, such that\n  \\f$\\text{nnz}_{\\text{ELL}} = m \\cdot \\text{ell_width}\\f$. The number of ELL\n  non-zero elements per row is obtained by rocsparse_csr2ell_width().\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  csr_descr   descriptor of the sparse CSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val     array containing the values of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array containing the column indices of the sparse CSR matrix.\n  @param[in]\n  ell_descr   descriptor of the sparse ELL matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  ell_width   number of non-zero elements per row in ELL storage format.\n  @param[out]\n  ell_val     array of \\p m times \\p ell_width elements of the sparse ELL matrix.\n  @param[out]\n  ell_col_ind array of \\p m times \\p ell_width elements containing the column indices\n              of the sparse ELL matrix.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p ell_width is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_descr, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, \\p ell_descr, \\p ell_val, or\n              \\p ell_col_ind pointer is invalid.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example converts a CSR matrix into an ELL matrix.\n  \\snippet example_rocsparse_csr2ell.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsr2ell(
        handle: rocsparse_handle,
        m: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        ell_descr: rocsparse_mat_descr,
        ell_width: rocsparse_int,
        ell_val: *mut f32,
        ell_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsr2ell(
        handle: rocsparse_handle,
        m: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        ell_descr: rocsparse_mat_descr,
        ell_width: rocsparse_int,
        ell_val: *mut f64,
        ell_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsr2ell(
        handle: rocsparse_handle,
        m: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        ell_descr: rocsparse_mat_descr,
        ell_width: rocsparse_int,
        ell_val: *mut rocsparse_float_complex,
        ell_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsr2ell(
        handle: rocsparse_handle,
        m: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        ell_descr: rocsparse_mat_descr,
        ell_width: rocsparse_int,
        ell_val: *mut rocsparse_double_complex,
        ell_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_csr2gebsr_buffer_size returns the size of the temporary buffer that is required\n  by \\ref rocsparse_csr2gebsr_nnz and \\ref rocsparse_scsr2gebsr \"rocsparse_Xcsr2gebsr()\". The\n  temporary storage buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n\n  @param[in]\n  dir         direction that specifies whether to count non-zero elements by \\ref rocsparse_direction_row or by\n              \\ref rocsparse_direction_column.\n\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n\n  @param[in]\n  n           number of columns of the sparse CSR matrix.\n\n  @param[in]\n  csr_descr    descriptor of the sparse CSR matrix. Currently, only\n               \\ref rocsparse_matrix_type_general is supported.\n\n  @param[in]\n  csr_val      array of \\p nnz elements containing the values of the sparse CSR matrix.\n\n  @param[in]\n  csr_row_ptr  integer array containing \\p m+1 elements that point to the start of each row of the CSR matrix.\n\n  @param[in]\n  csr_col_ind  integer array of the column indices for each non-zero element in the CSR matrix.\n\n  @param[in]\n  row_block_dim   the row block dimension of the general BSR matrix. Between 1 and \\p m.\n\n  @param[in]\n  col_block_dim   the col block dimension of the general BSR matrix. Between 1 and \\p n.\n\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer required by \\ref rocsparse_csr2gebsr_nnz\n               and \\ref rocsparse_scsr2gebsr \"rocsparse_Xcsr2gebsr()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, \\p row_block_dim, or \\p col_block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_val, \\p csr_row_ptr, \\p csr_col_ind, or \\p buffer_size\n              pointer is invalid.\n/\n/**@{"]
    pub fn rocsparse_scsr2gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsr2gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsr2gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsr2gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  This function takes a sparse CSR matrix as input and computes the block row offset array, \\p bsr_row_ptr,\n  and the total number of non-zero blocks, \\p bsr_nnz_devhost, that will result from converting the CSR format\n  input matrix to a general BSR format output matrix. This function is the second step in the conversion and\n  is used in conjunction with \\ref rocsparse_scsr2gebsr_buffer_size \"rocsparse_Xcsr2gebsr_buffer_size()\" and\n  \\ref rocsparse_scsr2gebsr \"rocsparse_Xcsr2gebsr()\".\n\n  \\p rocsparse_csr2gebsr_nnz accepts both host and device pointers for \\p bsr_nnz_devhost, which can be set by\n  calling \\ref rocsparse_set_pointer_mode prior to calling \\p rocsparse_csr2gebsr_nnz.\n\n  \\note\n  This function is blocking with respect to the host.\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle           handle to the rocSPARSE library context queue.\n  @param[in]\n  dir              direction that specifies whether to count non-zero elements by \\ref rocsparse_direction_row or by\n                   \\ref rocsparse_direction_column.\n  @param[in]\n  m                number of rows of the sparse CSR matrix.\n  @param[in]\n  n                number of columns of the sparse CSR matrix.\n  @param[in]\n  csr_descr        descriptor of the sparse CSR matrix. Currently, only\n                   \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_row_ptr      integer array containing \\p m+1 elements that point to the start of each row of the CSR matrix.\n\n  @param[in]\n  csr_col_ind      integer array of the column indices for each non-zero element in the CSR matrix.\n\n  @param[in]\n  bsr_descr        descriptor of the sparse general BSR matrix. Currently, only\n                   \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  bsr_row_ptr      integer array containing \\p mb+1 elements that point to the start of each block row of the\n                   general BSR matrix.\n  @param[in]\n  row_block_dim    the row block dimension of the general BSR matrix. Between \\f$1\\f$ and \\f$\\min(m, n)\\f$.\n  @param[in]\n  col_block_dim    the col block dimension of the general BSR matrix. Between \\f$1\\f$ and \\f$\\min(m, n)\\f$.\n  @param[out]\n  bsr_nnz_devhost  total number of non-zero elements in device or host memory.\n  @param[in]\n  temp_buffer      buffer allocated by the user. Its size is determined by calling\n                   \\ref rocsparse_scsr2gebsr_buffer_size \"rocsparse_Xcsr2gebsr_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, \\p row_block_dim, or \\p col_block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_row_ptr, \\p csr_col_ind, \\p bsr_row_ptr, or \\p bsr_nnz_devhost\n              pointer is invalid.\n/\n/**@{"]
    pub fn rocsparse_csr2gebsr_nnz(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_row_ptr: *mut rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsr_nnz_devhost: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse CSR matrix into a sparse general BSR matrix.\n\n  \\details\n  \\p rocsparse_csr2gebsr converts a CSR matrix into a general BSR matrix. It is assumed\n  that \\p bsr_val, \\p bsr_col_ind, and \\p bsr_row_ptr are allocated. The allocation size\n  for \\p bsr_row_ptr is computed as \\p mb+1, where \\p mb is the number of block rows\n  and \\p nb is the number of block columns in the general BSR matrix:\n  \\f[\n    mb = (m + row\\_block\\_dim - 1) / row\\_block\\_dim \\\\\n    nb = (n + col\\_block\\_dim - 1) / col\\_block\\_dim\n  \\f]\n  The allocation size for \\p bsr_val and \\p bsr_col_ind is computed using \\ref rocsparse_csr2bsr_nnz(),\n  which also fills in \\p bsr_row_ptr.\n\n  Converting from a sparse CSR matrix to a sparse general BSR matrix requires three steps. First,\n  call \\ref rocsparse_scsr2gebsr_buffer_size \"rocsparse_Xcsr2gebsr_buffer_size()\"\n  to determine the size of the required temporary storage buffer. After this has been determined,\n  allocate this buffer. Also now allocate the \\p bsr_row_ptr array to have length\n  \\p mb+1 and pass it to the function \\ref rocsparse_csr2gebsr_nnz. This will fill the \\p bsr_row_ptr\n  array and also compute the total number of non-zero blocks in the general BSR matrix. Now that the total\n  number of non-zero blocks is known, allocate the \\p bsr_col_ind and \\p bsr_val arrays.\n  Finally, call \\p rocsparse_csr2gebsr to complete the conversion. See the example below.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle         handle to the rocSPARSE library context queue.\n  @param[in]\n  dir            the storage format of the blocks, \\ref rocsparse_direction_row or \\ref rocsparse_direction_column.\n  @param[in]\n  m              number of rows in the sparse CSR matrix.\n  @param[in]\n  n              number of columns in the sparse CSR matrix.\n  @param[in]\n  csr_descr      descriptor of the sparse CSR matrix. Currently, only\n                 \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val        array of \\p nnz elements containing the values of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr    array of \\p m+1 elements that point to the start of every row of the\n                 sparse CSR matrix.\n  @param[in]\n  csr_col_ind    array of \\p nnz elements containing the column indices of the sparse CSR matrix.\n  @param[in]\n  bsr_descr      descriptor of the sparse BSR matrix. Currently, only\n                 \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  bsr_val        array of \\p nnzb* \\p row_block_dim* \\p col_block_dim containing the values of the sparse BSR matrix.\n  @param[out]\n  bsr_row_ptr    array of \\p mb+1 elements that point to the start of every block row of the\n                 sparse BSR matrix.\n  @param[out]\n  bsr_col_ind    array of \\p nnzb elements containing the block column indices of the sparse BSR matrix.\n  @param[in]\n  row_block_dim  row size of the blocks in the sparse general BSR matrix.\n  @param[in]\n  col_block_dim  col size of the blocks in the sparse general BSR matrix.\n  @param[in]\n  temp_buffer    buffer allocated by the user. Its size is determined by calling\n                 \\ref rocsparse_scsr2gebsr_buffer_size \"rocsparse_Xcsr2gebsr_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, \\p row_block_dim, or \\p col_block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p bsr_val,\n              \\p bsr_row_ptr, \\p bsr_col_ind, \\p csr_val, \\p csr_row_ptr, or\n              \\p csr_col_ind pointer is invalid.\n\n  \\par Example\n  This example converts a CSR matrix into an BSR matrix.\n  \\snippet example_rocsparse_csr2gebsr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsr2gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut f32,
        bsr_row_ptr: *mut rocsparse_int,
        bsr_col_ind: *mut rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsr2gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut f64,
        bsr_row_ptr: *mut rocsparse_int,
        bsr_col_ind: *mut rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsr2gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut rocsparse_float_complex,
        bsr_row_ptr: *mut rocsparse_int,
        bsr_col_ind: *mut rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsr2gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *mut rocsparse_double_complex,
        bsr_row_ptr: *mut rocsparse_int,
        bsr_col_ind: *mut rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse CSR matrix into a sparse HYB matrix.\n\n  \\details\n  \\p rocsparse_csr2hyb converts a CSR matrix into a HYB matrix. It is assumed\n  that \\p hyb has been initialized with \\ref rocsparse_create_hyb_mat().\n\n  \\note\n  This function requires a significant amount of storage for the HYB matrix,\n  depending on the matrix structure.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  m               number of rows of the sparse CSR matrix.\n  @param[in]\n  n               number of columns of the sparse CSR matrix.\n  @param[in]\n  descr           descriptor of the sparse CSR matrix. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val         array containing the values of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr     array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix.\n  @param[in]\n  csr_col_ind     array containing the column indices of the sparse CSR matrix.\n  @param[out]\n  hyb             sparse matrix in HYB format.\n  @param[in]\n  user_ell_width  width of the ELL part of the HYB matrix (only required if\n                  \\p partition_type == \\ref rocsparse_hyb_partition_user).\n  @param[in]\n  partition_type  \\ref rocsparse_hyb_partition_auto (recommended),\n                  \\ref rocsparse_hyb_partition_user, or\n                  \\ref rocsparse_hyb_partition_max.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p user_ell_width is invalid.\n  \\retval     rocsparse_status_invalid_value \\p partition_type is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p hyb, \\p csr_val,\n              \\p csr_row_ptr, or \\p csr_col_ind pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer for the HYB matrix could not be\n              allocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example converts a CSR matrix into a HYB matrix using user-defined partitioning.\n  \\snippet example_rocsparse_csr2hyb.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsr2hyb(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        hyb: rocsparse_hyb_mat,
        user_ell_width: rocsparse_int,
        partition_type: rocsparse_hyb_partition,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsr2hyb(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        hyb: rocsparse_hyb_mat,
        user_ell_width: rocsparse_int,
        partition_type: rocsparse_hyb_partition,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsr2hyb(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        hyb: rocsparse_hyb_mat,
        user_ell_width: rocsparse_int,
        partition_type: rocsparse_hyb_partition,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsr2hyb(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        hyb: rocsparse_hyb_mat,
        user_ell_width: rocsparse_int,
        partition_type: rocsparse_hyb_partition,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_csrsort_buffer_size returns the size of the temporary storage buffer\n  required by \\ref rocsparse_csrsort(). The temporary storage buffer must be allocated by\n  the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  m               number of rows of the sparse CSR matrix.\n  @param[in]\n  n               number of columns of the sparse CSR matrix.\n  @param[in]\n  nnz             number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr     array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix.\n  @param[in]\n  csr_col_ind     array of \\p nnz elements containing the column indices of the sparse\n                  CSR matrix.\n  @param[out]\n  buffer_size     number of bytes of the temporary storage buffer required by\n                  \\ref rocsparse_csrsort().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_row_ptr, \\p csr_col_ind, or\n              \\p buffer_size pointer is invalid."]
    pub fn rocsparse_csrsort_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Sort a sparse CSR matrix\n\n  \\details\n  \\p rocsparse_csrsort sorts a matrix in CSR format. The sorted permutation vector\n  \\p perm can be used to obtain the sorted \\p csr_val array. In this case, \\p perm must be\n  initialized as the identity permutation. For more information, see \\ref rocsparse_create_identity_permutation().\n\n  \\p rocsparse_csrsort requires an extra temporary storage buffer that has to be allocated by\n  the user. The storage buffer size can be determined by \\ref rocsparse_csrsort_buffer_size().\n\n  \\note\n  \\p perm can be \\p NULL if a sorted permutation vector is not required.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  m               number of rows of the sparse CSR matrix.\n  @param[in]\n  n               number of columns of the sparse CSR matrix.\n  @param[in]\n  nnz             number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr           descriptor of the sparse CSR matrix. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_row_ptr     array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix.\n  @param[inout]\n  csr_col_ind     array of \\p nnz elements containing the column indices of the sparse\n                  CSR matrix.\n  @param[inout]\n  perm            array of \\p nnz integers containing the unsorted map indices, which can be\n                  \\p NULL.\n  @param[in]\n  temp_buffer     temporary storage buffer allocated by the user. The size is returned by\n                  \\ref rocsparse_csrsort_buffer_size().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_row_ptr, \\p csr_col_ind,\n              or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  The following example sorts a \\f$3 \\times 3\\f$ CSR matrix.\n  \\snippet example_rocsparse_csrsort.cpp doc example"]
    pub fn rocsparse_csrsort(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
        perm: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief\n  This function converts the matrix \\f$A\\f$ in column-oriented dense format into a sparse matrix in COO format.\n  All the parameters are assumed to have been preallocated by the user, and the arrays are\n  filled in based on \\p nnz_per_rows, which can be pre-computed with \\ref rocsparse_snnz \"rocsparse_Xnnz()\".\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  m            number of rows of the column-oriented dense matrix \\p A.\n  @param[in]\n  n            number of columns of the column-oriented dense matrix \\p A.\n  @param[in]\n  descr        the descriptor of the column-oriented dense matrix \\p A. The supported matrix type is\n               \\ref rocsparse_matrix_type_general and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  A            column-oriented dense matrix of dimensions (\\p ld, \\p n).\n  @param[in]\n  ld           leading dimension of column-oriented dense matrix \\p A.\n  @param[in]\n  nnz_per_rows array of size \\p n containing the number of non-zero elements per row.\n  @param[out]\n  coo_val\n               array of nnz nonzero elements of matrix \\p A.\n  @param[out]\n  coo_row_ind  integer array of nnz row indices of the non-zero elements of matrix \\p A.\n  @param[out]\n  coo_col_ind  integer array of nnz column indices of the non-zero elements of matrix \\p A.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ld is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p A, \\p nnz_per_rows, \\p coo_val, \\p coo_col_ind, or \\p coo_row_ind\n              pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_dense2coo.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sdense2coo(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const f32,
        ld: rocsparse_int,
        nnz_per_rows: *const rocsparse_int,
        coo_val: *mut f32,
        coo_row_ind: *mut rocsparse_int,
        coo_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ddense2coo(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const f64,
        ld: rocsparse_int,
        nnz_per_rows: *const rocsparse_int,
        coo_val: *mut f64,
        coo_row_ind: *mut rocsparse_int,
        coo_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cdense2coo(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const rocsparse_float_complex,
        ld: rocsparse_int,
        nnz_per_rows: *const rocsparse_int,
        coo_val: *mut rocsparse_float_complex,
        coo_row_ind: *mut rocsparse_int,
        coo_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zdense2coo(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const rocsparse_double_complex,
        ld: rocsparse_int,
        nnz_per_rows: *const rocsparse_int,
        coo_val: *mut rocsparse_double_complex,
        coo_row_ind: *mut rocsparse_int,
        coo_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief\n\n  This function converts the matrix \\f$A\\f$ in column-oriented dense format into a sparse matrix in CSC format.\n  All the parameters are assumed to have been preallocated by the user, and the arrays are\n  filled in based on \\p nnz_per_columns, which can be pre-computed with \\ref rocsparse_snnz \"rocsparse_Xnnz()\".\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle           handle to the rocSPARSE library context queue.\n  @param[in]\n  m                number of rows of the column-oriented dense matrix \\p A.\n  @param[in]\n  n                number of columns of the column-oriented dense matrix \\p A.\n  @param[in]\n  descr            the descriptor of the column-oriented dense matrix \\p A. The supported matrix type is\n                   \\ref rocsparse_matrix_type_general and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  A                column-oriented dense matrix of dimensions (\\p ld, \\p n).\n  @param[in]\n  ld               leading dimension of the column-oriented dense matrix \\p A.\n  @param[in]\n  nnz_per_columns  array of size \\p n containing the number of non-zero elements per column.\n  @param[out]\n  csc_val          array of nnz ( = \\p csc_col_ptr[n] - \\p csc_col_ptr[0] ) non-zero elements of matrix \\p A.\n  @param[out]\n  csc_col_ptr      integer array of \\p n+1 elements that contains the start of every column and the end of the last column\n                   plus one.\n  @param[out]\n  csc_row_ind      integer array of nnz ( = \\p csc_col_ptr[n] - \\p csc_col_ptr[0] ) column indices of the non-zero elements\n                   of matrix \\p A.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ld is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p A, \\p nnz_per_columns, \\p csc_val, \\p csc_col_ptr, or \\p csc_row_ind\n              pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_dense2csc.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sdense2csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const f32,
        ld: rocsparse_int,
        nnz_per_columns: *const rocsparse_int,
        csc_val: *mut f32,
        csc_col_ptr: *mut rocsparse_int,
        csc_row_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ddense2csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const f64,
        ld: rocsparse_int,
        nnz_per_columns: *const rocsparse_int,
        csc_val: *mut f64,
        csc_col_ptr: *mut rocsparse_int,
        csc_row_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cdense2csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const rocsparse_float_complex,
        ld: rocsparse_int,
        nnz_per_columns: *const rocsparse_int,
        csc_val: *mut rocsparse_float_complex,
        csc_col_ptr: *mut rocsparse_int,
        csc_row_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zdense2csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const rocsparse_double_complex,
        ld: rocsparse_int,
        nnz_per_columns: *const rocsparse_int,
        csc_val: *mut rocsparse_double_complex,
        csc_col_ptr: *mut rocsparse_int,
        csc_row_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief\n  This function converts the matrix \\f$A\\f$ in column-oriented dense format into a sparse matrix in CSR format.\n  All the parameters are assumed to have been preallocated by the user, and the arrays are filled in based\n  on nnz_per_row, which can be pre-computed with \\ref rocsparse_snnz \"rocsparse_Xnnz()\".\n\n  \\note\n  This function is blocking with respect to the host.\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle        handle to the rocSPARSE library context queue.\n  @param[in]\n  m             number of rows of the column-oriented dense matrix \\p A.\n  @param[in]\n  n             number of columns of the column-oriented dense dense matrix \\p A.\n  @param[in]\n  descr         the descriptor of the column-oriented dense matrix \\p A. The supported matrix type is\n                \\ref rocsparse_matrix_type_general and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  A             column-oriented dense matrix of dimensions (\\p ld, \\p n).\n  @param[in]\n  ld            leading dimension of column-oriented dense matrix \\p A.\n  @param[in]\n  nnz_per_rows  array of size \\p n containing the number of non-zero elements per row.\n  @param[out]\n  csr_val       array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) non-zero elements of matrix \\p A.\n  @param[out]\n  csr_row_ptr   integer array of \\p m+1 elements that contains the start of every row and the end of the last row plus one.\n  @param[out]\n  csr_col_ind   integer array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) column indices of the non-zero elements of\n                matrix \\p A.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ld is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p A, \\p nnz_per_rows, \\p csr_val, \\p csr_row_ptr, or \\p csr_col_ind\n              pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_dense2csr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sdense2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const f32,
        ld: rocsparse_int,
        nnz_per_rows: *const rocsparse_int,
        csr_val: *mut f32,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ddense2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const f64,
        ld: rocsparse_int,
        nnz_per_rows: *const rocsparse_int,
        csr_val: *mut f64,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cdense2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const rocsparse_float_complex,
        ld: rocsparse_int,
        nnz_per_rows: *const rocsparse_int,
        csr_val: *mut rocsparse_float_complex,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zdense2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const rocsparse_double_complex,
        ld: rocsparse_int,
        nnz_per_rows: *const rocsparse_int,
        csr_val: *mut rocsparse_double_complex,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  This function takes a sparse ELL matrix as input and computes the row offset array, \\p csr_row_ptr,\n  and the total number of non-zeros, \\p csr_nnz, that will result from converting the ELL format input\n  matrix to a CSR format output matrix. This function is the first step in the conversion and is used in\n  conjunction with \\ref rocsparse_sell2csr \"rocsparse_Xell2csr()\". It is assumed that \\p csr_row_ptr has\n  been allocated with size \\p m+1.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse ELL matrix.\n  @param[in]\n  n           number of columns of the sparse ELL matrix.\n  @param[in]\n  ell_descr   descriptor of the sparse ELL matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  ell_width   number of non-zero elements per row in ELL storage format.\n  @param[in]\n  ell_col_ind array of \\p m times \\p ell_width elements containing the column indices\n              of the sparse ELL matrix.\n  @param[in]\n  csr_descr   descriptor of the sparse CSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[out]\n  csr_nnz     pointer to the total number of non-zero elements in CSR storage\n              format.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ell_width is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p ell_descr, \\p ell_col_ind,\n              \\p csr_descr, \\p csr_row_ptr, or \\p csr_nnz pointer is invalid.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general."]
    pub fn rocsparse_ell2csr_nnz(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_descr: rocsparse_mat_descr,
        ell_width: rocsparse_int,
        ell_col_ind: *const rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_row_ptr: *mut rocsparse_int,
        csr_nnz: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse ELL matrix into a sparse CSR matrix.\n\n  \\details\n  \\p rocsparse_ell2csr converts a ELL matrix into a CSR matrix. It is assumed\n  that \\p csr_row_ptr has already been filled and that \\p csr_val and \\p csr_col_ind\n  are allocated by the user. The allocation size for \\p csr_row_ptr is computed as\n  \\p m+1. The allocation size for \\p csr_val and \\p csr_col_ind is computed using\n  \\ref rocsparse_ell2csr_nnz() which also fills in \\p csr_row_ptr.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse ELL matrix.\n  @param[in]\n  n           number of columns of the sparse ELL matrix.\n  @param[in]\n  ell_descr   descriptor of the sparse ELL matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  ell_width   number of non-zero elements per row in ELL storage format.\n  @param[in]\n  ell_val     array of \\p m times \\p ell_width elements of the sparse ELL matrix.\n  @param[in]\n  ell_col_ind array of \\p m times \\p ell_width elements containing the column indices\n              of the sparse ELL matrix.\n  @param[in]\n  csr_descr   descriptor of the sparse CSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_val     array containing the values of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[out]\n  csr_col_ind array containing the column indices of the sparse CSR matrix.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ell_width is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_descr, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, \\p ell_descr, \\p ell_val, or\n              \\p ell_col_ind pointer is invalid.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example converts an ELL matrix into a CSR matrix.\n  \\snippet example_rocsparse_ell2csr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sell2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_descr: rocsparse_mat_descr,
        ell_width: rocsparse_int,
        ell_val: *const f32,
        ell_col_ind: *const rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dell2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_descr: rocsparse_mat_descr,
        ell_width: rocsparse_int,
        ell_val: *const f64,
        ell_col_ind: *const rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cell2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_descr: rocsparse_mat_descr,
        ell_width: rocsparse_int,
        ell_val: *const rocsparse_float_complex,
        ell_col_ind: *const rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zell2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_descr: rocsparse_mat_descr,
        ell_width: rocsparse_int,
        ell_val: *const rocsparse_double_complex,
        ell_col_ind: *const rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse general BSR matrix into a sparse CSR matrix.\n\n  \\details\n  \\p rocsparse_gebsr2csr converts a BSR matrix into a CSR matrix. The input matrix is assumed\n  to be allocated such that array \\p bsr_row_ptr has length \\p mb+1, \\p bsr_col_ind has length \\p nnzb, and\n  \\p bsr_val has length \\p nnzb*row_block_dim*col_block_dim. The output matrix is assumed to be\n  allocated such that array \\p csr_row_ptr has length \\p m+1, \\p csr_col_ind has length \\p nnz, and\n  \\p csr_val has length \\p nnz where:\n  \\f[\n    m = mb * row\\_block\\_dim \\\\\n    n = nb * col\\_block\\_dim \\\\\n    nnz = nnzb * row\\_block\\_dim * col\\_block\\_dim\n  \\f]\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         the storage format of the blocks, \\ref rocsparse_direction_row or \\ref rocsparse_direction_column.\n  @param[in]\n  mb          number of block rows in the sparse general BSR matrix.\n  @param[in]\n  nb          number of block columns in the sparse general BSR matrix.\n  @param[in]\n  bsr_descr   descriptor of the sparse general BSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  bsr_val     array of \\p nnzb*row_block_dim*col_block_dim containing the values of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of the\n              sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse BSR matrix.\n  @param[in]\n  row_block_dim   row size of the blocks in the sparse general BSR matrix.\n  @param[in]\n  col_block_dim   column size of the blocks in the sparse general BSR matrix.\n  @param[in]\n  csr_descr   descriptor of the sparse CSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_val     array of \\p nnzb*row_block_dim*col_block_dim elements containing the values of the sparse CSR matrix.\n  @param[out]\n  csr_row_ptr array of \\p m+1 where \\p m=mb*row_block_dim elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[out]\n  csr_col_ind array of \\p nnzb*block_dim*block_dim elements containing the column indices of the sparse CSR matrix.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p bsr_val,\n              \\p bsr_row_ptr, \\p bsr_col_ind, \\p csr_val, \\p csr_row_ptr, or\n              \\p csr_col_ind pointer is invalid.\n\n  \\par Example\n  This example converts a general BSR matrix into an CSR matrix.\n  \\snippet example_rocsparse_gebsr2csr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgebsr2csr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut f32,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgebsr2csr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut f64,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgebsr2csr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut rocsparse_float_complex,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgebsr2csr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        bsr_descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        csr_descr: rocsparse_mat_descr,
        csr_val: *mut rocsparse_double_complex,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_gebsr2gebsc_buffer_size returns the size of the temporary storage buffer\n  required by \\ref rocsparse_sgebsr2gebsc \"rocsparse_Xgebsr2gebsc()\".\n  The temporary storage buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  mb           number of rows of the sparse general BSR matrix.\n  @param[in]\n  nb           number of columns of the sparse general BSR matrix.\n  @param[in]\n  nnzb         number of non-zero entries of the sparse general BSR matrix.\n  @param[in]\n  bsr_val     array of \\p nnzb*row_block_dim*col_block_dim containing the values of the sparse general BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every row of the\n              sparse general BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the column indices of the sparse\n              general BSR matrix.\n  @param[in]\n  row_block_dim   row size of the blocks in the sparse general BSR matrix.\n  @param[in]\n  col_block_dim   col size of the blocks in the sparse general BSR matrix.\n  @param[out]\n  p_buffer_size number of bytes of the temporary storage buffer required by\n              rocsparse_sgebsr2gebsc(), rocsparse_dgebsr2gebsc(), rocsparse_cgebsr2gebsc(), and\n              rocsparse_zgebsr2gebsc().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nb, or \\p nnzb is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p bsr_row_ptr, \\p bsr_col_ind, or\n              \\p p_buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n/\n/**@{"]
    pub fn rocsparse_sgebsr2gebsc_buffer_size(
        handle: rocsparse_handle,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        p_buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgebsr2gebsc_buffer_size(
        handle: rocsparse_handle,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        p_buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgebsr2gebsc_buffer_size(
        handle: rocsparse_handle,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        p_buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgebsr2gebsc_buffer_size(
        handle: rocsparse_handle,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        p_buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse general BSR matrix into a sparse general BSC matrix.\n\n  \\details\n  \\p rocsparse_gebsr2gebsc converts a general BSR matrix into a general BSC matrix. The resulting\n  matrix can also be seen as the transpose of the input matrix. \\p rocsparse_gebsr2gebsc can also\n  be used to convert a general BSC matrix into a general BSR matrix.\n\n  The conversion of a sparse matrix from general BSR to general BSC format involves two steps. First,\n  call \\ref rocsparse_sgebsr2gebsc_buffer_size \"rocsparse_Xgebsr2gebsc_buffer_size()\" to\n  determine the size of the required tempory storage buffer. Then allocate this buffer. Secondly,\n  call \\p rocsparse_gebsr2gebsc to complete the conversion. After the conversion is complete, the\n  user must free the temporary buffer.\n\n  \\p rocsparse_gebsr2gebsc takes a \\ref rocsparse_action parameter as input. This \\p copy_values parameter\n  decides whether \\p bsc_row_ind and \\p bsc_val are filled during conversion (\\ref rocsparse_action_numeric)\n  or whether only \\p bsc_row_ind is filled (\\ref rocsparse_action_symbolic). Using\n  \\ref rocsparse_action_symbolic can be useful, for example, if only the sparsity pattern is required.\n\n  \\note\n  The resulting matrix can also be seen as the transpose of the input matrix.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle         handle to the rocSPARSE library context queue.\n  @param[in]\n  mb             number of rows of the sparse general BSR matrix.\n  @param[in]\n  nb             number of columns of the sparse general BSR matrix.\n  @param[in]\n  nnzb           number of non-zero entries of the sparse general BSR matrix.\n  @param[in]\n  bsr_val        array of \\p nnzb * \\p row_block_dim * \\p col_block_dim  elements of the sparse general BSR matrix.\n  @param[in]\n  bsr_row_ptr    array of \\p mb+1 elements that point to the start of every row of the\n                 sparse general BSR matrix.\n  @param[in]\n  bsr_col_ind    array of \\p nnz elements containing the column indices of the sparse\n                 general BSR matrix.\n  @param[in]\n  row_block_dim  row size of the blocks in the sparse general BSR matrix.\n  @param[in]\n  col_block_dim  col size of the blocks in the sparse general BSR matrix.\n  @param[out]\n  bsc_val        array of \\p nnz elements of the sparse BSC matrix.\n  @param[out]\n  bsc_row_ind    array of \\p nnz elements containing the row indices of the sparse BSC\n                 matrix.\n  @param[out]\n  bsc_col_ptr    array of \\p nb+1 elements that point to the start of every column of the\n                 sparse BSC matrix.\n  @param[in]\n  copy_values    \\ref rocsparse_action_symbolic or \\ref rocsparse_action_numeric.\n  @param[in]\n  idx_base       \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  temp_buffer    temporary storage buffer allocated by the user. The size is returned by\n                 \\ref rocsparse_sgebsr2gebsc_buffer_size \"rocsparse_Xgebsr2gebsc_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nb, or \\p nnzb is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p bsr_val, \\p bsr_row_ptr,\n              \\p bsr_col_ind, \\p bsc_val, \\p bsc_row_ind, \\p bsc_col_ptr, or\n              \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n  \\par Example\n  This example computes the transpose of a general BSR matrix.\n  \\snippet example_rocsparse_gebsr2gebsc.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgebsr2gebsc(
        handle: rocsparse_handle,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *mut f32,
        bsc_row_ind: *mut rocsparse_int,
        bsc_col_ptr: *mut rocsparse_int,
        copy_values: rocsparse_action,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgebsr2gebsc(
        handle: rocsparse_handle,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *mut f64,
        bsc_row_ind: *mut rocsparse_int,
        bsc_col_ptr: *mut rocsparse_int,
        copy_values: rocsparse_action,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgebsr2gebsc(
        handle: rocsparse_handle,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *mut rocsparse_float_complex,
        bsc_row_ind: *mut rocsparse_int,
        bsc_col_ptr: *mut rocsparse_int,
        copy_values: rocsparse_action,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgebsr2gebsc(
        handle: rocsparse_handle,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *mut rocsparse_double_complex,
        bsc_row_ind: *mut rocsparse_int,
        bsc_col_ptr: *mut rocsparse_int,
        copy_values: rocsparse_action,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_gebsr2gebsr_buffer_size returns the size of the temporary storage buffer that is required by\n  \\ref rocsparse_gebsr2gebsr_nnz() and \\ref rocsparse_sgebsr2gebsr \"rocsparse_Xgebsr2gebsr()\". The temporary\n  storage buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle           handle to the rocSPARSE library context queue.\n  @param[in]\n  dir              the storage format of the blocks, \\ref rocsparse_direction_row or \\ref rocsparse_direction_column.\n  @param[in]\n  mb               number of block rows of the general BSR sparse matrix \\f$A\\f$.\n  @param[in]\n  nb               number of block columns of the general BSR sparse matrix \\f$A\\f$.\n  @param[in]\n  nnzb             number of blocks in the general BSR sparse matrix \\f$A\\f$.\n  @param[in]\n  descr_A          the descriptor of the general BSR sparse matrix \\f$A\\f$. The supported matrix type is\n                   \\ref rocsparse_matrix_type_general and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  bsr_val_A        array of \\p nnzb*row_block_dim_A*col_block_dim_A containing the values of the sparse general BSR\n                   matrix \\f$A\\f$.\n  @param[in]\n  bsr_row_ptr_A    array of \\p mb+1 elements that point to the start of every block row of the\n                   sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_col_ind_A    array of \\p nnzb elements containing the block column indices of the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  row_block_dim_A  row size of the blocks in the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  col_block_dim_A  column size of the blocks in the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  row_block_dim_C  row size of the blocks in the sparse general BSR matrix \\f$C\\f$.\n  @param[in]\n  col_block_dim_C  column size of the blocks in the sparse general BSR matrix \\f$C\\f$.\n  @param[out]\n  buffer_size      number of bytes of the temporary storage buffer required by \\ref rocsparse_gebsr2gebsr_nnz() and\n                   \\ref rocsparse_sgebsr2gebsr \"rocsparse_Xgebsr2gebsr()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nb, \\p nnzb, \\p row_block_dim_A,\n              \\p col_block_dim_A, \\p row_block_dim_C, or \\p col_block_dim_C is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p bsr_row_ptr_A, \\p bsr_col_ind_A,\n              \\p descr_A, or \\p buffer_size pointer is invalid.\n/\n/**@{"]
    pub fn rocsparse_sgebsr2gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        bsr_val_A: *const f32,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        row_block_dim_A: rocsparse_int,
        col_block_dim_A: rocsparse_int,
        row_block_dim_C: rocsparse_int,
        col_block_dim_C: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgebsr2gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        bsr_val_A: *const f64,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        row_block_dim_A: rocsparse_int,
        col_block_dim_A: rocsparse_int,
        row_block_dim_C: rocsparse_int,
        col_block_dim_C: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgebsr2gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        bsr_val_A: *const rocsparse_float_complex,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        row_block_dim_A: rocsparse_int,
        col_block_dim_A: rocsparse_int,
        row_block_dim_C: rocsparse_int,
        col_block_dim_C: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgebsr2gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        bsr_val_A: *const rocsparse_double_complex,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        row_block_dim_A: rocsparse_int,
        col_block_dim_A: rocsparse_int,
        row_block_dim_C: rocsparse_int,
        col_block_dim_C: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  This function takes a sparse general BSR matrix as input and computes the block row offset array, \\p bsr_row_ptr_C,\n  and the total number of non-zero blocks, \\p nnz_total_dev_host_ptr, that result from converting the general BSR\n  format input matrix to a general BSR format output matrix. The input and output matrices can have different row and\n  column block dimensions. \\p rocsparse_gebsr2gebsr_nnz is the second step in the conversion and is used in conjunction with\n  \\ref rocsparse_sgebsr2gebsr_buffer_size \"rocsparse_Xgebsr2gebsr_buffer_size()\" and\n  \\ref rocsparse_sgebsr2gebsr \"rocsparse_Xgebsr2gebsr()\".\n\n  \\p rocsparse_gebsr2gebsr_nnz accepts both host and device pointers for \\p nnz_total_dev_host_ptr, which can be set by\n  calling \\ref rocsparse_set_pointer_mode prior to calling \\p rocsparse_gebsr2gebsr_nnz.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle                  handle to the rocSPARSE library context queue.\n  @param[in]\n  dir                     the storage format of the blocks, \\ref rocsparse_direction_row or \\ref rocsparse_direction_column.\n  @param[in]\n  mb                      number of block rows of the general BSR sparse matrix \\f$A\\f$.\n  @param[in]\n  nb                      number of block columns of the general BSR sparse matrix \\f$A\\f$.\n  @param[in]\n  nnzb                    number of blocks in the general BSR sparse matrix \\f$A\\f$.\n  @param[in]\n  descr_A                 the descriptor of the general BSR sparse matrix \\f$A\\f$. The supported matrix type is\n                          \\ref rocsparse_matrix_type_general and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  bsr_row_ptr_A           array of \\p mb+1 elements that point to the start of every block row of the\n                          sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_col_ind_A           array of \\p nnzb elements containing the block column indices of the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  row_block_dim_A         row size of the blocks in the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  col_block_dim_A         column size of the blocks in the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  descr_C                 the descriptor of the general BSR sparse matrix \\f$C\\f$. The supported matrix type is\n                          \\ref rocsparse_matrix_type_general and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  bsr_row_ptr_C           array of \\p mb_C+1 elements that point to the start of every block row of the\n                          sparse general BSR matrix \\f$C\\f$ where \\p mb_C=(m+row_block_dim_C-1)/row_block_dim_C.\n  @param[in]\n  row_block_dim_C         row size of the blocks in the sparse general BSR matrix \\f$C\\f$.\n  @param[in]\n  col_block_dim_C         column size of the blocks in the sparse general BSR matrix \\f$C\\f$.\n  @param[out]\n  nnz_total_dev_host_ptr  total number of non-zero blocks in general BSR sparse matrix \\f$C\\f$ stored using device or host memory.\n  @param[out]\n  temp_buffer             buffer allocated by the user whose size is determined by calling\n                          \\ref rocsparse_sgebsr2gebsr_buffer_size \"rocsparse_Xgebsr2gebsr_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nb, \\p nnzb, \\p row_block_dim_A,\n              \\p col_block_dim_A, \\p row_block_dim_C, or \\p col_block_dim_C is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p bsr_row_ptr_A, \\p bsr_col_ind_A,\n              \\p bsr_row_ptr_C, \\p descr_A, \\p descr_C, or \\p temp_buffer pointer is invalid."]
    pub fn rocsparse_gebsr2gebsr_nnz(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        row_block_dim_A: rocsparse_int,
        col_block_dim_A: rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_row_ptr_C: *mut rocsparse_int,
        row_block_dim_C: rocsparse_int,
        col_block_dim_C: rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief\n  This function converts the general BSR sparse matrix \\f$A\\f$ to another general BSR sparse matrix \\f$C\\f$.\n\n  \\details\n  \\p rocsparse_gebsr2gebsr converts a general BSR matrix \\f$A\\f$ into a general BSR matrix \\f$C\\f$. The input\n  and output matrices can have different row and column block dimensions. The input matrix \\f$A\\f$ is assumed\n  to be allocated such that array \\p bsr_row_ptr_A has length \\p mb+1, \\p bsr_col_ind_A has length \\p nnzb, and\n  \\p bsr_val_A has length \\p nnzb*row_block_dim_A*col_block_dim_A. The output matrix \\f$C\\f$ is assumed to be\n  allocated such that array \\p bsr_row_ptr_C has length \\p mb_C+1, \\p bsr_col_ind_C has length \\p nnzb_C, and\n  \\p bsr_val_C has length \\p nnzb_C*row_block_dim_C*col_block_dim_C where:\n  \\f[\n    m = mb * row\\_block\\_dim\\_A \\\\\n    n = nb * col\\_block\\_dim\\_A\n  \\f]\n  and\n  \\f[\n    mb\\_C = (m + row\\_block\\_dim\\_C - 1) / row\\_block\\_dim\\_C \\\\\n    nb\\_C = (n + col\\_block\\_dim\\_C - 1) / col\\_block\\_dim\\_C\n  \\f]\n  The number of non-zero blocks in the output sparse \\f$C\\f$ matrix (i.e. \\p nnzb_C) is computed using\n  \\ref rocsparse_gebsr2gebsr_nnz() which also fills in the \\p bsr_row_ptr_C array.\n\n  Converting from a sparse general BSR matrix to a sparse general BSR matrix requires three steps. First,\n  call \\ref rocsparse_sgebsr2gebsr_buffer_size \"rocsparse_Xgebsr2gebsr_buffer_size()\"\n  to determine the size of the required temporary storage buffer. After this has been determined,\n  allocate this buffer. Also allocate the \\p bsr_row_ptr_C array to have length\n  \\p mb_C+1 and pass it to the function \\ref rocsparse_gebsr2gebsr_nnz. This will fill the \\p bsr_row_ptr_C\n  array and also compute the total number of non-zero blocks in the general BSR output \\f$C\\f$ matrix. Now that\n  the total number of non-zero blocks is known, allocate the \\p bsr_col_ind_C and \\p bsr_val_C arrays.\n  Finally, call \\p rocsparse_gebsr2gebsr to complete the conversion. After the conversion is complete,\n  the temporary storage buffer can be deallocated. See the example below.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle           handle to the rocSPARSE library context queue.\n  @param[in]\n  dir              the storage format of the blocks, \\ref rocsparse_direction_row or \\ref rocsparse_direction_column.\n  @param[in]\n  mb               number of block rows of the general BSR sparse matrix \\f$A\\f$.\n  @param[in]\n  nb               number of block columns of the general BSR sparse matrix \\f$A\\f$.\n  @param[in]\n  nnzb             number of blocks in the general BSR sparse matrix \\f$A\\f$.\n  @param[in]\n  descr_A          the descriptor of the general BSR sparse matrix \\f$A\\f$. The supported matrix type is\n                   \\ref rocsparse_matrix_type_general and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  bsr_val_A        array of \\p nnzb*row_block_dim_A*col_block_dim_A containing the values of the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_row_ptr_A    array of \\p mb+1 elements that point to the start of every block row of the\n                   sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_col_ind_A    array of \\p nnzb elements containing the block column indices of the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  row_block_dim_A  row size of the blocks in the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  col_block_dim_A  column size of the blocks in the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  descr_C          the descriptor of the general BSR sparse matrix \\f$C\\f$. The supported matrix type is\n                   \\ref rocsparse_matrix_type_general and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  bsr_val_C        array of \\p nnzb_C*row_block_dim_C*col_block_dim_C containing the values of the sparse general BSR matrix \\f$C\\f$.\n  @param[in]\n  bsr_row_ptr_C    array of \\p mb_C+1 elements that point to the start of every block row of the\n                   sparse general BSR matrix \\f$C\\f$.\n  @param[in]\n  bsr_col_ind_C    array of \\p nnzb_C elements containing the block column indices of the sparse general BSR matrix \\f$C\\f$.\n  @param[in]\n  row_block_dim_C  row size of the blocks in the sparse general BSR matrix \\f$C\\f$.\n  @param[in]\n  col_block_dim_C  column size of the blocks in the sparse general BSR matrix \\f$C\\f$.\n  @param[out]\n  temp_buffer      buffer allocated by the user. Its size is determined by calling\n                   \\ref rocsparse_sgebsr2gebsr_buffer_size \"rocsparse_Xgebsr2gebsr_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nb, \\p nnzb, \\p row_block_dim_A,\n              \\p col_block_dim_A, \\p row_block_dim_C, or \\p col_block_dim_C is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p bsr_row_ptr_A, \\p bsr_col_ind_A, \\p bsr_val_A,\n              \\p bsr_row_ptr_C, \\p bsr_col_ind_C, \\p bsr_val_C, \\p descr_A, \\p descr_C,\n              or \\p temp_buffer pointer is invalid.\n\n  \\par Example\n  This example converts a general BSR matrix into an general BSR matrix.\n  \\snippet example_rocsparse_gebsr2gebsr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgebsr2gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        bsr_val_A: *const f32,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        row_block_dim_A: rocsparse_int,
        col_block_dim_A: rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut f32,
        bsr_row_ptr_C: *mut rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
        row_block_dim_C: rocsparse_int,
        col_block_dim_C: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgebsr2gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        bsr_val_A: *const f64,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        row_block_dim_A: rocsparse_int,
        col_block_dim_A: rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut f64,
        bsr_row_ptr_C: *mut rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
        row_block_dim_C: rocsparse_int,
        col_block_dim_C: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgebsr2gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        bsr_val_A: *const rocsparse_float_complex,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        row_block_dim_A: rocsparse_int,
        col_block_dim_A: rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut rocsparse_float_complex,
        bsr_row_ptr_C: *mut rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
        row_block_dim_C: rocsparse_int,
        col_block_dim_C: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgebsr2gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        bsr_val_A: *const rocsparse_double_complex,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        row_block_dim_A: rocsparse_int,
        col_block_dim_A: rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut rocsparse_double_complex,
        bsr_row_ptr_C: *mut rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
        row_block_dim_C: rocsparse_int,
        col_block_dim_C: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_hyb2csr_buffer_size returns the size of the temporary storage buffer\n  required by \\ref rocsparse_shyb2csr \"rocsparse_Xhyb2csr()\". The temporary storage\n  buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  descr           descriptor of the sparse HYB matrix. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  hyb             sparse matrix in HYB format.\n  @param[in]\n  csr_row_ptr     array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix.\n  @param[out]\n  buffer_size     number of bytes of the temporary storage buffer required by\n                  \\ref rocsparse_shyb2csr \"rocsparse_Xhyb2csr()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p hyb, \\p csr_row_ptr, or\n              \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general."]
    pub fn rocsparse_hyb2csr_buffer_size(
        handle: rocsparse_handle,
        descr: rocsparse_mat_descr,
        hyb: rocsparse_hyb_mat,
        csr_row_ptr: *const rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert a sparse HYB matrix into a sparse CSR matrix.\n\n  \\details\n  \\p rocsparse_hyb2csr converts a HYB matrix into a CSR matrix. This requires a HYB input structure,\n  \\ref rocsparse_hyb_mat, which is created using \\ref rocsparse_create_hyb_mat and is filled with data\n  using the conversion routine \\ref rocsparse_scsr2hyb \"rocsparse_Xcsr2hyb()\".\n\n  Converting back to a sparse CSR matrix from a sparse HYB matrix requires two steps. First, call\n  \\ref rocsparse_hyb2csr_buffer_size to determine the size of the required temporary\n  storage buffer. After this is determined, allocate this buffer. Finally, call\n  \\ref rocsparse_shyb2csr \"rocsparse_Xhyb2csr()\" to complete the conversion.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  descr           descriptor of the sparse HYB matrix. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  hyb             sparse matrix in HYB format.\n  @param[out]\n  csr_val         array containing the values of the sparse CSR matrix.\n  @param[out]\n  csr_row_ptr     array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix.\n  @param[out]\n  csr_col_ind     array containing the column indices of the sparse CSR matrix.\n  @param[in]\n  temp_buffer     temporary storage buffer allocated by the user. The size is returned by\n                  \\ref rocsparse_hyb2csr_buffer_size().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p hyb, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example converts a HYB matrix into a CSR matrix.\n  \\snippet example_rocsparse_hyb2csr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_shyb2csr(
        handle: rocsparse_handle,
        descr: rocsparse_mat_descr,
        hyb: rocsparse_hyb_mat,
        csr_val: *mut f32,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dhyb2csr(
        handle: rocsparse_handle,
        descr: rocsparse_mat_descr,
        hyb: rocsparse_hyb_mat,
        csr_val: *mut f64,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_chyb2csr(
        handle: rocsparse_handle,
        descr: rocsparse_mat_descr,
        hyb: rocsparse_hyb_mat,
        csr_val: *mut rocsparse_float_complex,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zhyb2csr(
        handle: rocsparse_handle,
        descr: rocsparse_mat_descr,
        hyb: rocsparse_hyb_mat,
        csr_val: *mut rocsparse_double_complex,
        csr_row_ptr: *mut rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Create the identity map.\n\n  \\details\n  \\p rocsparse_create_identity_permutation stores the identity map in \\p p, such that\n  \\f$p = 0:1:(n-1)\\f$.\n\n  \\code{.c}\n      for(i = 0; i < n; ++i)\n      {\n          p[i] = i;\n      }\n  \\endcode\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  n           size of the map \\p p.\n  @param[out]\n  p           array of \\p n integers containing the map.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p n is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p p pointer is invalid.\n\n  \\par Example\n  The following example creates an identity permutation.\n  \\snippet example_rocsparse_create_identity_permutation.cpp doc example"]
    pub fn rocsparse_create_identity_permutation(
        handle: rocsparse_handle,
        n: rocsparse_int,
        p: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Inverse a permutation vector.\n\n  \\details\n  \\p rocsparse_inverse_permutation computes\n\n  \\code{.c}\n      for(i = 0; i < n; ++i)\n      {\n          q[p[i]- base] = i + base;\n      }\n  \\endcode\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  n           size of the permutation vector \\p p.\n  @param[in]\n  p           array of \\p n integers containing the permutation vector to inverse.\n  @param[out]\n  q           array of \\p n integers containing the invsrse of the permutation vector.\n  @param[in]\n  base        \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p n is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p p pointer is invalid or \\p q pointer is invalid.\n  \\retval     rocsparse_status_invalid_value \\p base is invalid."]
    pub fn rocsparse_inverse_permutation(
        handle: rocsparse_handle,
        n: rocsparse_int,
        p: *const rocsparse_int,
        q: *mut rocsparse_int,
        base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Create the identity map.\n\n  \\details\n  \\p rocsparse_set_identity_permutation stores the identity map in \\p p, such that\n  \\f$p = 0:1:(n-1)\\f$.\n\n  \\code{.c}\n      for(i = 0; i < n; ++i)\n      {\n          p[i] = i;\n      }\n  \\endcode\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  n           size of the map \\p p.\n  @param[out]\n  p           array of \\p n integers containing the map.\n  @param[in]\n  indextype   the integer type of \\p p. Can be \\p rocsparse_indextype_i32 or \\p rocsparse_indextype_i64.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p n is invalid.\n  \\retval     rocsparse_status_not_implemented if \\p indextype is rocsparse_indextype_u16.\n  \\retval     rocsparse_status_invalid_pointer \\p p pointer is invalid.\n\n  \\par Example\n  The following example creates an identity permutation.\n  \\code{.c}\n      int32_t size = 200;\n\n      // Allocate memory to hold the identity map\n      int32_t* perm;\n      hipMalloc((void**)&perm, sizeof(int32_t) * size);\n\n      // Fill perm with the identity permutation\n      rocsparse_set_identity_permutation(handle, size, (void*)perm, rocsparse_indextype_i32);\n  \\endcode"]
    pub fn rocsparse_set_identity_permutation(
        handle: rocsparse_handle,
        n: i64,
        p: *mut ::std::os::raw::c_void,
        indextype: rocsparse_indextype,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  This function computes the number of non-zero elements per row or column and the total number of non-zero elements\n  in a dense matrix.\n\n  \\note\n  The routine supports asynchronous execution if the pointer mode is set to device.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle                  handle to the rocSPARSE library context queue.\n  @param[in]\n  dir                     direction that specifies whether to count non-zero elements by \\ref rocsparse_direction_row or by\n                          \\ref rocsparse_direction_column.\n  @param[in]\n  m                       number of rows of the dense matrix \\p A.\n  @param[in]\n  n                       number of columns of the dense matrix \\p A.\n  @param[in]\n  descr                   the descriptor of the dense matrix \\p A.\n  @param[in]\n  A                       array of dimensions (\\p ld, \\p n).\n  @param[in]\n  ld                      leading dimension of dense array \\p A.\n  @param[out]\n  nnz_per_row_columns     array of size \\p m or \\p n containing the number of non-zero elements per row or column, respectively.\n  @param[out]\n  nnz_total_dev_host_ptr  total number of non-zero elements in device or host memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ld is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p A, \\p nnz_per_row_columns, or \\p nnz_total_dev_host_ptr\n              pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_nnz.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_snnz(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const f32,
        ld: rocsparse_int,
        nnz_per_row_columns: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dnnz(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const f64,
        ld: rocsparse_int,
        nnz_per_row_columns: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cnnz(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const rocsparse_float_complex,
        ld: rocsparse_int,
        nnz_per_row_columns: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_znnz(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        m: rocsparse_int,
        n: rocsparse_int,
        descr: rocsparse_mat_descr,
        A: *const rocsparse_double_complex,
        ld: rocsparse_int,
        nnz_per_row_columns: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  Given a sparse CSR matrix and a non-negative tolerance, this function computes how many entries would be left\n  in each row of the matrix if elements less than the tolerance were removed. It also computes the total number\n  of remaining elements in the matrix.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle        handle to the rocSPARSE library context queue.\n\n  @param[in]\n  m             number of rows of the sparse CSR matrix.\n\n  @param[in]\n  descr_A       the descriptor of the sparse CSR matrix.\n\n  @param[in]\n  csr_val_A     array of \\p nnz_A elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr_A array of \\p m+1 elements that point to the start of every row of the\n                uncompressed sparse CSR matrix.\n  @param[out]\n  nnz_per_row   array of length \\p m containing the number of entries that will be kept per row in\n                the final compressed CSR matrix.\n  @param[out]\n  nnz_C         number of elements in the column indices and values arrays of the compressed\n                sparse CSR matrix. It can be either a host or device pointer.\n  @param[in]\n  tol           the non-negative tolerance used for compression. If \\p tol is complex, then only the magnitude\n                of the real part is used. Entries in the input uncompressed CSR array that are below the tolerance\n                are removed in the output compressed CSR matrix.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p n is invalid.\n  \\retval     rocsparse_status_invalid_value \\p tol is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_val_A, \\p csr_row_ptr_A, \\p nnz_per_row, or \\p nnz_C\n              pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_nnz_compress.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_snnz_compress(
        handle: rocsparse_handle,
        m: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        csr_val_A: *const f32,
        csr_row_ptr_A: *const rocsparse_int,
        nnz_per_row: *mut rocsparse_int,
        nnz_C: *mut rocsparse_int,
        tol: f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dnnz_compress(
        handle: rocsparse_handle,
        m: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        csr_val_A: *const f64,
        csr_row_ptr_A: *const rocsparse_int,
        nnz_per_row: *mut rocsparse_int,
        nnz_C: *mut rocsparse_int,
        tol: f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cnnz_compress(
        handle: rocsparse_handle,
        m: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        csr_val_A: *const rocsparse_float_complex,
        csr_row_ptr_A: *const rocsparse_int,
        nnz_per_row: *mut rocsparse_int,
        nnz_C: *mut rocsparse_int,
        tol: rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_znnz_compress(
        handle: rocsparse_handle,
        m: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        csr_val_A: *const rocsparse_double_complex,
        csr_row_ptr_A: *const rocsparse_int,
        nnz_per_row: *mut rocsparse_int,
        nnz_C: *mut rocsparse_int,
        tol: rocsparse_double_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_prune_csr2csr_buffer_size returns the size of the temporary buffer that\n  is required by \\ref rocsparse_sprune_csr2csr_nnz \"rocsparse_Xprune_csr2csr_nnz()\" and\n  \\ref rocsparse_sprune_csr2csr \"rocsparse_Xprune_csr2csr()\". The temporary storage\n  buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle        handle to the rocSPARSE library context queue.\n  @param[in]\n  m             number of rows in the sparse CSR matrix.\n  @param[in]\n  n             number of columns in the sparse CSR matrix.\n  @param[in]\n  nnz_A         number of non-zeros in the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_descr_A   descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val_A     array of \\p nnz_A elements containing the values of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A array of \\p m+1 elements that point to the start of every row of the\n                sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_col_ind_A array of \\p nnz_A elements containing the column indices of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  threshold     pointer to the non-negative pruning threshold, which can exist in either host or device memory.\n  @param[in]\n  csr_descr_C   descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val_C     array of \\p nnz_C elements containing the values of the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  csr_row_ptr_C array of \\p m+1 elements that point to the start of every row of the\n                sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  csr_col_ind_C array of \\p nnz_C elements containing the column indices of the sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  buffer_size   number of bytes of the temporary storage buffer required by\n                \\ref rocsparse_sprune_csr2csr_nnz \"rocsparse_Xprune_csr2csr_nnz()\" and\n                \\ref rocsparse_sprune_csr2csr \"rocsparse_Xprune_csr2csr()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n/\n/**@{"]
    pub fn rocsparse_sprune_csr2csr_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f32,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        threshold: *const f32,
        csr_descr_C: rocsparse_mat_descr,
        csr_val_C: *const f32,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *const rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_csr2csr_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f64,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        threshold: *const f64,
        csr_descr_C: rocsparse_mat_descr,
        csr_val_C: *const f64,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *const rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_prune_csr2csr_nnz computes the number of non-zero elements per row and the total\n  number of non-zero elements in a sparse CSR matrix after elements less than the threshold are\n  pruned from the matrix.\n\n  \\note The routine supports asynchronous execution if the pointer mode is set to device.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle                 handle to the rocSPARSE library context queue.\n  @param[in]\n  m                      number of rows in the sparse CSR matrix.\n  @param[in]\n  n                      number of columns in the sparse CSR matrix.\n  @param[in]\n  nnz_A                  number of non-zeros in the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_descr_A            descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                         \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val_A              array of \\p nnz_A elements containing the values of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A          array of \\p m+1 elements that point to the start of every row of the\n                         sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_col_ind_A          array of \\p nnz_A elements containing the column indices of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  threshold              pointer to the non-negative pruning threshold which can exist in either host or device memory.\n  @param[in]\n  csr_descr_C            descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                         \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_row_ptr_C          array of \\p m+1 elements that point to the start of every row of the\n                         sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  nnz_total_dev_host_ptr total number of non-zero elements in device or host memory.\n  @param[out]\n  temp_buffer            buffer allocated by the user. Its size is determined by calling\n                         \\ref rocsparse_sprune_csr2csr_buffer_size \"rocsparse_Xprune_csr2csr_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz_A is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p threshold, \\p csr_descr_A, \\p csr_descr_C, \\p csr_val_A,\n              \\p csr_row_ptr_A, \\p csr_col_ind_A, \\p csr_row_ptr_C, \\p nnz_total_dev_host_ptr,\n              or \\p temp_buffer pointer is invalid.\n\n/\n/**@{"]
    pub fn rocsparse_sprune_csr2csr_nnz(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f32,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        threshold: *const f32,
        csr_descr_C: rocsparse_mat_descr,
        csr_row_ptr_C: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_csr2csr_nnz(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f64,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        threshold: *const f64,
        csr_descr_C: rocsparse_mat_descr,
        csr_row_ptr_C: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert and prune sparse CSR matrix \\f$A\\f$ into a sparse CSR matrix \\f$C\\f$.\n\n  \\details\n  This function converts the sparse CSR matrix \\f$A\\f$ into a sparse CSR matrix \\f$C\\f$ by pruning values in \\f$A\\f$\n  that are less than a threshold.\n\n  The conversion involves three steps. First, call\n  \\ref rocsparse_sprune_csr2csr_buffer_size \"rocsparse_Xprune_csr2csr_buffer_size()\"\n  to determine the size of the temporary storage buffer. Allocate this buffer as well as the array\n  \\p csr_row_ptr_C to have \\p m+1 elements. Then call\n  \\ref rocsparse_sprune_csr2csr_nnz \"rocsparse_Xprune_csr2csr_nnz()\", which fills\n  in the \\p csr_row_ptr_C array and stores the number of elements that are larger than the pruning threshold\n  in \\p nnz_total_dev_host_ptr. Now that the number of non-zeros larger than the pruning threshold is known,\n  use this information to allocate the \\p csr_col_ind_C and \\p csr_val_C arrays and then call\n  \\p rocsparse_prune_csr2csr to complete the conversion. After the conversion is complete, the temporary storage\n  buffer can be freed.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle        handle to the rocSPARSE library context queue.\n  @param[in]\n  m             number of rows in the sparse CSR matrix.\n  @param[in]\n  n             number of columns in the sparse CSR matrix.\n  @param[in]\n  nnz_A         number of non-zeros in the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_descr_A   descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val_A     array of \\p nnz_A elements containing the values of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A array of \\p m+1 elements that point to the start of every row of the\n                sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_col_ind_A array of \\p nnz_A elements containing the column indices of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  threshold     pointer to the non-negative pruning threshold, which can exist in either host or device memory.\n  @param[in]\n  csr_descr_C   descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_val_C     array of \\p nnz_C elements containing the values of the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  csr_row_ptr_C array of \\p m+1 elements that point to the start of every row of the\n                sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  csr_col_ind_C array of \\p nnz_C elements containing the column indices of the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  temp_buffer   buffer allocated by the user. Its size is determined by calling\n                \\ref rocsparse_sprune_csr2csr_buffer_size \"rocsparse_Xprune_csr2csr_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz_A is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p threshold, \\p csr_descr_A, \\p csr_descr_C, \\p csr_val_A,\n              \\p csr_row_ptr_A, \\p csr_col_ind_A, \\p csr_val_C, \\p csr_row_ptr_C, \\p csr_col_ind_C,\n              or \\p temp_buffer pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_prune_csr2csr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sprune_csr2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f32,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        threshold: *const f32,
        csr_descr_C: rocsparse_mat_descr,
        csr_val_C: *mut f32,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_csr2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f64,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        threshold: *const f64,
        csr_descr_C: rocsparse_mat_descr,
        csr_val_C: *mut f64,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_prune_csr2csr_by_percentage_buffer_size returns the size of the temporary buffer that\n  is required by \\ref rocsparse_sprune_csr2csr_nnz_by_percentage \"rocsparse_Xprune_csr2csr_nnz_by_percentage()\"\n  and \\ref rocsparse_sprune_csr2csr_by_percentage \"rocsparse_Xprune_csr2csr_by_percentage()\". The temporary\n  storage buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle        handle to the rocSPARSE library context queue.\n  @param[in]\n  m             number of rows in the sparse CSR matrix.\n  @param[in]\n  n             number of columns in the sparse CSR matrix.\n  @param[in]\n  nnz_A         number of non-zeros in the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_descr_A   descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val_A     array of \\p nnz_A elements containing the values of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A array of \\p m+1 elements that point to the start of every row of the\n                sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_col_ind_A array of \\p nnz_A elements containing the column indices of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  percentage    \\p percentage>=0 and \\p percentage<=100.\n  @param[in]\n  csr_descr_C   descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val_C     array of \\p nnz_C elements containing the values of the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  csr_row_ptr_C array of \\p m+1 elements that point to the start of every row of the\n                sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  csr_col_ind_C array of \\p nnz_C elements containing the column indices of the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  info          prune info structure.\n  @param[out]\n  buffer_size   number of bytes of the temporary storage buffer required by\n                \\ref rocsparse_sprune_csr2csr_nnz_by_percentage \"rocsparse_Xprune_csr2csr_nnz_by_percentage()\" and\n                \\ref rocsparse_sprune_csr2csr_by_percentage \"rocsparse_Xprune_csr2csr_by_percentage()\"\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n/\n/**@{"]
    pub fn rocsparse_sprune_csr2csr_by_percentage_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f32,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        percentage: f32,
        csr_descr_C: rocsparse_mat_descr,
        csr_val_C: *const f32,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_csr2csr_by_percentage_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f64,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        percentage: f64,
        csr_descr_C: rocsparse_mat_descr,
        csr_val_C: *const f64,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_prune_csr2csr_nnz_by_percentage computes the number of non-zero elements per row and the total\n  number of non-zero elements in a sparse CSR matrix after a \\p percentage of the smallest magnitude elements\n  have been pruned from the sparse CSR input matrix. See\n  \\ref rocsparse_sprune_csr2csr_by_percentage \"rocsparse_sprune_csr2csr_by_percentage()\" for a more detailed\n  description of how this pruning based on \\p percentage works.\n\n  \\note The routine supports asynchronous execution if the pointer mode is set to device.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle                 handle to the rocSPARSE library context queue.\n  @param[in]\n  m                      number of rows in the sparse CSR matrix.\n  @param[in]\n  n                      number of columns in the sparse CSR matrix.\n  @param[in]\n  nnz_A                  number of non-zeros in the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_descr_A            descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                         \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val_A              array of \\p nnz_A elements containing the values of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A          array of \\p m+1 elements that point to the start of every row of the\n                         sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_col_ind_A          array of \\p nnz_A elements containing the column indices of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  percentage             \\p percentage>=0 and \\p percentage<=100.\n  @param[in]\n  csr_descr_C            descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                         \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_row_ptr_C          array of \\p m+1 elements that point to the start of every row of the\n                         sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  nnz_total_dev_host_ptr total number of non-zero elements in device or host memory.\n  @param[in]\n  info                   prune info structure.\n  @param[out]\n  temp_buffer            buffer allocated by the user. Its size is determined by calling\n                         \\ref rocsparse_sprune_csr2csr_by_percentage_buffer_size \"rocsparse_Xprune_csr2csr_by_percentage_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, \\p nnz_A, or \\p percentage is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_descr_A, \\p csr_descr_C, \\p info, \\p csr_val_A,\n              \\p csr_row_ptr_A, \\p csr_col_ind_A, \\p csr_row_ptr_C, \\p nnz_total_dev_host_ptr,\n              or \\p temp_buffer pointer is invalid.\n\n/\n/**@{"]
    pub fn rocsparse_sprune_csr2csr_nnz_by_percentage(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f32,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        percentage: f32,
        csr_descr_C: rocsparse_mat_descr,
        csr_row_ptr_C: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
        info: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_csr2csr_nnz_by_percentage(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f64,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        percentage: f64,
        csr_descr_C: rocsparse_mat_descr,
        csr_row_ptr_C: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
        info: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert and prune by percentage a sparse CSR matrix \\f$A\\f$ into a sparse CSR matrix \\f$C\\f$.\n\n  \\details\n  This function converts the sparse CSR matrix \\f$A\\f$ into a sparse CSR matrix \\f$C\\f$ by pruning values in \\f$A\\f$\n  that are less than a threshold. This threshold is determined by using a \\p percentage and the following steps:\n\n  <b>Step 1</b>: First, the \\p csr_val_A array is sorted in ascending order using the absolute value of each entry:\n  \\f[\n    csr\\_val\\_A\\_sorted = sort(abs(csr\\_val\\_A))\n  \\f]\n\n  <b>Step 2</b>: Next, use the \\p percentage parameter to determine the threshold:\n  \\f[\n    pos = ceil(nnz\\_A \\times (percentage/100)) - 1 \\\\\n    pos = \\min(pos, nnz\\_A - 1) \\\\\n    pos = \\max(pos, 0) \\\\\n    threshold = csr\\_val\\_A\\_sorted[pos]\n  \\f]\n\n  <b>Step 3</b>: Finally, use this threshold with the routine\n  \\ref rocsparse_sprune_csr2csr \"rocsparse_Xprune_csr2csr()\" to complete the conversion.\n\n  The conversion involves three steps. First, call\n  \\ref rocsparse_sprune_csr2csr_by_percentage_buffer_size \"rocsparse_Xprune_csr2csr_by_percentage_buffer_size()\"\n  to determine the size of the temporary storage buffer. Allocate this buffer as well as the array\n  \\p csr_row_ptr_C to have \\p m+1 elements. Then call\n  \\ref rocsparse_sprune_csr2csr_nnz_by_percentage \"rocsparse_Xprune_csr2csr_nnz_by_percentage()\" which fills\n  in the \\p csr_row_ptr_C array and stores the number of elements that are larger than the pruning threshold\n  in \\p nnz_total_dev_host_ptr. Now that the number of non-zeros larger than the pruning threshold is known,\n  use this information to allocate the \\p csr_col_ind_C and \\p csr_val_C arrays and then call\n  \\p rocsparse_prune_csr2csr_by_percentage to complete the conversion. After the conversion is complete, the\n  temporary storage buffer can be freed.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle        handle to the rocSPARSE library context queue.\n  @param[in]\n  m             number of rows in the sparse CSR matrix.\n  @param[in]\n  n             number of columns in the sparse CSR matrix.\n  @param[in]\n  nnz_A         number of non-zeros in the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_descr_A   descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val_A     array of \\p nnz_A elements containing the values of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A array of \\p m+1 elements that point to the start of every row of the\n                sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_col_ind_A array of \\p nnz_A elements containing the column indices of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  percentage    \\p percentage>=0 and \\p percentage<=100.\n  @param[in]\n  csr_descr_C   descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_val_C     array of \\p nnz_C elements containing the values of the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  csr_row_ptr_C array of \\p m+1 elements that point to the start of every row of the\n                sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  csr_col_ind_C array of \\p nnz_C elements containing the column indices of the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  info          prune info structure.\n  @param[in]\n  temp_buffer   buffer allocated by the user. Its size is determined by calling\n                \\ref rocsparse_sprune_csr2csr_buffer_size \"rocsparse_Xprune_csr2csr_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, \\p nnz_A, or \\p percentage is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_descr_A, \\p csr_descr_C, \\p info, \\p csr_val_A,\n              \\p csr_row_ptr_A, \\p csr_col_ind_A, \\p csr_val_C, \\p csr_row_ptr_C, \\p csr_col_ind_C,\n              or \\p temp_buffer pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_prune_csr2csr_by_percentage.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sprune_csr2csr_by_percentage(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f32,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        percentage: f32,
        csr_descr_C: rocsparse_mat_descr,
        csr_val_C: *mut f32,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        info: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_csr2csr_by_percentage(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz_A: rocsparse_int,
        csr_descr_A: rocsparse_mat_descr,
        csr_val_A: *const f64,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        percentage: f64,
        csr_descr_C: rocsparse_mat_descr,
        csr_val_C: *mut f64,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        info: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_prune_dense2csr_buffer_size returns the size of the temporary buffer that\n  is required by \\ref rocsparse_sprune_dense2csr_nnz \"rocsparse_Xprune_dense2csr_nnz()\" and\n  \\ref rocsparse_sprune_dense2csr \"rocsparse_Xprune_dense2csr()\". The temporary storage\n  buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the dense matrix \\p A.\n  @param[in]\n  n           number of columns of the dense matrix \\p A.\n  @param[in]\n  A           array of dimensions (\\p lda, \\p n).\n  @param[in]\n  lda         leading dimension of dense array \\p A.\n  @param[in]\n  threshold   pointer to the pruning non-negative threshold which can exist in either host or device memory.\n  @param[in]\n  descr       the descriptor of the dense matrix \\p A, the supported matrix type is \\ref rocsparse_matrix_type_general and\n              also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  csr_val     array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) non-zero elements of matrix \\p A.\n  @param[in]\n  csr_row_ptr integer array of \\p m+1 elements that contains the start of every row and the end of the last row plus one.\n  @param[in]\n  csr_col_ind integer array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) column indices of the non-zero elements of matrix \\p A.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_sprune_dense2csr_nnz \"rocsparse_Xprune_dense2csr_nnz()\" and\n              \\ref rocsparse_sprune_dense2csr \"rocsparse_Xprune_dense2csr()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n/\n/**@{"]
    pub fn rocsparse_sprune_dense2csr_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f32,
        lda: rocsparse_int,
        threshold: *const f32,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_dense2csr_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f64,
        lda: rocsparse_int,
        threshold: *const f64,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_prune_dense2csr_nnz computes the number of non-zero elements per row and the total\n  number of non-zero elements in a sparse CSR matrix after elements less than the threshold are\n  pruned from the matrix.\n\n  \\note\n  The routine supports asynchronous execution if the pointer mode is set to device.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle                 handle to the rocSPARSE library context queue.\n  @param[in]\n  m                      number of rows of the dense matrix \\p A.\n  @param[in]\n  n                      number of columns of the dense matrix \\p A.\n  @param[in]\n  A                      array of dimensions (\\p lda, \\p n).\n  @param[in]\n  lda                    leading dimension of dense array \\p A.\n  @param[in]\n  threshold              pointer to the pruning non-negative threshold which can exist in either host or device memory.\n  @param[in]\n  descr                  the descriptor of the dense matrix \\p A.\n  @param[out]\n  csr_row_ptr            integer array of \\p m+1 elements that contains the start of every row and the end of the last row plus one.\n  @param[out]\n  nnz_total_dev_host_ptr total number of non-zero elements in device or host memory.\n  @param[out]\n  temp_buffer            buffer allocated by the user. Its size is determined by calling\n                         \\ref rocsparse_sprune_dense2csr_buffer_size \"rocsparse_Xprune_dense2csr_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p lda is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p A, \\p threshold, \\p descr, \\p csr_row_ptr,\n              \\p nnz_total_dev_host_ptr, or \\p temp_buffer pointer is invalid.\n/\n/**@{"]
    pub fn rocsparse_sprune_dense2csr_nnz(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f32,
        lda: rocsparse_int,
        threshold: *const f32,
        descr: rocsparse_mat_descr,
        csr_row_ptr: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_dense2csr_nnz(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f64,
        lda: rocsparse_int,
        threshold: *const f64,
        descr: rocsparse_mat_descr,
        csr_row_ptr: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief Convert and prune dense matrix \\f$A\\f$ into a sparse CSR matrix \\f$C\\f$.\n\n  \\details\n  This function converts the dense matrix \\f$A\\f$ into a sparse CSR matrix \\f$C\\f$ by pruning values in \\f$A\\f$\n  that are less than a threshold.\n\n  The conversion involves three steps. First, call\n  \\ref rocsparse_sprune_dense2csr_buffer_size \"rocsparse_Xprune_dense2csr_buffer_size()\"\n  to determine the size of the temporary storage buffer. Allocate this buffer as well as the array\n  \\p csr_row_ptr to have \\p m+1 elements. Then call\n  \\ref rocsparse_sprune_dense2csr_nnz \"rocsparse_Xprune_dense2csr_nnz()\", which fills\n  in the \\p csr_row_ptr array and stores the number of elements that are larger than the pruning \\p threshold\n  in \\p nnz_total_dev_host_ptr. Now that the number of non-zeros larger than the pruning \\p threshold is known,\n  use this information to allocate the \\p csr_col_ind and \\p csr_val arrays and then call\n  \\p rocsparse_prune_dense2csr to complete the conversion. After the conversion is complete, the temporary storage\n  buffer can be freed.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the dense matrix \\p A.\n  @param[in]\n  n           number of columns of the dense matrix \\p A.\n  @param[in]\n  A           array of dimensions (\\p lda, \\p n).\n  @param[in]\n  lda         leading dimension of dense array \\p A.\n  @param[in]\n  threshold   pointer to the non-negative pruning threshold, which can exist in either host or device memory.\n  @param[in]\n  descr       the descriptor of the dense matrix \\p A. The supported matrix type is \\ref rocsparse_matrix_type_general and\n              also any valid value of the \\ref rocsparse_index_base.\n  @param[out]\n  csr_val     array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) non-zero elements of matrix \\p A.\n  @param[in]\n  csr_row_ptr integer array of \\p m+1 elements that contains the start of every row and the end of the last row plus one.\n  @param[out]\n  csr_col_ind integer array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) column indices of the non-zero elements of matrix \\p A.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user. The size is returned by\n              \\ref rocsparse_sprune_dense2csr_buffer_size \"rocsparse_Xprune_dense2csr_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p lda is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p A, \\p descr, \\p threshold, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, or \\p temp_buffer pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_prune_dense2csr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sprune_dense2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f32,
        lda: rocsparse_int,
        threshold: *const f32,
        descr: rocsparse_mat_descr,
        csr_val: *mut f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_dense2csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f64,
        lda: rocsparse_int,
        threshold: *const f64,
        descr: rocsparse_mat_descr,
        csr_val: *mut f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_prune_dense2csr_by_percentage_buffer_size returns the size of the temporary buffer that\n  is required by \\ref rocsparse_sprune_dense2csr_nnz_by_percentage \"rocsparse_Xprune_dense2csr_nnz_by_percentage()\"\n  and \\ref rocsparse_sprune_dense2csr_by_percentage \"rocsparse_Xprune_dense2csr_by_percentage()\". The temporary\n  storage buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the dense matrix \\p A.\n  @param[in]\n  n           number of columns of the dense matrix \\p A.\n  @param[in]\n  A           array of dimensions (\\p lda, \\p n).\n  @param[in]\n  lda         leading dimension of dense array \\p A.\n  @param[in]\n  percentage  \\p percentage>=0 and \\p percentage<=100.\n  @param[in]\n  descr       the descriptor of the dense matrix \\p A. The supported matrix type is \\ref rocsparse_matrix_type_general\n              and also any valid value of the \\ref rocsparse_index_base.\n  @param[in]\n  csr_val     array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) non-zero elements of matrix \\p A.\n  @param[in]\n  csr_row_ptr integer array of \\p m+1 elements that contains the start of every row and the end of the last row plus one.\n  @param[in]\n  csr_col_ind integer array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) column indices of the non-zero elements of matrix \\p A.\n  @param[in]\n  info prune  information structure.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_sprune_dense2csr_nnz_by_percentage \"rocsparse_Xprune_dense2csr_nnz_by_percentage()\" and\n              \\ref rocsparse_sprune_dense2csr_by_percentage \"rocsparse_Xprune_dense2csr_by_percentage()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n/\n/**@{"]
    pub fn rocsparse_sprune_dense2csr_by_percentage_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f32,
        lda: rocsparse_int,
        percentage: f32,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_dense2csr_by_percentage_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f64,
        lda: rocsparse_int,
        percentage: f64,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\details\n  \\p rocsparse_sprune_dense2csr_nnz_by_percentage computes the number of non-zero elements per row and the total\n  number of non-zero elements in a sparse CSR matrix after a \\p percentage of the smallest magnitude elements\n  have been pruned from the dense input matrix. See\n  \\ref rocsparse_sprune_dense2csr_by_percentage \"rocsparse_sprune_dense2csr_by_percentage()\" for a more detailed\n  description of how this pruning based on \\p percentage works.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle                 handle to the rocSPARSE library context queue.\n  @param[in]\n  m                      number of rows of the dense matrix \\p A.\n  @param[in]\n  n                      number of columns of the dense matrix \\p A.\n  @param[in]\n  A                      array of dimensions (\\p lda, \\p n).\n  @param[in]\n  lda                    leading dimension of dense array \\p A.\n  @param[in]\n  percentage             \\p percentage>=0 and \\p percentage<=100.\n  @param[in]\n  descr                  the descriptor of the dense matrix \\p A.\n  @param[out]\n  csr_row_ptr            integer array of \\p m+1 elements that contains the start of every row and the end of the last row plus one.\n  @param[out]\n  nnz_total_dev_host_ptr total number of non-zero elements in device or host memory.\n  @param[in]\n  info prune             information structure.\n  @param[out]\n  temp_buffer            buffer allocated by the user. Its size is determined by calling\n                         \\ref rocsparse_sprune_dense2csr_by_percentage_buffer_size \"rocsparse_Xprune_dense2csr_by_percentage_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, \\p lda, or \\p percentage is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p A, \\p descr, \\p info, \\p csr_row_ptr,\n              \\p nnz_total_dev_host_ptr, or \\p temp_buffer pointer is invalid.\n/\n/**@{"]
    pub fn rocsparse_sprune_dense2csr_nnz_by_percentage(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f32,
        lda: rocsparse_int,
        percentage: f32,
        descr: rocsparse_mat_descr,
        csr_row_ptr: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
        info: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_dense2csr_nnz_by_percentage(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f64,
        lda: rocsparse_int,
        percentage: f64,
        descr: rocsparse_mat_descr,
        csr_row_ptr: *mut rocsparse_int,
        nnz_total_dev_host_ptr: *mut rocsparse_int,
        info: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup conv_module\n  \\brief\n  This function converts the matrix \\f$A\\f$ in dense format into a sparse matrix in CSR format while pruning values\n  based on percentage.\n\n  \\details\n  This function converts the dense column-oriented matrix \\f$A\\f$ into a sparse CSR matrix \\f$C\\f$ by pruning values in \\f$A\\f$\n  that are less than a threshold. This threshold is determined by using a \\p percentage and the following steps:\n\n  <b>Step 1</b>: First, the \\p A array is sorted in ascending order using the absolute value of each entry:\n  \\f[\n    A\\_sorted = sort(abs(A))\n  \\f]\n\n  <b>Step 2</b>: Next, use the \\p percentage parameter to determine the threshold:\n  \\f[\n    pos = ceil(m \\times n \\times (percentage/100)) - 1 \\\\\n    pos = \\min(pos, m \\times n - 1) \\\\\n    pos = \\max(pos, 0) \\\\\n    threshold = A\\_sorted[pos]\n  \\f]\n\n  <b>Step 3</b>: Finally, use this threshold with the routine\n  \\ref rocsparse_sprune_dense2csr \"rocsparse_Xprune_dense2csr()\" to complete the conversion.\n\n  The conversion involves three steps. First, call\n  \\ref rocsparse_sprune_dense2csr_by_percentage_buffer_size \"rocsparse_Xprune_dense2csr_by_percentage_buffer_size()\"\n  to determine the size of the temporary storage buffer. Allocate this buffer as well as the array\n  \\p csr_row_ptr to have \\p m+1 elements. Then call\n  \\ref rocsparse_sprune_dense2csr_nnz_by_percentage \"rocsparse_Xprune_dense2csr_nnz_by_percentage()\", which fills\n  in the \\p csr_row_ptr array and stores the number of elements that are larger than the pruning threshold\n  in \\p nnz_total_dev_host_ptr. Now that the number of non-zeros larger than the pruning threshold is known,\n  use this information to allocate the \\p csr_col_ind and \\p csr_val arrays and then call\n  \\p rocsparse_prune_dense2csr_by_percentage to complete the conversion. After the conversion is complete, the\n  temporary storage buffer can be freed.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the dense matrix \\p A.\n  @param[in]\n  n           number of columns of the dense matrix \\p A.\n  @param[in]\n  A           array of dimensions (\\p lda, \\p n).\n  @param[in]\n  lda         leading dimension of dense array \\p A.\n  @param[in]\n  percentage  \\p percentage>=0 and \\p percentage<=100.\n  @param[in]\n  descr       the descriptor of the dense matrix \\p A. The supported matrix type is \\ref rocsparse_matrix_type_general and\n              also any valid value of the \\ref rocsparse_index_base.\n  @param[out]\n  csr_val     array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) non-zero elements of matrix \\p A.\n  @param[in]\n  csr_row_ptr integer array of \\p m+1 elements that contains the start of every row and the end of the last row plus one.\n  @param[out]\n  csr_col_ind integer array of nnz ( = \\p csr_row_ptr[m] - \\p csr_row_ptr[0] ) column indices of the non-zero elements of matrix \\p A.\n  @param[in]\n  info prune  information structure.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user. The size is returned by\n              \\ref rocsparse_sprune_dense2csr_by_percentage_buffer_size \"rocsparse_Xprune_dense2csr_by_percentage_buffer_size()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, \\p lda, or \\p percentage is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p A, \\p descr, \\p info, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, or \\p temp_buffer pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_prune_dense2csr_by_percentage.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sprune_dense2csr_by_percentage(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f32,
        lda: rocsparse_int,
        percentage: f32,
        descr: rocsparse_mat_descr,
        csr_val: *mut f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
        info: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dprune_dense2csr_by_percentage(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        A: *const f64,
        lda: rocsparse_int,
        percentage: f64,
        descr: rocsparse_mat_descr,
        csr_val: *mut f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *mut rocsparse_int,
        info: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\details\n  \\p rocsparse_bsrgeam_nnzb computes the total BSR non-zero elements and the BSR row\n  offsets that point to the start of every row of the sparse BSR matrix of the\n  resulting matrix C. It is assumed that \\p bsr_row_ptr_C has been allocated with\n  size \\p mb+1.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  Currently, only \\ref rocsparse_matrix_type_general is supported.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  dir             direction that specifies whether to count non-zero elements by \\ref rocsparse_direction_row or by\n                  \\ref rocsparse_direction_column in the BSR matrices \\f$A\\f$, \\f$B\\f$, and \\f$C\\f$.\n  @param[in]\n  mb              number of block rows in the sparse BSR matrix \\f$op(A)\\f$ and \\f$C\\f$.\n  @param[in]\n  nb              number of block columns of the sparse BSR matrix \\f$op(B)\\f$ and\n                  \\f$C\\f$.\n  @param[in]\n  block_dim       the block dimension of the BSR matrix \\f$A\\f$. Between 1 and m where \\p m=mb*block_dim.\n  @param[in]\n  descr_A         descriptor of the sparse BSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_A          number of non-zero block entries of the sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_row_ptr_A   array of \\p mb+1 elements that point to the start of every block row of the\n                  sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_col_ind_A   array of \\p nnzb_A elements containing the column indices of the\n                  sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse BSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_B          number of non-zero block entries of the sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  bsr_row_ptr_B   array of \\p mb+1 elements that point to the start of every block row of the\n                  sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  bsr_col_ind_B   array of \\p nnzb_B elements containing the block column indices of the\n                  sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  descr_C         descriptor of the sparse BSR matrix \\f$C\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  bsr_row_ptr_C   array of \\p mb+1 elements that point to the start of every block row of the\n                  sparse BSR matrix \\f$C\\f$.\n  @param[out]\n  nnzb_C          pointer to the number of non-zero block entries of the sparse BSR\n                  matrix \\f$C\\f$. \\p nnzb_C can be a host or device pointer.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p mb, \\p nb, \\p kb, \\p nnzb_A, or \\p nnzb_B is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p descr_A, \\p bsr_row_ptr_A,\n          \\p bsr_col_ind_A, \\p descr_B, \\p bsr_row_ptr_B, \\p bsr_col_ind_B,\n          \\p descr_C, \\p bsr_row_ptr_C, or \\p nnzb_C is invalid.\n  \\retval rocsparse_status_not_implemented\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general."]
    pub fn rocsparse_bsrgeam_nnzb(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        block_dim: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_row_ptr_C: *mut rocsparse_int,
        nnzb_C: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\brief Sparse matrix sparse matrix addition using the BSR storage format.\n\n  \\details\n  \\p rocsparse_bsrgeam multiplies the scalar \\f$\\alpha\\f$ with the sparse\n  \\f$m \\times n\\f$ matrix \\f$A\\f$, defined in BSR storage format, multiplies the\n  scalar \\f$\\beta\\f$ with the sparse \\f$mb \\times nb\\f$ matrix \\f$B\\f$, defined in BSR\n  storage format, and adds both resulting matrices to obtain the sparse\n  \\f$mb \\times nb\\f$ matrix \\f$C\\f$, defined in BSR storage format, such that\n  \\f[\n    C := \\alpha \\cdot A + \\beta \\cdot B.\n  \\f]\n\n  It is assumed that \\p bsr_row_ptr_C has already been filled and that \\p bsr_val_C and\n  \\p bsr_col_ind_C are allocated by the user. \\p bsr_row_ptr_C and the allocation size of\n  \\p bsr_col_ind_C and \\p bsr_val_C is defined by the number of non-zero block elements of\n  the sparse BSR matrix C. Both can be obtained by \\ref rocsparse_bsrgeam_nnzb().\n\n  \\note Both scalars \\f$\\alpha\\f$ and \\f$beta\\f$ have to be valid.\n\n  \\note Currently, only \\ref rocsparse_matrix_type_general is supported.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  dir             direction that specifies whether to count non-zero elements by \\ref rocsparse_direction_row or by\n                  \\ref rocsparse_direction_column in the BSR matrices \\f$A\\f$, \\f$B\\f$, and \\f$C\\f$.\n  @param[in]\n  mb               number of rows of the sparse BSR matrix \\f$A\\f$, \\f$B\\f$, and \\f$C\\f$.\n  @param[in]\n  nb               number of columns of the sparse BSR matrix \\f$A\\f$, \\f$B\\f$, and \\f$C\\f$.\n  @param[in]\n  block_dim       the block dimension of the BSR matrix \\f$A\\f$. Between 1 and m where \\p m=mb*block_dim.\n  @param[in]\n  alpha           scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr_A         descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_A           number of non-zero block entries of the sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_val_A       array of \\p nnzb_A block elements of the sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_row_ptr_A   array of \\p mb+1 block elements that point to the start of every block row of the\n                  sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_col_ind_A   array of \\p nnzb_A block elements containing the block column indices of the\n                  sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  beta            scalar \\f$\\beta\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse BSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_B          number of non-zero block entries of the sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  bsr_val_B       array of \\p nnzb_B block elements of the sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  bsr_row_ptr_B   array of \\p mb+1 block elements that point to the start of every block row of the\n                  sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  bsr_col_ind_B   array of \\p nnzb_B block elements containing the block column indices of the\n                  sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  descr_C         descriptor of the sparse BSR matrix \\f$C\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  bsr_val_C       array of block elements of the sparse BSR matrix \\f$C\\f$.\n  @param[in]\n  bsr_row_ptr_C   array of \\p mb+1 block elements that point to the start of every block row of the\n                  sparse BSR matrix \\f$C\\f$.\n  @param[out]\n  bsr_col_ind_C   array of block elements containing the block column indices of the\n                  sparse BSR matrix \\f$C\\f$.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p mb, \\p nb, \\p nnzb_A, or \\p nnzb_B is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p alpha, \\p descr_A, \\p bsr_val_A,\n          \\p bsr_row_ptr_A, \\p bsr_col_ind_A, \\p beta, \\p descr_B, \\p bsr_val_B,\n          \\p bsr_row_ptr_B, \\p bsr_col_ind_B, \\p descr_C, \\p csr_val_C,\n          \\p bsr_row_ptr_C, or \\p bsr_col_ind_C is invalid.\n  \\retval rocsparse_status_not_implemented\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example adds two CSR matrices.\n  \\snippet example_rocsparse_bsrgeam.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sbsrgeam(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const f32,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_val_A: *const f32,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        beta: *const f32,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_val_B: *const f32,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut f32,
        bsr_row_ptr_C: *const rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrgeam(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const f64,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_val_A: *const f64,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        beta: *const f64,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_val_B: *const f64,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut f64,
        bsr_row_ptr_C: *const rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrgeam(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_val_A: *const rocsparse_float_complex,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        beta: *const rocsparse_float_complex,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_val_B: *const rocsparse_float_complex,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut rocsparse_float_complex,
        bsr_row_ptr_C: *const rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrgeam(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_val_A: *const rocsparse_double_complex,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        beta: *const rocsparse_double_complex,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_val_B: *const rocsparse_double_complex,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut rocsparse_double_complex,
        bsr_row_ptr_C: *const rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\details\n  \\p rocsparse_bsrgemm_buffer_size returns the size of the temporary storage buffer\n  that is required by \\ref rocsparse_bsrgemm_nnzb() and \\ref rocsparse_sbsrgemm \"rocsparse_Xbsrgemm()\".\n  The temporary storage buffer must be allocated by the user.\n\n  \\note\n  This function is blocking with respect to the host.\n  \\note\n  Currently, only \\p trans_A == \\p trans_B == \\ref rocsparse_operation_none is\n  supported.\n  \\note\n  Currently, only \\ref rocsparse_matrix_type_general is supported.\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  dir             direction that specifies whether to count non-zero elements by \\ref rocsparse_direction_row or by\n                  \\ref rocsparse_direction_column in the BSR matrices \\f$A\\f$, \\f$B\\f$, \\f$C\\f$, and \\f$D\\f$.\n  @param[in]\n  trans_A         matrix \\f$A\\f$ operation type.\n  @param[in]\n  trans_B         matrix \\f$B\\f$ operation type.\n  @param[in]\n  mb              number of block rows in the sparse BSR matrix \\f$op(A)\\f$ and \\f$C\\f$.\n  @param[in]\n  nb              number of block columns of the sparse BSR matrix \\f$op(B)\\f$ and\n                  \\f$C\\f$.\n  @param[in]\n  kb              number of block columns of the sparse BSR matrix \\f$op(A)\\f$ and number of\n                  rows of the sparse BSR matrix \\f$op(B)\\f$.\n  @param[in]\n  block_dim       the block dimension of the BSR matrix \\f$A\\f$, \\f$B\\f$, \\f$C\\f$, and \\f$D\\f$.\n  @param[in]\n  alpha           scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr_A         descriptor of the sparse BSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_A          number of non-zero block entries of the sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_row_ptr_A   array of \\p mb+1 elements (\\f$op(A) == A\\f$, \\p kb+1 otherwise)\n                  that point to the start of every block row of the sparse BSR matrix\n                  \\f$op(A)\\f$.\n  @param[in]\n  bsr_col_ind_A   array of \\p nnzb_A elements containing the block column indices of the\n                  sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse BSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_B          number of non-zero block entries of the sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  bsr_row_ptr_B   array of \\p kb+1 elements (\\f$op(B) == B\\f$, \\p mb+1 otherwise)\n                  that point to the start of every block row of the sparse BSR matrix\n                  \\f$op(B)\\f$.\n  @param[in]\n  bsr_col_ind_B   array of \\p nnzb_B elements containing the block column indices of the\n                  sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  beta            scalar \\f$\\beta\\f$.\n  @param[in]\n  descr_D         descriptor of the sparse BSR matrix \\f$D\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_D          number of non-zero block entries of the sparse BSR matrix \\f$D\\f$.\n  @param[in]\n  bsr_row_ptr_D   array of \\p mb+1 elements that point to the start of every block row of the\n                  sparse BSR matrix \\f$D\\f$.\n  @param[in]\n  bsr_col_ind_D   array of \\p nnzb_D elements containing the block column indices of the sparse\n                  BSR matrix \\f$D\\f$.\n  @param[inout]\n  info_C          structure that holds metadata for the sparse BSR matrix \\f$C\\f$.\n  @param[out]\n  buffer_size     number of bytes of the temporary storage buffer required by\n                  rocsparse_bsrgemm_nnzb(), rocsparse_sbsrgemm(), rocsparse_dbsrgemm(),\n                  rocsparse_cbsrgemm(), and rocsparse_zbsrgemm().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p mb, \\p nb, \\p kb, \\p block_dim, \\p nnzb_A, \\p nnzb_B, or\n          \\p nnzb_D is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p alpha and \\p beta are invalid,\n          \\p descr_A, \\p bsr_row_ptr_A, \\p bsr_col_ind_A, \\p descr_B,\n          \\p bsr_row_ptr_B, or \\p bsr_col_ind_B are invalid if \\p alpha is valid,\n          \\p descr_D, \\p bsr_row_ptr_D, or \\p bsr_col_ind_D is invalid if \\p beta is\n          valid, or \\p info_C or \\p buffer_size are invalid.\n  \\retval rocsparse_status_not_implemented\n          \\p trans_A != \\ref rocsparse_operation_none,\n          \\p trans_B != \\ref rocsparse_operation_none, or\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sbsrgemm_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        kb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const f32,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        beta: *const f32,
        descr_D: rocsparse_mat_descr,
        nnzb_D: rocsparse_int,
        bsr_row_ptr_D: *const rocsparse_int,
        bsr_col_ind_D: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrgemm_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        kb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const f64,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        beta: *const f64,
        descr_D: rocsparse_mat_descr,
        nnzb_D: rocsparse_int,
        bsr_row_ptr_D: *const rocsparse_int,
        bsr_col_ind_D: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrgemm_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        kb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        beta: *const rocsparse_float_complex,
        descr_D: rocsparse_mat_descr,
        nnzb_D: rocsparse_int,
        bsr_row_ptr_D: *const rocsparse_int,
        bsr_col_ind_D: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrgemm_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        kb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        beta: *const rocsparse_double_complex,
        descr_D: rocsparse_mat_descr,
        nnzb_D: rocsparse_int,
        bsr_row_ptr_D: *const rocsparse_int,
        bsr_col_ind_D: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\details\n  \\p rocsparse_bsrgemm_nnzb computes the total BSR non-zero block elements and the BSR block row\n  offsets that point to the start of every block row of the sparse BSR matrix of the\n  resulting multiplied matrix C. It is assumed that \\p bsr_row_ptr_C has been allocated\n  with size \\p mb+1.\n  The required buffer size can be obtained by\n  \\ref rocsparse_sbsrgemm_buffer_size \"rocsparse_Xbsrgemm_buffer_size()\".\n\n  \\note\n  This function is blocking with respect to the host.\n  \\note\n  Currently, only \\p trans_A == \\p trans_B == \\ref rocsparse_operation_none is\n  supported.\n  \\note\n  Currently, only \\ref rocsparse_matrix_type_general is supported.\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  dir             direction that specifies whether to count non-zero elements by \\ref rocsparse_direction_row or by\n                  \\ref rocsparse_direction_column in the BSR matrices \\f$A\\f$, \\f$B\\f$, \\f$C\\f$, and \\f$D\\f$.\n  @param[in]\n  trans_A         matrix \\f$A\\f$ operation type.\n  @param[in]\n  trans_B         matrix \\f$B\\f$ operation type.\n  @param[in]\n  mb              number of block rows in the sparse BSR matrix \\f$op(A)\\f$ and \\f$C\\f$.\n  @param[in]\n  nb              number of block columns of the sparse BSR matrix \\f$op(B)\\f$ and\n                  \\f$C\\f$.\n  @param[in]\n  kb              number of block columns of the sparse BSR matrix \\f$op(A)\\f$ and number of\n                  rows of the sparse BSR matrix \\f$op(B)\\f$.\n  @param[in]\n  block_dim       the block dimension of the BSR matrix \\f$A\\f$, \\f$B\\f$, \\f$C\\f$, and \\f$D\\f$.\n  @param[in]\n  descr_A         descriptor of the sparse BSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_A          number of non-zero block entries of the sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_row_ptr_A   array of \\p mb+1 block elements (\\f$op(A) == A\\f$, \\p kb+1 otherwise)\n                  that point to the start of every row of the sparse BSR matrix\n                  \\f$op(A)\\f$.\n  @param[in]\n  bsr_col_ind_A   array of \\p nnzb_A block elements containing the block column indices of the\n                  sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse BSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_B          number of non-zero block entries of the sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  bsr_row_ptr_B   array of \\p kb+1 block elements (\\f$op(B) == B\\f$, \\p mb+1 otherwise)\n                  that point to the start of every block row of the sparse BSR matrix\n                  \\f$op(B)\\f$.\n  @param[in]\n  bsr_col_ind_B   array of \\p nnzb_B block elements containing the block column indices of the\n                  sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  descr_D         descriptor of the sparse BSR matrix \\f$D\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_D          number of non-zero block entries of the sparse BSR matrix \\f$D\\f$.\n  @param[in]\n  bsr_row_ptr_D   array of \\p mb+1 block elements that point to the start of every block row of the\n                  sparse BSR matrix \\f$D\\f$.\n  @param[in]\n  bsr_col_ind_D   array of \\p nnzb_D block elements containing the block column indices of the sparse\n                  BSR matrix \\f$D\\f$.\n  @param[in]\n  descr_C         descriptor of the sparse BSR matrix \\f$C\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  bsr_row_ptr_C   array of \\p mb+1 block elements that point to the start of every block row of the\n                  sparse BSR matrix \\f$C\\f$.\n  @param[out]\n  nnzb_C          pointer to the number of non-zero block entries of the sparse BSR\n                  matrix \\f$C\\f$.\n  @param[in]\n  info_C          structure that holds metadata for the sparse BSR matrix \\f$C\\f$.\n  @param[in]\n  temp_buffer     temporary storage buffer allocated by the user. The size is returned\n                  by rocsparse_sbsrgemm_buffer_size(),\n                  rocsparse_dbsrgemm_buffer_size(), rocsparse_cbsrgemm_buffer_size(), or\n                  rocsparse_zbsrgemm_buffer_size().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p mb, \\p nb, \\p kb, \\p block_dim, \\p nnzb_A, \\p nnzb_B, or\n          \\p nnzb_D is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p descr_A, \\p bsr_row_ptr_A,\n          \\p bsr_col_ind_A, \\p descr_B, \\p bsr_row_ptr_B, \\p bsr_col_ind_B,\n          \\p descr_D, \\p bsr_row_ptr_D, \\p bsr_col_ind_D, \\p descr_C,\n          \\p bsr_row_ptr_C, \\p nnzb_C, \\p info_C, or \\p temp_buffer is invalid.\n  \\retval rocsparse_status_memory_error additional buffer for long rows could not be\n          allocated.\n  \\retval rocsparse_status_not_implemented\n          \\p trans_A != \\ref rocsparse_operation_none,\n          \\p trans_B != \\ref rocsparse_operation_none, or\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general."]
    pub fn rocsparse_bsrgemm_nnzb(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        kb: rocsparse_int,
        block_dim: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        descr_D: rocsparse_mat_descr,
        nnzb_D: rocsparse_int,
        bsr_row_ptr_D: *const rocsparse_int,
        bsr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_row_ptr_C: *mut rocsparse_int,
        nnzb_C: *mut rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\brief Sparse matrix sparse matrix multiplication using the BSR storage format.\n\n  \\details\n  \\p rocsparse_bsrgemm multiplies the scalar \\f$\\alpha\\f$ with the sparse\n  \\f$mb \\times kb\\f$ matrix \\f$A\\f$, defined in BSR storage format, and the sparse\n  \\f$kb \\times nb\\f$ matrix \\f$B\\f$, defined in BSR storage format, and adds the result\n  to the sparse \\f$mb \\times nb\\f$ matrix \\f$D\\f$ that is multiplied by \\f$\\beta\\f$. The\n  final result is stored in the sparse \\f$mb \\times nb\\f$ matrix \\f$C\\f$, defined in BSR\n  storage format, such\n  that\n  \\f[\n    C := \\alpha \\cdot op(A) \\cdot op(B) + \\beta \\cdot D,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans_A == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans_A == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n        B^H, & \\text{if trans_B == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\note\n  This function does not produce deterministic results.\n\n  It is assumed that \\p bsr_row_ptr_C has already been filled and that \\p bsr_val_C and\n  \\p bsr_col_ind_C are allocated by the user. \\p bsr_row_ptr_C and the allocation size of\n  \\p bsr_col_ind_C and \\p bsr_val_C is defined by the number of non-zero elements of\n  the sparse BSR matrix C. Both can be obtained by \\ref rocsparse_bsrgemm_nnzb(). The\n  required buffer size for the computation can be obtained by\n  \\ref rocsparse_sbsrgemm_buffer_size \"rocsparse_Xbsrgemm_buffer_size()\".\n\n  \\note If \\f$\\alpha == 0\\f$, then \\f$C = \\beta \\cdot D\\f$ will be computed.\n  \\note If \\f$\\beta == 0\\f$, then \\f$C = \\alpha \\cdot op(A) \\cdot op(B)\\f$ will be computed.\n  \\note \\f$\\alpha == beta == 0\\f$ is invalid.\n  \\note Currently, only \\p trans_A == \\ref rocsparse_operation_none is supported.\n  \\note Currently, only \\p trans_B == \\ref rocsparse_operation_none is supported.\n  \\note Currently, only \\ref rocsparse_matrix_type_general is supported.\n  \\note This function is blocking with respect to the host.\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  dir             direction that specifies whether to count non-zero elements by \\ref rocsparse_direction_row or by\n                  \\ref rocsparse_direction_column in the BSR matrices \\f$A\\f$, \\f$B\\f$, \\f$C\\f$, and \\f$D\\f$.\n  @param[in]\n  trans_A         matrix \\f$A\\f$ operation type.\n  @param[in]\n  trans_B         matrix \\f$B\\f$ operation type.\n  @param[in]\n  mb              number of block rows of the sparse BSR matrix \\f$op(A)\\f$ and \\f$C\\f$.\n  @param[in]\n  nb              number of block columns of the sparse BSR matrix \\f$op(B)\\f$ and\n                  \\f$C\\f$.\n  @param[in]\n  kb              number of block columns of the sparse BSR matrix \\f$op(A)\\f$ and number of\n                  block rows of the sparse BSR matrix \\f$op(B)\\f$.\n  @param[in]\n  block_dim       the block dimension of the BSR matrix \\f$A\\f$, \\f$B\\f$, \\f$C\\f$, and \\f$D\\f$.\n  @param[in]\n  alpha           scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr_A         descriptor of the sparse BSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_A          number of non-zero block entries of the sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_val_A       array of \\p nnzb_A block elements of the sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_row_ptr_A   array of \\p mb+1 block elements (\\f$op(A) == A\\f$, \\p kb+1 otherwise)\n                  that point to the start of every block row of the sparse BSR matrix\n                  \\f$op(A)\\f$.\n  @param[in]\n  bsr_col_ind_A   array of \\p nnzb_A block elements containing the block column indices of the\n                  sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse BSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_B          number of non-zero block entries of the sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  bsr_val_B       array of \\p nnzb_B block elements of the sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  bsr_row_ptr_B   array of \\p kb+1 block elements (\\f$op(B) == B\\f$, \\p mb+1 otherwise)\n                  that point to the start of every block row of the sparse BSR matrix\n                  \\f$op(B)\\f$.\n  @param[in]\n  bsr_col_ind_B   array of \\p nnzb_B block elements containing the block column indices of the\n                  sparse BSR matrix \\f$B\\f$.\n  @param[in]\n  beta            scalar \\f$\\beta\\f$.\n  @param[in]\n  descr_D         descriptor of the sparse BSR matrix \\f$D\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnzb_D          number of non-zero block entries of the sparse BSR matrix \\f$D\\f$.\n  @param[in]\n  bsr_val_D       array of \\p nnzb_D block elements of the sparse BSR matrix \\f$D\\f$.\n  @param[in]\n  bsr_row_ptr_D   array of \\p mb+1 block elements that point to the start of every block row of the\n                  sparse BSR matrix \\f$D\\f$.\n  @param[in]\n  bsr_col_ind_D   array of \\p nnzb_D block elements containing the block column indices of the\n                  sparse BSR matrix \\f$D\\f$.\n  @param[in]\n  descr_C         descriptor of the sparse BSR matrix \\f$C\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  bsr_val_C       array of \\p nnzb_C elements of the sparse BSR matrix \\f$C\\f$.\n  @param[in]\n  bsr_row_ptr_C   array of \\p mb+1 block elements that point to the start of every block row of the\n                  sparse BSR matrix \\f$C\\f$.\n  @param[out]\n  bsr_col_ind_C   array of \\p nnzb_C block elements containing the block column indices of the\n                  sparse BSR matrix \\f$C\\f$.\n  @param[in]\n  info_C          structure that holds metadata for the sparse BSR matrix \\f$C\\f$.\n  @param[in]\n  temp_buffer     temporary storage buffer allocated by the user. The size is returned\n                  by rocsparse_sbsrgemm_buffer_size(),\n                  rocsparse_dbsrgemm_buffer_size(), rocsparse_cbsrgemm_buffer_size(), or\n                  rocsparse_zbsrgemm_buffer_size().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p mb, \\p nb, \\p kb, \\p block_dim, \\p nnzb_A, \\p nnzb_B, or\n          \\p nnzb_D is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p alpha and \\p beta are invalid,\n          \\p descr_A, \\p bsr_val_A, \\p bsr_row_ptr_A, \\p bsr_col_ind_A, \\p descr_B,\n          \\p bsr_val_B, \\p bsr_row_ptr_B, or \\p bsr_col_ind_B are invalid if \\p alpha\n          is valid, \\p descr_D, \\p bsr_val_D, \\p bsr_row_ptr_D, or \\p bsr_col_ind_D is\n          invalid if \\p beta is valid, or \\p bsr_val_C, \\p bsr_row_ptr_C,\n          \\p bsr_col_ind_C, or \\p info_C or \\p temp_buffer are invalid.\n  \\retval rocsparse_status_memory_error additional buffer for long rows could not be\n          allocated.\n  \\retval rocsparse_status_not_implemented\n          \\p trans_A != \\ref rocsparse_operation_none,\n          \\p trans_B != \\ref rocsparse_operation_none, or\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example multiplies two BSR matrices with a scalar alpha and adds the result to\n  another BSR matrix.\n  \\snippet example_rocsparse_bsrgemm.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sbsrgemm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        kb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const f32,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_val_A: *const f32,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_val_B: *const f32,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        beta: *const f32,
        descr_D: rocsparse_mat_descr,
        nnzb_D: rocsparse_int,
        bsr_val_D: *const f32,
        bsr_row_ptr_D: *const rocsparse_int,
        bsr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut f32,
        bsr_row_ptr_C: *const rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrgemm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        kb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const f64,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_val_A: *const f64,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_val_B: *const f64,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        beta: *const f64,
        descr_D: rocsparse_mat_descr,
        nnzb_D: rocsparse_int,
        bsr_val_D: *const f64,
        bsr_row_ptr_D: *const rocsparse_int,
        bsr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut f64,
        bsr_row_ptr_C: *const rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrgemm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        kb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_val_A: *const rocsparse_float_complex,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_val_B: *const rocsparse_float_complex,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        beta: *const rocsparse_float_complex,
        descr_D: rocsparse_mat_descr,
        nnzb_D: rocsparse_int,
        bsr_val_D: *const rocsparse_float_complex,
        bsr_row_ptr_D: *const rocsparse_int,
        bsr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut rocsparse_float_complex,
        bsr_row_ptr_C: *const rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrgemm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        kb: rocsparse_int,
        block_dim: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr_A: rocsparse_mat_descr,
        nnzb_A: rocsparse_int,
        bsr_val_A: *const rocsparse_double_complex,
        bsr_row_ptr_A: *const rocsparse_int,
        bsr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnzb_B: rocsparse_int,
        bsr_val_B: *const rocsparse_double_complex,
        bsr_row_ptr_B: *const rocsparse_int,
        bsr_col_ind_B: *const rocsparse_int,
        beta: *const rocsparse_double_complex,
        descr_D: rocsparse_mat_descr,
        nnzb_D: rocsparse_int,
        bsr_val_D: *const rocsparse_double_complex,
        bsr_row_ptr_D: *const rocsparse_int,
        bsr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        bsr_val_C: *mut rocsparse_double_complex,
        bsr_row_ptr_C: *const rocsparse_int,
        bsr_col_ind_C: *mut rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\details\n  \\p rocsparse_csrgeam_nnz computes the total CSR non-zero elements and the CSR row\n  offsets that point to the start of every row of the sparse CSR matrix of the\n  resulting matrix C. It is assumed that \\p csr_row_ptr_C has been allocated with\n  size \\p m+1.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  Currently, only \\ref rocsparse_matrix_type_general is supported.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  m               number of rows of the sparse CSR matrix \\f$A\\f$, \\f$B\\f$, and \\f$C\\f$.\n  @param[in]\n  n               number of columns of the sparse CSR matrix \\f$A\\f$, \\f$B\\f$, and \\f$C\\f$.\n  @param[in]\n  descr_A         descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_A           number of non-zero entries of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_col_ind_A   array of \\p nnz_A elements containing the column indices of the\n                  sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse CSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_B           number of non-zero entries of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_row_ptr_B   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_col_ind_B   array of \\p nnz_B elements containing the column indices of the\n                  sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  descr_C         descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_row_ptr_C   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  nnz_C           pointer to the number of non-zero entries of the sparse CSR\n                  matrix \\f$C\\f$. \\p nnz_C can be a host or device pointer.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, \\p nnz_A, or \\p nnz_B is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p descr_A, \\p csr_row_ptr_A,\n          \\p csr_col_ind_A, \\p descr_B, \\p csr_row_ptr_B, \\p csr_col_ind_B,\n          \\p descr_C, \\p csr_row_ptr_C, or \\p nnz_C is invalid.\n  \\retval rocsparse_status_not_implemented\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general."]
    pub fn rocsparse_csrgeam_nnz(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        csr_row_ptr_C: *mut rocsparse_int,
        nnz_C: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\brief Sparse matrix sparse matrix addition using the CSR storage format.\n\n  \\details\n  \\p rocsparse_csrgeam multiplies the scalar \\f$\\alpha\\f$ with the sparse\n  \\f$m \\times n\\f$ matrix \\f$A\\f$, defined in CSR storage format, multiplies the\n  scalar \\f$\\beta\\f$ with the sparse \\f$m \\times n\\f$ matrix \\f$B\\f$, defined in CSR\n  storage format, and adds both resulting matrices to obtain the sparse\n  \\f$m \\times n\\f$ matrix \\f$C\\f$, defined in CSR storage format, such that\n  \\f[\n    C := \\alpha \\cdot A + \\beta \\cdot B.\n  \\f]\n\n  It is assumed that \\p csr_row_ptr_C has already been filled and that \\p csr_val_C and\n  \\p csr_col_ind_C are allocated by the user. \\p csr_row_ptr_C and the allocation size of\n  \\p csr_col_ind_C and \\p csr_val_C is defined by the number of non-zero elements of\n  the sparse CSR matrix C. Both can be obtained by \\ref rocsparse_csrgeam_nnz().\n\n  \\note Both scalars \\f$\\alpha\\f$ and \\f$beta\\f$ have to be valid.\n\n  \\note Currently, only \\ref rocsparse_matrix_type_general is supported.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  m               number of rows of the sparse CSR matrix \\f$A\\f$, \\f$B\\f$, and \\f$C\\f$.\n  @param[in]\n  n               number of columns of the sparse CSR matrix \\f$A\\f$, \\f$B\\f$, and \\f$C\\f$.\n  @param[in]\n  alpha           scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr_A         descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_A           number of non-zero entries of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_val_A       array of \\p nnz_A elements of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_col_ind_A   array of \\p nnz_A elements containing the column indices of the\n                  sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  beta            scalar \\f$\\beta\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse CSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_B           number of non-zero entries of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_val_B       array of \\p nnz_B elements of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_row_ptr_B   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_col_ind_B   array of \\p nnz_B elements containing the column indices of the\n                  sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  descr_C         descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_val_C       array of elements of the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  csr_row_ptr_C   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  csr_col_ind_C   array of elements containing the column indices of the\n                  sparse CSR matrix \\f$C\\f$.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, \\p nnz_A, or \\p nnz_B is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p alpha, \\p descr_A, \\p csr_val_A,\n          \\p csr_row_ptr_A, \\p csr_col_ind_A, \\p beta, \\p descr_B, \\p csr_val_B,\n          \\p csr_row_ptr_B, \\p csr_col_ind_B, \\p descr_C, \\p csr_val_C,\n          \\p csr_row_ptr_C, or \\p csr_col_ind_C is invalid.\n  \\retval rocsparse_status_not_implemented\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example adds two CSR matrices.\n  \\snippet example_rocsparse_csrgeam.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsrgeam(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const f32,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const f32,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        beta: *const f32,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const f32,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        csr_val_C: *mut f32,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrgeam(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const f64,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const f64,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        beta: *const f64,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const f64,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        csr_val_C: *mut f64,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrgeam(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const rocsparse_float_complex,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        beta: *const rocsparse_float_complex,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const rocsparse_float_complex,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        csr_val_C: *mut rocsparse_float_complex,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrgeam(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const rocsparse_double_complex,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        beta: *const rocsparse_double_complex,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const rocsparse_double_complex,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        csr_val_C: *mut rocsparse_double_complex,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\details\n  \\p rocsparse_csrgemm_buffer_size returns the size of the temporary storage buffer\n  that is required by \\ref rocsparse_csrgemm_nnz() and \\ref rocsparse_scsrgemm \"rocsparse_Xcsrgemm()\".\n  The temporary storage buffer must be allocated by the user.\n\n  \\note\n  Note that for matrix products with more than 4096 non-zero entries per row,\n  an additional temporary storage buffer is allocated by the algorithm.\n  \\note\n  Note that for matrix products with more than 8192 intermediate products per\n  row, an additional temporary storage buffer is allocated by the algorithm.\n  \\note\n  Currently, only \\p trans_A == \\p trans_B == \\ref rocsparse_operation_none is\n  supported.\n  \\note\n  Currently, only \\ref rocsparse_matrix_type_general is supported.\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A         matrix \\f$A\\f$ operation type.\n  @param[in]\n  trans_B         matrix \\f$B\\f$ operation type.\n  @param[in]\n  m               number of rows of the sparse CSR matrix \\f$op(A)\\f$ and \\f$C\\f$.\n  @param[in]\n  n               number of columns of the sparse CSR matrix \\f$op(B)\\f$ and\n                  \\f$C\\f$.\n  @param[in]\n  k               number of columns of the sparse CSR matrix \\f$op(A)\\f$ and number of\n                  rows of the sparse CSR matrix \\f$op(B)\\f$.\n  @param[in]\n  alpha           scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr_A         descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_A           number of non-zero entries of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A   array of \\p m+1 elements (\\f$op(A) == A\\f$, \\p k+1 otherwise)\n                  that point to the start of every row of the sparse CSR matrix\n                  \\f$op(A)\\f$.\n  @param[in]\n  csr_col_ind_A   array of \\p nnz_A elements containing the column indices of the\n                  sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse CSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_B           number of non-zero entries of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_row_ptr_B   array of \\p k+1 elements (\\f$op(B) == B\\f$, \\p m+1 otherwise)\n                  that point to the start of every row of the sparse CSR matrix\n                  \\f$op(B)\\f$.\n  @param[in]\n  csr_col_ind_B   array of \\p nnz_B elements containing the column indices of the\n                  sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  beta            scalar \\f$\\beta\\f$.\n  @param[in]\n  descr_D         descriptor of the sparse CSR matrix \\f$D\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_D           number of non-zero entries of the sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_row_ptr_D   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_col_ind_D   array of \\p nnz_D elements containing the column indices of the sparse\n                  CSR matrix \\f$D\\f$.\n  @param[inout]\n  info_C          structure that holds metadata for the sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  buffer_size     number of bytes of the temporary storage buffer required by\n                  \\ref rocsparse_csrgemm_nnz() and \\ref rocsparse_scsrgemm \"rocsparse_Xcsrgemm()\".\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, \\p k, \\p nnz_A, \\p nnz_B, or\n          \\p nnz_D is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p alpha and \\p beta are invalid,\n          \\p descr_A, \\p csr_row_ptr_A, \\p csr_col_ind_A, \\p descr_B,\n          \\p csr_row_ptr_B or \\p csr_col_ind_B are invalid if \\p alpha is valid,\n          \\p descr_D, \\p csr_row_ptr_D, or \\p csr_col_ind_D is invalid if \\p beta is\n          valid, \\p info_C or \\p buffer_size is invalid.\n  \\retval rocsparse_status_not_implemented\n          \\p trans_A != \\ref rocsparse_operation_none,\n          \\p trans_B != \\ref rocsparse_operation_none, or\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_scsrgemm_buffer_size(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const f32,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const f32,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrgemm_buffer_size(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const f64,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const f64,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrgemm_buffer_size(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const rocsparse_float_complex,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrgemm_buffer_size(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const rocsparse_double_complex,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\brief Sparse matrix sparse matrix multiplication using the CSR storage format.\n\n  \\details\n  \\p rocsparse_csrgemm_nnz computes the total CSR non-zero elements and the CSR row\n  offsets that point to the start of every row of the sparse CSR matrix of the\n  resulting multiplied matrix C. It is assumed that \\p csr_row_ptr_C has been allocated\n  with size \\p m+1.\n  The required buffer size can be obtained by rocsparse_scsrgemm_buffer_size(),\n  rocsparse_dcsrgemm_buffer_size(), rocsparse_ccsrgemm_buffer_size(), and\n  rocsparse_zcsrgemm_buffer_size(), respectively.\n\n  \\note\n  Note that for matrix products with more than 8192 intermediate products per\n  row, an additional temporary storage buffer is allocated by the algorithm.\n  \\note\n  This function supports unsorted CSR matrices as input, while output will be sorted.\n  Note that matrices B and D can only be unsorted up to 8192 intermediate\n  products per row. If this number is exceeded, \\ref rocsparse_status_requires_sorted_storage\n  will be returned.\n  \\note\n  This function is blocking with respect to the host.\n  \\note\n  Currently, only \\p trans_A == \\p trans_B == \\ref rocsparse_operation_none is\n  supported.\n  \\note\n  Currently, only \\ref rocsparse_matrix_type_general is supported.\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A         matrix \\f$A\\f$ operation type.\n  @param[in]\n  trans_B         matrix \\f$B\\f$ operation type.\n  @param[in]\n  m               number of rows of the sparse CSR matrix \\f$op(A)\\f$ and \\f$C\\f$.\n  @param[in]\n  n               number of columns of the sparse CSR matrix \\f$op(B)\\f$ and\n                  \\f$C\\f$.\n  @param[in]\n  k               number of columns of the sparse CSR matrix \\f$op(A)\\f$ and number of\n                  rows of the sparse CSR matrix \\f$op(B)\\f$.\n  @param[in]\n  descr_A         descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_A           number of non-zero entries of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A   array of \\p m+1 elements (\\f$op(A) == A\\f$, \\p k+1 otherwise)\n                  that point to the start of every row of the sparse CSR matrix\n                  \\f$op(A)\\f$.\n  @param[in]\n  csr_col_ind_A   array of \\p nnz_A elements containing the column indices of the\n                  sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse CSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_B           number of non-zero entries of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_row_ptr_B   array of \\p k+1 elements (\\f$op(B) == B\\f$, \\p m+1 otherwise)\n                  that point to the start of every row of the sparse CSR matrix\n                  \\f$op(B)\\f$.\n  @param[in]\n  csr_col_ind_B   array of \\p nnz_B elements containing the column indices of the\n                  sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  descr_D         descriptor of the sparse CSR matrix \\f$D\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_D           number of non-zero entries of the sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_row_ptr_D   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_col_ind_D   array of \\p nnz_D elements containing the column indices of the sparse\n                  CSR matrix \\f$D\\f$.\n  @param[in]\n  descr_C         descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_row_ptr_C   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  nnz_C           pointer to the number of non-zero entries of the sparse CSR\n                  matrix \\f$C\\f$.\n  @param[in]\n  info_C          structure that holds meta data for the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  temp_buffer     temporary storage buffer allocated by the user, size is returned\n                  by rocsparse_scsrgemm_buffer_size(),\n                  rocsparse_dcsrgemm_buffer_size(), rocsparse_ccsrgemm_buffer_size(), or\n                  rocsparse_zcsrgemm_buffer_size().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, \\p k, \\p nnz_A, \\p nnz_B, or\n          \\p nnz_D is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p descr_A, \\p csr_row_ptr_A,\n          \\p csr_col_ind_A, \\p descr_B, \\p csr_row_ptr_B, \\p csr_col_ind_B,\n          \\p descr_D, \\p csr_row_ptr_D, \\p csr_col_ind_D, \\p descr_C,\n          \\p csr_row_ptr_C, \\p nnz_C, \\p info_C, or \\p temp_buffer is invalid.\n  \\retval rocsparse_status_memory_error additional buffer for long rows could not be\n          allocated.\n  \\retval rocsparse_status_not_implemented\n          \\p trans_A != \\ref rocsparse_operation_none,\n          \\p trans_B != \\ref rocsparse_operation_none, or\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general."]
    pub fn rocsparse_csrgemm_nnz(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        csr_row_ptr_C: *mut rocsparse_int,
        nnz_C: *mut rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\brief Sparse matrix sparse matrix multiplication using the CSR storage format.\n\n  \\details\n  \\p rocsparse_csrgemm multiplies the scalar \\f$\\alpha\\f$ with the sparse\n  \\f$m \\times k\\f$ matrix \\f$A\\f$, defined in CSR storage format, and the sparse\n  \\f$k \\times n\\f$ matrix \\f$B\\f$, defined in CSR storage format, and adds the result\n  to the sparse \\f$m \\times n\\f$ matrix \\f$D\\f$ that is multiplied by \\f$\\beta\\f$. The\n  final result is stored in the sparse \\f$m \\times n\\f$ matrix \\f$C\\f$, defined in CSR\n  storage format, such\n  that\n  \\f[\n    C := \\alpha \\cdot op(A) \\cdot op(B) + \\beta \\cdot D,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans_A == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans_A == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n        B^H, & \\text{if trans_B == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\note\n  This function does not produce deterministic results.\n\n  It is assumed that \\p csr_row_ptr_C has already been filled and that \\p csr_val_C and\n  \\p csr_col_ind_C are allocated by the user. \\p csr_row_ptr_C and the allocation size of\n  \\p csr_col_ind_C and \\p csr_val_C are defined by the number of non-zero elements of\n  the sparse CSR matrix C. Both can be obtained by using rocsparse_csrgemm_nnz(). The\n  required buffer size for the computation can be obtained by\n  rocsparse_scsrgemm_buffer_size(), rocsparse_dcsrgemm_buffer_size(),\n  rocsparse_ccsrgemm_buffer_size(), and rocsparse_zcsrgemm_buffer_size(), respectively.\n\n  \\note If \\f$\\alpha == 0\\f$, then \\f$C = \\beta \\cdot D\\f$ will be computed.\n  \\note If \\f$\\beta == 0\\f$, then \\f$C = \\alpha \\cdot op(A) \\cdot op(B)\\f$ will be computed.\n  \\note \\f$\\alpha == beta == 0\\f$ is invalid.\n  \\note Currently, only \\p trans_A == \\ref rocsparse_operation_none is supported.\n  \\note Currently, only \\p trans_B == \\ref rocsparse_operation_none is supported.\n  \\note Currently, only \\ref rocsparse_matrix_type_general is supported.\n  \\note Note that for matrix products with more than 4096 non-zero entries per\n  row, an additional temporary storage buffer is allocated by the algorithm.\n  \\note\n  This function supports unsorted CSR matrices as input, while output will be sorted.\n  Note that matrices B and D can only be unsorted up to 4096 non-zero entries\n  per row. If this number is exceeded, \\ref rocsparse_status_requires_sorted_storage\n  will be returned.\n  \\note\n  This function is blocking with respect to the host.\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A         matrix \\f$A\\f$ operation type.\n  @param[in]\n  trans_B         matrix \\f$B\\f$ operation type.\n  @param[in]\n  m               number of rows of the sparse CSR matrix \\f$op(A)\\f$ and \\f$C\\f$.\n  @param[in]\n  n               number of columns of the sparse CSR matrix \\f$op(B)\\f$ and\n                  \\f$C\\f$.\n  @param[in]\n  k               number of columns of the sparse CSR matrix \\f$op(A)\\f$ and number of\n                  rows of the sparse CSR matrix \\f$op(B)\\f$.\n  @param[in]\n  alpha           scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr_A         descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_A           number of non-zero entries of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_val_A       array of \\p nnz_A elements of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A   array of \\p m+1 elements (\\f$op(A) == A\\f$, \\p k+1 otherwise)\n                  that point to the start of every row of the sparse CSR matrix\n                  \\f$op(A)\\f$.\n  @param[in]\n  csr_col_ind_A   array of \\p nnz_A elements containing the column indices of the\n                  sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse CSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_B           number of non-zero entries of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_val_B       array of \\p nnz_B elements of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_row_ptr_B   array of \\p k+1 elements (\\f$op(B) == B\\f$, \\p m+1 otherwise)\n                  that point to the start of every row of the sparse CSR matrix\n                  \\f$op(B)\\f$.\n  @param[in]\n  csr_col_ind_B   array of \\p nnz_B elements containing the column indices of the\n                  sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  beta            scalar \\f$\\beta\\f$.\n  @param[in]\n  descr_D         descriptor of the sparse CSR matrix \\f$D\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_D           number of non-zero entries of the sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_val_D       array of \\p nnz_D elements of the sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_row_ptr_D   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_col_ind_D   array of \\p nnz_D elements containing the column indices of the\n                  sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  descr_C         descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[out]\n  csr_val_C       array of \\p nnz_C elements of the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  csr_row_ptr_C   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  csr_col_ind_C   array of \\p nnz_C elements containing the column indices of the\n                  sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  info_C          structure that holds meta data for the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  temp_buffer     temporary storage buffer allocated by the user, size is returned\n                  by rocsparse_scsrgemm_buffer_size(),\n                  rocsparse_dcsrgemm_buffer_size(), rocsparse_ccsrgemm_buffer_size(), or\n                  rocsparse_zcsrgemm_buffer_size().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, \\p k, \\p nnz_A, \\p nnz_B, or\n          \\p nnz_D is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p alpha and \\p beta are invalid,\n          \\p descr_A, \\p csr_val_A, \\p csr_row_ptr_A, \\p csr_col_ind_A, \\p descr_B,\n          \\p csr_val_B, \\p csr_row_ptr_B, or \\p csr_col_ind_B are invalid if \\p alpha\n          is valid, \\p descr_D, \\p csr_val_D, \\p csr_row_ptr_D, or \\p csr_col_ind_D are\n          invalid if \\p beta is valid, or \\p csr_val_C, \\p csr_row_ptr_C,\n          \\p csr_col_ind_C, \\p info_C, or \\p temp_buffer are invalid.\n  \\retval rocsparse_status_memory_error additional buffer for long rows could not be\n          allocated.\n  \\retval rocsparse_status_not_implemented\n          \\p trans_A != \\ref rocsparse_operation_none,\n          \\p trans_B != \\ref rocsparse_operation_none, or\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example multiplies two CSR matrices with a scalar alpha and adds the result to\n  another CSR matrix.\n  \\code{.c}\n  // Initialize scalar multipliers\n  float alpha = 2.0f;\n  float beta  = 1.0f;\n\n  // Create matrix descriptors\n  rocsparse_mat_descr descr_A;\n  rocsparse_mat_descr descr_B;\n  rocsparse_mat_descr descr_C;\n  rocsparse_mat_descr descr_D;\n\n  rocsparse_create_mat_descr(&descr_A);\n  rocsparse_create_mat_descr(&descr_B);\n  rocsparse_create_mat_descr(&descr_C);\n  rocsparse_create_mat_descr(&descr_D);\n\n  // Create matrix info structure\n  rocsparse_mat_info info_C;\n  rocsparse_create_mat_info(&info_C);\n\n  // Set pointer mode\n  rocsparse_set_pointer_mode(handle, rocsparse_pointer_mode_host);\n\n  // Query rocsparse for the required buffer size\n  size_t buffer_size;\n\n  rocsparse_scsrgemm_buffer_size(handle,\n                                 rocsparse_operation_none,\n                                 rocsparse_operation_none,\n                                 m,\n                                 n,\n                                 k,\n                                 &alpha,\n                                 descr_A,\n                                 nnz_A,\n                                 csr_row_ptr_A,\n                                 csr_col_ind_A,\n                                 descr_B,\n                                 nnz_B,\n                                 csr_row_ptr_B,\n                                 csr_col_ind_B,\n                                 &beta,\n                                 descr_D,\n                                 nnz_D,\n                                 csr_row_ptr_D,\n                                 csr_col_ind_D,\n                                 info_C,\n                                 &buffer_size);\n\n  // Allocate buffer\n  void* buffer;\n  hipMalloc(&buffer, buffer_size);\n\n  // Obtain number of total non-zero entries in C and row pointers of C\n  rocsparse_int nnz_C;\n  hipMalloc((void**)&csr_row_ptr_C, sizeof(rocsparse_int) * (m + 1));\n\n  rocsparse_csrgemm_nnz(handle,\n                        rocsparse_operation_none,\n                        rocsparse_operation_none,\n                        m,\n                        n,\n                        k,\n                        descr_A,\n                        nnz_A,\n                        csr_row_ptr_A,\n                        csr_col_ind_A,\n                        descr_B,\n                        nnz_B,\n                        csr_row_ptr_B,\n                        csr_col_ind_B,\n                        descr_D,\n                        nnz_D,\n                        csr_row_ptr_D,\n                        csr_col_ind_D,\n                        descr_C,\n                        csr_row_ptr_C,\n                        &nnz_C,\n                        info_C,\n                        buffer);\n\n  // Compute column indices and values of C\n  hipMalloc((void**)&csr_col_ind_C, sizeof(rocsparse_int) * nnz_C);\n  hipMalloc((void**)&csr_val_C, sizeof(float) * nnz_C);\n\n  rocsparse_scsrgemm(handle,\n                     rocsparse_operation_none,\n                     rocsparse_operation_none,\n                     m,\n                     n,\n                     k,\n                     &alpha,\n                     descr_A,\n                     nnz_A,\n                     csr_val_A,\n                     csr_row_ptr_A,\n                     csr_col_ind_A,\n                     descr_B,\n                     nnz_B,\n                     csr_val_B,\n                     csr_row_ptr_B,\n                     csr_col_ind_B,\n                     &beta,\n                     descr_D,\n                     nnz_D,\n                     csr_val_D,\n                     csr_row_ptr_D,\n                     csr_col_ind_D,\n                     descr_C,\n                     csr_val_C,\n                     csr_row_ptr_C,\n                     csr_col_ind_C,\n                     info_C,\n                     buffer);\n  \\endcode\n/\n/**@{"]
    pub fn rocsparse_scsrgemm(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const f32,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const f32,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const f32,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const f32,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_val_D: *const f32,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        csr_val_C: *mut f32,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrgemm(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const f64,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const f64,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const f64,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const f64,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_val_D: *const f64,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        csr_val_C: *mut f64,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrgemm(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const rocsparse_float_complex,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const rocsparse_float_complex,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const rocsparse_float_complex,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_val_D: *const rocsparse_float_complex,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        csr_val_C: *mut rocsparse_float_complex,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrgemm(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const rocsparse_double_complex,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const rocsparse_double_complex,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const rocsparse_double_complex,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_val_D: *const rocsparse_double_complex,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        csr_val_C: *mut rocsparse_double_complex,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\brief Sparse matrix sparse matrix symbolic multiplication using the CSR storage format.\n\n  \\details\n  \\p rocsparse_csrgemm_symbolic multiplies two sparsity patterns and adds an extra one: \\f[ opA \\cdot op(B) + D \\f]\n  with \\f$m \\times k\\f$ matrix \\f$A\\f$, defined in CSR storage format, the sparse\n  \\f$k \\times n\\f$ matrix \\f$B\\f$, defined in CSR storage format, and the sparse \\f$m \\times n\\f$ matrix \\f$D\\f$.\n  The final result is stored in the sparse \\f$m \\times n\\f$ matrix \\f$C\\f$, defined in CSR\n  storage format, such\n  that\n  \\f[\n    C := op(A) \\cdot op(B) + D,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans_A == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans_A == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n        B^H, & \\text{if trans_B == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  It is assumed that \\p csr_row_ptr_C has already been filled and that\n  \\p csr_col_ind_C is allocated by the user. \\p csr_row_ptr_C and the allocation size of\n  \\p csr_col_ind_C are defined by the number of non-zero elements of\n  the sparse CSR matrix C. Both can be obtained by using rocsparse_csrgemm_nnz(). The\n  required buffer size for the computation can be obtained by\n  rocsparse_scsrgemm_buffer_size(), rocsparse_dcsrgemm_buffer_size(),\n  rocsparse_ccsrgemm_buffer_size(), and rocsparse_zcsrgemm_buffer_size(), respectively.\n\n  \\note Currently, only \\p trans_A == \\ref rocsparse_operation_none is supported.\n  \\note Currently, only \\p trans_B == \\ref rocsparse_operation_none is supported.\n  \\note Currently, only \\ref rocsparse_matrix_type_general is supported.\n  \\note Note that for matrix products with more than 4096 non-zero entries per\n  row, an additional temporary storage buffer is allocated by the algorithm.\n  \\note This function is blocking with respect to the host.\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A         matrix \\f$A\\f$ operation type.\n  @param[in]\n  trans_B         matrix \\f$B\\f$ operation type.\n  @param[in]\n  m               number of rows of the sparse CSR matrix \\f$op(A)\\f$ and \\f$C\\f$.\n  @param[in]\n  n               number of columns of the sparse CSR matrix \\f$op(B)\\f$ and\n                  \\f$C\\f$.\n  @param[in]\n  k               number of columns of the sparse CSR matrix \\f$op(A)\\f$ and number of\n                  rows of the sparse CSR matrix \\f$op(B)\\f$.\n  @param[in]\n  descr_A         descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_A           number of non-zero entries of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A   array of \\p m+1 elements (\\f$op(A) == A\\f$, \\p k+1 otherwise)\n                  that point to the start of every row of the sparse CSR matrix\n                  \\f$op(A)\\f$.\n  @param[in]\n  csr_col_ind_A   array of \\p nnz_A elements containing the column indices of the\n                  sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse CSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_B           number of non-zero entries of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_row_ptr_B   array of \\p k+1 elements (\\f$op(B) == B\\f$, \\p m+1 otherwise)\n                  that point to the start of every row of the sparse CSR matrix\n                  \\f$op(B)\\f$.\n  @param[in]\n  csr_col_ind_B   array of \\p nnz_B elements containing the column indices of the\n                  sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  descr_D         descriptor of the sparse CSR matrix \\f$D\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_D           number of non-zero entries of the sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_row_ptr_D   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_col_ind_D   array of \\p nnz_D elements containing the column indices of the\n                  sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  descr_C         descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_C           number of non-zero entries of the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  csr_row_ptr_C   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  csr_col_ind_C   array of \\p nnz_C elements containing the column indices of the\n                  sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  info_C          structure that holds metadata for the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  temp_buffer     temporary storage buffer allocated by the user. The size is returned\n                  by rocsparse_scsrgemm_buffer_size(),\n                  rocsparse_dcsrgemm_buffer_size(), rocsparse_ccsrgemm_buffer_size(), or\n                  rocsparse_zcsrgemm_buffer_size().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, \\p k, \\p nnz_A, \\p nnz_B, or\n          \\p nnz_D is invalid.\n  \\retval rocsparse_status_invalid_pointer\n          \\p descr_A, \\p csr_row_ptr_A, \\p csr_col_ind_A, \\p descr_B,\n          \\p csr_row_ptr_B, \\p csr_col_ind_B, \\p descr_D, \\p csr_row_ptr_D, \\p csr_col_ind_D\n          \\p csr_row_ptr_C,\n          \\p csr_col_ind_C, \\p info_C, or \\p temp_buffer is invalid.\n  \\retval rocsparse_status_memory_error additional buffer for long rows could not be\n          allocated.\n  \\retval rocsparse_status_not_implemented\n          \\p trans_A != \\ref rocsparse_operation_none,\n          \\p trans_B != \\ref rocsparse_operation_none, or\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example multiplies symbolically two CSR matrices and adds the result to\n  another CSR matrix.\n  \\code{.c}\n  // Initialize scalar multipliers\n  float alpha = 2.0f;\n  float beta  = 1.0f;\n\n  // Create matrix descriptors\n  rocsparse_mat_descr descr_A;\n  rocsparse_mat_descr descr_B;\n  rocsparse_mat_descr descr_C;\n  rocsparse_mat_descr descr_D;\n\n  rocsparse_create_mat_descr(&descr_A);\n  rocsparse_create_mat_descr(&descr_B);\n  rocsparse_create_mat_descr(&descr_C);\n  rocsparse_create_mat_descr(&descr_D);\n\n  // Create matrix info structure\n  rocsparse_mat_info info_C;\n  rocsparse_create_mat_info(&info_C);\n\n  // Set pointer mode\n  rocsparse_set_pointer_mode(handle, rocsparse_pointer_mode_host);\n\n  // Query rocsparse for the required buffer size\n  size_t buffer_size;\n\n  rocsparse_scsrgemm_buffer_size(handle,\n                                 rocsparse_operation_none,\n                                 rocsparse_operation_none,\n                                 m,\n                                 n,\n                                 k,\n                                 &alpha,\n                                 descr_A,\n                                 nnz_A,\n                                 csr_row_ptr_A,\n                                 csr_col_ind_A,\n                                 descr_B,\n                                 nnz_B,\n                                 csr_row_ptr_B,\n                                 csr_col_ind_B,\n                                 &beta,\n                                 descr_D,\n                                 nnz_D,\n                                 csr_row_ptr_D,\n                                 csr_col_ind_D,\n                                 info_C,\n                                 &buffer_size);\n\n  // Allocate buffer\n  void* buffer;\n  hipMalloc(&buffer, buffer_size);\n\n  // Obtain number of total non-zero entries in C and row pointers of C\n  rocsparse_int nnz_C;\n  hipMalloc((void**)&csr_row_ptr_C, sizeof(rocsparse_int) * (m + 1));\n\n  rocsparse_csrgemm_nnz(handle,\n                        rocsparse_operation_none,\n                        rocsparse_operation_none,\n                        m,\n                        n,\n                        k,\n                        descr_A,\n                        nnz_A,\n                        csr_row_ptr_A,\n                        csr_col_ind_A,\n                        descr_B,\n                        nnz_B,\n                        csr_row_ptr_B,\n                        csr_col_ind_B,\n                        descr_D,\n                        nnz_D,\n                        csr_row_ptr_D,\n                        csr_col_ind_D,\n                        descr_C,\n                        csr_row_ptr_C,\n                        &nnz_C,\n                        info_C,\n                        buffer);\n\n  // Compute column indices of C\n  hipMalloc((void**)&csr_col_ind_C, sizeof(rocsparse_int) * nnz_C);\n\n  rocsparse_csrgemm_symbolic(handle,\n                     rocsparse_operation_none,\n                     rocsparse_operation_none,\n                     m,\n                     n,\n                     k,\n                     descr_A,\n                     nnz_A,\n                     csr_row_ptr_A,\n                     csr_col_ind_A,\n                     descr_B,\n                     nnz_B,\n                     csr_row_ptr_B,\n                     csr_col_ind_B,\n                     descr_D,\n                     nnz_D,\n                     csr_row_ptr_D,\n                     csr_col_ind_D,\n                     descr_C,\n                     nnz_C,\n                     csr_row_ptr_C,\n                     csr_col_ind_C,\n                     info_C,\n                     buffer);\n  \\endcode\n/\n/**@{"]
    pub fn rocsparse_csrgemm_symbolic(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        nnz_C: rocsparse_int,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *mut rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup extra_module\n  \\brief Sparse matrix sparse matrix numeric multiplication using the CSR storage format.\n\n  \\details\n  \\p rocsparse_csrgemm_numeric multiplies the scalar \\f$\\alpha\\f$ with the sparse\n  \\f$m \\times k\\f$ matrix \\f$A\\f$, defined in CSR storage format, and the sparse\n  \\f$k \\times n\\f$ matrix \\f$B\\f$, defined in CSR storage format, and adds the result\n  to the sparse \\f$m \\times n\\f$ matrix \\f$D\\f$ that is multiplied by \\f$\\beta\\f$. The\n  final result is stored in the sparse \\f$m \\times n\\f$ matrix \\f$C\\f$, predefined in CSR\n  storage format, such\n  that\n  \\f[\n    C := \\alpha \\cdot op(A) \\cdot op(B) + \\beta \\cdot D,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans_A == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans_A == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n        B^H, & \\text{if trans_B == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\note\n  This function does not produce deterministic results.\n\n  The symbolic part of the csr matrix C can be obtained by rocsparse_csrgemm_symbolic().\n  It is assumed that \\p csr_row_ptr_C and \\p csr_col_ind_C have already been filled and that \\p csr_val_C is allocated by the user. \\p csr_row_ptr_C and the allocation size of\n  \\p csr_col_ind_C and \\p csr_val_C are defined by the number of non-zero elements of\n  the sparse CSR matrix C. Both can be obtained by rocsparse_csrgemm_nnz(). The\n  required buffer size for the computation can be obtained by\n  rocsparse_scsrgemm_buffer_size(), rocsparse_dcsrgemm_buffer_size(),\n  rocsparse_ccsrgemm_buffer_size(), and rocsparse_zcsrgemm_buffer_size(), respectively.\n\n  \\note If \\f$\\alpha == 0\\f$, then \\f$C = \\beta \\cdot D\\f$ will be computed.\n  \\note If \\f$\\beta == 0\\f$, then \\f$C = \\alpha \\cdot op(A) \\cdot op(B)\\f$ will be computed.\n  \\note \\f$\\alpha == beta == 0\\f$ is invalid.\n  \\note Currently, only \\p trans_A == \\ref rocsparse_operation_none is supported.\n  \\note Currently, only \\p trans_B == \\ref rocsparse_operation_none is supported.\n  \\note Currently, only \\ref rocsparse_matrix_type_general is supported.\n  \\note Note that for matrix products with more than 4096 non-zero entries per\n  row, an additional temporary storage buffer is allocated by the algorithm.\n  \\note This function is blocking with respect to the host.\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A         matrix \\f$A\\f$ operation type.\n  @param[in]\n  trans_B         matrix \\f$B\\f$ operation type.\n  @param[in]\n  m               number of rows of the sparse CSR matrix \\f$op(A)\\f$ and \\f$C\\f$.\n  @param[in]\n  n               number of columns of the sparse CSR matrix \\f$op(B)\\f$ and\n                  \\f$C\\f$.\n  @param[in]\n  k               number of columns of the sparse CSR matrix \\f$op(A)\\f$ and number of\n                  rows of the sparse CSR matrix \\f$op(B)\\f$.\n  @param[in]\n  alpha           scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr_A         descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_A           number of non-zero entries of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_val_A       array of \\p nnz_A elements of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr_A   array of \\p m+1 elements (\\f$op(A) == A\\f$, \\p k+1 otherwise)\n                  that point to the start of every row of the sparse CSR matrix\n                  \\f$op(A)\\f$.\n  @param[in]\n  csr_col_ind_A   array of \\p nnz_A elements containing the column indices of the\n                  sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  descr_B         descriptor of the sparse CSR matrix \\f$B\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_B           number of non-zero entries of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_val_B       array of \\p nnz_B elements of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_row_ptr_B   array of \\p k+1 elements (\\f$op(B) == B\\f$, \\p m+1 otherwise)\n                  that point to the start of every row of the sparse CSR matrix\n                  \\f$op(B)\\f$.\n  @param[in]\n  csr_col_ind_B   array of \\p nnz_B elements containing the column indices of the\n                  sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  beta            scalar \\f$\\beta\\f$.\n  @param[in]\n  descr_D         descriptor of the sparse CSR matrix \\f$D\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_D           number of non-zero entries of the sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_val_D       array of \\p nnz_D elements of the sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_row_ptr_D   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  csr_col_ind_D   array of \\p nnz_D elements containing the column indices of the\n                  sparse CSR matrix \\f$D\\f$.\n  @param[in]\n  descr_C         descriptor of the sparse CSR matrix \\f$C\\f$. Currently, only\n                  \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  nnz_C           number of non-zero entries of the sparse CSR matrix \\f$C\\f$.\n  @param[out]\n  csr_val_C       array of \\p nnz_C elements of the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  csr_row_ptr_C   array of \\p m+1 elements that point to the start of every row of the\n                  sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  csr_col_ind_C   array of \\p nnz_C elements containing the column indices of the\n                  sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  info_C          structure that holds metadata for the sparse CSR matrix \\f$C\\f$.\n  @param[in]\n  temp_buffer     temporary storage buffer allocated by the user. The size is returned\n                  by rocsparse_scsrgemm_buffer_size(),\n                  rocsparse_dcsrgemm_buffer_size(), rocsparse_ccsrgemm_buffer_size(), or\n                  rocsparse_zcsrgemm_buffer_size().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, \\p k, \\p nnz_A, \\p nnz_B, or\n          \\p nnz_D is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p alpha and \\p beta are invalid,\n          \\p descr_A, \\p csr_val_A, \\p csr_row_ptr_A, \\p csr_col_ind_A, \\p descr_B,\n          \\p csr_val_B, \\p csr_row_ptr_B, or \\p csr_col_ind_B are invalid if \\p alpha\n          is valid, \\p descr_D, \\p csr_val_D, \\p csr_row_ptr_D, or \\p csr_col_ind_D is\n          invalid if \\p beta is valid, or \\p csr_val_C, \\p csr_row_ptr_C,\n          \\p csr_col_ind_C, \\p info_C, or \\p temp_buffer is invalid.\n  \\retval rocsparse_status_memory_error additional buffer for long rows could not be\n          allocated.\n  \\retval rocsparse_status_not_implemented\n          \\p trans_A != \\ref rocsparse_operation_none,\n          \\p trans_B != \\ref rocsparse_operation_none, or\n          \\p rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example multiplies two CSR matrices with a scalar alpha and adds the result to\n  another CSR matrix.\n  \\code{.c}\n  // Initialize scalar multipliers\n  float alpha = 2.0f;\n  float beta  = 1.0f;\n\n  // Create matrix descriptors\n  rocsparse_mat_descr descr_A;\n  rocsparse_mat_descr descr_B;\n  rocsparse_mat_descr descr_C;\n  rocsparse_mat_descr descr_D;\n\n  rocsparse_create_mat_descr(&descr_A);\n  rocsparse_create_mat_descr(&descr_B);\n  rocsparse_create_mat_descr(&descr_C);\n  rocsparse_create_mat_descr(&descr_D);\n\n  // Create matrix info structure\n  rocsparse_mat_info info_C;\n  rocsparse_create_mat_info(&info_C);\n\n  // Set pointer mode\n  rocsparse_set_pointer_mode(handle, rocsparse_pointer_mode_host);\n\n  // Query rocsparse for the required buffer size\n  size_t buffer_size;\n\n  rocsparse_scsrgemm_buffer_size(handle,\n                                 rocsparse_operation_none,\n                                 rocsparse_operation_none,\n                                 m,\n                                 n,\n                                 k,\n                                 &alpha,\n                                 descr_A,\n                                 nnz_A,\n                                 csr_row_ptr_A,\n                                 csr_col_ind_A,\n                                 descr_B,\n                                 nnz_B,\n                                 csr_row_ptr_B,\n                                 csr_col_ind_B,\n                                 &beta,\n                                 descr_D,\n                                 nnz_D,\n                                 csr_row_ptr_D,\n                                 csr_col_ind_D,\n                                 info_C,\n                                 &buffer_size);\n\n  // Allocate buffer\n  void* buffer;\n  hipMalloc(&buffer, buffer_size);\n\n  // Obtain number of total non-zero entries in C and row pointers of C\n  rocsparse_int nnz_C;\n  hipMalloc((void**)&csr_row_ptr_C, sizeof(rocsparse_int) * (m + 1));\n\n  rocsparse_csrgemm_nnz(handle,\n                        rocsparse_operation_none,\n                        rocsparse_operation_none,\n                        m,\n                        n,\n                        k,\n                        descr_A,\n                        nnz_A,\n                        csr_row_ptr_A,\n                        csr_col_ind_A,\n                        descr_B,\n                        nnz_B,\n                        csr_row_ptr_B,\n                        csr_col_ind_B,\n                        descr_D,\n                        nnz_D,\n                        csr_row_ptr_D,\n                        csr_col_ind_D,\n                        descr_C,\n                        csr_row_ptr_C,\n                        &nnz_C,\n                        info_C,\n                        buffer);\n\n  // Compute column indices and values of C\n  hipMalloc((void**)&csr_col_ind_C, sizeof(rocsparse_int) * nnz_C);\n  rocsparse_csrgemm_symbolic(handle,\n                     rocsparse_operation_none,\n                     rocsparse_operation_none,\n                     m,\n                     n,\n                     k,\n                     descr_A,\n                     nnz_A,\n                     csr_row_ptr_A,\n                     csr_col_ind_A,\n                     descr_B,\n                     nnz_B,\n                     csr_row_ptr_B,\n                     csr_col_ind_B,\n                     descr_D,\n                     nnz_D,\n                     csr_row_ptr_D,\n                     csr_col_ind_D,\n                     descr_C,\n                     nnz_C,\n                     csr_row_ptr_C,\n                     csr_col_ind_C,\n                     info_C,\n                     buffer);\n  hipMalloc((void**)&csr_val_C, sizeof(float) * nnz_C);\n\n  rocsparse_scsrgemm_numeric(handle,\n                     rocsparse_operation_none,\n                     rocsparse_operation_none,\n                     m,\n                     n,\n                     k,\n                     &alpha,\n                     descr_A,\n                     nnz_A,\n                     csr_val_A,\n                     csr_row_ptr_A,\n                     csr_col_ind_A,\n                     descr_B,\n                     nnz_B,\n                     csr_val_B,\n                     csr_row_ptr_B,\n                     csr_col_ind_B,\n                     &beta,\n                     descr_D,\n                     nnz_D,\n                     csr_val_D,\n                     csr_row_ptr_D,\n                     csr_col_ind_D,\n                     descr_C,\n                     nnz_C,\n                     csr_val_C,\n                     csr_row_ptr_C,\n                     csr_col_ind_C,\n                     info_C,\n                     buffer);\n  \\endcode\n/\n/**@{"]
    pub fn rocsparse_scsrgemm_numeric(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const f32,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const f32,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const f32,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const f32,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_val_D: *const f32,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        nnz_C: rocsparse_int,
        csr_val_C: *mut f32,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrgemm_numeric(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const f64,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const f64,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const f64,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const f64,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_val_D: *const f64,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        nnz_C: rocsparse_int,
        csr_val_C: *mut f64,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrgemm_numeric(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const rocsparse_float_complex,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const rocsparse_float_complex,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const rocsparse_float_complex,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_val_D: *const rocsparse_float_complex,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        nnz_C: rocsparse_int,
        csr_val_C: *mut rocsparse_float_complex,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrgemm_numeric(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr_A: rocsparse_mat_descr,
        nnz_A: rocsparse_int,
        csr_val_A: *const rocsparse_double_complex,
        csr_row_ptr_A: *const rocsparse_int,
        csr_col_ind_A: *const rocsparse_int,
        descr_B: rocsparse_mat_descr,
        nnz_B: rocsparse_int,
        csr_val_B: *const rocsparse_double_complex,
        csr_row_ptr_B: *const rocsparse_int,
        csr_col_ind_B: *const rocsparse_int,
        beta: *const rocsparse_double_complex,
        descr_D: rocsparse_mat_descr,
        nnz_D: rocsparse_int,
        csr_val_D: *const rocsparse_double_complex,
        csr_row_ptr_D: *const rocsparse_int,
        csr_col_ind_D: *const rocsparse_int,
        descr_C: rocsparse_mat_descr,
        nnz_C: rocsparse_int,
        csr_val_C: *mut rocsparse_double_complex,
        csr_row_ptr_C: *const rocsparse_int,
        csr_col_ind_C: *const rocsparse_int,
        info_C: rocsparse_mat_info,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Scale a sparse vector and add it to a scaled dense vector.\n\n  \\details\n  \\p rocsparse_axpby multiplies the sparse vector \\f$x\\f$ with scalar \\f$\\alpha\\f$ and\n  adds the result to the dense vector \\f$y\\f$ that is multiplied with scalar\n  \\f$\\beta\\f$, such that\n\n  \\f[\n      y := \\alpha \\cdot x + \\beta \\cdot y\n  \\f]\n\n  \\code{.c}\n      for(i = 0; i < size; ++i)\n      {\n          y[i] = beta * y[i]\n      }\n      for(i = 0; i < nnz; ++i)\n      {\n          y[x_ind[i]] += alpha * x_val[i]\n      }\n  \\endcode\n\n  \\p rocsparse_axpby supports the following uniform-precision data types for the sparse and dense vectors \\p x and\n  \\p y and compute types for the scalars \\f$\\alpha\\f$ and \\f$\\beta\\f$.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"axpby_uniform\">Uniform Precisions</caption>\n  <tr><th>X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\par Mixed Precisions:\n  <table>\n  <caption id=\"axpby_mixed\">Mixed Precisions</caption>\n  <tr><th>X / Y                     <th>compute_type\n  <tr><td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_f32_r\n  </table>\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  x           sparse matrix descriptor.\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  y           dense matrix descriptor.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_pointer \\p alpha, \\p x, \\p beta, or \\p y pointer is\n          invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_axpby.cpp doc example"]
    pub fn rocsparse_axpby(
        handle: rocsparse_handle,
        alpha: *const ::std::os::raw::c_void,
        x: rocsparse_const_spvec_descr,
        beta: *const ::std::os::raw::c_void,
        y: rocsparse_dnvec_descr,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Check matrix to see if it is valid.\n\n  \\details\n  \\p rocsparse_check_spmat checks whether the input matrix is valid.\n\n  \\p rocsparse_check_spmat requires two steps to complete. First, call \\p rocsparse_check_spmat\n  with the stage parameter set to \\ref rocsparse_check_spmat_stage_buffer_size, which determines the\n  size of the temporary buffer needed in the second step. Allocate this buffer and call\n  \\p rocsparse_check_spmat with the stage parameter set to \\ref rocsparse_check_spmat_stage_compute,\n  which checks the input matrix for errors. Any detected errors in the input matrix are reported in the\n  \\p data_status (passed to the function as a host pointer).\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"check_spmat_uniform\">Uniform Precisions</caption>\n  <tr><th>A\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\note\n  This function writes the required allocation size (in bytes) to \\p buffer_size and\n  returns without performing the checking operation when \\p stage is equal to\n  \\ref rocsparse_check_spmat_stage_buffer_size.\n\n  \\note\n  The sparse matrix formats currently supported are: \\p rocsparse_format_coo, \\p rocsparse_format_csr,\n  \\p rocsparse_format_csc, \\p rocsparse_format_ell, and \\p rocsparse_format_bsr.\n\n  \\note check_spmat requires two stages to complete. The first stage\n  \\ref rocsparse_check_spmat_stage_buffer_size will return the size of the temporary storage buffer\n  that is required for subsequent calls to \\ref rocsparse_check_spmat.\n  In the final stage \\ref rocsparse_check_spmat_stage_compute, the actual computation is performed.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  mat         matrix descriptor.\n  @param[out]\n  data_status modified to indicate the status of the data.\n  @param[in]\n  stage       check_matrix stage for the matrix computation.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer. buffer_size is set when\n              \\p temp_buffer is nullptr.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user. When a nullptr is passed,\n              the required allocation size (in bytes) is written to \\p buffer_size and\n              function returns without performing the checking operation.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p mat, \\p buffer_size, \\p temp_buffer, or \\p data_status pointer\n              is invalid.\n  \\retval     rocsparse_status_invalid_value the value of \\p stage is incorrect.\n\n  \\par Example\n  This example checks whether a matrix is upper triangular. The matrix passed to\n  \\ref rocsparse_check_spmat is invalid because it contains an entry in the lower triangular\n  part of the matrix.\n  \\snippet example_rocsparse_check_spmat.cpp doc example"]
    pub fn rocsparse_check_spmat(
        handle: rocsparse_handle,
        mat: rocsparse_const_spmat_descr,
        data_status: *mut rocsparse_data_status,
        stage: rocsparse_check_spmat_stage,
        buffer_size: *mut usize,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Dense matrix to sparse matrix conversion.\n\n  \\details\n  \\p rocsparse_dense_to_sparse performs the conversion of a dense matrix to a sparse matrix in CSR, CSC, or COO format.\n\n  \\p rocsparse_dense_to_sparse requires multiple steps to complete. First, call \\p rocsparse_dense_to_sparse\n  with \\p nullptr passed into \\p temp_buffer:\n  \\code{.c}\n   // Call dense_to_sparse to get required buffer size\n   size_t buffer_size = 0;\n   rocsparse_dense_to_sparse(handle,\n                             matA,\n                             matB,\n                             rocsparse_dense_to_sparse_alg_default,\n                             &buffer_size,\n                             nullptr);\n  \\endcode\n  After this is called, the \\p buffer_size will be filled with the size of the required buffer that must be allocated.\n  Next, call \\p rocsparse_dense_to_sparse with the newly allocated \\p temp_buffer and \\p nullptr passed into\n  \\p buffer_size:\n  \\code{.c}\n   // Call dense_to_sparse to perform analysis\n   rocsparse_dense_to_sparse(handle,\n                             matA,\n                             matB,\n                             rocsparse_dense_to_sparse_alg_default,\n                             nullptr,\n                             temp_buffer);\n  \\endcode\n  This will determine the number of non-zeros that will exist in the sparse matrix, which can be queried using the\n  \\ref rocsparse_spmat_get_size routine. With this, allocate the sparse matrix device arrays and\n  set them on the sparse matrix descriptor using \\ref rocsparse_csr_set_pointers (CSR format),\n  \\ref rocsparse_csc_set_pointers (for CSC format), or \\ref rocsparse_coo_set_pointers (for COO format). Finally, the\n  conversion is completed by calling \\p rocsparse_dense_to_sparse with both the \\p buffer_size and \\p temp_buffer :\n  \\code{.c}\n   // Call dense_to_sparse to complete conversion\n   rocsparse_dense_to_sparse(handle,\n                             matA,\n                             matB,\n                             rocsparse_dense_to_sparse_alg_default,\n                             &buffer_size,\n                             temp_buffer);\n  \\endcode\n  Currently, \\p rocsparse_dense_to_sparse only supports the algorithm \\ref rocsparse_dense_to_sparse_alg_default.\n  See the full example below.\n\n  \\p rocsparse_dense_to_sparse supports \\ref rocsparse_datatype_f16_r, \\ref rocsparse_datatype_bf16_r, \\ref rocsparse_datatype_f32_r,\n  \\ref rocsparse_datatype_f64_r, \\ref rocsparse_datatype_f32_c, and \\ref rocsparse_datatype_f64_c for values arrays in the sparse matrix\n  (stored in CSR, CSC, or COO format) and the dense matrix. For the row/column offset and row/column index arrays of the sparse matrix,\n  \\p rocsparse_dense_to_sparse supports the precisions \\ref rocsparse_indextype_i32 and \\ref rocsparse_indextype_i64.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"dense_to_sparse_uniform\">Uniform Precisions</caption>\n  <tr><th>A / B\n  <tr><td>rocsparse_datatype_f16_r\n  <tr><td>rocsparse_datatype_bf16_r\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\note\n  This function writes the required allocation size (in bytes) to \\p buffer_size and\n  returns without performing the dense to sparse operation, when a nullptr is passed for\n  \\p temp_buffer.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  mat_A        dense matrix descriptor.\n  @param[in]\n  mat_B        sparse matrix descriptor.\n  @param[in]\n  alg          algorithm for the dense to sparse computation.\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer. buffer_size is set when\n               \\p temp_buffer is nullptr.\n  @param[in]\n  temp_buffer  temporary storage buffer allocated by the user. When a nullptr is passed,\n               the required allocation size (in bytes) is written to \\p buffer_size and the\n               function returns without performing the dense to sparse operation.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p mat_A, \\p mat_B, or \\p buffer_size\n               pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_dense_to_sparse.cpp doc example"]
    pub fn rocsparse_dense_to_sparse(
        handle: rocsparse_handle,
        mat_A: rocsparse_const_dnmat_descr,
        mat_B: rocsparse_spmat_descr,
        alg: rocsparse_dense_to_sparse_alg,
        buffer_size: *mut usize,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\details\n  \\p rocsparse_extract_buffer_size calculates the required buffer size in bytes for a given stage \\p stage.\n  This routine is used in conjunction with \\ref rocsparse_extract_nnz and \\ref rocsparse_extract to extract\n  a lower or upper triangular sparse matrix from an input sparse matrix. See \\ref rocsparse_extract for more\n  details.\n\n  \\note\n  This routine is asynchronous with respect to the host.\n  This routine supports execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  descr        descriptor of the extract algorithm.\n  @param[in]\n  source       source sparse matrix descriptor.\n  @param[in]\n  target       target sparse matrix descriptor.\n  @param[in]\n  stage        stage of the extract computation.\n  @param[out]\n  buffer_size_in_bytes  size in bytes of the buffer.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_value if \\p stage is invalid.\n  \\retval      rocsparse_status_invalid_pointer \\p descr, \\p source, \\p target, or \\p buffer_size_in_bytes\n               pointer is invalid."]
    pub fn rocsparse_extract_buffer_size(
        handle: rocsparse_handle,
        descr: rocsparse_extract_descr,
        source: rocsparse_const_spmat_descr,
        target: rocsparse_spmat_descr,
        stage: rocsparse_extract_stage,
        buffer_size_in_bytes: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\details\n  \\p rocsparse_extract_nnz returns the number of non-zeros in the extracted matrix. The value is\n  available after the analysis phase \\ref rocsparse_extract_stage_analysis has been executed. This routine\n  is used in conjunction with \\ref rocsparse_extract_buffer_size and \\ref rocsparse_extract to extract a lower\n  or upper triangular sparse matrix from an input sparse matrix. See \\ref rocsparse_extract for more\n  details.\n\n  \\note\n  This routine is asynchronous with respect to the host.\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  descr        descriptor of the extract algorithm.\n  @param[out]\n  nnz          the number of non-zeros.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p descr or \\p nnz pointer is invalid."]
    pub fn rocsparse_extract_nnz(
        handle: rocsparse_handle,
        descr: rocsparse_extract_descr,
        nnz: *mut i64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse matrix extraction.\n\n  \\details\n  \\p rocsparse_extract performs the extraction of the lower or upper part of a sparse matrix into a new matrix.\n\n  \\p rocsparse_extract requires multiple steps to complete. First, create the source and target sparse matrix\n  descriptors. For example, in the case of CSR matrix format, this might look like:\n  \\code{.c}\n   // Build Source\n   rocsparse_spmat_descr source;\n   rocsparse_create_csr_descr(&source,\n                              M,\n                              N,\n                              nnz,\n                              dsource_row_ptr,\n                              dsource_col_ind,\n                              dsource_val,\n                              rocsparse_indextype_i32,\n                              rocsparse_indextype_i32,\n                              rocsparse_index_base_zero,\n                              rocsparse_datatype_f32_r);\n\n   // Build target\n   void * dtarget_row_ptr;\n   hipMalloc(&dtarget_row_ptr, sizeof(int32_t) * (M + 1));\n   rocsparse_spmat_descr target;\n   rocsparse_create_csr_descr(&target,\n                              M,\n                              N,\n                              0,\n                              dtarget_row_ptr,\n                              nullptr,\n                              nullptr,\n                              rocsparse_indextype_i32,\n                              rocsparse_indextype_i32,\n                              rocsparse_index_base_zero,\n                              rocsparse_datatype_f32_r);\n  \\endcode\n  Next, create the extraction descriptor and call \\ref rocsparse_extract_buffer_size with the stage\n  \\ref rocsparse_extract_stage_analysis to determine the amount of temporary storage required.\n  Allocate this temporary storage buffer and pass it to \\p rocsparse_extract with the stage\n  \\ref rocsparse_extract_stage_analysis.\n  \\code{.c}\n  // Create descriptor\n  rocsparse_extract_descr descr;\n  rocsparse_create_extract_descr(&descr,\n                                 source,\n                                 target,\n                                 rocsparse_extract_alg_default);\n\n  // Analysis phase\n  size_t buffer_size;\n  rocsparse_extract_buffer_size(handle,\n                                descr,\n                                source,\n                                target,\n                                rocsparse_extract_stage_analysis,\n                                &buffer_size);\n  void* dbuffer = nullptr;\n  hipMalloc(&dbuffer, buffer_size);\n  rocsparse_extract(handle,\n                    descr,\n                    source,\n                    target,\n                    rocsparse_extract_stage_analysis,\n                    buffer_size,\n                    dbuffer);\n  hipFree(dbuffer);\n  \\endcode\n  Then calls \\ref rocsparse_extract_nnz to determine the number of non-zeros that will exist in the\n  target matrix. After this is determined, allocate the column indices and values arrays of the target sparse\n  matrix:\n  \\code{.c}\n  int64_t target_nnz;\n  rocsparse_extract_nnz(handle, descr, &target_nnz);\n\n  void* dtarget_col_ind,\n  void* dtarget_val;\n  hipMalloc(&dtarget_col_ind, sizeof(int32_t) * target_nnz);\n  hipMalloc(&dtarget_val, sizeof(float) * target_nnz);\n  rocsparse_csr_set_pointers(target, dtarget_row_ptr, dtarget_col_ind, dtarget_val);\n  \\endcode\n  Finally, call \\ref rocsparse_extract_buffer_size with the stage \\ref rocsparse_extract_stage_compute\n  to determine the size of the temporary user-allocated storage needed for the computation of the column indices and values\n  in the sparse target. Allocate this buffer and complete the conversion by calling \\p rocsparse_extract using\n  the \\ref rocsparse_extract_stage_compute stage:\n  \\code{.c}\n  // Calculation phase\n  rocsparse_extract_buffer_size(handle,\n                                descr,\n                                source,\n                                target,\n                                rocsparse_extract_stage_compute,\n                                &buffer_size);\n  hipMalloc(&dbuffer, buffer_size);\n  rocsparse_extract(handle,\n                    descr,\n                    source,\n                    target,\n                    rocsparse_extract_stage_compute,\n                    buffer_size,\n                    dbuffer);\n  hipFree(dbuffer);\n  \\endcode\n  The target row pointer, column indices, and values arrays will now be filled with the upper or lower part of the source matrix.\n\n  The source and the target matrices must have the same format (see \\ref rocsparse_format) and the same storage mode (see\n  \\ref rocsparse_storage_mode). The attributes of the target matrix, the fill mode \\ref rocsparse_fill_mode, and the diagonal\n  type \\ref rocsparse_diag_type are used to parameterize the algorithm. These can be set on the target matrix using\n  \\ref rocsparse_spmat_set_attribute. See the full example below.\n\n  \\note\n  This routine is asynchronous with respect to the host.\n  This routine supports execution in a hipGraph context.\n  \\note\n  Supported formats are \\ref rocsparse_format_csr and  \\ref rocsparse_format_csc.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  descr        descriptor of the extract algorithm.\n  @param[in]\n  source       sparse matrix descriptor.\n  @param[in]\n  target       sparse matrix descriptor.\n  @param[in]\n  stage        stage of the extract computation.\n  @param[in]\n  buffer_size_in_bytes  size in bytes of the \\p buffer.\n  @param[in]\n  buffer  temporary storage buffer allocated by the user.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_value if \\p stage is invalid.\n  \\retval      rocsparse_status_invalid_pointer \\p descr, \\p source, \\p target, or \\p buffer\n               pointer is invalid.\n  \\par Example\n  This example extracts the lower part of CSR matrix into a CSR matrix.\n  \\snippet example_rocsparse_extract.cpp doc example"]
    pub fn rocsparse_extract(
        handle: rocsparse_handle,
        descr: rocsparse_extract_descr,
        source: rocsparse_const_spmat_descr,
        target: rocsparse_spmat_descr,
        stage: rocsparse_extract_stage,
        buffer_size_in_bytes: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Gather elements from a dense vector and store them in a sparse vector.\n\n  \\details\n  \\p rocsparse_gather gathers the elements from the dense vector \\f$y\\f$ and stores\n  them in the sparse vector \\f$x\\f$.\n\n  \\code{.c}\n      for(i = 0; i < nnz; ++i)\n      {\n          x_val[i] = y[x_ind[i]];\n      }\n  \\endcode\n\n  \\p rocsparse_gather supports the following uniform-precision data types for the sparse and dense vectors \\p x and\n  \\p y.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"gather_uniform\">Uniform Precisions</caption>\n  <tr><th>X / Y\n  <tr><td>rocsparse_datatype_i8_r\n  <tr><td>rocsparse_datatype_f16_r\n  <tr><td>rocsparse_datatype_bf16_r\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  y            dense vector \\f$y\\f$.\n  @param[out]\n  x            sparse vector \\f$x\\f$.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p x or \\p y pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_gather.cpp doc example"]
    pub fn rocsparse_gather(
        handle: rocsparse_handle,
        y: rocsparse_const_dnvec_descr,
        x: rocsparse_spvec_descr,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Apply Givens rotation to a dense and a sparse vector.\n\n  \\details\n  \\p rocsparse_rot applies the Givens rotation matrix \\f$G\\f$ to the sparse vector\n  \\f$x\\f$ and the dense vector \\f$y\\f$, where\n  \\f[\n    G = \\begin{pmatrix} c & s \\\\ -s & c \\end{pmatrix}\n  \\f]\n\n  \\code{.c}\n      for(i = 0; i < nnz; ++i)\n      {\n          x_tmp = x_val[i];\n          y_tmp = y[x_ind[i]];\n\n          x_val[i]    = c * x_tmp + s * y_tmp;\n          y[x_ind[i]] = c * y_tmp - s * x_tmp;\n      }\n  \\endcode\n\n  \\p rocsparse_rot supports the following uniform-precision data types for the sparse and dense vectors \\p x and\n  \\p y and compute types for the scalars \\f$c\\f$ and \\f$s\\f$.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"rot_uniform\">Uniform Precisions</caption>\n  <tr><th>X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  c           pointer to the cosine element of \\f$G\\f$, which can be on host or device.\n  @param[in]\n  s           pointer to the sine element of \\f$G\\f$, which can be on host or device.\n  @param[inout]\n  x           sparse vector \\f$x\\f$.\n  @param[inout]\n  y           dense vector \\f$y\\f$.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p c, \\p s, \\p x, or \\p y pointer is\n              invalid.\n  \\par Example\n  \\snippet example_rocsparse_rot.cpp doc example"]
    pub fn rocsparse_rot(
        handle: rocsparse_handle,
        c: *const ::std::os::raw::c_void,
        s: *const ::std::os::raw::c_void,
        x: rocsparse_spvec_descr,
        y: rocsparse_dnvec_descr,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Scatter elements from a sparse vector into a dense vector.\n\n  \\details\n  \\p rocsparse_scatter scatters the elements from the sparse vector \\f$x\\f$ into the dense\n  vector \\f$y\\f$.\n\n  \\code{.c}\n      for(i = 0; i < nnz; ++i)\n      {\n          y[x_ind[i]] = x_val[i];\n      }\n  \\endcode\n\n  \\p rocsparse_scatter supports the following uniform-precision data types for the sparse and dense vectors \\p x and\n  \\p y.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"scatter_uniform\">Uniform Precisions</caption>\n  <tr><th>X / Y\n  <tr><td>rocsparse_datatype_i8_r\n  <tr><td>rocsparse_datatype_f16_r\n  <tr><td>rocsparse_datatype_bf16_r\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  x            sparse vector \\f$x\\f$.\n  @param[out]\n  y            dense vector \\f$y\\f$.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p x or \\p y pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_scatter.cpp doc example"]
    pub fn rocsparse_scatter(
        handle: rocsparse_handle,
        x: rocsparse_const_spvec_descr,
        y: rocsparse_dnvec_descr,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\details\n  \\p rocsparse_sddmm_buffer_size returns the size of the required buffer to execute the SDDMM operation from a given configuration.\n  This routine is used in conjunction with \\ref rocsparse_sddmm_preprocess() and \\ref rocsparse_sddmm().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  opA          dense matrix \\f$A\\f$ operation type.\n  @param[in]\n  opB          dense matrix \\f$B\\f$ operation type.\n  @param[in]\n  alpha        scalar \\f$\\alpha\\f$.\n  @param[in]\n  mat_A        dense matrix \\f$A\\f$ descriptor.\n  @param[in]\n  mat_B        dense matrix \\f$B\\f$ descriptor.\n  @param[in]\n  beta         scalar \\f$\\beta\\f$.\n  @param[inout]\n  mat_C        sparse matrix \\f$C\\f$ descriptor.\n  @param[in]\n  compute_type floating point precision for the SDDMM computation.\n  @param[in]\n  alg specification of the algorithm to use.\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_value the value of \\p opA or \\p opB is incorrect.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_pointer \\p alpha and \\p beta are invalid,\n          or the \\p mat_A, \\p mat_B, \\p mat_C, or \\p buffer_size pointer is invalid.\n  \\retval rocsparse_status_not_implemented\n          \\p opA == \\ref rocsparse_operation_conjugate_transpose or\n          \\p opB == \\ref rocsparse_operation_conjugate_transpose."]
    pub fn rocsparse_sddmm_buffer_size(
        handle: rocsparse_handle,
        opA: rocsparse_operation,
        opB: rocsparse_operation,
        alpha: *const ::std::os::raw::c_void,
        mat_A: rocsparse_const_dnmat_descr,
        mat_B: rocsparse_const_dnmat_descr,
        beta: *const ::std::os::raw::c_void,
        mat_C: rocsparse_spmat_descr,
        compute_type: rocsparse_datatype,
        alg: rocsparse_sddmm_alg,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\details\n  \\p rocsparse_sddmm_preprocess executes a part of the algorithm that can be calculated once in the context of multiple\n  calls of the \\ref rocsparse_sddmm with the same sparsity pattern.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  opA          dense matrix \\f$A\\f$ operation type.\n  @param[in]\n  opB          dense matrix \\f$B\\f$ operation type.\n  @param[in]\n  alpha        scalar \\f$\\alpha\\f$.\n  @param[in]\n  mat_A        dense matrix \\f$A\\f$ descriptor.\n  @param[in]\n  mat_B        dense matrix \\f$B\\f$ descriptor.\n  @param[in]\n  beta         scalar \\f$\\beta\\f$.\n  @param[inout]\n  mat_C        sparse matrix \\f$C\\f$ descriptor.\n  @param[in]\n  compute_type floating point precision for the SDDMM computation.\n  @param[in]\n  alg specification of the algorithm to use.\n  @param[in]\n  temp_buffer  temporary storage buffer allocated by the user.\n  The size must be greater or equal to the size obtained with \\ref rocsparse_sddmm_buffer_size.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_value the value of \\p opA or \\p opB is incorrect.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_pointer \\p alpha and \\p beta are invalid, or the\n          \\p mat_A, \\p mat_B, \\p mat_C, or \\p temp_buffer pointer is invalid.\n  \\retval rocsparse_status_not_implemented\n          \\p opA == \\ref rocsparse_operation_conjugate_transpose or\n          \\p opB == \\ref rocsparse_operation_conjugate_transpose."]
    pub fn rocsparse_sddmm_preprocess(
        handle: rocsparse_handle,
        opA: rocsparse_operation,
        opB: rocsparse_operation,
        alpha: *const ::std::os::raw::c_void,
        mat_A: rocsparse_const_dnmat_descr,
        mat_B: rocsparse_const_dnmat_descr,
        beta: *const ::std::os::raw::c_void,
        mat_C: rocsparse_spmat_descr,
        compute_type: rocsparse_datatype,
        alg: rocsparse_sddmm_alg,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief  Sampled Dense-Dense Matrix Multiplication.\n\n  \\details\n  \\p rocsparse_sddmm multiplies the scalar \\f$\\alpha\\f$ with the dense\n  \\f$m \\times k\\f$ matrix \\f$op(A)\\f$, the dense \\f$k \\times n\\f$ matrix \\f$op(B)\\f$, filtered by the sparsity pattern\n  of the \\f$m \\times n\\f$ sparse matrix \\f$C\\f$ and adds the result to \\f$C\\f$ scaled by\n  \\f$\\beta\\f$. The final result is stored in the sparse \\f$m \\times n\\f$ matrix \\f$C\\f$,\n  such that\n  \\f[\n    C := \\alpha ( op(A) \\cdot op(B) ) \\circ spy(C) + \\beta C,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if op(A) == rocsparse_operation_none} \\\\\n        A^T, & \\text{if op(A) == rocsparse_operation_transpose} \\\\\n    \\end{array}\n    \\right.\n  \\f],\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if op(B) == rocsparse_operation_none} \\\\\n        B^T, & \\text{if op(B) == rocsparse_operation_transpose} \\\\\n    \\end{array}\n    \\right.\n  \\f]\n   and\n  \\f[\n    spy(C)_{ij} = \\left\\{\n    \\begin{array}{ll}\n        1, & \\text{ if C_{ij} != 0} \\\\\n        0, & \\text{ otherwise} \\\\\n    \\end{array}\n    \\right.\n  \\f]\n\n  Computing the above sampled dense-dense multiplication requires three steps to complete. First, call\n  \\ref rocsparse_sddmm_buffer_size to determine the size of the required temporary storage buffer. Next,\n  allocate this buffer and call \\ref rocsparse_sddmm_preprocess, which performs any analysis of the input matrices\n  that might be required. Finally, call \\p rocsparse_sddmm to complete the computation. After all calls to\n  \\p rocsparse_sddmm are complete, the temporary buffer can be deallocated.\n\n  \\p rocsparse_sddmm supports different algorithms which can provide better performance for different matrices.\n\n  <table>\n  <caption id=\"sddmm_algorithms\">Algorithms</caption>\n  <tr><th>Algorithms                        <th>Deterministic  <th>Preprocessing  <th>Notes\n  <tr><td>rocsparse_sddmm_alg_default</td>  <td>Yes</td>       <td>No</td>        <td>Uses the sparsity pattern of matrix C to perform a limited set of dot products. </td>\n  <tr><td>rocsparse_sddmm_alg_dense</td>    <td>Yes</td>       <td>No</td>        <td>Explicitly converts the matrix C into a dense matrix to perform a dense matrix multiply and add. </td>\n  </table>\n\n  Currently, \\p rocsparse_sddmm only supports the uniform precisions indicated in the table below. For the sparse matrix \\f$C\\f$, \\p rocsparse_sddmm supports the index types\n  \\ref rocsparse_indextype_i32 and \\ref rocsparse_indextype_i64.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"sddmm_uniform\">Uniform Precisions</caption>\n  <tr><th>A / B / C / compute_type\n  <tr><td>rocsparse_datatype_f16_r\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\par Mixed Precisions:\n  <table>\n  <caption id=\"sddmm_mixed\">Mixed Precisions</caption>\n  <tr><th>A / B                     <th>C                         <th>compute_type\n  <tr><td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f32_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_f32_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_f32_r\n  </table>\n\n  \\note\n  The sparse matrix formats currently supported are: \\ref rocsparse_format_csr,\n  \\ref rocsparse_format_csc, \\ref rocsparse_format_coo, \\ref rocsparse_format_coo_aos,\n  and \\ref rocsparse_format_ell.\n\n  \\note \\p opA == \\ref rocsparse_operation_conjugate_transpose is not supported.\n  \\note \\p opB == \\ref rocsparse_operation_conjugate_transpose is not supported.\n\n  \\note\n  This routine supports execution in a hipGraph context only when \\p alg == \\ref rocsparse_sddmm_alg_default.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  opA          dense matrix \\f$A\\f$ operation type.\n  @param[in]\n  opB          dense matrix \\f$B\\f$ operation type.\n  @param[in]\n  alpha        scalar \\f$\\alpha\\f$.\n  @param[in]\n  mat_A        dense matrix \\f$A\\f$ descriptor.\n  @param[in]\n  mat_B        dense matrix \\f$B\\f$ descriptor.\n  @param[in]\n  beta         scalar \\f$\\beta\\f$.\n  @param[inout]\n  mat_C        sparse matrix \\f$C\\f$ descriptor.\n  @param[in]\n  compute_type floating point precision for the SDDMM computation.\n  @param[in]\n  alg specification of the algorithm to use.\n  @param[in]\n  temp_buffer  temporary storage buffer allocated by the user.\n  The size must be greater or equal to the size obtained with \\ref rocsparse_sddmm_buffer_size.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_value the value of \\p opA, \\p opB, \\p compute\\_type, or \\p alg is incorrect.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_pointer \\p alpha and \\p beta are invalid, or the\n          \\p mat_A, \\p mat_B, \\p mat_C, or \\p temp_buffer pointer is invalid.\n  \\retval rocsparse_status_not_implemented\n          \\p opA == \\ref rocsparse_operation_conjugate_transpose or\n          \\p opB == \\ref rocsparse_operation_conjugate_transpose.\n\n  \\par Example\n  This example performs a sampled dense-dense matrix product, \\f$C := \\alpha ( A \\cdot B ) \\circ spy(C) + \\beta C\\f$\n  where \\f$\\circ\\f$ is the Hadamard product.\n  \\snippet example_rocsparse_sddmm.cpp doc example"]
    pub fn rocsparse_sddmm(
        handle: rocsparse_handle,
        opA: rocsparse_operation,
        opB: rocsparse_operation,
        alpha: *const ::std::os::raw::c_void,
        mat_A: rocsparse_const_dnmat_descr,
        mat_B: rocsparse_const_dnmat_descr,
        beta: *const ::std::os::raw::c_void,
        mat_C: rocsparse_spmat_descr,
        compute_type: rocsparse_datatype,
        alg: rocsparse_sddmm_alg,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse matrix to dense matrix conversion.\n\n  \\details\n  \\p rocsparse_sparse_to_dense performs the conversion of a sparse matrix in CSR, CSC, or COO format to a dense matrix.\n\n  \\p rocsparse_sparse_to_dense requires multiple steps to complete. First, call \\p rocsparse_sparse_to_dense\n  with \\p nullptr passed into \\p temp_buffer:\n  \\code{.c}\n   // Call sparse_to_dense to get required buffer size\n   size_t buffer_size = 0;\n   rocsparse_sparse_to_dense(handle,\n                             matA,\n                             matB,\n                             rocsparse_sparse_to_dense_alg_default,\n                             &buffer_size,\n                             nullptr);\n  \\endcode\n  After this is called, the \\p buffer_size will be filled with the size of the required buffer that must be allocated.\n  Finally, the conversion is completed by calling \\p rocsparse_sparse_to_dense with both the \\p buffer_size and \\p temp_buffer:\n  \\code{.c}\n   // Call dense_to_sparse to complete conversion\n   rocsparse_sparse_to_dense(handle,\n                             matA,\n                             matB,\n                             rocsparse_sparse_to_dense_alg_default,\n                             &buffer_size,\n                             temp_buffer);\n  \\endcode\n  Currently, \\p rocsparse_sparse_to_dense only supports the algorithm \\ref rocsparse_sparse_to_dense_alg_default.\n  See the full example below.\n\n  \\p rocsparse_sparse_to_dense supports \\ref rocsparse_datatype_f16_r, \\ref rocsparse_datatype_bf16_r, \\ref rocsparse_datatype_f32_r,\n  \\ref rocsparse_datatype_f64_r, \\ref rocsparse_datatype_f32_c, and \\ref rocsparse_datatype_f64_c for values arrays in the sparse matrix\n  (stored in CSR, CSC, or COO format) and the dense matrix. For the row/column offset and row/column index arrays of the\n  sparse matrix, \\p rocsparse_sparse_to_dense supports the precisions \\ref rocsparse_indextype_i32 and\n  \\ref rocsparse_indextype_i64.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"sparse_to_dense_uniform\">Uniform Precisions</caption>\n  <tr><th>A / B\n  <tr><td>rocsparse_datatype_f16_r\n  <tr><td>rocsparse_datatype_bf16_r\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\note\n  This function writes the required allocation size (in bytes) to \\p buffer_size and\n  returns without performing the sparse to dense operation when NULL is passed for\n  \\p temp_buffer.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  mat_A        sparse matrix descriptor.\n  @param[in]\n  mat_B        dense matrix descriptor.\n  @param[in]\n  alg          algorithm for the sparse to dense computation.\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer. buffer_size is set when\n               \\p temp_buffer is nullptr.\n  @param[in]\n  temp_buffer  temporary storage buffer allocated by the user. When a nullptr is passed,\n               the required allocation size (in bytes) is written to \\p buffer_size and the\n               function returns without performing the sparse to dense operation.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p mat_A, \\p mat_B, or \\p buffer_size\n               pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_sparse_to_dense.cpp doc example"]
    pub fn rocsparse_sparse_to_dense(
        handle: rocsparse_handle,
        mat_A: rocsparse_const_spmat_descr,
        mat_B: rocsparse_dnmat_descr,
        alg: rocsparse_sparse_to_dense_alg,
        buffer_size: *mut usize,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\details\n  \\p rocsparse_sparse_to_sparse_buffer_size calculates the required buffer size in bytes for a given stage \\p stage.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  descr        descriptor of the sparse_to_sparse algorithm.\n  @param[in]\n  source       source sparse matrix descriptor.\n  @param[in]\n  target       target sparse matrix descriptor.\n  @param[in]\n  stage        stage of the sparse_to_sparse computation.\n  @param[out]\n  buffer_size_in_bytes  size in bytes of the \\p buffer\n\n  \\note\n  This routine does not support batched computation.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_value if any required enumeration is invalid.\n  \\retval      rocsparse_status_invalid_pointer \\p mat_A, \\p mat_B, or \\p buffer_size_in_bytes\n               pointer is invalid."]
    pub fn rocsparse_sparse_to_sparse_buffer_size(
        handle: rocsparse_handle,
        descr: rocsparse_sparse_to_sparse_descr,
        source: rocsparse_const_spmat_descr,
        target: rocsparse_spmat_descr,
        stage: rocsparse_sparse_to_sparse_stage,
        buffer_size_in_bytes: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse matrix to sparse matrix conversion.\n\n  \\details\n  \\p rocsparse_sparse_to_sparse performs the conversion of a sparse matrix to a sparse matrix.\n\n  \\note\n  The required allocation size (in bytes) to \\p buffer_size_in_bytes must be obtained from \\ref rocsparse_sparse_to_sparse_buffer_size\n  for each stage. The required buffer size can be different between stages.\n\n  \\note\n  The \\ref rocsparse_format_bell and \\ref rocsparse_format_sell formats are not supported.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  descr        descriptor of the sparse_to_sparse algorithm.\n  @param[in]\n  source       sparse matrix descriptor.\n  @param[in]\n  target       sparse matrix descriptor.\n  @param[in]\n  stage        stage of the sparse_to_sparse computation.\n  @param[in]\n  buffer_size_in_bytes  size in bytes of the \\p buffer.\n  @param[in]\n  buffer  temporary storage buffer allocated by the user.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\par Example\n  This example converts a CSR matrix into an ELL matrix.\n  \\snippet example_rocsparse_sparse_to_sparse.cpp doc example"]
    pub fn rocsparse_sparse_to_sparse(
        handle: rocsparse_handle,
        descr: rocsparse_sparse_to_sparse_descr,
        source: rocsparse_const_spmat_descr,
        target: rocsparse_spmat_descr,
        stage: rocsparse_sparse_to_sparse_stage,
        buffer_size_in_bytes: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\details\n  \\p rocsparse_spgeam_buffer_size returns the size of the required buffer to execute the given stage of the SpGEAM operation.\n  This routine is used in conjunction with \\ref rocsparse_spgeam(). See \\ref rocsparse_spgeam for a full description and example.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  descr        SpGEAM descriptor.\n  @param[in]\n  mat_A        sparse matrix \\f$A\\f$ descriptor.\n  @param[in]\n  mat_B        sparse matrix \\f$B\\f$ descriptor.\n  @param[in]\n  mat_C        sparse matrix \\f$C\\f$ descriptor.\n  @param[in]\n  stage        SpGEAM stage for the SpGEAM computation.\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer.\n  @param[out]\n  error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_pointer \\p mat_A, \\p mat_B, \\p descr, or \\p buffer_size pointer is invalid."]
    pub fn rocsparse_spgeam_buffer_size(
        handle: rocsparse_handle,
        descr: rocsparse_spgeam_descr,
        mat_A: rocsparse_const_spmat_descr,
        mat_B: rocsparse_const_spmat_descr,
        mat_C: rocsparse_const_spmat_descr,
        stage: rocsparse_spgeam_stage,
        buffer_size: *mut usize,
        error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse matrix sparse matrix addition.\n\n  \\details\n  \\p rocsparse_spgeam multiplies the scalar \\f$\\alpha\\f$ with the sparse \\f$m \\times n\\f$ CSR matrix \\f$op(A)\\f$\n  and adds it to \\f$\\beta\\f$ multiplied by the sparse \\f$m \\times n\\f$ matrix \\f$op(B)\\f$. The final result is\n  stored in the sparse \\f$m \\times n\\f$ matrix \\f$C\\f$,\n  such that\n  \\f[\n    C := \\alpha op(A) + \\beta op(B),\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\p rocsparse_spgeam requires multiple steps to complete. First, create a \\ref rocsparse_spgeam_descr by\n  calling \\ref rocsparse_create_spgeam_descr. Set the SpGEAM algorithm (currently only\n  \\ref rocsparse_spgeam_alg_default supported) as well as the compute type and the transpose operation type for the sparse\n  matrices \\f$op(A)\\f$ and \\f$op(B)\\f$ using \\ref rocsparse_spgeam_set_input. Next, calculate the total non-zeros\n  that will exist in the sparse matrix \\f$C\\f$. To do so, call \\ref rocsparse_spgeam_buffer_size with the stage set\n  to \\ref rocsparse_spgeam_stage_analysis. This will fill the \\p buffer_size parameter, allowing allocation of this buffer.\n  After the buffer has been allocated, call \\p rocsparse_spgeam with the same stage \\ref rocsparse_spgeam_stage_analysis.\n  The total non-zeros and the row offset array for \\f$C\\f$ have now been calculated and are stored internally in the\n  \\ref rocsparse_spgeam_descr. Now, retrieve the non-zero count using \\ref rocsparse_spgeam_get_output and then\n  allocate the \\f$C\\f$ matrix. To complete the computation, repeat the process (this time passing the stage\n  \\ref rocsparse_spgeam_stage_compute) by calling \\ref rocsparse_spgeam_buffer_size to determine the required buffer size, then\n  allocate the buffer, and finally call \\p rocsparse_spgeam. The user-allocated buffers can be freed after each call to\n  \\p rocsparse_spgeam. After the computation is complete and the SpGEAM descriptor is no longer needed, call\n  \\ref rocsparse_destroy_spgeam_descr. See the full code example below.\n\n  The stage \\ref rocsparse_spgeam_stage_compute computes the symbolic part and the numeric of the resulting matrix C. To perform multiple operations involving matrices of same sparsity patterns but with different numerical values, the symbolic stages (\\ref rocsparse_spgeam_stage_symbolic_analysis and \\ref rocsparse_spgeam_stage_symbolic_compute) and the numeric stages (\\ref rocsparse_spgeam_stage_numeric_analysis and \\ref rocsparse_spgeam_stage_numeric_compute) can be used to separate the symbolic calculation from the numeric calculation.\n\n  \\note The stages  \\ref rocsparse_spgeam_stage_analysis and \\ref rocsparse_spgeam_stage_compute cannot be mixed with the stages \\ref rocsparse_spgeam_stage_symbolic_analysis, \\ref rocsparse_spgeam_stage_symbolic_compute, \\ref rocsparse_spgeam_stage_numeric_analysis, and \\ref rocsparse_spgeam_stage_numeric_compute.\n  \\note The stage \\ref rocsparse_spgeam_stage_analysis must precede the stage \\ref rocsparse_spgeam_stage_compute.\n  \\note The stage \\ref rocsparse_spgeam_stage_symbolic_analysis must precede the stage \\ref rocsparse_spgeam_stage_symbolic_compute.\n  \\note The stage \\ref rocsparse_spgeam_stage_numeric_analysis must precede the stage \\ref rocsparse_spgeam_stage_numeric_compute.\n  \\note The symbolic stages are not required to perform the numeric stages.\n  \\note The stage \\ref rocsparse_spgeam_stage_numeric_analysis must be reapplied if the numeric values of the input matrices \\p mat_A and \\p mat_B have changed between subsequent calls of the stage \\ref rocsparse_spgeam_stage_numeric_compute.\n\n  \\p rocsparse_spgeam supports multiple combinations of index types, data types, and compute types. The tables below indicate\n  the currently supported different index and data types that can be used for the sparse matrices \\f$op(A)\\f$, \\f$op(B)\\f$, and\n  \\f$C\\f$, and the compute type for \\f$\\alpha\\f$ and \\f$\\beta\\f$. The advantage of using different index and data types is to save on\n  memory bandwidth and storage when a user application allows, while performing the actual computation in a higher precision.\n\n  \\note\n  This routine does not support batched computation.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"spgeam_uniform\">Uniform Precisions</caption>\n  <tr><th>A / B / C / compute_type\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\par Uniform Index Types:\n  <table>\n  <caption id=\"spgeam_csr_uniform_indextype\">CSR Uniform Index Types</caption>\n  <tr><th>CSR Row offset                 <th>CSR Column indices\n  <tr><td>rocsparse_indextype_i32</td>   <td>rocsparse_indextype_i32</td>\n  <tr><td>rocsparse_indextype_i64</td>   <td>rocsparse_indextype_i64</td>\n  </table>\n\n  \\par Mixed Index Types:\n  <table>\n  <caption id=\"spgeam_csr_mixed_indextype\">CSR Mixed Index Types</caption>\n  <tr><th>CSR Row offset                 <th>CSR Column indices\n  <tr><td>rocsparse_indextype_i64</td>   <td>rocsparse_indextype_i32</td>\n  </table>\n\n  In general, when adding two sparse matrices together, it is possible that the resulting matrix will require\n  a larger index representation to store correctly. For example, when adding \\f$A + B\\f$ using\n  \\ref rocsparse_indextype_i32 index types for the row pointer and column indices arrays, it might be the case that the row pointer\n  of the resulting \\f$C\\f$ matrix would require index type \\ref rocsparse_indextype_i64. This is currently not supported. In this\n  scenario, store the \\f$A\\f$, \\f$B\\f$, and \\f$C\\f$ matrices using the higher index precision.\n\n  Additionally, all three matrices \\f$A\\f$, \\f$B\\f$, and \\f$C\\f$ must use the same index types. For example, if \\f$A\\f$ uses the\n  index type \\ref rocsparse_indextype_i32 for the row offset array and the index type \\ref rocsparse_indextype_i32 for the column\n  indices array, then both \\f$B\\f$ and \\f$C\\f$ must also use these same index types for their respective row offset and column index\n  arrays. In the scenario where \\f$C\\f$ requires a larger index type for the row offset array, store all three\n  matrices using the larger index type \\ref rocsparse_indextype_i64 for the row offsets array.\n\n  \\note Currently only CSR format is supported.\n  \\note Currently, only \\p trans_A == \\ref rocsparse_operation_none is supported.\n  \\note Currently, only \\p trans_B == \\ref rocsparse_operation_none is supported.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  descr        SpGEAM descriptor.\n  @param[in]\n  mat_A        sparse matrix \\f$A\\f$ descriptor.\n  @param[in]\n  mat_B        sparse matrix \\f$B\\f$ descriptor.\n  @param[out]\n  mat_C        sparse matrix \\f$C\\f$ descriptor.\n  @param[in]\n  stage        SpGEAM stage for the SpGEAM computation.\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer. \\p buffer_size is\n               determined by calling \\ref rocsparse_spgeam_buffer_size.\n  @param[in]\n  temp_buffer  temporary storage buffer allocated by the user.\n  @param[out]\n  error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_pointer \\p mat_A, \\p mat_B, \\p mat_C, \\p descr, or \\p buffer_size pointer is invalid.\n\n  \\par First Example\n  \\snippet example_rocsparse_spgeam_1.cpp doc example\n\n  \\par Second Example\n  \\snippet example_rocsparse_spgeam_2.cpp doc example"]
    pub fn rocsparse_spgeam(
        handle: rocsparse_handle,
        descr: rocsparse_spgeam_descr,
        mat_A: rocsparse_const_spmat_descr,
        mat_B: rocsparse_const_spmat_descr,
        mat_C: rocsparse_spmat_descr,
        stage: rocsparse_spgeam_stage,
        buffer_size: usize,
        temp_buffer: *mut ::std::os::raw::c_void,
        error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse matrix sparse matrix multiplication.\n\n  \\details\n  \\p rocsparse_spgemm multiplies the scalar \\f$\\alpha\\f$ with the sparse\n  \\f$m \\times k\\f$ matrix \\f$op(A)\\f$ and the sparse \\f$k \\times n\\f$ matrix \\f$op(B)\\f$ and\n  adds the result to the sparse \\f$m \\times n\\f$ matrix \\f$D\\f$ that is multiplied by\n  \\f$\\beta\\f$. The final result is stored in the sparse \\f$m \\times n\\f$ matrix \\f$C\\f$,\n  such that\n  \\f[\n    C := \\alpha \\cdot op(A) \\cdot op(B) + \\beta \\cdot D,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\p rocsparse_spgemm requires three stages to complete. First, pass the \\ref rocsparse_spgemm_stage_buffer_size\n  stage to determine the size of the required temporary storage buffer. Next, allocate this buffer and call\n  \\p rocsparse_spgemm again with the \\ref rocsparse_spgemm_stage_nnz stage, which will determine the number of non-zeros\n  in \\f$C\\f$. This stage will also fill in the row pointer array of \\f$C\\f$. Now that the number of non-zeros in \\f$C\\f$\n  is known, allocate space for the column indices and values arrays of \\f$C\\f$. Finally, call\n  \\p rocsparse_spgemm with the \\ref rocsparse_spgemm_stage_compute stage to perform the actual computation, which fills in\n  the column indices and values arrays of \\f$C\\f$. After all calls to \\p rocsparse_spgemm are complete, the temporary buffer\n  can be deallocated.\n\n  Alternatively, it is possible to perform sparse matrix products multiple times with matrices having the same sparsity\n  pattern with different values. In this scenario, the process begins like before. First, call \\p rocsparse_spgemm\n  with stage \\ref rocsparse_spgemm_stage_buffer_size to determine the required buffer size. Then allocate this buffer\n  and call \\p rocsparse_spgemm with the stage \\ref rocsparse_spgemm_stage_nnz to determine the number of non-zeros in \\f$C\\f$\n  and allocate the \\f$C\\f$ column indices and values arrays. Now, however, call \\p rocsparse_spgemm with the\n  \\ref rocsparse_spgemm_stage_symbolic stage, which will fill in the column indices array of \\f$C\\f$ but not the values array.\n  It is then possible to repeatedly change the values of \\f$A\\f$, \\f$B\\f$, and \\f$D\\f$ and call \\p rocsparse_spgemm with\n  the \\ref rocsparse_spgemm_stage_numeric stage, which fills the values array of \\f$C\\f$. The use of the extra\n  \\ref rocsparse_spgemm_stage_symbolic and \\ref rocsparse_spgemm_stage_numeric stages allows users to compute the sparsity pattern\n  of \\f$C\\f$ once, but compute the values multiple times.\n\n  \\p rocsparse_spgemm supports multiple combinations of data types and compute types. The tables below indicate the currently\n  supported different data types that can be used for the sparse matrices \\f$op(A)\\f$, \\f$op(B)\\f$, \\f$C\\f$, and \\f$D\\f$,\n  and the compute type for \\f$\\alpha\\f$ and \\f$\\beta\\f$. The advantage of using different data types is to save on\n  memory bandwidth and storage when a user application allows, while performing the actual computation in a higher precision.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"spgemm_uniform\">Uniform Precisions</caption>\n  <tr><th>A / B / C / D / compute_type\n  <tr><td>rocsparse_datatype_f16_r\n  <tr><td>rocsparse_datatype_bf16_r\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\p rocsparse_spgemm supports \\ref rocsparse_indextype_i32 and \\ref rocsparse_indextype_i64 index precisions for storing the row\n  pointer and column indices arrays of the sparse matrices.\n\n  In general, when multiplying two sparse matrices together, it is possible that the resulting matrix will require a\n  larger index representation to store correctly. For example, when multiplying \\f$A \\times B\\f$ using\n  \\ref rocsparse_indextype_i32 index types for the row pointer and column indices arrays, it might be the case that the row pointer\n  of the resulting \\f$C\\f$ matrix would require index precision \\ref rocsparse_indextype_i64. This is currently not supported.\n  In this scenario, the \\f$A\\f$ and \\f$B\\f$ matrices need to be stored using the higher index precision.\n\n  \\note\n  This function does not produce deterministic results.\n\n  \\note SpGEMM requires three stages to complete. The first stage,\n  \\ref rocsparse_spgemm_stage_buffer_size, will return the size of the temporary storage buffer\n  that is required for subsequent calls to \\ref rocsparse_spgemm. The second stage,\n  \\ref rocsparse_spgemm_stage_nnz, will determine the number of non-zero elements of the\n  resulting \\f$C\\f$ matrix. If the sparsity pattern of \\f$C\\f$ is already known, this\n  stage can be skipped. In the final stage, \\ref rocsparse_spgemm_stage_compute, the actual\n  computation is performed.\n  \\note If \\f$\\alpha == 0\\f$, then \\f$C = \\beta \\cdot D\\f$ will be computed.\n  \\note If \\f$\\beta == 0\\f$, then \\f$C = \\alpha \\cdot op(A) \\cdot op(B)\\f$ will be\n  computed.\n  \\note Currently only CSR and BSR formats are supported.\n  \\note If \\ref rocsparse_spgemm_stage_symbolic is selected, then only the symbolic computation is performed.\n  \\note If \\ref rocsparse_spgemm_stage_numeric is selected, then only the numeric computation is performed.\n  \\note For the \\ref rocsparse_spgemm_stage_symbolic and \\ref rocsparse_spgemm_stage_numeric stages, only the\n  CSR matrix format is currently supported.\n  \\note \\f$\\alpha == beta == 0\\f$ is invalid.\n  \\note It is permissible to pass the same sparse matrix for \\f$C\\f$ and \\f$D\\f$ if both\n  matrices have the same sparsity pattern.\n  \\note Currently, only \\p trans_A == \\ref rocsparse_operation_none is supported.\n  \\note Currently, only \\p trans_B == \\ref rocsparse_operation_none is supported.\n  \\note This function is non-blocking and executed asynchronously with respect to the\n        host. It can return before the actual computation has finished.\n  \\note Note that for rare matrix products with more than 4096 non-zero entries\n  per row, an additional temporary storage buffer is allocated by the algorithm.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A      sparse matrix \\f$A\\f$ operation type.\n  @param[in]\n  trans_B      sparse matrix \\f$B\\f$ operation type.\n  @param[in]\n  alpha        scalar \\f$\\alpha\\f$.\n  @param[in]\n  A            sparse matrix \\f$A\\f$ descriptor.\n  @param[in]\n  B            sparse matrix \\f$B\\f$ descriptor.\n  @param[in]\n  beta         scalar \\f$\\beta\\f$.\n  @param[in]\n  D            sparse matrix \\f$D\\f$ descriptor.\n  @param[out]\n  C            sparse matrix \\f$C\\f$ descriptor.\n  @param[in]\n  compute_type floating point precision for the SpGEMM computation.\n  @param[in]\n  alg          SpGEMM algorithm for the SpGEMM computation.\n  @param[in]\n  stage        SpGEMM stage for the SpGEMM computation.\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer. buffer_size is set when\n               \\p temp_buffer is nullptr.\n  @param[in]\n  temp_buffer  temporary storage buffer allocated by the user. When a nullptr is passed,\n               the required allocation size (in bytes) is written to \\p buffer_size and the\n               function returns without performing the SpGEMM operation.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_pointer \\p alpha and \\p beta are invalid, or the\n          \\p A, \\p B, \\p D, \\p C, or \\p buffer_size pointer is invalid.\n  \\retval rocsparse_status_memory_error additional buffer for long rows could not be\n          allocated.\n  \\retval rocsparse_status_not_implemented\n          \\p trans_A != \\ref rocsparse_operation_none or\n          \\p trans_B != \\ref rocsparse_operation_none.\n\n  \\par Example\n  \\snippet example_rocsparse_spgemm.cpp doc example"]
    pub fn rocsparse_spgemm(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        alpha: *const ::std::os::raw::c_void,
        A: rocsparse_const_spmat_descr,
        B: rocsparse_const_spmat_descr,
        beta: *const ::std::os::raw::c_void,
        D: rocsparse_const_spmat_descr,
        C: rocsparse_spmat_descr,
        compute_type: rocsparse_datatype,
        alg: rocsparse_spgemm_alg,
        stage: rocsparse_spgemm_stage,
        buffer_size: *mut usize,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Incomplete Cholesky factorization with 0 fill-ins and no pivoting.\n  \\details\n  \\p rocsparse_spic0_buffer_size returns the size of the non-persistent buffer\n  that is required by \\ref rocsparse_spic0 and must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  \\note\n  This routine only supports uniform batched computation, that is, the same sparsity pattern but batched values of the matrices.\n\n  \\note\n  Supported formats are \\ref rocsparse_format_csr and \\ref rocsparse_format_bsr.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  spic0_descr Spic0 descriptor.\n  @param[in]\n  A            descriptor of the matrix to factorize.\n  @param[in]\n  P            descriptor of the factorization. In-place \\p P = \\p A is allowed.\n  @param[in]\n  spic0_stage stage for the Spic0 computation.\n  @param[out]\n  p_buffer_size_in_bytes  number of bytes of the buffer.\n  @param[out]\n  p_error      error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_not_implemented the sparse format is invalid or the preconditioner \\p P is not identical to the matrix to factorize \\p A.\n  \\retval rocsparse_status_invalid_value the \\p spic0_stage value is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p spic0_descr, \\p A, \\p P, or \\p p_buffer_size_in_bytes pointer is invalid."]
    pub fn rocsparse_spic0_buffer_size(
        handle: rocsparse_handle,
        spic0_descr: rocsparse_spic0_descr,
        A: rocsparse_const_spmat_descr,
        P: rocsparse_const_spmat_descr,
        spic0_stage: rocsparse_spic0_stage,
        p_buffer_size_in_bytes: *mut usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Incomplete Cholesky factorization with 0 fill-ins and no pivoting.\n\n  \\details\n  \\p rocsparse_spic0 computes the incomplete Cholesky factorization with 0 fill-ins\n  and no pivoting of a sparse \\f$m \\times m\\f$ matrix \\f$A\\f$, such that\n  \\f[\n    A \\approx LL^T\n  \\f]\n  where the lower triangular matrix \\f$L\\f$ is computed using:\n  \\f[\n    L_{ij} = \\left\\{\n    \\begin{array}{ll}\n        \\sqrt{A_{jj} - \\sum_{k=0}^{j-1}(L_{jk})^{2}},   & \\text{if i == j} \\\\\n        \\frac{1}{L_{jj}}(A_{ij} - \\sum_{k=0}^{j-1}L_{ik} \\times L_{jk}), & \\text{if i > j}\n    \\end{array}\n    \\right.\n  \\f]\n  for each entry found in the matrix \\f$A\\f$.\n\n  Performing the above operation requires two stages, the stage \\ref rocsparse_spic0_stage_analysis and the stage \\ref rocsparse_spic0_stage_compute.\n  The stage \\ref rocsparse_spic0_stage_analysis is required to perform the stage \\ref rocsparse_spic0_stage_compute and only needs to be called once for a given sparse matrix \\f$A\\f$, while the stage \\ref rocsparse_spic0_stage_compute can be repeatedly used with different matrices \\f$A\\f$ that have the same sparsity pattern.\n\n  \\p rocsparse_spic0 supports the following\n  data types for \\p A : \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r, \\ref rocsparse_datatype_f32_c, and \\ref rocsparse_datatype_f64_c.\n\n  \\note The descriptor \\p spic0_descr needs to be configured with \\ref rocsparse_spic0_set_input.\n  \\note\n  The sparse matrix formats currently supported are \\ref rocsparse_format_csr and \\ref rocsparse_format_bsr.\n\n  \\note\n  the \\ref rocsparse_spic0_stage_compute stage is non-blocking\n  and executed asynchronously with respect to the host. It can return before the actual computation has finished.\n  The \\ref rocsparse_spic0_stage_analysis stage is blocking with respect to the host.\n\n  \\note\n  Only the \\ref rocsparse_spic0_stage_compute stage\n  supports execution in a hipGraph context. The \\ref rocsparse_spic0_stage_analysis stage does not support hipGraph.\n\n  \\note\n  This routine only supports uniform strided batched computation, that is, the same sparsity pattern but strided batched values of the matrices.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  spic0_descr Spic0 descriptor\n  @param[in]\n  A            descriptor of the matrix to factorize.\n  @param[out]\n  P            descriptor of the factorization. In-place \\p P = \\p A is allowed.\n  @param[in]\n  spic0_stage stage for the Spic0 computation.\n  @param[in]\n  buffer_size_in_bytes  number of bytes of the buffer.\n  @param[in]\n  buffer       buffer allocated by the user.\n  @param[out]\n  p_error      error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_not_implemented the sparse format is invalid or the preconditioner \\p P is not identical to the matrix to factorize \\p A.\n  \\retval rocsparse_status_invalid_value the \\p spic0_stage value is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p spic0_descr, \\p A, \\p P, or \\p buffer_size_in_bytes pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_spic0.cpp doc example"]
    pub fn rocsparse_spic0(
        handle: rocsparse_handle,
        spic0_descr: rocsparse_spic0_descr,
        A: rocsparse_const_spmat_descr,
        P: rocsparse_spmat_descr,
        spic0_stage: rocsparse_spic0_stage,
        buffer_size_in_bytes: usize,
        buffer: *mut ::std::os::raw::c_void,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Get buffer size for incomplete LU factorization with 0 fill-ins and no pivoting.\n  \\details\n  \\p rocsparse_spilu0_buffer_size returns the size of the non-persistent buffer\n  that is required by \\ref rocsparse_spilu0, and must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  \\note\n  Supported formats are \\ref rocsparse_format_csr and \\ref rocsparse_format_bsr.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  spilu0_descr Spilu0 descriptor.\n  @param[in]\n  A            descriptor of the matrix to factorize.\n  @param[in]\n  P            descriptor of the factorization.\n  @param[in]\n  spilu0_stage stage for the Spilu0 computation.\n  @param[out]\n  p_buffer_size_in_bytes  number of bytes of the buffer.\n  @param[out]\n  p_error      error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if the user is not interested in obtaining an error descriptor.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_not_implemented the sparse format is invalid or the preconditioner \\p P is not identical to the matrix to factorize \\p A.\n  \\retval rocsparse_status_invalid_value the \\p spilu0_stage value is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p spilu0_descr, \\p A, \\p P, or \\p p_buffer_size_in_bytes pointer is invalid."]
    pub fn rocsparse_spilu0_buffer_size(
        handle: rocsparse_handle,
        spilu0_descr: rocsparse_spilu0_descr,
        A: rocsparse_const_spmat_descr,
        P: rocsparse_const_spmat_descr,
        spilu0_stage: rocsparse_spilu0_stage,
        p_buffer_size_in_bytes: *mut usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Incomplete LU factorization with 0 fill-ins and no pivoting.\n\n  \\details\n  \\p rocsparse_spilu0 computes the incomplete LU factorization with 0 fill-ins and no\n  pivoting of a sparse \\f$m \\times m\\f$ matrix \\f$A\\f$, such that\n  \\f[\n    A \\approx LU\n  \\f]\n  where the lower triangular matrix \\f$L\\f$ and the upper triangular matrix \\f$U\\f$ are computed using:\n  \\f[\n    \\begin{array}{ll}\n        L_{ij} = \\frac{1}{U_{jj}}(A_{ij} - \\sum_{k=0}^{j-1}L_{ik} \\times U_{kj}), & \\text{if i > j} \\\\\n        U_{ij} = (A_{ij} - \\sum_{k=0}^{j-1}L_{ik} \\times U_{kj}), & \\text{if i <= j}\n    \\end{array}\n  \\f]\n  for each entry found in the matrix \\f$A\\f$.\n\n  Performing the above operation requires two stages, the stage \\ref rocsparse_spilu0_stage_analysis and the stage \\ref rocsparse_spilu0_stage_compute.\n  The stage \\ref rocsparse_spilu0_stage_analysis is required to perform the stage \\ref rocsparse_spilu0_stage_compute and only needs to be called once for a given sparse matrix \\f$A\\f$, while the stage \\ref rocsparse_spilu0_stage_compute can be repeatedly used with different matrices \\f$A\\f$ that have the same sparsity pattern.\n\n  \\p rocsparse_spilu0 supports the following\n  data types for \\p A : \\ref rocsparse_datatype_f32_r, \\ref rocsparse_datatype_f64_r, \\ref rocsparse_datatype_f32_c, and \\ref rocsparse_datatype_f64_c.\n\n  \\note The descriptor \\p spilu0_descr needs to be configured with \\ref rocsparse_spilu0_set_input.\n  \\note The sparse matrix formats currently supported are \\ref rocsparse_format_csr and \\ref rocsparse_format_bsr.\n\n  \\note\n  the \\ref rocsparse_spilu0_stage_compute stage is non-blocking\n  and executed asynchronously with respect to the host. It can return before the actual computation has finished.\n  The \\ref rocsparse_spilu0_stage_analysis stage is blocking with respect to the host.\n\n  \\note\n  Only the \\ref rocsparse_spilu0_stage_compute stage\n  supports execution in a hipGraph context. The \\ref rocsparse_spilu0_stage_analysis stage does not support hipGraph.\n\n  \\note\n  This routine only supports uniform batched computation, that is, same sparsity pattern but batched values of the matrices.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  spilu0_descr Spilu0 descriptor.\n  @param[in]\n  A            descriptor of the matrix to factorize.\n  @param[out]\n  P            descriptor of the factorization.\n  @param[in]\n  spilu0_stage stage for the Spilu0 computation.\n  @param[in]\n  buffer_size_in_bytes  number of bytes of the buffer.\n  @param[in]\n  buffer       buffer allocated by the user.\n  @param[out]\n  p_error      error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_not_implemented the sparse format is invalid or the preconditioner \\p P is not identical to the matrix to factorize \\p A.\n  \\retval rocsparse_status_invalid_value the \\p spilu0_stage value is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p spilu0_descr, \\p A, \\p P, or \\p buffer_size_in_bytes pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_spilu0.cpp doc example"]
    pub fn rocsparse_spilu0(
        handle: rocsparse_handle,
        spilu0_descr: rocsparse_spilu0_descr,
        A: rocsparse_const_spmat_descr,
        P: rocsparse_spmat_descr,
        spilu0_stage: rocsparse_spilu0_stage,
        buffer_size_in_bytes: usize,
        buffer: *mut ::std::os::raw::c_void,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse iterative triangular solve.\n\n  \\details\n  \\p rocsparse_spitsv solves, using the Jacobi iterative method, a sparse triangular linear system of a sparse\n  \\f$m \\times m\\f$ matrix, defined in CSR format, a dense solution vector\n  \\f$y\\f$ and the right-hand side \\f$x\\f$ that is multiplied by \\f$\\alpha\\f$, such that\n  \\f[\n    op(A) y = \\alpha x,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  The Jacobi method applied to the sparse triangular linear system above gives\n  \\f[\n     y_{k+1} = y_{k} + D^{-1} ( \\alpha x - (D + T) y_{k} )\n  \\f]\n  with \\f$A = D + T\\f$, \\f$D\\f$ the diagonal of \\f$A\\f$ and \\f$T\\f$ the strict triangular part of \\f$A\\f$.\n\n  The above equation can be also written as\n  \\f[\n     y_{k+1} = y_{k} + D^{-1} r_k\n  \\f]\n  where\n  \\f[\n     r_k = \\alpha x - (D + T) y_k.\n  \\f]\n  Starting with \\f$y_0 = \\f$ \\p y, the method iterates while \\f$ k \\lt \\f$ \\p host_nmaxiter and until\n  \\f[\n     \\Vert r_k \\Vert_{\\infty} \\le \\epsilon,\n  \\f]\n  with \\f$\\epsilon\\f$ = \\p host_tol.\n\n  \\p rocsparse_spitsv requires three stages to complete. First, pass the \\ref rocsparse_spitsv_stage_buffer_size\n  stage to determine the size of the required temporary storage buffer. Next, allocate this buffer and call\n  \\p rocsparse_spitsv again with the \\ref rocsparse_spitsv_stage_preprocess stage, which will preprocess data and store it\n  in the temporary buffer. Finally, call \\p rocsparse_spitsv with the \\ref rocsparse_spitsv_stage_compute stage to\n  perform the actual computation. After all calls to \\p rocsparse_spitsv are complete, the temporary buffer\n  can be deallocated.\n\n  \\p rocsparse_spitsv supports \\ref rocsparse_indextype_i32 and \\ref rocsparse_indextype_i64 index precisions for storing the\n  row pointer and column indices arrays of the sparse matrix. \\p rocsparse_spitsv supports the following data types for\n  \\f$op(A)\\f$, \\f$x\\f$, \\f$y\\f$, and compute types for \\f$\\alpha\\f$:\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"spitsv_uniform\">Uniform Precisions</caption>\n  <tr><th>A / X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle        handle to the rocSPARSE library context queue.\n  @param[inout]\n  host_nmaxiter maximum number of iteration on input and number of iteration on output. If the output number of iterations is strictly less than the input maximum number of iterations, then the algorithm converged.\n  @param[in]\n  host_tol      if the pointer is null, then the loop will execute \\p nmaxiter[0] iterations. The precision is float for f32-based calculations (including the complex case) and double for f64-based calculations (including the complex case).\n  @param[out]\n  host_history  Optional array to record the norm of the residual before each iteration. The precision is float for f32-based calculations (including the complex case) and double for f64-based calculations (including the complex case).\n  @param[in]\n  trans         matrix operation type.\n  @param[in]\n  alpha         scalar \\f$\\alpha\\f$.\n  @param[in]\n  mat           matrix descriptor.\n  @param[in]\n  x             vector descriptor.\n  @param[inout]\n  y             vector descriptor.\n  @param[in]\n  compute_type  floating point precision for the SpITSV computation.\n  @param[in]\n  alg           SpITSV algorithm for the SpITSV computation.\n  @param[in]\n  stage         SpITSV stage for the SpITSV computation.\n  @param[out]\n  buffer_size   number of bytes of the temporary storage buffer.\n  @param[in]\n  temp_buffer   temporary storage buffer allocated by the user. When a nullptr is passed,\n                the required allocation size (in bytes) is written to \\p buffer_size and\n                function returns without performing the SpITSV operation.\n\n  \\retval       rocsparse_status_success the operation completed successfully.\n  \\retval       rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval       rocsparse_status_invalid_pointer \\p alpha, \\p mat, \\p x, \\p y, \\p descr, or\n                \\p buffer_size pointer is invalid.\n  \\retval       rocsparse_status_not_implemented \\p trans, \\p compute_type, \\p stage, or \\p alg is\n                currently not supported.\n\n  \\par Example\n  \\snippet example_rocsparse_spitsv.cpp doc example"]
    pub fn rocsparse_spitsv(
        handle: rocsparse_handle,
        host_nmaxiter: *mut rocsparse_int,
        host_tol: *const ::std::os::raw::c_void,
        host_history: *mut ::std::os::raw::c_void,
        trans: rocsparse_operation,
        alpha: *const ::std::os::raw::c_void,
        mat: rocsparse_spmat_descr,
        x: rocsparse_dnvec_descr,
        y: rocsparse_dnvec_descr,
        compute_type: rocsparse_datatype,
        alg: rocsparse_spitsv_alg,
        stage: rocsparse_spitsv_stage,
        buffer_size: *mut usize,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse matrix dense matrix multiplication.\n\n  \\details\n  \\p rocsparse_spmm multiplies the scalar \\f$\\alpha\\f$ with a sparse \\f$m \\times k\\f$ matrix \\f$op(A)\\f$,\n  defined in CSR, CSC, COO, BSR, or Blocked ELL storage format, and the dense \\f$k \\times n\\f$ matrix \\f$op(B)\\f$\n  and adds the result to the dense \\f$m \\times n\\f$ matrix \\f$C\\f$ that is multiplied by the scalar\n  \\f$\\beta\\f$, such that\n  \\f[\n    C := \\alpha \\cdot op(A) \\cdot op(B) + \\beta \\cdot C,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans_A == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans_A == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n        B^H, & \\text{if trans_B == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  Both \\f$B\\f$ and \\f$C\\f$ can be in row or column order.\n\n  \\p rocsparse_spmm requires three stages to complete. First, pass the \\ref rocsparse_spmm_stage_buffer_size\n  stage to determine the size of the required temporary storage buffer. Next, allocate this buffer and call\n  \\p rocsparse_spmm again with the \\ref rocsparse_spmm_stage_preprocess stage, which will perform analysis on the sparse\n  matrix \\f$op(A)\\f$. Finally, call \\p rocsparse_spmm with the \\ref rocsparse_spmm_stage_compute stage to perform\n  the actual computation. The buffer size, buffer allocation, and preprocess stages only need to be called once for a given\n  sparse matrix \\f$op(A)\\f$, while the computation stage can be repeatedly used with different \\f$B\\f$ and \\f$C\\f$ matrices.\n  After all calls to \\p rocsparse_spmm are complete, the temporary buffer can be deallocated.\n\n  As noted above, both \\f$B\\f$ and \\f$C\\f$ can be in row or column order (this includes mixing the order so that \\f$B\\f$ is in\n  row order and \\f$C\\f$ in column order and vice versa). For best performance, use row order for both \\f$B\\f$ and \\f$C\\f$ as\n  this provides the best memory access.\n\n  \\p rocsparse_spmm supports multiple different algorithms. These algorithms have different trade-offs depending on the sparsity\n  pattern of the matrix, whether or not the results need to be deterministic, and how many times the sparse-matrix product will\n  be performed.\n\n  <table>\n  <caption id=\"spmm_csr_algorithms\">CSR Algorithms</caption>\n  <tr><th>CSR Algorithms                         <th>Deterministic  <th>Preprocessing  <th>Notes\n  <tr><td>rocsparse_spmm_alg_csr</td>            <td>Yes</td>       <td>No</td>        <td>Default algorithm.</td>\n  <tr><td>rocsparse_spmm_alg_csr_row_split</td>  <td>Yes</td>       <td>No</td>        <td>Assigns a fixed number of threads per row, regardless of the number of non-zeros in each row. This can perform well when each row in the matrix has roughly the same number of non-zeros.</td>\n  <tr><td>rocsparse_spmm_alg_csr_nnz_split</td>  <td>No</td>        <td>Yes</td>       <td>Distributes work by having each thread block work on a fixed number of non-zeros, regardless of the number of rows that might be involved. This can perform well when the matrix has some rows with few non-zeros and some rows with many non-zeros.</td>\n  <tr><td>rocsparse_spmm_alg_csr_merge_path</td> <td>No</td>        <td>Yes</td>       <td>Attempts to combine the approaches of row-split and non-zero split by having each block work on a fixed amount of work, which can be either non-zeros or rows.</td>\n  </table>\n\n  <table>\n  <caption id=\"spmm_coo_algorithms\">COO Algorithms</caption>\n  <tr><th>COO Algorithms                               <th>Deterministic   <th>Preprocessing <th>Notes\n  <tr><td>rocsparse_spmm_alg_coo_segmented</td>        <td>Yes</td>        <td>No</td>       <td>Generally not as fast as the atomic algorithm but is deterministic.</td>\n  <tr><td>rocsparse_spmm_alg_coo_atomic</td>           <td>No</td>         <td>No</td>       <td>Generally the fastest COO algorithm. This is the default algorithm.</td>\n  <tr><td>rocsparse_spmm_alg_coo_segmented_atomic</td> <td>No</td>         <td>No</td>       <td> </td>\n  </table>\n\n  <table>\n  <caption id=\"spmm_bell_algorithms\">Blocked-ELL Algorithms</caption>\n  <tr><th>Blocked ELL Algorithms       <th>Deterministic   <th>Preprocessing <th>Notes\n  <tr><td>rocsparse_spmm_alg_bell</td> <td>Yes</td>        <td>No</td>       <td></td>\n  </table>\n\n  <table>\n  <caption id=\"spmm_bsr_algorithms\">BSR Algorithms</caption>\n  <tr><th>BSR Algorithms                <th>Deterministic   <th>Preprocessing <th>Notes\n  <tr><td>rocsparse_spmm_alg_bsr</td>   <td>Yes</td>        <td>No</td>       <td></td>\n  </table>\n\n  It is also possible to pass \\ref rocsparse_spmm_alg_default, which will automatically select from the algorithms listed above\n  based on the sparse matrix format. In the case of CSR or CSC matrices, this will set the algorithm to be \\ref rocsparse_spmm_alg_csr. In\n  the case of blocked ELL matrices, this will set the algorithm to be \\ref rocsparse_spmm_alg_bell. In the case of BSR matrices, this\n  will set the algorithm to be \\ref rocsparse_spmm_alg_bsr, and for COO matrices, it will set the algorithm to be\n  \\ref rocsparse_spmm_alg_coo_atomic.\n\n  When A is transposed, \\p rocsparse_spmm will revert to using \\ref rocsparse_spmm_alg_csr\n  for CSR and CSC formats and \\ref rocsparse_spmm_alg_coo_atomic for COO format, regardless of algorithm selected.\n\n  \\p rocsparse_spmm supports multiple combinations of data types and compute types. The tables below indicate the currently\n  supported different data types that can be used for for the sparse matrix \\f$op(A)\\f$ and the dense matrices \\f$op(B)\\f$ and\n  \\f$C\\f$ and the compute type for \\f$\\alpha\\f$ and \\f$\\beta\\f$. The advantage of using different data types is to save on\n  memory bandwidth and storage when a user application allows, while performing the actual computation in a higher precision.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"spmm_uniform\">Uniform Precisions</caption>\n  <tr><th>A / B / C / compute_type\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\par Mixed precisions:\n  <table>\n  <caption id=\"spmm_mixed\">Mixed Precisions</caption>\n  <tr><th>A / B                     <th>C                        <th>compute_type\n  <tr><td>rocsparse_datatype_i8_r   <td>rocsparse_datatype_i32_r <td>rocsparse_datatype_i32_r\n  <tr><td>rocsparse_datatype_i8_r   <td>rocsparse_datatype_f32_r <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f32_r <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f16_r <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_f32_r <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_f32_r\n  </table>\n\n  \\p rocsparse_spmm supports \\ref rocsparse_indextype_i32 and \\ref rocsparse_indextype_i64 index precisions\n  for storing the row pointer and column indices arrays of the sparse matrices.\n\n  \\p rocsparse_spmm also supports batched computation for CSR and COO matrices. There are three supported batch modes:\n  \\f[\n      C_i = A \\times B_i \\\\\n      C_i = A_i \\times B \\\\\n      C_i = A_i \\times B_i\n  \\f]\n\n  The batch mode is determined by the batch count and stride passed for each matrix. For example,\n  to use the first batch mode (\\f$C_i = A \\times B_i\\f$) with 100 batches for non-transposed \\f$A\\f$,\n  \\f$B\\f$, and \\f$C\\f$, pass:\n  \\f[\n      batch\\_count\\_A=1 \\\\\n      batch\\_count\\_B=100 \\\\\n      batch\\_count\\_C=100 \\\\\n      offsets\\_batch\\_stride\\_A=0 \\\\\n      columns\\_values\\_batch\\_stride\\_A=0 \\\\\n      batch\\_stride\\_B=k*n \\\\\n      batch\\_stride\\_C=m*n\n  \\f]\n  To use the second batch mode (\\f$C_i = A_i \\times B\\f$), pass:\n  \\f[\n      batch\\_count\\_A=100 \\\\\n      batch\\_count\\_B=1 \\\\\n      batch\\_count\\_C=100 \\\\\n      offsets\\_batch\\_stride\\_A=m+1 \\\\\n      columns\\_values\\_batch\\_stride\\_A=nnz \\\\\n      batch\\_stride\\_B=0 \\\\\n      batch\\_stride\\_C=m*n\n  \\f]\n  And to use the third batch mode (\\f$C_i = A_i \\times B_i\\f$), pass:\n  \\f[\n      batch\\_count\\_A=100 \\\\\n      batch\\_count\\_B=100 \\\\\n      batch\\_count\\_C=100 \\\\\n      offsets\\_batch\\_stride\\_A=m+1 \\\\\n      columns\\_values\\_batch\\_stride_A=nnz \\\\\n      batch\\_stride_B=k*n \\\\\n      batch\\_stride_C=m*n\n  \\f]\n  See the examples below.\n\n  \\note\n  None of the algorithms above are deterministic when \\f$A\\f$ is transposed or conjugate transposed.\n\n  \\note\n  All algorithms perform best when using row ordering for the dense \\f$B\\f$ and \\f$C\\f$ matrices.\n\n  \\note\n  The sparse matrix formats currently supported are: \\ref rocsparse_format_coo, \\ref rocsparse_format_csr,\n  \\ref rocsparse_format_csc, \\ref rocsparse_format_bsr, and \\ref rocsparse_format_bell.\n\n  \\note\n  Mixed precisions are only supported for BSR, CSR, CSC, and COO matrix formats.\n\n  \\note\n  Only the \\ref rocsparse_spmm_stage_buffer_size stage and the \\ref rocsparse_spmm_stage_compute stage are non-blocking\n  and executed asynchronously with respect to the host. They can return before the actual computation has finished.\n  The \\ref rocsparse_spmm_stage_preprocess stage is blocking with respect to the host.\n\n  \\note\n  Currently, only \\p trans_A == \\ref rocsparse_operation_none is supported for the COO and blocked ELL formats.\n\n  \\note\n  Only the \\ref rocsparse_spmm_stage_buffer_size stage and the \\ref rocsparse_spmm_stage_compute stage\n  support execution in a hipGraph context. The \\ref rocsparse_spmm_stage_preprocess stage does not support hipGraph.\n\n  \\note\n  Currently, only CSR, CSC, COO, BSR, and blocked ELL sparse formats are supported.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A      matrix operation type.\n  @param[in]\n  trans_B      matrix operation type.\n  @param[in]\n  alpha        scalar \\f$\\alpha\\f$.\n  @param[in]\n  mat_A        matrix descriptor.\n  @param[in]\n  mat_B        matrix descriptor.\n  @param[in]\n  beta         scalar \\f$\\beta\\f$.\n  @param[in]\n  mat_C        matrix descriptor.\n  @param[in]\n  compute_type floating point precision for the SpMM computation.\n  @param[in]\n  alg          SpMM algorithm for the SpMM computation.\n  @param[in]\n  stage        SpMM stage for the SpMM computation.\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer.\n  @param[in]\n  temp_buffer  temporary storage buffer allocated by the user. When the\n               \\ref rocsparse_spmm_stage_buffer_size stage is passed in, the required\n               allocation size (in bytes) is written to \\p buffer_size and function\n               returns without performing the SpMM operation.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p alpha, \\p mat_A, \\p mat_B, \\p mat_C, \\p beta, or\n               \\p buffer_size pointer is invalid.\n  \\retval      rocsparse_status_not_implemented \\p trans_A, \\p trans_B, \\p compute_type, or \\p alg is\n               currently not supported.\n  \\par Example\n  This example performs sparse matrix-dense matrix multiplication, \\f$C := \\alpha \\cdot A \\cdot B + \\beta \\cdot C\\f$\n  \\snippet example_rocsparse_spmm.cpp doc example\n\n  \\par Example\n  An example of the first batch mode (\\f$C_i = A \\times B_i\\f$) is provided below.\n  \\snippet example_rocsparse_spmm_batched.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_spmm(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        alpha: *const ::std::os::raw::c_void,
        mat_A: rocsparse_const_spmat_descr,
        mat_B: rocsparse_const_dnmat_descr,
        beta: *const ::std::os::raw::c_void,
        mat_C: rocsparse_dnmat_descr,
        compute_type: rocsparse_datatype,
        alg: rocsparse_spmm_alg,
        stage: rocsparse_spmm_stage,
        buffer_size: *mut usize,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse matrix vector multiplication.\n\n  \\details\n  \\p rocsparse_spmv multiplies the scalar \\f$\\alpha\\f$ with a sparse \\f$m \\times n\\f$ matrix \\f$op(A)\\f$, defined in CSR,\n  CSC, COO, COO (AoS), BSR, or ELL format, with the dense vector \\f$x\\f$ and adds the result to the dense vector \\f$y\\f$\n  that is multiplied by the scalar \\f$\\beta\\f$, such that\n  \\f[\n    y := \\alpha \\cdot op(A) \\cdot x + \\beta \\cdot y,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  Performing the above operation involves multiple steps. First, call \\p rocsparse_spmv with the stage parameter set to\n  \\ref rocsparse_spmv_stage_buffer_size to determine the size of the required temporary storage buffer. Then allocate this\n  buffer and call \\p rocsparse_spmv with the stage parameter set to \\ref rocsparse_spmv_stage_preprocess. Depending on the algorithm\n  and sparse matrix format, this will perform analysis on the sparsity pattern of \\f$op(A)\\f$. Finally, complete the operation\n  by calling \\p rocsparse_spmv with the stage parmeter set to \\ref rocsparse_spmv_stage_compute. The buffer size, buffer allocation, and\n  preprocess stages only need to be called once for a given sparse matrix \\f$op(A)\\f$, while the computation stage can be repeatedly used\n  with different \\f$x\\f$ and \\f$y\\f$ vectors. After all calls to \\p rocsparse_spmv are complete, the temporary buffer can be deallocated.\n\n  \\p rocsparse_spmv supports multiple different algorithms. These algorithms have different trade-offs depending on the sparsity\n  pattern of the matrix, whether or not the results need to be deterministic, and how many times the sparse-vector product will\n  be performed.\n\n  <table>\n  <caption id=\"spmv_csr_algorithms\">CSR/CSC Algorithms</caption>\n  <tr><th>Algorithm                            <th>Deterministic  <th>Preprocessing  <th>Notes\n  <tr><td>rocsparse_spmv_alg_csr_rowsplit</td> <td>Yes</td>       <td>No</td>        <td>Is best suited for matrices with all rows having a similar number of non-zeros. Can outperform adaptive and LRB algorithms in certain sparsity patterns. Will perform very poorly if some rows have few non-zeros and some rows have many non-zeros.</td>\n  <tr><td>rocsparse_spmv_alg_csr_stream</td>   <td>Yes</td>       <td>No</td>        <td>[Deprecated] The old name for rocsparse_spmv_alg_csr_rowsplit.</td>\n  <tr><td>rocsparse_spmv_alg_csr_adaptive</td> <td>No</td>        <td>Yes</td>       <td>Generally the fastest algorithm across all matrix sparsity patterns. This includes matrices that have some rows with many non-zeros and some rows with few non-zeros. Requires lengthy preprocessing that needs to be amortized over many subsequent sparse vector products.</td>\n  <tr><td>rocsparse_spmv_alg_csr_lrb</td>      <td>No</td>        <td>Yes</td>       <td>Like the adaptive algorithm, it generally performs well across all matrix sparsity patterns. Generally not as fast as the adaptive algorithm, however, it uses a much faster pre-processing step. Good for when only a small number of sparse vector products will be performed.</td>\n  <tr><td>rocsparse_spmv_alg_csr_nnzsplit</td> <td>No</td>        <td>Yes</td>       <td>Like the adaptive algorithm, it generally performs well across all matrix sparsity patterns. Generally not as fast as the adaptive algorithm but faster than the LRB algorithm. It uses a much faster preprocessing step than LRB. Good when the number of sparse vector products that will be performed is less than one hundred. If more products need to be computed, the adaptive algorithm is probably faster.</td>\n  </table>\n\n  <table>\n  <caption id=\"spmv_coo_algorithms\">COO Algorithms</caption>\n  <tr><th>COO Algorithms                     <th>Deterministic   <th>Preprocessing <th>Notes\n  <tr><td>rocsparse_spmv_alg_coo</td>        <td>Yes</td>        <td>Yes</td>      <td>Generally not as fast as the atomic algorithm but is deterministic.</td>\n  <tr><td>rocsparse_spmv_alg_coo_atomic</td> <td>No</td>         <td>No</td>       <td>Generally the fastest COO algorithm.</td>\n  </table>\n\n  <table>\n  <caption id=\"spmv_ell_algorithms\">ELL Algorithms</caption>\n  <tr><th>ELL Algorithms                <th>Deterministic   <th>Preprocessing <th>Notes\n  <tr><td>rocsparse_spmv_alg_ell</td>   <td>Yes</td>        <td>No</td>       <td></td>\n  </table>\n\n  <table>\n  <caption id=\"spmv_bsr_algorithms\">BSR Algorithms</caption>\n  <tr><th>BSR Algorithm                 <th>Deterministic   <th>Preprocessing <th>Notes\n  <tr><td>rocsparse_spmv_alg_bsr</td>   <td>Yes</td>        <td>No</td>       <td></td>\n  </table>\n\n  \\p rocsparse_spmv supports multiple combinations of data types and compute types. The tables below indicate the currently\n  supported different data types that can be used for the sparse matrix \\f$op(A)\\f$, the dense vectors \\f$x\\f$ and\n  \\f$y\\f$, and the compute type for \\f$\\alpha\\f$ and \\f$\\beta\\f$. The advantage of using different data types is to save on\n  memory bandwidth and storage when a user application allows, while performing the actual computation in a higher precision.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"spmv_uniform\">Uniform Precisions</caption>\n  <tr><th>A / X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\par Mixed Precisions:\n  <table>\n  <caption id=\"spmv_mixed\">Mixed Precisions</caption>\n  <tr><th>A / X                     <th>Y                         <th>compute_type\n  <tr><td>rocsparse_datatype_i8_r   <td>rocsparse_datatype_i32_r  <td>rocsparse_datatype_i32_r\n  <tr><td>rocsparse_datatype_i8_r   <td>rocsparse_datatype_f32_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f32_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_f32_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_f32_r\n  </table>\n\n  \\par Mixed-regular Real Precisions\n  <table>\n  <caption id=\"spmv_mixed_regular_real\">Mixed-regular Real Precisions</caption>\n  <tr><th>A                        <th>X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r <td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c <td>rocsparse_datatype_f64_c\n  </table>\n\n  \\par Mixed-regular Complex Precisions\n  <table>\n  <caption id=\"spmv_mixed_regular_complex\">Mixed-regular Complex Precisions</caption>\n  <tr><th>A                        <th>X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r <td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_r <td>rocsparse_datatype_f64_c\n  </table>\n\n  \\p rocsparse_spmv supports \\ref rocsparse_indextype_i32 and \\ref rocsparse_indextype_i64 index precisions\n  for storing the row pointer and column indices arrays of the sparse matrices.\n\n  \\note\n  None of the algorithms above are deterministic when \\f$A\\f$ is transposed.\n\n  \\note\n  The sparse matrix formats currently supported are: \\ref rocsparse_format_bsr, \\ref rocsparse_format_coo,\n  \\ref rocsparse_format_coo_aos, \\ref rocsparse_format_csr, \\ref rocsparse_format_csc, and \\ref rocsparse_format_ell.\n\n  \\note\n  Only the \\ref rocsparse_spmv_stage_buffer_size stage and the \\ref rocsparse_spmv_stage_compute stage are non-blocking\n  and executed asynchronously with respect to the host. They can return before the actual computation has finished.\n  The \\ref rocsparse_spmv_stage_preprocess stage is blocking with respect to the host.\n\n  \\note\n  Only the \\ref rocsparse_spmv_stage_buffer_size stage and the \\ref rocsparse_spmv_stage_compute stage\n  support execution in a hipGraph context. The \\ref rocsparse_spmv_stage_preprocess stage does not support hipGraph.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  trans        matrix operation type.\n  @param[in]\n  alpha        scalar \\f$\\alpha\\f$.\n  @param[in]\n  mat          matrix descriptor.\n  @param[in]\n  x            vector descriptor.\n  @param[in]\n  beta         scalar \\f$\\beta\\f$.\n  @param[inout]\n  y            vector descriptor.\n  @param[in]\n  compute_type floating point precision for the SpMV computation.\n  @param[in]\n  alg          SpMV algorithm for the SpMV computation.\n  @param[in]\n  stage        SpMV stage for the SpMV computation.\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer. buffer_size is set when\n               \\p temp_buffer is nullptr.\n  @param[in]\n  temp_buffer  temporary storage buffer allocated by the user. When the\n               \\ref rocsparse_spmv_stage_buffer_size stage is passed,\n               the required allocation size (in bytes) is written to \\p buffer_size and\n               function returns without performing the SpMV operation.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context \\p handle was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p alpha, \\p mat, \\p x, \\p beta, \\p y, or\n               \\p buffer_size pointer is invalid.\n  \\retval      rocsparse_status_invalid_value the value of \\p trans, \\p compute_type, \\p alg, or \\p stage is incorrect.\n  \\retval      rocsparse_status_not_implemented \\p compute_type or \\p alg is\n               currently not supported.\n\n  \\par Example\n  \\snippet example_rocsparse_spmv.cpp doc example"]
    pub fn rocsparse_spmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        alpha: *const ::std::os::raw::c_void,
        mat: rocsparse_const_spmat_descr,
        x: rocsparse_const_dnvec_descr,
        beta: *const ::std::os::raw::c_void,
        y: rocsparse_dnvec_descr,
        compute_type: rocsparse_datatype,
        alg: rocsparse_spmv_alg,
        stage: rocsparse_spmv_stage,
        buffer_size: *mut usize,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse triangular system solve with multiple right-hand sides.\n\n  \\details\n  \\p rocsparse_spsm solves a triangular linear system of equations defined by a sparse \\f$m \\times m\\f$ square matrix \\f$op(A)\\f$,\n  given in CSR or COO storage format, such that\n  \\f[\n    op(A) \\cdot C = \\alpha \\cdot op(B),\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_B == rocsparse_operation_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and where \\f$C\\f$ is the dense solution matrix and \\f$B\\f$ is the dense right-hand side matrix. Both \\f$B\\f$\n  and \\f$C\\f$ can be in row or column order.\n\n  Performing the above operation requires three stages. First, \\p rocsparse_spsm must be called with the stage\n  \\ref rocsparse_spsm_stage_buffer_size, which will determine the size of the required temporary storage buffer.\n  Then allocate this buffer and call \\p rocsparse_spsm with the stage \\ref rocsparse_spsm_stage_preprocess,\n  which will perform analysis on the sparse matrix \\f$op(A)\\f$. Finally, complete the computation by calling\n  \\p rocsparse_spsm with the stage \\ref rocsparse_spsm_stage_compute. The buffer size, buffer allocation, and preprocess\n  stages only need to be called once for a given sparse triangular matrix \\f$op(A)\\f$, while the computation stage can be\n  repeatedly used with different \\f$B\\f$ and \\f$C\\f$ matrices.\n\n  As noted above, both \\f$B\\f$ and \\f$C\\f$ can be in row or column order (this includes mixing the order so that \\f$B\\f$ is in\n  row order and \\f$C\\f$ in column order and vice versa). Internally, however, rocSPARSE kernels solve the system assuming the\n  matrices \\f$B\\f$ and \\f$C\\f$ are in row order, as this provides the best memory access. This means that if the matrix\n  \\f$C\\f$ is not in row order and/or the matrix \\f$B\\f$ is not row order (or \\f$B^{T}\\f$ is not column order as this is\n  equivalent to being in row order), then internally, memory copies and/or transposing of data might be performed to get them\n  into the correct order (possibly using extra buffer size). After the computation is completed, additional memory copies and/or\n  transposing of data might be performed to get them back into the user arrays. For the best performance and smallest required\n  temporary storage buffers, use row order for the matrix \\f$C\\f$ and row order for the matrix \\f$B\\f$ (or column order if\n  \\f$B\\f$ is being transposed).\n\n  \\p rocsparse_spsm supports \\ref rocsparse_indextype_i32 and \\ref rocsparse_indextype_i64 index precisions for storing the\n  row pointer and column indices arrays of the sparse matrices. \\p rocsparse_spsm supports the following data types for\n  \\f$op(A)\\f$, \\f$op(B)\\f$, \\f$C\\f$, and compute types for \\f$\\alpha\\f$:\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"spsm_uniform\">Uniform Precisions</caption>\n  <tr><th>A / B / C / compute_type\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\note\n  The sparse matrix formats currently supported are: \\ref rocsparse_format_coo and \\ref rocsparse_format_csr.\n\n  \\note\n  Only the \\ref rocsparse_spsm_stage_buffer_size stage and the \\ref rocsparse_spsm_stage_compute stage are non-blocking\n  and executed asynchronously with respect to the host. They can return before the actual computation has finished.\n  The \\ref rocsparse_spsm_stage_preprocess stage is blocking with respect to the host.\n\n  \\note\n  Currently, only \\p trans_A == \\ref rocsparse_operation_none and \\p trans_A == \\ref rocsparse_operation_transpose is supported.\n  Currently, only \\p trans_B == \\ref rocsparse_operation_none and \\p trans_B == \\ref rocsparse_operation_transpose is supported.\n\n  \\note\n  Only the \\ref rocsparse_spsm_stage_buffer_size stage and the \\ref rocsparse_spsm_stage_compute stage\n  support execution in a hipGraph context. The \\ref rocsparse_spsm_stage_preprocess stage does not support hipGraph.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A      matrix operation type for the sparse matrix \\f$op(A)\\f$.\n  @param[in]\n  trans_B      matrix operation type for the dense matrix \\f$op(B)\\f$.\n  @param[in]\n  alpha        scalar \\f$\\alpha\\f$.\n  @param[in]\n  matA         sparse matrix descriptor.\n  @param[in]\n  matB         dense matrix descriptor.\n  @param[inout]\n  matC         dense matrix descriptor.\n  @param[in]\n  compute_type floating point precision for the SpSM computation.\n  @param[in]\n  alg          SpSM algorithm for the SpSM computation.\n  @param[in]\n  stage        SpSM stage for the SpSM computation.\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer.\n  @param[in]\n  temp_buffer  temporary storage buffer allocated by the user. When the\n               \\ref rocsparse_spsm_stage_buffer_size stage is passed in,\n               the required allocation size (in bytes) is written to \\p buffer_size, and the\n               function returns without performing the SpSM operation.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p alpha, \\p matA, \\p matB, \\p matC, \\p descr, or\n               \\p buffer_size pointer is invalid.\n  \\retval      rocsparse_status_not_implemented \\p trans_A, \\p trans_B, \\p compute_type, \\p stage, or \\p alg is\n               currently not supported.\n\n  \\par Example\n  \\snippet example_rocsparse_spsm.cpp doc example"]
    pub fn rocsparse_spsm(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        alpha: *const ::std::os::raw::c_void,
        matA: rocsparse_const_spmat_descr,
        matB: rocsparse_const_dnmat_descr,
        matC: rocsparse_dnmat_descr,
        compute_type: rocsparse_datatype,
        alg: rocsparse_spsm_alg,
        stage: rocsparse_spsm_stage,
        buffer_size: *mut usize,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse triangular system solve.\n\n  \\details\n  \\p rocsparse_spsv solves a triangular linear system of equations defined by a sparse \\f$m \\times m\\f$ square matrix \\f$op(A)\\f$,\n  given in CSR or COO storage format, such that\n  \\f[\n    op(A) \\cdot y = \\alpha \\cdot x,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and where \\f$y\\f$ is the dense solution vector and \\f$x\\f$ is the dense right-hand side vector.\n\n  Performing the above operation requires three stages. First, \\p rocsparse_spsv must be called with the stage\n  \\ref rocsparse_spsv_stage_buffer_size, which will determine the size of the required temporary storage buffer.\n  The user then allocates this buffer and calls \\p rocsparse_spsv with the stage \\ref rocsparse_spsv_stage_preprocess,\n  which will perform analysis on the sparse matrix \\f$op(A)\\f$. Finally, complete the computation by calling\n  \\p rocsparse_spsv with the stage \\ref rocsparse_spsv_stage_compute. The buffer size, buffer allocation, and preprocess\n  stages only need to be called once for a given sparse matrix \\f$op(A)\\f$, while the computation stage can be repeatedly\n  used with different \\f$x\\f$ and \\f$y\\f$ vectors.\n\n  \\p rocsparse_spsv supports \\ref rocsparse_indextype_i32 and \\ref rocsparse_indextype_i64 index types for\n  storing the row pointer and column indices arrays of the sparse matrices. \\p rocsparse_spsv supports the following\n  data types for \\f$op(A)\\f$, \\f$x\\f$, \\f$y\\f$ and compute types for \\f$\\alpha\\f$:\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"spsv_uniform\">Uniform Precisions</caption>\n  <tr><th>A / X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\note\n  The sparse matrix formats currently supported are: \\ref rocsparse_format_coo and \\ref rocsparse_format_csr.\n\n  \\note\n  Only the \\ref rocsparse_spsv_stage_buffer_size stage and the \\ref rocsparse_spsv_stage_compute stage are non-blocking\n  and executed asynchronously with respect to the host. They can return before the actual computation has finished.\n  The \\ref rocsparse_spsv_stage_preprocess stage is blocking with respect to the host.\n\n  \\note\n  Currently, only \\p trans == \\ref rocsparse_operation_none and \\p trans == \\ref rocsparse_operation_transpose is supported.\n\n  \\note\n  Only the \\ref rocsparse_spsv_stage_buffer_size stage and the \\ref rocsparse_spsv_stage_compute stage\n  support execution in a hipGraph context. The \\ref rocsparse_spsv_stage_preprocess stage does not support hipGraph.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  trans        matrix operation type.\n  @param[in]\n  alpha        scalar \\f$\\alpha\\f$.\n  @param[in]\n  mat          matrix descriptor.\n  @param[in]\n  x            vector descriptor.\n  @param[inout]\n  y            vector descriptor.\n  @param[in]\n  compute_type floating point precision for the SpSV computation.\n  @param[in]\n  alg          SpSV algorithm for the SpSV computation.\n  @param[in]\n  stage        SpSV stage for the SpSV computation.\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer.\n  @param[in]\n  temp_buffer  temporary storage buffer allocated by the user. When the\n               \\ref rocsparse_spsv_stage_buffer_size stage is passed,\n               the required allocation size (in bytes) is written to \\p buffer_size and the\n               function returns without performing the SpSV operation.\n               This buffer is non-persistent, and no data is stored in it. Therefore, this memory\n               can be freed or reused for other tasks between the analysis phase and the compute phase.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p alpha, \\p mat, \\p x, \\p y, or\n               \\p buffer_size pointer is invalid.\n  \\retval      rocsparse_status_not_implemented \\p trans, \\p compute_type, \\p stage, or \\p alg is\n               currently not supported.\n\n  \\par Example\n  \\snippet example_rocsparse_spsv.cpp doc example"]
    pub fn rocsparse_spsv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        alpha: *const ::std::os::raw::c_void,
        mat: rocsparse_const_spmat_descr,
        x: rocsparse_const_dnvec_descr,
        y: rocsparse_dnvec_descr,
        compute_type: rocsparse_datatype,
        alg: rocsparse_spsv_alg,
        stage: rocsparse_spsv_stage,
        buffer_size: *mut usize,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\details\n  \\p rocsparse_sptrsm_buffer_size returns the size of the required buffer to execute the given stage of the SpTrSM operation.\n  This routine is used in conjunction with \\ref rocsparse_sptrsm(). See \\ref rocsparse_sptrsm for a full description and example.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched execution.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  sptrsm_descr SpTrSM descriptor.\n  @param[in]\n  A  sparse matrix descriptor.\n  @param[in]\n  X            dense matrix descriptor.\n  @param[in]\n  Y            dense matrix descriptor.\n  @param[in]\n  sptrsm_stage stage for the SpTrSM computation.\n  @param[out]\n  buffer_size_in_bytes  number of bytes of the buffer.\n  @param[out]\n  p_error      error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value the \\p sptrsm_stage value is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p A, \\p X, \\p Y, \\p sptrsm_descr, or \\p buffer_size_in_bytes pointer is invalid."]
    pub fn rocsparse_sptrsm_buffer_size(
        handle: rocsparse_handle,
        sptrsm_descr: rocsparse_sptrsm_descr,
        A: rocsparse_const_spmat_descr,
        X: rocsparse_const_dnmat_descr,
        Y: rocsparse_const_dnmat_descr,
        sptrsm_stage: rocsparse_sptrsm_stage,
        buffer_size_in_bytes: *mut usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse triangular system solve with multiple right-hand sides.\n\n  \\details\n  \\p rocsparse_sptrsm solves a triangular linear system of equations defined by a sparse \\f$m \\times m\\f$ square matrix \\f$op(A)\\f$,\n  given in CSR or COO storage format, such that\n  \\f[\n    op(A) \\cdot Y = \\alpha \\cdot op(X),\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(X) = \\left\\{\n    \\begin{array}{ll}\n        X,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        X^T, & \\text{if trans_B == rocsparse_operation_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and where \\f$Y\\f$ is the dense solution matrix and \\f$X\\f$ is the dense right-hand side matrix. Both \\f$X\\f$\n  and \\f$Y\\f$ can be in row or column order.\n\n  Performing the above operation requires two stages, the stage \\ref rocsparse_sptrsm_stage_analysis and the stage \\ref rocsparse_sptrsm_stage_compute.\n  The stage \\ref rocsparse_sptrsm_stage_analysis is required to perform the stage \\ref rocsparse_sptrsm_stage_compute and only needs to be called once for a given sparse matrix \\f$op(A)\\f$, while the stage \\ref rocsparse_sptrsm_stage_compute can be repeatedly used with different \\f$X\\f$ and \\f$Y\\f$ matrices.\n\n  As noted above, both \\f$X\\f$ and \\f$Y\\f$ can be in row or column order (this includes mixing the order so that \\f$X\\f$ is in\n  row order and \\f$Y\\f$ in column order and vice versa). Internally, however, rocSPARSE kernels solve the system assuming the\n  matrices \\f$X\\f$ and \\f$Y\\f$ are in row order, as this provides the best memory access. This means that if the matrix\n  \\f$Y\\f$ is not in row order and/or the matrix \\f$X\\f$ is not in row order (or \\f$X^{T}\\f$ is not in column order as this is\n  equivalent to being in row order), then internally, memory copies and/or transposing of data might be performed to get them\n  into the correct order (possibly using extra buffer size). After the computation is completed, additional memory copies and/or\n  transposing of data might be performed to get them back into the user arrays. For the best performance and smallest required\n  temporary storage buffers, use row order for the matrix \\f$Y\\f$ and row order for the matrix \\f$X\\f$ (or column order if\n  \\f$X\\f$ is being transposed).\n\n  \\p rocsparse_sptrsm supports \\ref rocsparse_indextype_i32 and \\ref rocsparse_indextype_i64 index precisions for storing the\n  row pointer and column indices arrays of the sparse matrices. \\p rocsparse_sptrsm supports the following data types for\n  \\f$op(A)\\f$, \\f$op(X)\\f$, \\f$Y\\f$, and compute types for \\f$\\alpha\\f$:\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"sptrsm_uniform\">Uniform Precisions</caption>\n  <tr><th>A / X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\note\n  The sparse matrix formats currently supported are: \\ref rocsparse_format_coo and \\ref rocsparse_format_csr.\n\n  \\note\n  Only the \\ref rocsparse_sptrsm_stage_compute stage is non-blocking\n  and executed asynchronously with respect to the host. It can return before the actual computation has finished.\n  The \\ref rocsparse_sptrsm_stage_analysis stage is blocking with respect to the host.\n\n  \\note\n  Currently, only \\p trans_A == \\ref rocsparse_operation_none and \\p trans_A == \\ref rocsparse_operation_transpose are supported.\n  Currently, only \\p trans_X == \\ref rocsparse_operation_none and \\p trans_X == \\ref rocsparse_operation_transpose are supported.\n\n  \\note\n  Only the stage \\ref rocsparse_sptrsm_stage_compute\n  supports execution in a hipGraph context. The \\ref rocsparse_sptrsm_stage_analysis stage does not support hipGraph.\n\n  \\note\n  This routine does not support batched execution.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  sptrsm_descr           SpTrSM routine descriptor.\n  @param[in]\n  A           sparse matrix descriptor.\n  @param[in]\n  X           dense matrix descriptor.\n  @param[inout]\n  Y           dense matrix descriptor.\n  @param[in]\n  sptrsm_stage SpTrSM stage for the SpTrSM computation.\n  @param[out]\n  buffer_size_in_bytes  number of bytes of the temporary storage buffer.\n  @param[in]\n  buffer  temporary storage buffer allocated by the user.\n  @param[out]\n  p_error      error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p A, X, \\p Y, \\p sptrsm_descr, or\n               \\p buffer_size pointer is invalid.\n  \\retval      rocsparse_status_not_implemented the configuration of the descriptor \\p sptrsm_descr is currently not supported.\n  \\par Example\n  \\snippet example_rocsparse_sptrsm.cpp doc example"]
    pub fn rocsparse_sptrsm(
        handle: rocsparse_handle,
        sptrsm_descr: rocsparse_sptrsm_descr,
        A: rocsparse_const_spmat_descr,
        X: rocsparse_const_dnmat_descr,
        Y: rocsparse_dnmat_descr,
        sptrsm_stage: rocsparse_sptrsm_stage,
        buffer_size_in_bytes: usize,
        buffer: *mut ::std::os::raw::c_void,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\details\n  \\p rocsparse_sptrsv_buffer_size returns the size of the required buffer to execute the given stage of the SpTrSV operation.\n  This routine is used in conjunction with \\ref rocsparse_sptrsv(). See \\ref rocsparse_sptrsv for a full description and example.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  sptrsv_descr SpTrSV descriptor.\n  @param[in]\n  spmat_descr  sparse matrix descriptor.\n  @param[in]\n  x            dense vector descriptor.\n  @param[in]\n  y            dense vector descriptor.\n  @param[in]\n  sptrsv_stage stage for the SpTrSV computation.\n  @param[out]\n  buffer_size_in_bytes  number of bytes of the buffer.\n  @param[out]\n  p_error      error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value the \\p sptrsv_stage value is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p sptrsv_descr, \\p spmat_descr, \\p x, \\p y, or \\p buffer_size_in_bytes pointer is invalid."]
    pub fn rocsparse_sptrsv_buffer_size(
        handle: rocsparse_handle,
        sptrsv_descr: rocsparse_sptrsv_descr,
        spmat_descr: rocsparse_const_spmat_descr,
        x: rocsparse_const_dnvec_descr,
        y: rocsparse_const_dnvec_descr,
        sptrsv_stage: rocsparse_sptrsv_stage,
        buffer_size_in_bytes: *mut usize,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse triangular solve.\n\n  \\details\n  \\p rocsparse_sptrsv solves a triangular linear system of equations defined by a sparse \\f$m \\times m\\f$ square matrix \\f$op(A)\\f$,\n  such that\n  \\f[\n    op(A) \\cdot y = \\alpha \\cdot x,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if op == rocsparse_operation_none} \\\\\n        A^T, & \\text{if op == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if op == rocsparse_operation_conjugate_transpose} \\\\\n    \\end{array}\n    \\right.\n  \\f]\n  and where \\f$y\\f$ is the dense solution vector and \\f$x\\f$ is the dense right-hand side vector.\n\n  Performing the above operation requires two stages, the stage \\ref rocsparse_sptrsv_stage_analysis and the stage \\ref rocsparse_sptrsv_stage_compute.\n  The stage \\ref rocsparse_sptrsv_stage_analysis is required to perform the stage \\ref rocsparse_sptrsv_stage_compute and only need to be called once for a given sparse matrix \\f$op(A)\\f$, while the stage \\ref rocsparse_sptrsv_stage_compute can be repeatedly used with different \\f$x\\f$ and \\f$y\\f$ vectors.\n\n  \\p rocsparse_sptrsv supports the following\n  data types for \\f$op(A)\\f$, \\f$x\\f$, \\f$y\\f$, and scalar \\f$\\alpha\\f$:\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"sptrsv_uniform\">Uniform Precisions</caption>\n  <tr><th>A / X / Y / scalar\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\note The descriptor \\p rocsparse_sptrsv_descr needs to be configured with \\ref rocsparse_sptrsv_set_input.\n  \\note\n  The sparse matrix formats currently supported are: \\ref rocsparse_format_coo and \\ref rocsparse_format_csr.\n\n  \\note\n  the \\ref rocsparse_sptrsv_stage_compute stage is non-blocking\n  and executed asynchronously with respect to the host. It can return before the actual computation has finished.\n  The \\ref rocsparse_sptrsv_stage_analysis stage is blocking with respect to the host.\n\n  \\note\n  Currently, only \\p trans == \\ref rocsparse_operation_none and \\p trans == \\ref rocsparse_operation_transpose are supported.\n  Only the \\ref rocsparse_sptrsv_stage_compute stage\n  supports execution in a hipGraph context. The \\ref rocsparse_sptrsv_stage_analysis stage does not support hipGraph.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  sptrsv_descr descriptor of the routine.\n  @param[in]\n  A            matrix descriptor.\n  @param[in]\n  x            vector descriptor.\n  @param[inout]\n  y            vector descriptor.\n  @param[in]\n  sptrsv_stage stage for the SpTRSV computation.\n  @param[in]\n  buffer_size_in_bytes  number of bytes of the buffer.\n  @param[in]\n  buffer       buffer allocated by the user.\n  @param[out]\n  p_error      error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if the user is not interested in obtaining an error descriptor.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p sptrsv_descr, \\p A, \\p x, or \\p y is invalid, or \\p buffer is null and \\p buffer_size_in_bytes is non-zero, or \\p buffer is not null and \\p buffer_size_in_bytes is zero.\n  \\retval      rocsparse_status_invalid_value \\p sptrsv_stage is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_sptrsv.cpp doc example"]
    pub fn rocsparse_sptrsv(
        handle: rocsparse_handle,
        sptrsv_descr: rocsparse_sptrsv_descr,
        A: rocsparse_const_spmat_descr,
        x: rocsparse_const_dnvec_descr,
        y: rocsparse_dnvec_descr,
        sptrsv_stage: rocsparse_sptrsv_stage,
        buffer_size_in_bytes: usize,
        buffer: *mut ::std::os::raw::c_void,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse vector inner dot product.\n\n  \\details\n  \\p rocsparse_spvv computes the inner dot product of the sparse vector \\f$x\\f$ with the\n  dense vector \\f$y\\f$, such that\n  \\f[\n    \\text{result} := op(x) \\cdot y,\n  \\f]\n  with\n  \\f[\n    op(x) = \\left\\{\n    \\begin{array}{ll}\n        x,   & \\text{if trans == rocsparse_operation_none} \\\\\n        \\bar{x}, & \\text{if trans == rocsparse_operation_conjugate_transpose} \\\\\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\code{.c}\n      result = 0;\n      for(i = 0; i < nnz; ++i)\n      {\n          result += x_val[i] * y[x_ind[i]];\n      }\n  \\endcode\n\n  Performing the above operation involves two steps. First, call \\p rocsparse_spvv with \\p temp_buffer set to \\p nullptr,\n  which will return the required temporary buffer size in the parameter \\p buffer_size. Then allocate this buffer. Finally,\n  complete the computation by calling \\p rocsparse_spvv a second time with the newly allocated buffer. After the\n  computation is complete, deallocate the buffer.\n\n  \\p rocsparse_spvv supports the following uniform and mixed-precision data types for the sparse and dense vectors \\f$x\\f$ and\n  \\f$y\\f$ and compute types for the scalar \\p result.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"spvv_uniform\">Uniform Precisions</caption>\n  <tr><th>X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\par Mixed Precisions:\n  <table>\n  <caption id=\"spvv_mixed\">Mixed Precisions</caption>\n  <tr><th>X / Y                     <th>compute_type / result\n  <tr><td>rocsparse_datatype_i8_r   <td>rocsparse_datatype_i32_r\n  <tr><td>rocsparse_datatype_i8_r   <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_f32_r\n  </table>\n\n  \\note\n  This function writes the required allocation size (in bytes) to \\p buffer_size and\n  returns without performing the SpVV operation when a nullptr is passed for\n  \\p temp_buffer.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  trans        sparse vector operation type.\n  @param[in]\n  x            sparse vector descriptor.\n  @param[in]\n  y            dense vector descriptor.\n  @param[out]\n  result       pointer to the result, which can be in host or device memory.\n  @param[in]\n  compute_type floating point precision for the SpVV computation.\n  @param[out]\n  buffer_size  number of bytes of the temporary storage buffer. buffer_size is set when\n               \\p temp_buffer is nullptr.\n  @param[in]\n  temp_buffer  temporary storage buffer allocated by the user. When a nullptr is passed,\n               the required allocation size (in bytes) is written to \\p buffer_size and the\n               function returns without performing the SpVV operation.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p x, \\p y, \\p result, or \\p buffer_size\n               pointer is invalid.\n  \\retval      rocsparse_status_not_implemented \\p compute_type is currently not\n               supported.\n\n  \\par Example\n  \\snippet example_rocsparse_spvv.cpp doc example"]
    pub fn rocsparse_spvv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        x: rocsparse_const_spvec_descr,
        y: rocsparse_const_dnvec_descr,
        result: *mut ::std::os::raw::c_void,
        compute_type: rocsparse_datatype,
        buffer_size: *mut usize,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\details\n  \\p rocsparse_v2_spmv_buffer_size returns the size of the required buffer to execute the given stage of the Version 2 SpMV operation.\n  This routine is used in conjunction with \\ref rocsparse_v2_spmv(). See \\ref rocsparse_v2_spmv for a full description and example.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  descr        SpMV descriptor.\n  @param[in]\n  mat          sparse matrix descriptor.\n  @param[in]\n  x            dense vector descriptor.\n  @param[in]\n  y            dense vector descriptor.\n  @param[in]\n  stage        Version 2 SpMV stage for the SpMV computation.\n  @param[out]\n  buffer_size_in_bytes  number of bytes of the buffer.\n  @param[out]\n  error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value the \\p stage value is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p mat, \\p x, \\p y, \\p descr, or \\p buffer_size_in_bytes pointer is invalid."]
    pub fn rocsparse_v2_spmv_buffer_size(
        handle: rocsparse_handle,
        descr: rocsparse_spmv_descr,
        mat: rocsparse_const_spmat_descr,
        x: rocsparse_const_dnvec_descr,
        y: rocsparse_const_dnvec_descr,
        stage: rocsparse_v2_spmv_stage,
        buffer_size_in_bytes: *mut usize,
        error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Sparse matrix vector multiplication.\n\n  \\details\n  \\p rocsparse_v2_spmv multiplies the scalar \\f$\\alpha\\f$ with a sparse \\f$m \\times n\\f$ matrix \\f$op(A)\\f$ with the dense vector \\f$x\\f$ and adds the result to the dense vector \\f$y\\f$\n  that is multiplied by the scalar \\f$\\beta\\f$, such that\n  \\f[\n    y := \\alpha \\cdot op(A) \\cdot x + \\beta \\cdot y,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\note The sparse matrix format \\ref rocsparse_format_bell is not supported.\n\n  Performing the above operation involves two stages. The first stage is \\ref rocsparse_v2_spmv_stage_analysis. This will perform an analysis\n  of the symbolic information of \\f$op(A)\\f$. The second stage is \\ref rocsparse_v2_spmv_stage_compute, which corresponds to the actual calculation.\n  The size of the buffer required for each stage is determined by calling the routine \\ref rocsparse_v2_spmv_buffer_size.\n  The stage \\ref rocsparse_v2_spmv_stage_analysis only needs to be called once for a given sparse matrix \\f$op(A)\\f$, while the computation stage can be repeatedly used\n  with different \\f$x\\f$ and \\f$y\\f$ vectors.\n\n  \\note The stage \\ref rocsparse_v2_spmv_stage_analysis is mandatory. An error will be returned if that stage was not executed before the stage \\ref rocsparse_v2_spmv_stage_compute.\n\n  \\p rocsparse_v2_spmv supports multiple algorithms. These algorithms have different trade-offs depending on the sparsity pattern of the matrix,\n  whether or not the results need to be deterministic, and how many times the sparse-vector product will be performed.\n\n  <table>\n  <caption id=\"v2_spmv_csr_algorithms\">CSR/CSC Algorithms</caption>\n  <tr><th>Algorithm                            <th>Deterministic  <th>Notes\n  <tr><td>rocsparse_spmv_alg_csr_rowsplit</td> <td>Yes</td>       <td>This is best suited for matrices with all rows having a similar number of non-zeros. Can outperform adaptive and LRB algorithms in certain sparsity patterns. Will perform very poorly if some rows have few non-zeros and some rows have many non-zeros.</td>\n  <tr><td>rocsparse_spmv_alg_csr_stream</td>   <td>Yes</td>       <td>[Deprecated] The old name for rocsparse_spmv_alg_csr_rowsplit.</td>\n  <tr><td>rocsparse_spmv_alg_csr_adaptive</td> <td>No</td>        <td>Generally the fastest algorithm across all matrix sparsity patterns. This includes matrices that have some rows with many non-zeros and some rows with few non-zeros. Requires lengthy preprocessing that needs to be amortized over many subsequent sparse vector products.</td>\n  <tr><td>rocsparse_spmv_alg_csr_lrb</td>      <td>No</td>        <td>Like the adaptive algorithm, this generally performs well across all matrix sparsity patterns. Generally not as fast as the adaptive algorithm. However, it uses a much faster preprocessing step. Good for when only a small number of sparse vector products will be performed.</td>\n  <tr><td>rocsparse_spmv_alg_csr_nnzsplit</td> <td>No</td>        <td>Like the adaptive algorithm, this generally performs well across all matrix sparsity patterns. Generally not as fast as the adaptive algorithm but faster than the LRB algorithm. It uses a much faster preprocessing step than LRB. It's good when the number of sparse vector products that will be performed is less than one hundred. If more products need to be computed, the adaptive algorithm is probably faster.</td>\n  </table>\n\n  <table>\n  <caption id=\"v2_spmv_coo_algorithms\">COO Algorithms</caption>\n  <tr><th>COO Algorithms                     <th>Deterministic   <th>Notes\n  <tr><td>rocsparse_spmv_alg_coo</td>        <td>Yes</td>        <td>Generally not as fast as the atomic algorithm but is deterministic.</td>\n  <tr><td>rocsparse_spmv_alg_coo_atomic</td> <td>No</td>         <td>Generally the fastest COO algorithm.</td>\n  </table>\n\n  <table>\n  <caption id=\"v2_spmv_ell_algorithms\">ELL Algorithms</caption>\n  <tr><th>ELL Algorithms                <th>Deterministic   <th>Notes\n  <tr><td>rocsparse_spmv_alg_ell</td>   <td>Yes</td>        <td></td>\n  </table>\n\n  <table>\n  <caption id=\"v2_spmv_sell_algorithms\">Sliced ELL Algorithms</caption>\n  <tr><th>Sliced ELL Algorithms          <th>Deterministic   <th>Notes\n  <tr><td>rocsparse_spmv_alg_sell</td>   <td>Yes</td>        <td></td>\n  </table>\n\n  <table>\n  <caption id=\"v2_spmv_bsr_algorithms\">BSR Algorithms</caption>\n  <tr><th>BSR Algorithm                 <th>Deterministic   <th>Notes\n  <tr><td>rocsparse_spmv_alg_bsr</td>   <td>Yes</td>        <td></td>\n  </table>\n\n  \\p rocsparse_v2_spmv supports multiple combinations of data types and compute types. The tables below indicate the currently\n  supported different data types that can be used for the sparse matrix \\f$op(A)\\f$, the dense vectors \\f$x\\f$ and\n  \\f$y\\f$, and the compute type for \\f$\\alpha\\f$ and \\f$\\beta\\f$. The advantage of using different data types is to save on\n  memory bandwidth and storage when a user application allows, while performing the actual computation in a higher precision.\n\n  \\par Uniform Precisions:\n  <table>\n  <caption id=\"v2_spmv_uniform\">Uniform Precisions</caption>\n  <tr><th>A / X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_c\n  </table>\n\n  \\par Mixed Precisions:\n  <table>\n  <caption id=\"v2_spmv_mixed\">Mixed Precisions</caption>\n  <tr><th>A / X                     <th>Y                         <th>compute_type\n  <tr><td>rocsparse_datatype_i8_r   <td>rocsparse_datatype_i32_r  <td>rocsparse_datatype_i32_r\n  <tr><td>rocsparse_datatype_i8_r   <td>rocsparse_datatype_f32_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f32_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f16_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_f32_r  <td>rocsparse_datatype_f32_r\n  <tr><td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_bf16_r <td>rocsparse_datatype_f32_r\n  </table>\n\n  \\par Mixed-regular Real Precisions\n  <table>\n  <caption id=\"v2_spmv_mixed_regular_real\">Mixed-regular Real Precisions</caption>\n  <tr><th>A                        <th>X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r <td>rocsparse_datatype_f64_r\n  <tr><td>rocsparse_datatype_f32_c <td>rocsparse_datatype_f64_c\n  </table>\n\n  \\par Mixed-regular Complex Precisions\n  <table>\n  <caption id=\"v2_spmv_mixed_regular_complex\">Mixed-regular Complex Precisions</caption>\n  <tr><th>A                        <th>X / Y / compute_type\n  <tr><td>rocsparse_datatype_f32_r <td>rocsparse_datatype_f32_c\n  <tr><td>rocsparse_datatype_f64_r <td>rocsparse_datatype_f64_c\n  </table>\n\n  \\p rocsparse_v2_spmv supports \\ref rocsparse_indextype_i32 and \\ref rocsparse_indextype_i64 index precisions\n  for storing the row pointer and column indices arrays of the sparse matrices.\n\n  \\note\n  None of the algorithms above are deterministic when \\f$A\\f$ is transposed.\n\n  \\note\n  All the sparse matrix formats are supported except \\ref rocsparse_format_bell.\n\n  \\note\n  The \\ref rocsparse_v2_spmv_stage_compute stage is non-blocking\n  and executed asynchronously with respect to the host. It can return before the actual computation has finished.\n  The stage \\ref rocsparse_v2_spmv_stage_analysis is blocking with respect to the host.\n\n  \\note\n  Only the stage \\ref rocsparse_v2_spmv_stage_compute\n  supports execution in a hipGraph context. The \\ref rocsparse_v2_spmv_stage_analysis stage does not support hipGraph.\n\n  \\note\n  This routine does not support batched computation.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  descr        SpMV descriptor.\n  @param[in]\n  alpha        scalar \\f$\\alpha\\f$.\n  @param[in]\n  mat          matrix descriptor.\n  @param[in]\n  x            vector descriptor.\n  @param[in]\n  beta         scalar \\f$\\beta\\f$.\n  @param[inout]\n  y            vector descriptor.\n  @param[in]\n  stage        SpMV stage of the SpMV algorithm.\n  @param[in]\n  buffer_size_in_bytes  size in bytes of the buffer, which must be greater or equal to the buffer size obtained from \\ref rocsparse_v2_spmv_buffer_size.\n  @param[in]\n  buffer       temporary buffer allocated by the user.\n  @param[out]\n  error        error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval      rocsparse_status_success the operation completed successfully.\n  \\retval      rocsparse_status_invalid_handle the library context \\p handle was not initialized.\n  \\retval      rocsparse_status_invalid_pointer \\p alpha, \\p mat, \\p x, \\p beta, \\p y, or\n               \\p buffer pointer is invalid.\n  \\retval      rocsparse_status_invalid_value the value of \\p stage is invalid.\n  \\retval      rocsparse_status_not_implemented if \\p alg is not supported or if the mixed precision configuration is not supported.\n\n  \\par Example\n  \\snippet example_rocsparse_v2_spmv.cpp doc example"]
    pub fn rocsparse_v2_spmv(
        handle: rocsparse_handle,
        descr: rocsparse_spmv_descr,
        alpha: *const ::std::os::raw::c_void,
        mat: rocsparse_const_spmat_descr,
        x: rocsparse_const_dnvec_descr,
        beta: *const ::std::os::raw::c_void,
        y: rocsparse_dnvec_descr,
        stage: rocsparse_v2_spmv_stage,
        buffer_size_in_bytes: usize,
        buffer: *mut ::std::os::raw::c_void,
        error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Set extra scalar and vector parameters for SpMV.\n\n  \\details\n  \\p rocsparse_spmv_set_extra sets a gamma dnvec vector and z vectors that are\n  appended to the SpMV computation. The computation will be:\n  \\f$y = \\alpha * op(A) * x + \\beta * y + \\sum_{i=1}^{n} \\gamma_i z_i\\f$\n  where \\f$n\\f$ is the number of extra terms set by \\p num_extras.\n\n  This feature can be used to implement residual calculations of the form\n  \\f$r = b - A * x\\f$ within the SpMV call by setting \\f$\\gamma = 1\\f$ and \\f$z = b\\f$.\n\n  \\par Data type Requirements\n  The following data type requirements must be satisfied:\n  - The \\p gamma_vec data type must match the scalar data type set using\n    \\ref rocsparse_spmv_set_input with \\p rocsparse_spmv_input_scalar_datatype.\n  - All \\p z_vecs must have the same data type as the compute data type set using\n    \\ref rocsparse_spmv_set_input with \\p rocsparse_spmv_input_compute_datatype.\n  - The size of \\p gamma_vec must equal \\p num_extras.\n  - All \\p z_vecs must have the same size (vector length).\n  - Both scalar and compute data types must be set on the descriptor before calling this function.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[inout]\n  descr           SpMV descriptor.\n  @param[in]\n  num_extras      number of extra terms (gamma/z pairs).\n  @param[in]\n  gamma_vec       dense vector descriptor containing gamma scalars. Must have a data type matching\n                  the scalar datatype and a size equal to \\p num_extras.\n  @param[in]\n  z_vecs          array of dense vector descriptors for z vectors. All vectors must have a\n                  data type matching the compute data type and have the same size.\n  @param[out]\n  p_error         error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_pointer \\p descr, \\p gamma_vec, or \\p z_vecs is invalid.\n  \\retval rocsparse_status_invalid_value invalid parameters, including data type mismatches\n          or missing scalar/compute data type configuration.\n  \\retval rocsparse_status_invalid_size size mismatches between \\p gamma_vec and \\p num_extras,\n          or between \\p z_vecs elements."]
    pub fn rocsparse_spmv_set_extra(
        handle: rocsparse_handle,
        descr: rocsparse_spmv_descr,
        num_extras: i64,
        gamma_vec: rocsparse_const_dnvec_descr,
        z_vecs: *mut rocsparse_const_dnvec_descr,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup generic_module\n  \\brief Clear extra parameters for SpMV.\n\n  \\details\n  \\p rocsparse_spmv_clear_extra clears the extra parameters set by\n  \\ref rocsparse_spmv_set_extra.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[inout]\n  descr           SpMV descriptor.\n  @param[out]\n  p_error         error descriptor created if the returned status is not \\ref rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_pointer \\p descr is invalid."]
    pub fn rocsparse_spmv_clear_extra(
        handle: rocsparse_handle,
        descr: rocsparse_spmv_descr,
        p_error: *mut rocsparse_error,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level1_module\n  \\brief Scale a sparse vector and add it to a dense vector.\n\n  \\details\n  \\p rocsparse_axpyi multiplies the sparse vector \\f$x\\f$ with scalar \\f$\\alpha\\f$ and\n  adds the result to the dense vector \\f$y\\f$, such that\n\n  \\f[\n      y := y + \\alpha \\cdot x\n  \\f]\n\n  \\code{.c}\n      for(i = 0; i < nnz; ++i)\n      {\n          y[x_ind[i]] = y[x_ind[i]] + alpha * x_val[i];\n      }\n  \\endcode\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  nnz         number of non-zero entries of vector \\f$x\\f$.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  x_val       array of \\p nnz elements containing the values of \\f$x\\f$.\n  @param[in]\n  x_ind       array of \\p nnz elements containing the indices of the non-zero\n              values of \\f$x\\f$.\n  @param[inout]\n  y           array of values in dense format.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base is invalid.\n  \\retval rocsparse_status_invalid_size \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p alpha, \\p x_val, \\p x_ind, or \\p y pointer\n          is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_axpyi.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_saxpyi(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        alpha: *const f32,
        x_val: *const f32,
        x_ind: *const rocsparse_int,
        y: *mut f32,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_daxpyi(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        alpha: *const f64,
        x_val: *const f64,
        x_ind: *const rocsparse_int,
        y: *mut f64,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_caxpyi(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        x_val: *const rocsparse_float_complex,
        x_ind: *const rocsparse_int,
        y: *mut rocsparse_float_complex,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zaxpyi(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        x_val: *const rocsparse_double_complex,
        x_ind: *const rocsparse_int,
        y: *mut rocsparse_double_complex,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level1_module\n  \\brief Compute the dot product of a complex conjugate sparse vector with a dense\n  vector.\n\n  \\details\n  \\p rocsparse_dotci computes the dot product of the complex conjugate sparse vector\n  \\f$x\\f$ with the dense vector \\f$y\\f$, such that\n  \\f[\n    \\text{result} := \\bar{x}^H y\n  \\f]\n\n  \\code{.c}\n      result = 0\n      for(i = 0; i < nnz; ++i)\n      {\n          result += conj(x_val[i]) * y[x_ind[i]];\n      }\n  \\endcode\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  nnz         number of non-zero entries of vector \\f$x\\f$.\n  @param[in]\n  x_val       array of \\p nnz values.\n  @param[in]\n  x_ind       array of \\p nnz elements containing the indices of the non-zero\n              values of \\f$x\\f$.\n  @param[in]\n  y           array of values in dense format.\n  @param[out]\n  result      pointer to the result, which can be in host or device memory.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base is invalid.\n  \\retval rocsparse_status_invalid_size \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p x_val, \\p x_ind, \\p y, or \\p result\n          pointer is invalid.\n  \\retval rocsparse_status_memory_error the buffer for the dot product reduction\n          could not be allocated.\n  \\retval rocsparse_status_internal_error an internal error occurred.\n/\n/**@{"]
    pub fn rocsparse_cdotci(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *const rocsparse_float_complex,
        x_ind: *const rocsparse_int,
        y: *const rocsparse_float_complex,
        result: *mut rocsparse_float_complex,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zdotci(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *const rocsparse_double_complex,
        x_ind: *const rocsparse_int,
        y: *const rocsparse_double_complex,
        result: *mut rocsparse_double_complex,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level1_module\n  \\brief Compute the dot product of a sparse vector with a dense vector.\n\n  \\details\n  \\p rocsparse_doti computes the dot product of the sparse vector \\f$x\\f$ with the\n  dense vector \\f$y\\f$, such that\n  \\f[\n    \\text{result} := y^T x\n  \\f]\n\n  \\code{.c}\n      result = 0\n      for(i = 0; i < nnz; ++i)\n      {\n          result += x_val[i] * y[x_ind[i]];\n      }\n  \\endcode\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  nnz         number of non-zero entries of vector \\f$x\\f$.\n  @param[in]\n  x_val       array of \\p nnz values.\n  @param[in]\n  x_ind       array of \\p nnz elements containing the indices of the non-zero\n              values of \\f$x\\f$.\n  @param[in]\n  y           array of values in dense format.\n  @param[out]\n  result      pointer to the result, which can be in host or device memory.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base is invalid.\n  \\retval rocsparse_status_invalid_size \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p x_val, \\p x_ind, \\p y, or \\p result\n          pointer is invalid.\n  \\retval rocsparse_status_memory_error the buffer for the dot product reduction\n          could not be allocated.\n  \\retval rocsparse_status_internal_error an internal error occurred.\n\n  \\par Example\n  \\snippet example_rocsparse_doti.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sdoti(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *const f32,
        x_ind: *const rocsparse_int,
        y: *const f32,
        result: *mut f32,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ddoti(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *const f64,
        x_ind: *const rocsparse_int,
        y: *const f64,
        result: *mut f64,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cdoti(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *const rocsparse_float_complex,
        x_ind: *const rocsparse_int,
        y: *const rocsparse_float_complex,
        result: *mut rocsparse_float_complex,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zdoti(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *const rocsparse_double_complex,
        x_ind: *const rocsparse_int,
        y: *const rocsparse_double_complex,
        result: *mut rocsparse_double_complex,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level1_module\n  \\brief Gather elements from a dense vector and store them in a sparse vector.\n\n  \\details\n  \\p rocsparse_gthr gathers the elements that are listed in \\p x_ind from the dense\n  vector \\f$y\\f$ and stores them in the sparse vector \\f$x\\f$.\n\n  \\code{.c}\n      for(i = 0; i < nnz; ++i)\n      {\n          x_val[i] = y[x_ind[i]];\n      }\n  \\endcode\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  nnz         number of non-zero entries of \\f$x\\f$.\n  @param[in]\n  y           array of values in dense format.\n  @param[out]\n  x_val       array of \\p nnz elements containing the values of \\f$x\\f$.\n  @param[in]\n  x_ind       array of \\p nnz elements containing the indices of the non-zero\n              values of \\f$x\\f$.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_value \\p idx_base is invalid.\n  \\retval     rocsparse_status_invalid_size \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p y, \\p x_val, or \\p x_ind pointer is\n              invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_gthr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgthr(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        y: *const f32,
        x_val: *mut f32,
        x_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgthr(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        y: *const f64,
        x_val: *mut f64,
        x_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgthr(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        y: *const rocsparse_float_complex,
        x_val: *mut rocsparse_float_complex,
        x_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgthr(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        y: *const rocsparse_double_complex,
        x_val: *mut rocsparse_double_complex,
        x_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level1_module\n  \\brief Gather and zero out elements from a dense vector and store them in a sparse\n  vector.\n\n  \\details\n  \\p rocsparse_gthrz gathers the elements that are listed in \\p x_ind from the dense\n  vector \\f$y\\f$ and stores them in the sparse vector \\f$x\\f$. The gathered elements\n  in \\f$y\\f$ are replaced by zero.\n\n  \\code{.c}\n      for(i = 0; i < nnz; ++i)\n      {\n          x_val[i]    = y[x_ind[i]];\n          y[x_ind[i]] = 0;\n      }\n  \\endcode\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  nnz         number of non-zero entries of \\f$x\\f$.\n  @param[inout]\n  y           array of values in dense format.\n  @param[out]\n  x_val       array of \\p nnz elements containing the non-zero values of \\f$x\\f$.\n  @param[in]\n  x_ind       array of \\p nnz elements containing the indices of the non-zero\n              values of \\f$x\\f$.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_value \\p idx_base is invalid.\n  \\retval     rocsparse_status_invalid_size \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p y, \\p x_val, or \\p x_ind pointer is\n              invalid.\n/\n/**@{"]
    pub fn rocsparse_sgthrz(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        y: *mut f32,
        x_val: *mut f32,
        x_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgthrz(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        y: *mut f64,
        x_val: *mut f64,
        x_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgthrz(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        y: *mut rocsparse_float_complex,
        x_val: *mut rocsparse_float_complex,
        x_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgthrz(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        y: *mut rocsparse_double_complex,
        x_val: *mut rocsparse_double_complex,
        x_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level1_module\n  \\brief Apply Givens rotation to a dense and a sparse vector.\n\n  \\details\n  \\p rocsparse_roti applies the Givens rotation matrix \\f$G\\f$ to the sparse vector\n  \\f$x\\f$ and the dense vector \\f$y\\f$, where\n  \\f[\n    G = \\begin{pmatrix} c & s \\\\ -s & c \\end{pmatrix}\n  \\f]\n\n  \\code{.c}\n      for(i = 0; i < nnz; ++i)\n      {\n          x_tmp = x_val[i];\n          y_tmp = y[x_ind[i]];\n\n          x_val[i]    = c * x_tmp + s * y_tmp;\n          y[x_ind[i]] = c * y_tmp - s * x_tmp;\n      }\n  \\endcode\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  nnz         number of non-zero entries of \\f$x\\f$.\n  @param[inout]\n  x_val       array of \\p nnz elements containing the non-zero values of \\f$x\\f$.\n  @param[in]\n  x_ind       array of \\p nnz elements containing the indices of the non-zero\n              values of \\f$x\\f$.\n  @param[inout]\n  y           array of values in dense format.\n  @param[in]\n  c           pointer to the cosine element of \\f$G\\f$, can be on the host or device.\n  @param[in]\n  s           pointer to the sine element of \\f$G\\f$, can be on the host or device.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_value \\p idx_base is invalid.\n  \\retval     rocsparse_status_invalid_size \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p c, \\p s, \\p x_val, \\p x_ind, or \\p y\n              pointer is invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_roti.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sroti(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *mut f32,
        x_ind: *const rocsparse_int,
        y: *mut f32,
        c: *const f32,
        s: *const f32,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_droti(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *mut f64,
        x_ind: *const rocsparse_int,
        y: *mut f64,
        c: *const f64,
        s: *const f64,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level1_module\n  \\brief Scatter elements from a dense vector across a sparse vector.\n\n  \\details\n  \\p rocsparse_sctr scatters the elements that are listed in \\p x_ind from the sparse\n  vector \\f$x\\f$ into the dense vector \\f$y\\f$. Indices of \\f$y\\f$ that are not listed\n  in \\p x_ind remain unchanged.\n\n  \\code{.c}\n      for(i = 0; i < nnz; ++i)\n      {\n          y[x_ind[i]] = x_val[i];\n      }\n  \\endcode\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  nnz         number of non-zero entries of \\f$x\\f$.\n  @param[in]\n  x_val       array of \\p nnz elements containing the non-zero values of \\f$x\\f$.\n  @param[in]\n  x_ind       array of \\p nnz elements containing the indices of the non-zero\n              values of x.\n  @param[inout]\n  y           array of values in dense format.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_value \\p idx_base is invalid.\n  \\retval     rocsparse_status_invalid_size \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p x_val, \\p x_ind, or \\p y pointer is\n              invalid.\n\n  \\par Example\n  \\snippet example_rocsparse_sctr.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_ssctr(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *const f32,
        x_ind: *const rocsparse_int,
        y: *mut f32,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dsctr(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *const f64,
        x_ind: *const rocsparse_int,
        y: *mut f64,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_csctr(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *const rocsparse_float_complex,
        x_ind: *const rocsparse_int,
        y: *mut rocsparse_float_complex,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zsctr(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *const rocsparse_double_complex,
        x_ind: *const rocsparse_int,
        y: *mut rocsparse_double_complex,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_isctr(
        handle: rocsparse_handle,
        nnz: rocsparse_int,
        x_val: *const rocsparse_int,
        x_ind: *const rocsparse_int,
        y: *mut rocsparse_int,
        idx_base: rocsparse_index_base,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_bsrmv_analysis performs the analysis step for \\ref rocsparse_sbsrmv \"rocsparse_Xbsrmv()\".\n  It is expected that this function will be executed only once for a given sparsity pattern and particular operation\n  type. The gathered analysis meta data is stored in the \\ref rocsparse_mat_info object and can be cleared by\n  \\ref rocsparse_bsrmv_clear().\n\n  If the matrix sparsity pattern changes, the gathered information will become invalid. To perform another\n  sparse matrix multiplication with a matrix having a different sparsity pattern, either destroy\n  the old \\p info object and create a new one or clear the existing \\p info object using\n  \\ref rocsparse_bsrmv_clear(). In both cases, the analysis will need to be called again.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         matrix storage of BSR blocks.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  mb          number of block rows of the sparse BSR matrix.\n  @param[in]\n  nb          number of block columns of the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse BSR matrix.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  bsr_val     array of \\p nnzb blocks of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of\n              the sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse\n              BSR matrix.\n  @param[in]\n  block_dim     block dimension of the sparse BSR matrix.\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nb, or \\p nnzb is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p bsr_val, \\p bsr_row_ptr,\n              \\p bsr_col_ind, or \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer for the gathered information\n              could not be allocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans != \\ref rocsparse_operation_none or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sbsrmv_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrmv_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrmv_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrmv_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Sparse matrix vector multiplication using the BSR storage format.\n\n  \\details\n  \\p rocsparse_bsrmv multiplies the scalar \\f$\\alpha\\f$ with a sparse\n  \\f$m \\times n\\f$ matrix, defined in BSR storage format, and the dense vector \\f$x\\f$ and adds the\n  result to the dense vector \\f$y\\f$ that is multiplied by the scalar \\f$\\beta\\f$, such that\n  \\f[\n    y := \\alpha \\cdot op(A) \\cdot x + \\beta \\cdot y,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none}\n    \\end{array}\n    \\right.\n  \\f]\n  and where \\f$m = mb \\times block\\_dim\\f$ and \\f$n= nb \\times block\\_dim\\f$.\n\n  The operation above can be done with or without analysis. Running with analysis might result in better performance\n  when computing the matrix vector product but will also incur a performance cost attributed to the additional analysis step.\n  For this reason, running with analysis makes sense when a user plans on computing the matrix vector product many times and\n  therefore can amortize the analysis cost.\n\n  To run the operation above without analysis, call the \\p rocsparse_bsrmv routine while passing\n  \\p NULL for the \\p info parameter.\n\n  Running the operation with analysis involves two steps. First, create a \\ref rocsparse_mat_info object\n  by calling \\ref rocsparse_create_mat_info and then pass this to \\ref rocsparse_sbsrmv_analysis \"rocsparse_Xbsrmv_analysis()\",\n  which will perform analysis on the sparsity pattern of the matrix \\f$op(A)\\f$. Then complete the operation by\n  calling \\p rocsparse_bsrmv. The creation of the \\p info object and the call to the analysis routine only need to be performed\n  once for a given sparsity pattern, while the computation can be performed repeatedly as long as the sparsity pattern has\n  not changed. After all calls to \\p rocsparse_bsrmv have been made, the \\p info object can be destroyed with a call to\n  \\ref rocsparse_destroy_mat_info.\n\n  When running with analysis, users might want to perform multiple sparse matrix\n  multiplications, with each sparse matrix having a different sparsity pattern. Instead of creating and destroying multiple\n  \\ref rocsparse_mat_info objects for each unique sparsity pattern, the user can instead create the \\p info object once and\n  then call \\ref rocsparse_bsrmv_clear, followed by re-running the analysis in between each sparse matrix multiplication.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  Currently, only \\p trans == \\ref rocsparse_operation_none is supported.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         matrix storage of BSR blocks.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  mb          number of block rows of the sparse BSR matrix.\n  @param[in]\n  nb          number of block columns of the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse BSR matrix.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  bsr_val     array of \\p nnzb blocks of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of\n              the sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse\n              BSR matrix.\n  @param[in]\n  block_dim     block dimension of the sparse BSR matrix.\n  @param[in]\n  x           array of \\p nb*block_dim elements (\\f$op(A) = A\\f$) or \\p mb*block_dim\n              elements (\\f$op(A) = A^T\\f$ or \\f$op(A) = A^H\\f$).\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  y           array of \\p mb*block_dim elements (\\f$op(A) = A\\f$) or \\p nb*block_dim\n              elements (\\f$op(A) = A^T\\f$ or \\f$op(A) = A^H\\f$).\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nb, \\p nnzb, or \\p block_dim is\n              invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p bsr_val,\n              \\p bsr_row_ind, \\p bsr_col_ind, \\p x, \\p beta, or \\p y pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans != \\ref rocsparse_operation_none or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example performs a sparse matrix vector multiplication in BSR format.\n  \\snippet example_rocsparse_bsrmv.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sbsrmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f32,
        beta: *const f32,
        y: *mut f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f64,
        beta: *const f64,
        y: *mut f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_float_complex,
        beta: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_double_complex,
        beta: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_bsrmv_clear deallocates all memory that was allocated by\n  \\ref rocsparse_sbsrmv_analysis \"rocsparse_Xbsrmv_analysis()\". This is especially useful\n  if memory is an issue and the analysis data is not required anymore for further computation,\n  for example, when switching to another sparse matrix format.\n\n  Calling \\p rocsparse_bsrmv_clear is optional. All allocated resources will be\n  cleared when the opaque \\ref rocsparse_mat_info object is destroyed using\n  \\ref rocsparse_destroy_mat_info().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[inout]\n  info        structure that holds the information collected during analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer for the gathered information\n              could not be deallocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_bsrmv_clear(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_bsrsv_zero_pivot returns \\ref rocsparse_status_zero_pivot if either a\n  structural or numerical zero has been found during \\ref rocsparse_sbsrsv_solve \"rocsparse_sbsrsv_solve()\"\n  computation. The first zero pivot \\f$j\\f$ at \\f$A_{j,j}\\f$ is stored in \\p position,\n  using the same index base as the BSR matrix.\n\n  \\p position can be in host or device memory. If no zero pivot has been found,\n  \\p position is set to -1 and \\ref rocsparse_status_success is returned instead.\n\n  \\note \\p rocsparse_bsrsv_zero_pivot is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[inout]\n  position    pointer to zero pivot \\f$j\\f$, which can be in host or device memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or \\p position pointer is\n              invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_zero_pivot zero pivot has been found."]
    pub fn rocsparse_bsrsv_zero_pivot(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        position: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_bsrsv_buffer_size returns the size of the temporary storage buffer that\n  is required by \\ref rocsparse_sbsrsv_analysis \"rocsparse_Xbsrsv_analysis()\" and\n  \\ref rocsparse_sbsrsv_solve \"rocsparse_Xbsrsv_solve()\". The temporary storage buffer\n  must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         matrix storage of BSR blocks.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  mb          number of block rows of the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse BSR matrix.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix.\n  @param[in]\n  bsr_val     array of \\p nnzb blocks of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of\n              the sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnz containing the block column indices of the sparse\n              BSR matrix.\n  @param[in]\n  block_dim     block dimension of the sparse BSR matrix.\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              rocsparse_sbsrsv_analysis(), rocsparse_dbsrsv_analysis(),\n              rocsparse_cbsrsv_analysis(), rocsparse_zbsrsv_analysis(),\n              rocsparse_sbsrsv_solve(), rocsparse_dbsrsv_solve(),\n              rocsparse_cbsrsv_solve(), and rocsparse_zbsrsv_solve().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p bsr_val, \\p bsr_row_ptr,\n              \\p bsr_col_ind, \\p info, or \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans == \\ref rocsparse_operation_conjugate_transpose or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sbsrsv_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrsv_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrsv_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrsv_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_bsrsv_analysis performs the analysis step for \\ref rocsparse_sbsrsv_solve \"rocsparse_sbsrsv_solve()\".\n  It is expected that this function will be executed only once for a given matrix and particular operation type.\n  The analysis meta data can be cleared by \\ref rocsparse_bsrsv_clear().\n\n  \\p rocsparse_bsrsv_analysis can share its meta data with \\ref rocsparse_sbsrsm_analysis \"rocsparse_Xbsrsm_analysis()\",\n  \\ref rocsparse_sbsrilu0_analysis \"rocsparse_Xbsrilu0_analysis()\", and\n  \\ref rocsparse_sbsric0_analysis \"rocsparse_Xbsric0_analysis()\". Selecting \\ref rocsparse_analysis_policy_reuse policy\n  can greatly improve computation performance of metadata. However, the user needs to ensure that the sparsity\n  pattern remains unchanged. Otherwise, \\ref rocsparse_analysis_policy_force has to be used.\n\n  \\note\n  If the matrix sparsity pattern changes, the gathered information will become invalid.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         matrix storage of BSR blocks.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  mb          number of block rows of the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse BSR matrix.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix.\n  @param[in]\n  bsr_val     array of \\p nnzb blocks of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of\n              the sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnz containing the block column indices of the sparse\n              BSR matrix.\n  @param[in]\n  block_dim     block dimension of the sparse BSR matrix.\n  @param[out]\n  info        structure that holds the information collected during\n              the analysis step.\n  @param[in]\n  analysis    \\ref rocsparse_analysis_policy_reuse or\n              \\ref rocsparse_analysis_policy_force.\n  @param[in]\n  solve       \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p bsr_row_ptr,\n              \\p bsr_col_ind, \\p info, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans == \\ref rocsparse_operation_conjugate_transpose or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sbsrsv_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrsv_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrsv_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrsv_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_bsrsv_clear deallocates all memory that was allocated by\n  \\ref rocsparse_sbsrsv_analysis \"rocsparse_sbsrsv_analysis()\". This is especially useful\n  if memory is an issue and the analysis data is not required for further computation, for example,\n  when switching to another sparse matrix format. Calling \\p rocsparse_bsrsv_clear is optional.\n  All allocated resources will be cleared when the opaque \\ref rocsparse_mat_info struct is\n  destroyed using \\ref rocsparse_destroy_mat_info().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[inout]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer holding the meta data could not\n              be deallocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_bsrsv_clear(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Sparse triangular solve using the BSR storage format.\n\n  \\details\n  \\p rocsparse_bsrsv_solve solves a sparse triangular linear system of a sparse\n  \\f$m \\times m\\f$ matrix, defined in BSR storage format, a dense solution vector\n  \\f$y\\f$, and the right-hand side \\f$x\\f$ that is multiplied by \\f$\\alpha\\f$, such that\n  \\f[\n    op(A) \\cdot y = \\alpha \\cdot x,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  Performing the above operation requires three steps. First, call\n  \\ref rocsparse_sbsrsv_buffer_size \"rocsparse_Xbsrsv_buffer_size()\", which will determine the size of the required\n  temporary storage buffer. Then allocate this buffer and call\n  \\ref rocsparse_sbsrsv_analysis \"rocsparse_Xbsrsv_analysis()\", which will perform analysis on the sparse matrix\n  \\f$op(A)\\f$. Finally, complete the computation by calling \\p rocsparse_bsrsv_solve. The buffer size,\n  buffer allocation, and analysis only need to be called once for a given sparse matrix \\f$op(A)\\f$, while the\n  computation stage can be repeatedly used with different \\f$x\\f$ and \\f$y\\f$ vectors. After all calls to\n  \\p rocsparse_bsrsv_solve are complete, the temporary buffer can be deallocated.\n\n  Solving a triangular system involves inverting the diagonal blocks. This means that if the sparse matrix is\n  missing the diagonal block (referred to as a structural zero) or the diagonal block is not invertible (referred\n  to as a numerical zero), then a solution is not possible. \\p rocsparse_bsrsv_solve tracks the location of the first\n  zero pivot (either numerical or structural zero). The zero pivot status can be checked by calling \\ref rocsparse_bsrsv_zero_pivot().\n  If \\ref rocsparse_bsrsv_zero_pivot() returns \\ref rocsparse_status_success, then no zero pivot was found and therefore\n  the matrix does not have a structural or numerical zero.\n\n  The user can specify that the sparse matrix should be interpreted as having identity blocks on the diagonal by setting the diagonal\n  type on the descriptor \\p descr to \\ref rocsparse_diag_type_unit using \\ref rocsparse_set_mat_diag_type. If\n  \\ref rocsparse_diag_type == \\ref rocsparse_diag_type_unit, no zero pivot will be reported, even if the diagonal block \\f$A_{j,j}\\f$\n  for some \\f$j\\f$ is not invertible.\n\n  The sparse CSR matrix passed to \\p rocsparse_bsrsv_solve does not actually have to be a triangular matrix. Instead, the\n  triangular upper or lower part of the sparse matrix is solved based on \\ref rocsparse_fill_mode set on the descriptor\n  \\p descr. If the fill mode is set to \\ref rocsparse_fill_mode_lower, then the lower triangular matrix is solved. If the\n  fill mode is set to \\ref rocsparse_fill_mode_upper, then the upper triangular matrix is solved.\n\n  \\note\n  The sparse BSR matrix has to be sorted.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  Currently, only \\p trans == \\ref rocsparse_operation_none and\n  \\p trans == \\ref rocsparse_operation_transpose are supported.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         matrix storage of BSR blocks.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  mb          number of block rows of the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse BSR matrix.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix.\n  @param[in]\n  bsr_val     array of \\p nnzb blocks of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of\n              the sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnz containing the block column indices of the sparse\n              BSR matrix.\n  @param[in]\n  block_dim     block dimension of the sparse BSR matrix.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  x           array of \\p m elements, holding the right-hand side.\n  @param[out]\n  y           array of \\p m elements, holding the solution.\n  @param[in]\n  policy      \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p bsr_val,\n              \\p bsr_row_ptr, \\p bsr_col_ind, \\p x, or \\p y pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans == \\ref rocsparse_operation_conjugate_transpose or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  Consider the lower triangular \\f$m \\times m\\f$ matrix \\f$L\\f$, stored in BSR\n  storage format with unit diagonal. The following example solves \\f$L \\cdot y = x\\f$.\n  \\snippet example_rocsparse_bsrsv.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sbsrsv_solve(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f32,
        y: *mut f32,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrsv_solve(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f64,
        y: *mut f64,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrsv_solve(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrsv_solve(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Sparse matrix vector multiplication with mask operation using the BSR storage format.\n\n  \\details\n  \\p rocsparse_bsrxmv multiplies the scalar \\f$\\alpha\\f$ with a sparse\n  \\f$m \\times n\\f$ modified matrix, defined in BSR storage format, and the dense vector \\f$x\\f$\n  and adds the result to the dense vector \\f$y\\f$ that is multiplied by the scalar \\f$\\beta\\f$,\n  such that\n  \\f[\n    y := \\left( \\alpha \\cdot op(A) \\cdot x + \\beta \\cdot y \\right)\\left( \\text{mask} \\right),\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none}\n    \\end{array}\n    \\right.\n  \\f]\n  and where \\f$m = mb \\times block\\_dim\\f$ and \\f$n = nb \\times block\\_dim\\f$.\n\n  The \\f$\\text{mask}\\f$ is defined as an array of block row indices.\n  The input sparse matrix is defined with a modified BSR storage format where the beginning and the end of each row\n  is defined with two arrays, \\p bsr_row_ptr and \\p bsr_end_ptr (both of size \\p mb), rather the usual \\p bsr_row_ptr of size \\p mb+1.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  Currently, only \\p trans == \\ref rocsparse_operation_none is supported.\n  Currently, \\p block_dim==1 is not supported.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         matrix storage of BSR blocks.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  size_of_mask number of updated block rows of the array \\p y.\n  @param[in]\n  mb          number of block rows of the sparse BSR matrix.\n  @param[in]\n  nb          number of block columns of the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse BSR matrix.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  bsr_val     array of \\p nnzb blocks of the sparse BSR matrix.\n\n  @param[in]\n  bsr_mask_ptr array of \\p size_of_mask elements that give the indices of the updated block rows.\n\n  @param[in]\n  bsr_row_ptr array of \\p mb elements that point to the start of every block row of\n              the sparse BSR matrix.\n  @param[in]\n  bsr_end_ptr array of \\p mb elements that point to the end of every block row of\n              the sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse\n              BSR matrix.\n  @param[in]\n  block_dim     block dimension of the sparse BSR matrix.\n  @param[in]\n  x           array of \\p nb*block_dim elements (\\f$op(A) = A\\f$) or \\p mb*block_dim\n              elements (\\f$op(A) = A^T\\f$ or \\f$op(A) = A^H\\f$).\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  y           array of \\p mb*block_dim elements (\\f$op(A) = A\\f$) or \\p nb*block_dim\n              elements (\\f$op(A) = A^T\\f$ or \\f$op(A) = A^H\\f$).\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nb, \\p nnzb, \\p block_dim, or \\p size_of_mask is\n              invalid.\n  \\retval     rocsparse_status_invalid_value \\p size_of_mask is greater than \\p mb.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p bsr_val,\n              \\p bsr_row_ind, \\p bsr_col_ind, \\p x, \\p beta, or \\p y pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_not_implemented\n              \\p block_dim==1, \\p trans != \\ref rocsparse_operation_none or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sbsrxmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        size_of_mask: rocsparse_int,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_mask_ptr: *const rocsparse_int,
        bsr_row_ptr: *const rocsparse_int,
        bsr_end_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        x: *const f32,
        beta: *const f32,
        y: *mut f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrxmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        size_of_mask: rocsparse_int,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_mask_ptr: *const rocsparse_int,
        bsr_row_ptr: *const rocsparse_int,
        bsr_end_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        x: *const f64,
        beta: *const f64,
        y: *mut f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrxmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        size_of_mask: rocsparse_int,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_mask_ptr: *const rocsparse_int,
        bsr_row_ptr: *const rocsparse_int,
        bsr_end_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        x: *const rocsparse_float_complex,
        beta: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrxmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        size_of_mask: rocsparse_int,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_mask_ptr: *const rocsparse_int,
        bsr_row_ptr: *const rocsparse_int,
        bsr_end_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        x: *const rocsparse_double_complex,
        beta: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Sparse matrix vector multiplication using the COO storage format.\n\n  \\details\n  \\p rocsparse_coomv multiplies the scalar \\f$\\alpha\\f$ with a sparse \\f$m \\times n\\f$\n  matrix, defined in COO storage format, and the dense vector \\f$x\\f$ and adds the\n  result to the dense vector \\f$y\\f$ that is multiplied by the scalar \\f$\\beta\\f$,\n  such that\n  \\f[\n    y := \\alpha \\cdot op(A) \\cdot x + \\beta \\cdot y,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  The COO matrix has to be sorted by row indices. This can be achieved by using\n  rocsparse_coosort_by_row().\n\n  \\code{.c}\n      for(i = 0; i < m; ++i)\n      {\n          y[i] = beta * y[i];\n      }\n\n      for(i = 0; i < nnz; ++i)\n      {\n          y[coo_row_ind[i]] += alpha * coo_val[i] * x[coo_col_ind[i]];\n      }\n  \\endcode\n\n  \\note\n  This function does not produce deterministic results when A is transposed.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the sparse COO matrix.\n  @param[in]\n  n           number of columns of the sparse COO matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse COO matrix.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse COO matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  coo_val     array of \\p nnz elements of the sparse COO matrix.\n  @param[in]\n  coo_row_ind array of \\p nnz elements containing the row indices of the sparse COO\n              matrix.\n  @param[in]\n  coo_col_ind array of \\p nnz elements containing the column indices of the sparse\n              COO matrix.\n  @param[in]\n  x           array of \\p n elements (\\f$op(A) = A\\f$) or \\p m elements\n              (\\f$op(A) = A^T\\f$ or \\f$op(A) = A^H\\f$).\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  y           array of \\p m elements (\\f$op(A) = A\\f$) or \\p n elements\n              (\\f$op(A) = A^T\\f$ or \\f$op(A) = A^H\\f$).\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p coo_val,\n              \\p coo_row_ind, \\p coo_col_ind, \\p x, \\p beta, or \\p y pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example performs a sparse matrix vector multiplication in COO format.\n  \\snippet example_rocsparse_coomv.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scoomv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        coo_val: *const f32,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        x: *const f32,
        beta: *const f32,
        y: *mut f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcoomv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        coo_val: *const f64,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        x: *const f64,
        beta: *const f64,
        y: *mut f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccoomv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        coo_val: *const rocsparse_float_complex,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        x: *const rocsparse_float_complex,
        beta: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcoomv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        coo_val: *const rocsparse_double_complex,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        x: *const rocsparse_double_complex,
        beta: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_csritsv_zero_pivot returns \\ref rocsparse_status_zero_pivot if either a\n  structural or numerical zero has been found during\n  \\ref rocsparse_scsritsv_solve \"rocsparse_Xcsritsv_solve()\" and/or\n  \\ref rocsparse_scsritsv_analysis \"rocsparse_Xcsritsv_analysis()\" execution. The first zero pivot \\f$j\\f$ at\n  \\f$A_{j,j}\\f$ is stored in \\p position, using the same index base as the CSR matrix.\n\n  \\p position can be in host or device memory. If no zero pivot has been found,\n  \\p position is set to -1 and \\ref rocsparse_status_success is returned instead.\n\n  \\note \\p rocsparse_csritsv_zero_pivot is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[inout]\n  position    pointer to zero pivot \\f$j\\f$, which can be in host or device memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or \\p position pointer is\n              invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_zero_pivot zero pivot has been found."]
    pub fn rocsparse_csritsv_zero_pivot(
        handle: rocsparse_handle,
        descr: rocsparse_mat_descr,
        info: rocsparse_mat_info,
        position: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_csritsv_buffer_size returns the size of the temporary storage buffer that\n  is required by \\ref rocsparse_scsritsv_analysis \"rocsparse_Xcsritsv_analysis()\" and\n  \\ref rocsparse_scsritsv_solve \"rocsparse_Xcsritsv_solve()\". The temporary storage buffer\n  must be allocated by the user.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_scsritsv_analysis \"rocsparse_Xcsritsv_analysis()\" and\n              \\ref rocsparse_scsritsv_solve \"rocsparse_Xcsritsv_solve()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_val, \\p csr_row_ptr,\n              \\p csr_col_ind, \\p info, or \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general and \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_triangular.\n/\n/**@{"]
    pub fn rocsparse_scsritsv_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsritsv_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsritsv_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsritsv_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_csritsv_analysis performs the analysis step for \\ref rocsparse_scsritsv_solve \"rocsparse_Xcsritsv_solve()\".\n  It is expected that this function will be executed only once for a given matrix and particular operation type. The\n  analysis meta data can be cleared by \\ref rocsparse_csritsv_clear().\n\n   Selecting\n  \\ref rocsparse_analysis_policy_reuse policy can greatly improve the computation\n  performance of metadata. However, the user needs to ensure that the sparsity\n  pattern remains unchanged. If this cannot be assured,\n  \\ref rocsparse_analysis_policy_force has to be used.\n\n  \\note\n  If the matrix sparsity pattern changes, the gathered information will become invalid.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[out]\n  info        structure that holds the information collected during\n              the analysis step.\n  @param[in]\n  analysis    \\ref rocsparse_analysis_policy_reuse or\n              \\ref rocsparse_analysis_policy_force.\n  @param[in]\n  solve       \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_row_ptr,\n              \\p csr_col_ind, \\p info, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general and \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_triangular.\n/\n/**@{"]
    pub fn rocsparse_scsritsv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsritsv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsritsv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsritsv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = "@}*/\n/*! \\ingroup level2_module\n  \\details\n  \\p rocsparse_csritsv_clear deallocates all memory that was allocated by\n  \\ref rocsparse_scsritsv_analysis \"rocsparse_Xcsritsv_analysis()\". This is\n  especially useful if memory is an issue and the analysis data is not\n  required for further computation, for example, when switching to another sparse\n  matrix format. Calling \\p rocsparse_csritsv_clear is optional. All allocated\n  resources will be cleared when the opaque \\ref rocsparse_mat_info struct is\n  destroyed using \\ref rocsparse_destroy_mat_info().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[inout]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer holding the meta data could not\n              be deallocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csritsv_clear(
        handle: rocsparse_handle,
        descr: rocsparse_mat_descr,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Sparse iterative triangular solve using the CSR storage format.\n\n  \\details\n  \\p rocsparse_csritsv_solve solves iteratively, with the use of the Jacobi method, a sparse triangular linear system of a sparse\n  \\f$m \\times m\\f$ matrix, defined in CSR storage format, a dense solution vector\n  \\f$y\\f$, and the right-hand side \\f$x\\f$ that is multiplied by \\f$\\alpha\\f$, such that\n  \\f[\n    op(A) y = \\alpha x,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  The Jacobi method applied to the sparse triangular linear system above gives\n  \\f[\n     y_{k+1} = y_{k} + D^{-1} ( \\alpha x - (D + T) y_{k} )\n  \\f]\n  with \\f$A = D + T\\f$, \\f$D\\f$ the diagonal of \\f$A\\f$ and \\f$T\\f$ the strict triangular part of \\f$A\\f$.\n\n  The above equation can be also written as\n  \\f[\n     y_{k+1} = y_{k} + D^{-1} r_k\n  \\f]\n  where\n  \\f[\n     r_k = \\alpha x - (D + T) y_k.\n  \\f]\n  Starting with \\f$y_0 = \\f$ \\p y, the method iterates if \\f$ 0 \\le k \\lt \\f$ \\p host_nmaxiter and if\n  \\f[\n     \\Vert r_k \\Vert_{\\infty} \\gt \\epsilon,\n  \\f]\n  with \\f$\\epsilon\\f$ = \\p host_tol.\n\n  \\p rocsparse_csritsv_solve requires a user allocated temporary buffer. Its size is\n  returned by \\ref rocsparse_scsritsv_buffer_size \"rocsparse_Xcsritsv_buffer_size()\".\n  In addition, analysis metadata is required. It can be obtained by\n  \\ref rocsparse_scsritsv_analysis \"rocsparse_Xcsritsv_analysis()\". \\p rocsparse_csritsv_solve\n  reports the first zero pivot (either numerical or structural zero).\n  The zero pivot status can be checked by calling \\ref rocsparse_csritsv_zero_pivot(). If\n  \\ref rocsparse_diag_type == \\ref rocsparse_diag_type_unit, no zero pivot will be\n  reported, even if \\f$A_{j,j} = 0\\f$ for some \\f$j\\f$.\n\n  \\note\n  The sparse CSR matrix has to be sorted. This can be achieved by calling\n  rocsparse_csrsort().\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle         handle to the rocSPARSE library context queue.\n  @param[inout]\n  host_nmaxiter  maximum number of iterations on input and number of iterations on output. If the output number of iterations is strictly less than the input maximum number of iterations, then the algorithm converged.\n  @param[in]\n  host_tol       if the pointer is null then loop will execute \\p nmaxiter[0] iterations.\n  @param[out]\n  host_history   optional array to record the norm of the residual before each iteration.\n  @param[in]\n  trans          matrix operation type.\n  @param[in]\n  m              number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz            number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  alpha          scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr          descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val        array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr    array of \\p m+1 elements that point to the start\n                 of every row of the sparse CSR matrix.\n  @param[in]\n  csr_col_ind    array of \\p nnz elements containing the column indices of the sparse\n                 CSR matrix.\n  @param[in]\n  info           structure that holds the information collected during the analysis step.\n  @param[in]\n  x              array of \\p m elements, holding the right-hand side.\n  @param[inout]\n  y              array of \\p m elements, holding the solution.\n  @param[in]\n  policy         \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer    temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, \\p x, or \\p y pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general and \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_triangular.\n\n  \\par Example\n  Consider the lower triangular \\f$m \\times m\\f$ matrix \\f$L\\f$, stored in CSR\n  storage format with unit diagonal. The following example solves \\f$L \\cdot y = x\\f$.\n  \\code{.c}\n      // Create rocSPARSE handle\n      rocsparse_handle handle;\n      rocsparse_create_handle(&handle);\n\n      // Create matrix descriptor\n      rocsparse_mat_descr descr;\n      rocsparse_create_mat_descr(&descr);\n      rocsparse_set_mat_fill_mode(descr, rocsparse_fill_mode_lower);\n      rocsparse_set_mat_diag_type(descr, rocsparse_diag_type_unit);\n\n      // Create matrix info structure\n      rocsparse_mat_info info;\n      rocsparse_create_mat_info(&info);\n\n      // Obtain required buffer size\n      size_t buffer_size;\n      rocsparse_dcsritsv_buffer_size(handle,\n                                     rocsparse_operation_none,\n                                     m,\n                                     nnz,\n                                     descr,\n                                     csr_val,\n                                     csr_row_ptr,\n                                     csr_col_ind,\n                                     info,\n                                     &buffer_size);\n\n      // Allocate temporary buffer\n      void* temp_buffer;\n      hipMalloc(&temp_buffer, buffer_size);\n\n      // Perform analysis step\n      rocsparse_dcsritsv_analysis(handle,\n                                  rocsparse_operation_none,\n                                  m,\n                                  nnz,\n                                  descr,\n                                  csr_val,\n                                  csr_row_ptr,\n                                  csr_col_ind,\n                                  info,\n                                  rocsparse_analysis_policy_reuse,\n                                  rocsparse_solve_policy_auto,\n                                  temp_buffer);\n\n      // Solve Ly = x\n      rocsparse_int nmaxiter = 200;\n      rocsparse_int host_maxiter = nmaxiter;\n      double host_tol = 1.0e-4;\n      double host_history[200];\n\n      // Initialization of y\n      hipMemset(y, 0, sizeof(double) * m);\n\n      rocsparse_dcsritsv_solve(handle,\n                               &host_maxiter,\n                               &host_tol,\n                               host_history,\n                               rocsparse_operation_none,\n                               m,\n                               nnz,\n                               &alpha,\n                               descr,\n                               csr_val,\n                               csr_row_ptr,\n                               csr_col_ind,\n                               info,\n                               x,\n                               y,\n                               rocsparse_solve_policy_auto,\n                               temp_buffer);\n\n      if (host_maxiter < nmaxiter)\n       {\n         printf(\"convergence\\n\");\n       }\n      else\n       {\n         printf(\"no convergence\\n\");\n       }\n      for (int i=0;i<=host_maxiter;++i)\n        {\n          printf(\"iter = %d, nrm inf residual=%e\\n\", i, host_history[i]);\n        }\n\n      // No zero pivot should be found, with L having unit diagonal\n\n      // Clean up\n      hipFree(temp_buffer);\n      rocsparse_destroy_mat_info(info);\n      rocsparse_destroy_mat_descr(descr);\n      rocsparse_destroy_handle(handle);\n  \\endcode\n/\n/**@{"]
    pub fn rocsparse_scsritsv_solve(
        handle: rocsparse_handle,
        host_nmaxiter: *mut rocsparse_int,
        host_tol: *const f32,
        host_history: *mut f32,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f32,
        y: *mut f32,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsritsv_solve(
        handle: rocsparse_handle,
        host_nmaxiter: *mut rocsparse_int,
        host_tol: *const f64,
        host_history: *mut f64,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f64,
        y: *mut f64,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsritsv_solve(
        handle: rocsparse_handle,
        host_nmaxiter: *mut rocsparse_int,
        host_tol: *const f32,
        host_history: *mut f32,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsritsv_solve(
        handle: rocsparse_handle,
        host_nmaxiter: *mut rocsparse_int,
        host_tol: *const f64,
        host_history: *mut f64,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Sparse iterative triangular solve using the CSR storage format.\n\n  \\details\n  \\p rocsparse_csritsv_solve_ex solves iteratively, with the use of the Jacobi method, a sparse triangular linear system of a sparse\n  \\f$m \\times m\\f$ matrix, defined in CSR storage format, a dense solution vector\n  \\f$y\\f$, and the right-hand side \\f$x\\f$ that is multiplied by \\f$\\alpha\\f$, such that\n  \\f[\n    op(A) y = \\alpha x,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  The Jacobi method applied to the sparse triangular linear system above gives\n  \\f[\n     y_{k+1} = y_{k} + D^{-1} ( \\alpha x - (D + T) y_{k} )\n  \\f]\n  with \\f$A = D + T\\f$, \\f$D\\f$ the diagonal of \\f$A\\f$ and \\f$T\\f$ the strict triangular part of \\f$A\\f$.\n\n  The above equation can be also written as\n  \\f[\n     y_{k+1} = y_{k} + D^{-1} r_k\n  \\f]\n  where\n  \\f[\n     r_k = \\alpha x - (D + T) y_k.\n  \\f]\n  Starting with \\f$y_0 = \\f$ \\p y, the method iterates if \\f$ 0 \\le k \\lt \\f$ \\p host_nmaxiter and if\n  \\f[\n     \\Vert r_k \\Vert_{\\infty} \\gt \\epsilon,\n  \\f]\n  with \\f$\\epsilon\\f$ = \\p host_tol.\n\n  The parameter \\p host_nfreeiter is used to control the frequence of the stopping criteria evaluation, potentially improving the performance of the algorithm with less norm calculation. Between each iteration of index \\f$ k \\f$, \\p host_nfreeiter are performed without stopping criteria evaluation. Therefore, if the convergence is obtained at index \\f$ k \\f$, that means \\f$ (k + 1) \\f$ \\p host_nfreeiter \\f$ + k \\f$ iterations have been performed.\n\n  \\p rocsparse_csritsv_solve_ex requires a user allocated temporary buffer. Its size is\n  returned by \\ref rocsparse_scsritsv_buffer_size \"rocsparse_Xcsritsv_buffer_size()\".\n  Furthermore, analysis meta data is required. It can be obtained by\n  \\ref rocsparse_scsritsv_analysis \"rocsparse_Xcsritsv_analysis()\". \\p rocsparse_csritsv_solve_ex\n  reports the first zero pivot (either numerical or structural zero). The zero pivot status\n  can be checked by calling rocsparse_csritsv_zero_pivot(). If\n  \\ref rocsparse_diag_type == \\ref rocsparse_diag_type_unit, no zero pivot will be\n  reported, even if \\f$A_{j,j} = 0\\f$ for some \\f$j\\f$.\n\n  \\note\n  The sparse CSR matrix has to be sorted. This can be achieved by calling\n  rocsparse_csrsort().\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[inout]\n  host_nmaxiter     maximum number of iterations on input and number of iterations on output. If the output number of iterations is strictly less than the input maximum number of iterations, then the algorithm converged.\n  @param[in]\n  host_nfreeiter    number of free iterations, that is, the number of iterations performed without stopping criteria evaluation between two iterations with stopping criteria evaluation.\n  @param[in]\n  host_tol          if the pointer is null, then loop will execute \\p nmaxiter[0] iterations.\n  @param[out]\n  host_history      optional array to record the norm of the residual before each iteration.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start\n              of every row of the sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  x           array of \\p m elements, holding the right-hand side.\n  @param[inout]\n  y           array of \\p m elements, holding the solution.\n  @param[in]\n  policy      \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, \\p x, or \\p y pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general and \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_triangular.\n\n  \\par Example\n  Consider the lower triangular \\f$m \\times m\\f$ matrix \\f$L\\f$, stored in CSR\n  storage format with unit diagonal. The following example solves \\f$L \\cdot y = x\\f$.\n  \\code{.c}\n      // Create rocSPARSE handle\n      rocsparse_handle handle;\n      rocsparse_create_handle(&handle);\n\n      // Create matrix descriptor\n      rocsparse_mat_descr descr;\n      rocsparse_create_mat_descr(&descr);\n      rocsparse_set_mat_fill_mode(descr, rocsparse_fill_mode_lower);\n      rocsparse_set_mat_diag_type(descr, rocsparse_diag_type_unit);\n\n      // Create matrix info structure\n      rocsparse_mat_info info;\n      rocsparse_create_mat_info(&info);\n\n      // Obtain required buffer size\n      size_t buffer_size;\n      rocsparse_dcsritsv_buffer_size(handle,\n                                     rocsparse_operation_none,\n                                     m,\n                                     nnz,\n                                     descr,\n                                     csr_val,\n                                     csr_row_ptr,\n                                     csr_col_ind,\n                                     info,\n                                     &buffer_size);\n\n      // Allocate temporary buffer\n      void* temp_buffer;\n      hipMalloc(&temp_buffer, buffer_size);\n\n      // Perform analysis step\n      rocsparse_dcsritsv_analysis(handle,\n                                  rocsparse_operation_none,\n                                  m,\n                                  nnz,\n                                  descr,\n                                  csr_val,\n                                  csr_row_ptr,\n                                  csr_col_ind,\n                                  info,\n                                  rocsparse_analysis_policy_reuse,\n                                  rocsparse_solve_policy_auto,\n                                  temp_buffer);\n\n      // Solve Ly = x\n      rocsparse_int nmaxiter = 200;\n      rocsparse_int host_maxiter = nmaxiter;\n\n      rocsparse_int host_nfreeiter = 20;\n      double host_tol = 1.0e-4;\n      double host_history[200];\n\n      // Initialization of y\n      hipMemset(y, 0, sizeof(double) * m);\n\n      rocsparse_dcsritsv_solve_ex(handle,\n                                  &host_maxiter,\n                                  host_nfreeiter,\n                                  &host_tol,\n                                  host_history,\n                                  rocsparse_operation_none,\n                                  m,\n                                  nnz,\n                                  &alpha,\n                                  descr,\n                                  csr_val,\n                                  csr_row_ptr,\n                                  csr_col_ind,\n                                  info,\n                                  x,\n                                  y,\n                                  rocsparse_solve_policy_auto,\n                                  temp_buffer);\n\n      if (host_maxiter < nmaxiter)\n       {\n         printf(\"convergence\\n\");\n       }\n      else\n       {\n         printf(\"no convergence\\n\");\n       }\n      for (int i=0;i<=host_maxiter;++i)\n        {\n          printf(\"iter = %d, nrm inf residual=%e\\n\", i, host_history[i]);\n        }\n      // No zero pivot should be found, with L having unit diagonal\n\n      // Clean up\n      hipFree(temp_buffer);\n      rocsparse_destroy_mat_info(info);\n      rocsparse_destroy_mat_descr(descr);\n      rocsparse_destroy_handle(handle);\n  \\endcode\n/\n/**@{"]
    pub fn rocsparse_scsritsv_solve_ex(
        handle: rocsparse_handle,
        host_nmaxiter: *mut rocsparse_int,
        host_nfreeiter: rocsparse_int,
        host_tol: *const f32,
        host_history: *mut f32,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f32,
        y: *mut f32,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsritsv_solve_ex(
        handle: rocsparse_handle,
        host_nmaxiter: *mut rocsparse_int,
        host_nfreeiter: rocsparse_int,
        host_tol: *const f64,
        host_history: *mut f64,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f64,
        y: *mut f64,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsritsv_solve_ex(
        handle: rocsparse_handle,
        host_nmaxiter: *mut rocsparse_int,
        host_nfreeiter: rocsparse_int,
        host_tol: *const f32,
        host_history: *mut f32,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsritsv_solve_ex(
        handle: rocsparse_handle,
        host_nmaxiter: *mut rocsparse_int,
        host_nfreeiter: rocsparse_int,
        host_tol: *const f64,
        host_history: *mut f64,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_csrmv_analysis performs the analysis step for \\ref rocsparse_scsrmv \"rocsparse_Xcsrmv()\".\n  It is expected that this function will be executed only once for a given sparsity pattern and particular operation\n  type. The gathered analysis metadata is stored in the \\ref rocsparse_mat_info object and can be cleared by\n  \\ref rocsparse_csrmv_clear().\n\n  If the matrix sparsity pattern changes, the gathered information will become invalid. To perform another\n  sparse matrix multiplication with a matrix having a different sparsity pattern, either destroy\n  the old \\p info object and create a new one or clear the existing info object using\n  \\ref rocsparse_csrmv_clear(). In both cases, the analysis will need to be called again.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  n           number of columns of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_val, \\p csr_row_ptr,\n              \\p csr_col_ind, or \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer for the gathered information\n              could not be allocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented if \\ref rocsparse_matrix_type is not one of\n              \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric, or\n              \\ref rocsparse_matrix_type_triangular.\n/\n/**@{"]
    pub fn rocsparse_scsrmv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrmv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrmv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrmv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_csrmv_clear deallocates all memory that was allocated by\n  \\ref rocsparse_scsrmv_analysis \"rocsparse_Xcsrmv_analysis()\". This is especially useful\n  if memory is an issue and the analysis data is not required for further\n  computation, for example, when switching to another sparse matrix format.\n\n  \\note\n  Calling \\p rocsparse_csrmv_clear is optional. All allocated resources will be\n  cleared, when the opaque \\ref rocsparse_mat_info object is destroyed using\n  \\ref rocsparse_destroy_mat_info().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[inout]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer for the gathered information\n              could not be deallocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csrmv_clear(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Sparse matrix vector multiplication using the CSR storage format.\n\n  \\details\n  \\p rocsparse_csrmv multiplies the scalar \\f$\\alpha\\f$ with a sparse \\f$m \\times n\\f$\n  matrix, defined in CSR storage format, and the dense vector \\f$x\\f$ and adds the\n  result to the dense vector \\f$y\\f$ that is multiplied by the scalar \\f$\\beta\\f$,\n  such that\n  \\f[\n    y := \\alpha \\cdot op(A) \\cdot x + \\beta \\cdot y,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  The \\p info parameter is optional and contains information collected by\n  \\ref rocsparse_scsrmv_analysis \"rocsparse_Xcsrmv_analysis()\". If present, the\n  information will be used to speed up the \\p csrmv computation. If\n  \\p info == \\p NULL, a general \\p csrmv routine will be used instead. Running with\n  analysis might result in better performance when computing the matrix vector product\n  but will also incur a performance cost attributed to the additional analysis step.\n  For this reason, running with analysis makes sense when computing\n  the matrix vector product many times, therefore amortizing the analysis cost.\n\n  \\code{.c}\n      for(i = 0; i < m; ++i)\n      {\n          y[i] = beta * y[i];\n\n          for(j = csr_row_ptr[i]; j < csr_row_ptr[i + 1]; ++j)\n          {\n              y[i] = y[i] + alpha * csr_val[j] * x[csr_col_ind[j]];\n          }\n      }\n  \\endcode\n\n  To run the above operation without analysis, call the \\p rocsparse_csrmv routine while passing\n  \\p NULL for the \\p info parameter.\n\n  With analysis, completing the sparse matrix vector multiplication involves two steps. First,\n  create a \\ref rocsparse_mat_info object by calling \\ref rocsparse_create_mat_info and then pass this to\n  \\ref rocsparse_scsrmv_analysis \"rocsparse_Xcsrmv_analysis()\", which will perform analysis on the sparsity pattern of the\n  matrix \\f$op(A)\\f$. Then complete the operation by calling \\p rocsparse_csrmv. The creation of the \\p info object\n  and the call to the analysis routine only need to be performed once for a given sparsity pattern, while the computation\n  can be performed repeatedly as long as the sparsity pattern has not changed. After all calls to \\p rocsparse_csrmv have\n  been made, the \\p info object can be destroyed with a call to \\ref rocsparse_destroy_mat_info.\n\n  When running with analysis, a user might want to perform multiple sparse matrix\n  multiplications, with each sparse matrix having a different sparsity pattern. Instead of creating and destroying multiple\n  \\ref rocsparse_mat_info objects for each unique sparsity pattern, they can instead create the \\p info object once and\n  then call \\ref rocsparse_csrmv_clear and rerun the analysis in between each sparse matrix multiplication.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  n           number of columns of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start\n              of every row of the sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[in]\n  info        information collected by \\ref rocsparse_scsrmv_analysis \"rocsparse_Xcsrmv_analysis()\",\n              which can be \\p NULL if no information is available.\n  @param[in]\n  x           array of \\p n elements (\\f$op(A) == A\\f$) or \\p m elements\n              (\\f$op(A) == A^T\\f$ or \\f$op(A) == A^H\\f$).\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  y           array of \\p m elements (\\f$op(A) == A\\f$) or \\p n elements\n              (\\f$op(A) == A^T\\f$ or \\f$op(A) == A^H\\f$).\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, \\p x, \\p beta, or \\p y pointer is\n              invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example performs a sparse matrix vector multiplication in CSR format\n  using additional meta data to improve performance.\n  \\snippet example_rocsparse_csrmv.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsrmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f32,
        beta: *const f32,
        y: *mut f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f64,
        beta: *const f64,
        y: *mut f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_float_complex,
        beta: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_double_complex,
        beta: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_csrsv_zero_pivot returns \\ref rocsparse_status_zero_pivot if either a\n  structural or numerical zero has been found during \\ref rocsparse_scsrsv_solve \"rocsparse_Xcsrsv_solve()\"\n  computation. The first zero pivot \\f$j\\f$ at \\f$A_{j,j}\\f$ is stored in \\p position,\n  using the same index base as the CSR matrix.\n\n  \\p position can be in host or device memory. If no zero pivot has been found,\n  \\p position is set to -1 and \\ref rocsparse_status_success is returned instead.\n\n  \\note \\p rocsparse_csrsv_zero_pivot is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[inout]\n  position    pointer to zero pivot \\f$j\\f$, can be in host or device memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or \\p position pointer is\n              invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_zero_pivot zero pivot has been found."]
    pub fn rocsparse_csrsv_zero_pivot(
        handle: rocsparse_handle,
        descr: rocsparse_mat_descr,
        info: rocsparse_mat_info,
        position: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_csrsv_buffer_size returns the size of the temporary storage buffer that\n  is required by \\ref rocsparse_scsrsv_analysis \"rocsparse_Xcsrsv_analysis()\" and\n  \\ref rocsparse_scsrsv_solve \"rocsparse_Xcsrsv_solve()\". The temporary storage buffer\n  must be allocated by the user. The size of the temporary storage buffer is identical\n  to the size returned by \\ref rocsparse_scsrilu0_buffer_size \"rocsparse_Xcsrilu0_buffer_size()\"\n  if the matrix sparsity pattern is identical. The user-allocated buffer can therefore be shared\n  between subsequent calls to those functions.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_scsrsv_analysis \"rocsparse_Xcsrsv_analysis()\" and\n              \\ref rocsparse_scsrsv_solve \"rocsparse_Xcsrsv_solve()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_val, \\p csr_row_ptr,\n              \\p csr_col_ind, \\p info, or \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans == \\ref rocsparse_operation_conjugate_transpose or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_scsrsv_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrsv_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrsv_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrsv_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = "@}*/\n/*! \\ingroup level2_module\n  \\details\n  \\p rocsparse_csrsv_analysis performs the analysis step for\n  \\ref rocsparse_scsrsv_solve \"rocsparse_Xcsrsv_solve()\". It is expected that this\n  function will be executed only once for a given matrix and particular operation\n  type. The analysis metadata can be cleared by \\ref rocsparse_csrsv_clear().\n\n  If the matrix sparsity pattern changes, the gathered information will become invalid. To perform another\n  sparse triangular solve with a matrix having a different sparsity pattern, either destroy\n  the old \\p info object and create a new one or clear the existing \\p info object using\n  \\ref rocsparse_csrsv_clear(). In both cases, the analysis will need to be called again.\n\n  \\p rocsparse_csrsv_analysis can share its meta data with\n  \\ref rocsparse_scsrsm_analysis \"rocsparse_Xcsrsm_analysis()\",\n  \\ref rocsparse_scsrilu0_analysis \"rocsparse_Xcsrilu0_analysis()\", and\n  \\ref rocsparse_scsric0_analysis \"rocsparse_Xcsric0_analysis()\". Selecting\n  \\ref rocsparse_analysis_policy_reuse policy can greatly improve the computation\n  performance of the metadata. However, the user needs to ensure that the sparsity\n  pattern remains unchanged. If this cannot be assured,\n  \\ref rocsparse_analysis_policy_force must be used.\n\n  \\note\n  If the matrix sparsity pattern changes, the gathered information will become invalid.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[out]\n  info        structure that holds the information collected during\n              the analysis step.\n  @param[in]\n  analysis    \\ref rocsparse_analysis_policy_reuse or\n              \\ref rocsparse_analysis_policy_force.\n  @param[in]\n  solve       \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_row_ptr,\n              \\p csr_col_ind, \\p info, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans == \\ref rocsparse_operation_conjugate_transpose or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_scsrsv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrsv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrsv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrsv_analysis(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_csrsv_clear deallocates all memory that was allocated by\n  \\ref rocsparse_scsrsv_analysis \"rocsparse_Xcsrsv_analysis()\". This is especially useful\n  if memory is an issue and the analysis data is not required for further computation, for example,\n  when switching to another sparse matrix format.\n\n  Calling \\p rocsparse_csrsv_clear is optional. All allocated resources will be cleared when the\n  opaque \\ref rocsparse_mat_info struct is destroyed using \\ref rocsparse_destroy_mat_info().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[inout]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer holding the meta data could not\n              be deallocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csrsv_clear(
        handle: rocsparse_handle,
        descr: rocsparse_mat_descr,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Sparse triangular solve using CSR storage format.\n\n  \\details\n  \\p rocsparse_csrsv_solve solves a sparse triangular linear system of a sparse\n  \\f$m \\times m\\f$ matrix, defined in CSR storage format, a dense solution vector\n  \\f$y\\f$ and the right-hand side \\f$x\\f$ that is multiplied by \\f$\\alpha\\f$, such that\n  \\f[\n    op(A) \\cdot y = \\alpha \\cdot x,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  Performing the above operation requires three steps. First, call\n  \\ref rocsparse_scsrsv_buffer_size \"rocsparse_Xcsrsv_buffer_size()\", which determines the size of the required\n  temporary storage buffer. Then allocate this buffer and call\n  \\ref rocsparse_scsrsv_analysis \"rocsparse_Xcsrsv_analysis()\", which will perform analysis on the sparse matrix\n  \\f$op(A)\\f$. Finally, complete the computation by calling \\p rocsparse_csrsv_solve. The buffer size,\n  buffer allocation, and analysis only need to be called once for a given sparse matrix \\f$op(A)\\f$, while the\n  computation stage can be repeatedly used with different \\f$x\\f$ and \\f$y\\f$ vectors. After all calls to\n  \\p rocsparse_csrsv_solve are complete, the temporary buffer can be deallocated.\n\n  Solving a triangular system involves division by the diagonal elements. This means that if the sparse matrix is\n  missing the diagonal entry (referred to as a structural zero) or the diagonal entry is zero (referred to as a numerical zero),\n  then a division by zero would occur. \\p rocsparse_csrsv_solve tracks the location of the first zero pivot (either numerical\n  or structural zero). The zero pivot status can be checked by calling \\ref rocsparse_csrsv_zero_pivot(). If\n  \\ref rocsparse_csrsv_zero_pivot() returns \\ref rocsparse_status_success, then no zero pivot was found and therefore\n  the matrix does not have a structural or numerical zero.\n\n  The user can specify that the sparse matrix should be interpreted as having ones on the diagonal by setting the diagonal type\n  on the descriptor \\p descr to \\ref rocsparse_diag_type_unit using \\ref rocsparse_set_mat_diag_type. If\n  \\ref rocsparse_diag_type == \\ref rocsparse_diag_type_unit, no zero pivot will be reported, even if \\f$A_{j,j} = 0\\f$ for\n  some \\f$j\\f$.\n\n  The sparse CSR matrix passed to \\p rocsparse_csrsv_solve does not actually have to be a triangular matrix. Instead the\n  triangular upper or lower part of the sparse matrix is solved based on \\ref rocsparse_fill_mode set on the descriptor\n  \\p descr. If the fill mode is set to \\ref rocsparse_fill_mode_lower, then the lower triangular matrix is solved. If the\n  fill mode is set to \\ref rocsparse_fill_mode_upper, then the upper triangular matrix is solved.\n\n  \\note\n  The sparse CSR matrix has to be sorted. This can be achieved by calling\n  rocsparse_csrsort().\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  Currently, only \\p trans == \\ref rocsparse_operation_none and\n  \\p trans == \\ref rocsparse_operation_transpose is supported.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start\n              of every row of the sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  x           array of \\p m elements, holding the right-hand side.\n  @param[out]\n  y           array of \\p m elements, holding the solution.\n  @param[in]\n  policy      \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, \\p x, or \\p y pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans == \\ref rocsparse_operation_conjugate_transpose or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  Consider the lower triangular \\f$m \\times m\\f$ matrix \\f$L\\f$, stored in CSR\n  storage format with unit diagonal. The following example solves \\f$L \\cdot y = x\\f$.\n  \\snippet example_rocsparse_csrsv.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsrsv_solve(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f32,
        y: *mut f32,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrsv_solve(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const f64,
        y: *mut f64,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrsv_solve(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrsv_solve(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        x: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Sparse matrix vector multiplication using the ELL storage format.\n\n  \\details\n  \\p rocsparse_ellmv multiplies the scalar \\f$\\alpha\\f$ with a sparse \\f$m \\times n\\f$\n  matrix, defined in ELL storage format, and the dense vector \\f$x\\f$ and adds the\n  result to the dense vector \\f$y\\f$ that is multiplied by the scalar \\f$\\beta\\f$,\n  such that\n  \\f[\n    y := \\alpha \\cdot op(A) \\cdot x + \\beta \\cdot y,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\code{.c}\n      for(i = 0; i < m; ++i)\n      {\n          y[i] = beta * y[i];\n\n          for(p = 0; p < ell_width; ++p)\n          {\n              idx = p * m + i;\n\n              if((ell_col_ind[idx] >= 0) && (ell_col_ind[idx] < n))\n              {\n                  y[i] = y[i] + alpha * ell_val[idx] * x[ell_col_ind[idx]];\n              }\n          }\n      }\n  \\endcode\n\n  \\note\n  This function does not produce deterministic results when A is transposed.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the sparse ELL matrix.\n  @param[in]\n  n           number of columns of the sparse ELL matrix.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse ELL matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  ell_val     array that contains the elements of the sparse ELL matrix. Padded\n              elements should be zero.\n  @param[in]\n  ell_col_ind array that contains the column indices of the sparse ELL matrix.\n              Padded column indices should be -1.\n  @param[in]\n  ell_width   number of non-zero elements per row of the sparse ELL matrix.\n  @param[in]\n  x           array of \\p n elements (\\f$op(A) == A\\f$) or \\p m elements\n              (\\f$op(A) == A^T\\f$ or \\f$op(A) == A^H\\f$).\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  y           array of \\p m elements (\\f$op(A) == A\\f$) or \\p n elements\n              (\\f$op(A) == A^T\\f$ or \\f$op(A) == A^H\\f$).\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ell_width is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p ell_val,\n              \\p ell_col_ind, \\p x, \\p beta, or \\p y pointer is invalid.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example performs a sparse matrix vector multiplication in ELL format. It also shows how to convert\n  from CSR to ELL format.\n  \\snippet example_rocsparse_ellmv.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sellmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        ell_val: *const f32,
        ell_col_ind: *const rocsparse_int,
        ell_width: rocsparse_int,
        x: *const f32,
        beta: *const f32,
        y: *mut f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dellmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        ell_val: *const f64,
        ell_col_ind: *const rocsparse_int,
        ell_width: rocsparse_int,
        x: *const f64,
        beta: *const f64,
        y: *mut f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cellmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        ell_val: *const rocsparse_float_complex,
        ell_col_ind: *const rocsparse_int,
        ell_width: rocsparse_int,
        x: *const rocsparse_float_complex,
        beta: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zellmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        ell_val: *const rocsparse_double_complex,
        ell_col_ind: *const rocsparse_int,
        ell_width: rocsparse_int,
        x: *const rocsparse_double_complex,
        beta: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Sparse matrix vector multiplication using the GEBSR storage format.\n\n  \\details\n  \\p rocsparse_gebsrmv multiplies the scalar \\f$\\alpha\\f$ with a sparse\n  \\f$m \\times n\\f$ matrix, defined in GEBSR storage format, and the dense vector\n  \\f$x\\f$ and adds the result to the dense vector \\f$y\\f$ that is multiplied by\n  the scalar \\f$\\beta\\f$, such that\n  \\f[\n    y := \\alpha \\cdot op(A) \\cdot x + \\beta \\cdot y,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none}\n    \\end{array}\n    \\right.\n  \\f]\n  and where \\f$m = mb \\times row\\_block\\_dim\\f$ and \\f$n = nb \\times col\\_block\\_dim\\f$.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  Currently, only \\p trans == \\ref rocsparse_operation_none is supported.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         matrix storage of GEBSR blocks.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  mb          number of block rows of the sparse GEBSR matrix.\n  @param[in]\n  nb          number of block columns of the sparse GEBSR matrix.\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse GEBSR matrix.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse GEBSR matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  bsr_val     array of \\p nnzb blocks of the sparse GEBSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of\n              the sparse GEBSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnz containing the block column indices of the sparse\n              GEBSR matrix.\n  @param[in]\n  row_block_dim row block dimension of the sparse GEBSR matrix.\n  @param[in]\n  col_block_dim column block dimension of the sparse GEBSR matrix.\n  @param[in]\n  x           array of \\p nb*col_block_dim elements (\\f$op(A) = A\\f$) or \\p mb*row_block_dim\n              elements (\\f$op(A) = A^T\\f$ or \\f$op(A) = A^H\\f$).\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  y           array of \\p mb*row_block_dim elements (\\f$op(A) = A\\f$) or \\p nb*col_block_dim\n              elements (\\f$op(A) = A^T\\f$ or \\f$op(A) = A^H\\f$).\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nb, \\p nnzb, \\p row_block_dim,\n              or \\p col_block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p bsr_val,\n              \\p bsr_row_ind, \\p bsr_col_ind, \\p x, \\p beta, or \\p y pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans != \\ref rocsparse_operation_none or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example performs a sparse matrix vector multiplication in GEBSR format.\n  \\snippet example_rocsparse_gebsrmv.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgebsrmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        x: *const f32,
        beta: *const f32,
        y: *mut f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgebsrmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        x: *const f64,
        beta: *const f64,
        y: *mut f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgebsrmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        x: *const rocsparse_float_complex,
        beta: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgebsrmv(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans: rocsparse_operation,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        x: *const rocsparse_double_complex,
        beta: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\details\n  \\p rocsparse_gemvi_buffer_size returns the size of the temporary storage buffer\n  required by \\ref rocsparse_sgemvi \"rocsparse_Xgemvi()\". The temporary storage\n  buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the dense matrix.\n  @param[in]\n  n           number of columns of the dense matrix.\n  @param[in]\n  nnz         number of non-zero entries in the sparse vector.\n  @param[out]\n  buffer_size temporary storage buffer size.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans != \\ref rocsparse_operation_none or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sgemvi_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgemvi_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgemvi_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgemvi_buffer_size(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Dense matrix sparse vector multiplication.\n\n  \\details\n  \\p rocsparse_gemvi multiplies the scalar \\f$\\alpha\\f$ with a dense \\f$m \\times n\\f$\n  matrix \\f$A\\f$ and the sparse vector \\f$x\\f$ and adds the result to the dense vector\n  \\f$y\\f$ that is multiplied by the scalar \\f$\\beta\\f$, such that\n  \\f[\n    y := \\alpha \\cdot op(A) \\cdot x + \\beta \\cdot y,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none}\n    \\end{array}\n    \\right.\n  \\f]\n\n  Performing the above operation involves two steps. First, call\n  \\ref rocsparse_sgemvi_buffer_size \"rocsparse_Xgemvi_buffer_size()\" to determine the size of\n  the temporary storage buffer. Next, allocate this temporary buffer and pass it to\n  \\p rocsparse_gemvi to complete the computation. After all calls to \\p rocsparse_gemvi are complete, the\n  temporary storage buffer can be freed.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  Currently, only \\p trans == \\ref rocsparse_operation_none is supported.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  m           number of rows of the dense matrix.\n  @param[in]\n  n           number of columns of the dense matrix.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  A           pointer to the dense matrix.\n  @param[in]\n  lda         leading dimension of the dense matrix.\n  @param[in]\n  nnz         number of non-zero entries in the sparse vector.\n  @param[in]\n  x_val       array of \\p nnz elements containing the values of the sparse vector.\n  @param[in]\n  x_ind       array of \\p nnz elements containing the indices of the sparse vector.\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  y           array of \\p m elements (\\f$op(A) == A\\f$) or \\p n elements\n              (\\f$op(A) == A^T\\f$ or \\f$op(A) == A^H\\f$).\n  @param[in]\n  idx_base    rocsparse_index_base_zero or rocsparse_index_base_one.\n  @param[in]\n  temp_buffer temporary storage buffer.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, \\p lda, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p alpha, \\p A, \\p x_val, \\p x_ind,\n              \\p beta, \\p y, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans != \\ref rocsparse_operation_none or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  \\snippet example_rocsparse_gemvi.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgemvi(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const f32,
        A: *const f32,
        lda: rocsparse_int,
        nnz: rocsparse_int,
        x_val: *const f32,
        x_ind: *const rocsparse_int,
        beta: *const f32,
        y: *mut f32,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgemvi(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const f64,
        A: *const f64,
        lda: rocsparse_int,
        nnz: rocsparse_int,
        x_val: *const f64,
        x_ind: *const rocsparse_int,
        beta: *const f64,
        y: *mut f64,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgemvi(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        A: *const rocsparse_float_complex,
        lda: rocsparse_int,
        nnz: rocsparse_int,
        x_val: *const rocsparse_float_complex,
        x_ind: *const rocsparse_int,
        beta: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgemvi(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        A: *const rocsparse_double_complex,
        lda: rocsparse_int,
        nnz: rocsparse_int,
        x_val: *const rocsparse_double_complex,
        x_ind: *const rocsparse_int,
        beta: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
        idx_base: rocsparse_index_base,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level2_module\n  \\brief Sparse matrix vector multiplication using the HYB storage format.\n\n  \\details\n  \\p rocsparse_hybmv multiplies the scalar \\f$\\alpha\\f$ with a sparse \\f$m \\times n\\f$\n  matrix, defined in HYB storage format, and the dense vector \\f$x\\f$ and adds the\n  result to the dense vector \\f$y\\f$ that is multiplied by the scalar \\f$\\beta\\f$,\n  such that\n  \\f[\n    y := \\alpha \\cdot op(A) \\cdot x + \\beta \\cdot y,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans == rocsparse_operation_none}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans       matrix operation type.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse HYB matrix. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  hyb         matrix in HYB storage format.\n  @param[in]\n  x           array of \\p n elements (\\f$op(A) == A\\f$) or \\p m elements\n              (\\f$op(A) == A^T\\f$ or \\f$op(A) == A^H\\f$).\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  y           array of \\p m elements (\\f$op(A) == A\\f$) or \\p n elements\n              (\\f$op(A) == A^T\\f$ or \\f$op(A) == A^H\\f$).\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p hyb structure was not initialized with\n              valid matrix sizes.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p hyb, \\p x,\n              \\p beta, or \\p y pointer is invalid.\n  \\retval     rocsparse_status_invalid_value \\p hyb structure was not initialized\n              with a valid partitioning type.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_memory_error the buffer could not be allocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans != \\ref rocsparse_operation_none or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example performs a sparse matrix vector multiplication in HYB format and\n  demonstrates a conversion from the CSR to HYB format.\n  \\snippet example_rocsparse_hybmv.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_shybmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        hyb: rocsparse_hyb_mat,
        x: *const f32,
        beta: *const f32,
        y: *mut f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dhybmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        hyb: rocsparse_hyb_mat,
        x: *const f64,
        beta: *const f64,
        y: *mut f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_chybmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        hyb: rocsparse_hyb_mat,
        x: *const rocsparse_float_complex,
        beta: *const rocsparse_float_complex,
        y: *mut rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zhybmv(
        handle: rocsparse_handle,
        trans: rocsparse_operation,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        hyb: rocsparse_hyb_mat,
        x: *const rocsparse_double_complex,
        beta: *const rocsparse_double_complex,
        y: *mut rocsparse_double_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\brief Sparse matrix dense matrix multiplication using the BSR storage format.\n\n  \\details\n  \\p rocsparse_bsrmm multiplies the scalar \\f$\\alpha\\f$ with a sparse \\f$m \\times k\\f$\n  matrix \\f$A\\f$, defined in BSR storage format, and the column-oriented dense \\f$k \\times n\\f$\n  matrix \\f$B\\f$ and adds the result to the column-oriented dense \\f$m \\times n\\f$ matrix \\f$C\\f$ that\n  is multiplied by the scalar \\f$\\beta\\f$, such that\n  \\f[\n    C := \\alpha \\cdot op(A) \\cdot op(B) + \\beta \\cdot C,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none} \\\\\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n    \\end{array}\n    \\right.\n  \\f]\n  and where \\f$k = block\\_dim \\times kb\\f$ and \\f$m = block\\_dim \\times mb\\f$.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  Currently, only \\p trans_A == \\ref rocsparse_operation_none is supported.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         the storage format of the blocks. Can be \\ref rocsparse_direction_row or \\ref rocsparse_direction_column.\n  @param[in]\n  trans_A     matrix \\f$A\\f$ operation type. Currently, only \\ref rocsparse_operation_none is supported.\n  @param[in]\n  trans_B     matrix \\f$B\\f$ operation type. Currently, only \\ref rocsparse_operation_none and rocsparse_operation_transpose\n              are supported.\n  @param[in]\n  mb          number of block rows of the sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  n           number of columns of the column-oriented dense matrix \\f$op(B)\\f$ and \\f$C\\f$.\n  @param[in]\n  kb          number of block columns of the sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix \\f$A\\f$. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  bsr_val     array of \\p nnzb*block_dim*block_dim elements of the sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of the\n              sparse BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse\n              BSR matrix \\f$A\\f$.\n  @param[in]\n  block_dim   size of the blocks in the sparse BSR matrix.\n  @param[in]\n  B           column-oriented dense matrix of dimension \\f$ldb \\times n\\f$ (\\f$op(B) == B\\f$),\n              \\f$ldb \\times k\\f$ otherwise.\n  @param[in]\n  ldb         leading dimension of \\f$B\\f$, must be at least \\f$\\max{(1, k)}\\f$ (\\f$ op(B) == B\\f$) where \\f$k = block\\_dim \\times kb\\f$,\n  \\f$\\max{(1, n)}\\f$ otherwise.\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  C           column-oriented dense matrix of  dimension \\f$ldc \\times n\\f$.\n  @param[in]\n  ldc         leading dimension of \\f$C\\f$, must be at least \\f$\\max{(1, m)}\\f$ (\\f$ op(A) == A\\f$) where \\f$m = block\\_dim \\times mb\\f$,\n  \\f$\\max{(1, k)}\\f$ where \\f$k = block\\_dim \\times kb\\f$ otherwise.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p n, \\p kb, \\p nnzb, \\p ldb, or \\p ldc\n              is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p bsr_val,\n              \\p bsr_row_ptr, \\p bsr_col_ind, \\p B, \\p beta, or \\p C pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans_A != \\ref rocsparse_operation_none,\n              \\p trans_B == \\ref rocsparse_operation_conjugate_transpose, or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example multiplies a BSR matrix with a column-oriented dense matrix.\n  \\snippet example_rocsparse_bsrmm.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sbsrmm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        n: rocsparse_int,
        kb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        B: *const f32,
        ldb: rocsparse_int,
        beta: *const f32,
        C: *mut f32,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrmm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        n: rocsparse_int,
        kb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        B: *const f64,
        ldb: rocsparse_int,
        beta: *const f64,
        C: *mut f64,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrmm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        n: rocsparse_int,
        kb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        B: *const rocsparse_float_complex,
        ldb: rocsparse_int,
        beta: *const rocsparse_float_complex,
        C: *mut rocsparse_float_complex,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrmm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        n: rocsparse_int,
        kb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        B: *const rocsparse_double_complex,
        ldb: rocsparse_int,
        beta: *const rocsparse_double_complex,
        C: *mut rocsparse_double_complex,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\details\n  \\p rocsparse_bsrsm_zero_pivot returns \\ref rocsparse_status_zero_pivot if either a\n  structural or numerical zero has been found during\n  \\ref rocsparse_sbsrsm_solve \"rocsparse_Xbsrsm_solve()\" computation. The first zero\n  pivot \\f$j\\f$ at \\f$A_{j,j}\\f$ is stored in \\p position, using the same index base as\n  the BSR matrix.\n\n  \\p position can be in the host or device memory. If no zero pivot has been found,\n  \\p position is set to -1 and \\ref rocsparse_status_success is returned instead.\n\n  \\note \\p rocsparse_bsrsm_zero_pivot is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[inout]\n  position    pointer to zero pivot \\f$j\\f$, which can be in host or device memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or \\p position pointer is\n              invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_zero_pivot zero pivot has been found."]
    pub fn rocsparse_bsrsm_zero_pivot(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        position: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\details\n  \\p rocsparse_bsrsm_buffer_size returns the size of the temporary storage buffer that\n  is required by \\ref rocsparse_sbsrsm_analysis \"rocsparse_Xbsrsm_analysis()\" and\n  \\ref rocsparse_sbsrsm_solve \"rocsparse_Xbsrsm_solve()\". The temporary storage buffer\n  must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         matrix storage of BSR blocks.\n  @param[in]\n  trans_A     matrix A operation type.\n  @param[in]\n  trans_X     matrix X operation type.\n  @param[in]\n  mb          number of block rows of the sparse BSR matrix A.\n  @param[in]\n  nrhs        number of columns of the column-oriented dense matrix op(X).\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse BSR matrix A.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix A.\n  @param[in]\n  bsr_val     array of \\p nnzb blocks of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of\n              the sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb containing the block column indices of the sparse\n              BSR matrix.\n  @param[in]\n  block_dim   block dimension of the sparse BSR matrix.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_sbsrsm_analysis \"rocsparse_Xbsrsm_analysis()\" and\n              \\ref rocsparse_sbsrsm_solve \"rocsparse_Xbsrsm_solve()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nrhs, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p bsr_val,\n              \\p bsr_row_ptr, \\p bsr_col_ind, \\p info, or \\p buffer_size pointer\n              is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans_A == \\ref rocsparse_operation_conjugate_transpose,\n              \\p trans_X == \\ref rocsparse_operation_conjugate_transpose, or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sbsrsm_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrsm_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrsm_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrsm_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\details\n  \\p rocsparse_bsrsm_analysis performs the analysis step for\n  \\ref rocsparse_sbsrsm_solve \"rocsparse_Xbsrsm_solve()\". It is expected that this function\n  will be executed only once for a given matrix and particular operation type. The analysis\n  meta data can be cleared by \\ref rocsparse_bsrsm_clear().\n\n  \\p rocsparse_bsrsm_analysis can share its meta data with\n  \\ref rocsparse_sbsrilu0_analysis \"rocsparse_Xbsrilu0_analysis()\",\n  \\ref rocsparse_sbsric0_analysis \"rocsparse_Xbsric0_analysis()\", and\n  \\ref rocsparse_sbsrsv_analysis \"rocsparse_Xbsrsv_analysis()\". Selecting\n  \\ref rocsparse_analysis_policy_reuse policy can greatly improve the computation\n  performance of the metadata. However, the user needs to ensure that the sparsity\n  pattern remains unchanged. If this cannot be assured,\n  \\ref rocsparse_analysis_policy_force has to be used.\n\n  \\note\n  If the matrix sparsity pattern changes, the gathered information will become invalid.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         matrix storage of BSR blocks.\n  @param[in]\n  trans_A     matrix A operation type.\n  @param[in]\n  trans_X     matrix X operation type.\n  @param[in]\n  mb          number of block rows of the sparse BSR matrix A.\n  @param[in]\n  nrhs        number of columns of the column-oriented dense matrix op(X).\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse BSR matrix A.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix A.\n  @param[in]\n  bsr_val     array of \\p nnzb blocks of the sparse BSR matrix A.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of\n              the sparse BSR matrix A.\n  @param[in]\n  bsr_col_ind array of \\p nnzb containing the block column indices of the sparse\n              BSR matrix A.\n  @param[in]\n  block_dim   block dimension of the sparse BSR matrix A.\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  analysis    \\ref rocsparse_analysis_policy_reuse or\n              \\ref rocsparse_analysis_policy_force.\n  @param[in]\n  solve       \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nrhs, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p bsr_val, \\p bsr_row_ptr,\n              \\p bsr_col_ind, \\p info, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans_A == \\ref rocsparse_operation_conjugate_transpose,\n              \\p trans_X == \\ref rocsparse_operation_conjugate_transpose, or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sbsrsm_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrsm_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrsm_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrsm_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\details\n  \\p rocsparse_bsrsm_clear deallocates all memory that was allocated by\n  \\ref rocsparse_sbsrsm_analysis \"rocsparse_Xbsrsm_analysis()\". This is especially useful\n  if memory is an issue and the analysis data is not required for further computation, for example,\n  when switching to another sparse matrix format. Calling \\p rocsparse_bsrsm_clear is optional.\n  All allocated resources will be cleared when the opaque \\ref rocsparse_mat_info struct\n  is destroyed using \\ref rocsparse_destroy_mat_info().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[inout]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer holding the metadata could not\n              be deallocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_bsrsm_clear(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\brief Sparse triangular system solve using the BSR storage format.\n\n  \\details\n  \\p rocsparse_bsrsm_solve solves a sparse triangular linear system of a sparse\n  \\f$m \\times m\\f$ matrix, defined in BSR storage format, a column-oriented dense solution matrix\n  \\f$X\\f$, and the column-oriented dense right-hand side matrix \\f$B\\f$ that is multiplied by \\f$\\alpha\\f$,\n  such that\n  \\f[\n    op(A) \\cdot op(X) = \\alpha \\cdot op(B),\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans_A == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans_A == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  ,\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_X == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_X == rocsparse_operation_transpose} \\\\\n        B^H, & \\text{if trans_X == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(X) = \\left\\{\n    \\begin{array}{ll}\n        X,   & \\text{if trans_X == rocsparse_operation_none} \\\\\n        X^T, & \\text{if trans_X == rocsparse_operation_transpose} \\\\\n        X^H, & \\text{if trans_X == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and where \\f$m = block\\_dim \\times mb\\f$.\n\n  Note that, as indicated above, the operation type of both \\f$op(B)\\f$ and \\f$op(X)\\f$ is specified by the\n  \\p trans_X parameter and that the operation type of B and X must match. For example, if \\f$op(B)=B\\f$, then\n  \\f$op(X)=X\\f$. Likewise, if \\f$op(B)=B^T\\f$, then \\f$op(X)=X^T\\f$.\n\n  Given that the sparse matrix A is a square matrix, its size is \\f$m \\times m\\f$ regardless of\n  whether A is transposed or not. The size of the column-oriented dense matrices B and X have\n  a size that depends on the value of \\p trans_X :\n\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        ldb \\times nrhs, \\text{  } ldb \\ge m, & \\text{if trans_X == rocsparse_operation_none} \\\\\n        ldb \\times m, \\text{  } ldb \\ge nrhs,  & \\text{if trans_X == rocsparse_operation_transpose} \\\\\n        ldb \\times m, \\text{  } ldb \\ge nrhs, & \\text{if trans_X == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(X) = \\left\\{\n    \\begin{array}{ll}\n        ldb \\times nrhs, \\text{  } ldb \\ge m, & \\text{if trans_X == rocsparse_operation_none} \\\\\n        ldb \\times m, \\text{  } ldb \\ge nrhs,  & \\text{if trans_X == rocsparse_operation_transpose} \\\\\n        ldb \\times m, \\text{  } ldb \\ge nrhs, & \\text{if trans_X == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\p rocsparse_bsrsm_solve requires a user-allocated temporary buffer. Its size is returned by\n  \\ref rocsparse_sbsrsm_buffer_size \"rocsparse_Xbsrsm_buffer_size()\". The size of the required buffer is larger\n  when  \\p trans_A equals \\ref rocsparse_operation_transpose or \\ref rocsparse_operation_conjugate_transpose and\n  when \\p trans_X is \\ref rocsparse_operation_none. The subsequent solve will also be faster when \\f$A\\f$ is\n  non-transposed and \\f$B\\f$ is transposed (or conjugate transposed). For example, instead of solving:\n\n  \\f[\n   \\left[\n    \\begin{array}{c | c}\n      \\begin{array}{c c}\n       a_{00} & a_{01} \\\\\n       a_{10} & a_{11}\n      \\end{array} &\n      \\begin{array}{c c}\n       0 & 0 \\\\\n       0 & 0\n      \\end{array} \\\\\n    \\hline\n      \\begin{array}{c c}\n       a_{20} & a_{21} \\\\\n       a_{30} & a_{31}\n      \\end{array} &\n      \\begin{array}{c c}\n       a_{22} & a_{23} \\\\\n       a_{32} & a_{33}\n      \\end{array} \\\\\n    \\end{array}\n   \\right]\n    \\cdot\n    \\begin{bmatrix}\n    x_{00} & x_{01} \\\\\n    x_{10} & x_{11} \\\\\n    x_{20} & x_{21} \\\\\n    x_{30} & x_{31} \\\\\n    \\end{bmatrix}\n    =\n    \\begin{bmatrix}\n    b_{00} & b_{01} \\\\\n    b_{10} & b_{11} \\\\\n    b_{20} & b_{21} \\\\\n    b_{30} & b_{31} \\\\\n    \\end{bmatrix}\n  \\f]\n\n  Consider solving:\n\n  \\f[\n   \\left[\n    \\begin{array}{c | c}\n      \\begin{array}{c c}\n       a_{00} & a_{01} \\\\\n       a_{10} & a_{11}\n      \\end{array} &\n      \\begin{array}{c c}\n       0 & 0 \\\\\n       0 & 0\n      \\end{array} \\\\\n    \\hline\n      \\begin{array}{c c}\n       a_{20} & a_{21} \\\\\n       a_{30} & a_{31}\n      \\end{array} &\n      \\begin{array}{c c}\n       a_{22} & a_{23} \\\\\n       a_{32} & a_{33}\n      \\end{array} \\\\\n    \\end{array}\n   \\right]\n    \\cdot\n    \\begin{bmatrix}\n    x_{00} & x_{10} & x_{20} & x_{30} \\\\\n    x_{01} & x_{11} & x_{21} & x_{31}\n    \\end{bmatrix}^{T}\n    =\n    \\begin{bmatrix}\n    b_{00} & b_{10} & b_{20} & b_{30} \\\\\n    b_{01} & b_{11} & b_{21} & b_{31}\n    \\end{bmatrix}^{T}\n  \\f]\n\n  After the temporary storage buffer has been allocated, analysis metadata is required. It can be obtained\n  by \\ref rocsparse_sbsrsm_analysis \"rocsparse_Xbsrsm_analysis()\".\n\n  Solving a triangular system involves inverting the diagonal blocks. This means that if the sparse matrix is\n  missing the diagonal block (referred to as a structural zero) or the diagonal block is not invertible (referred\n  to as a numerical zero) then a solution is not possible. \\p rocsparse_bsrsm_solve tracks the location of the first\n  zero pivot (either numerical or structural zero). The zero pivot status can be checked by calling \\ref rocsparse_bsrsm_zero_pivot().\n  If \\ref rocsparse_bsrsm_zero_pivot() returns \\ref rocsparse_status_success, then no zero pivot was found and therefore\n  the matrix does not have a structural or numerical zero.\n\n  The user can specify that the sparse matrix should be interpreted as having identity blocks on the diagonal by setting the diagonal\n  type on the descriptor \\p descr to \\ref rocsparse_diag_type_unit using \\ref rocsparse_set_mat_diag_type. If\n  \\ref rocsparse_diag_type == \\ref rocsparse_diag_type_unit, no zero pivot will be reported, even if the diagonal block \\f$A_{j,j}\\f$\n  for some \\f$j\\f$ is not invertible.\n\n  The sparse CSR matrix passed to \\p rocsparse_bsrsm_solve does not actually have to be a triangular matrix. Instead, the\n  triangular upper or lower part of the sparse matrix is solved based on \\ref rocsparse_fill_mode set on the descriptor\n  \\p descr. If the fill mode is set to \\ref rocsparse_fill_mode_lower, then the lower triangular matrix is solved. If the\n  fill mode is set to \\ref rocsparse_fill_mode_upper, then the upper triangular matrix is solved.\n\n  \\note\n  The sparse BSR matrix has to be sorted.\n\n  \\note\n  Operation type of B and X must match, , if \\f$op(B)=B\\f$ then \\f$op(X)=X\\f$.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  Currently, only \\p trans_A != \\ref rocsparse_operation_conjugate_transpose and\n  \\p trans_X != \\ref rocsparse_operation_conjugate_transpose is supported.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         matrix storage of BSR blocks.\n  @param[in]\n  trans_A     matrix A operation type.\n  @param[in]\n  trans_X     matrix X operation type.\n  @param[in]\n  mb          number of block rows of the sparse BSR matrix A.\n  @param[in]\n  nrhs        number of columns of the column-oriented dense matrix op(X).\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse BSR matrix A.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix A.\n  @param[in]\n  bsr_val     array of \\p nnzb blocks of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of\n              the sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb containing the block column indices of the sparse\n              BSR matrix.\n  @param[in]\n  block_dim   block dimension of the sparse BSR matrix.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  B           column-oriented dense matrix B with leading dimension \\p ldb.\n  @param[in]\n  ldb         leading dimension of rhs matrix B.\n  @param[out]\n  X           column-oriented dense solution matrix X with leading dimension \\p ldx.\n  @param[in]\n  ldx         leading dimension of solution matrix X.\n  @param[in]\n  policy      \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nrhs, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p alpha, \\p descr, \\p bsr_val,\n              \\p bsr_row_ptr, \\p bsr_col_ind, \\p B, \\p X \\p info, or \\p temp_buffer pointer\n              is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans_A == \\ref rocsparse_operation_conjugate_transpose,\n              \\p trans_X == \\ref rocsparse_operation_conjugate_transpose, or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  Consider the lower triangular \\f$m \\times m\\f$ matrix \\f$L\\f$, stored in BSR\n  storage format with non-unit diagonal. The following example solves \\f$L \\cdot X = B\\f$.\n  \\snippet example_rocsparse_bsrsm.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sbsrsm_solve(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        B: *const f32,
        ldb: rocsparse_int,
        X: *mut f32,
        ldx: rocsparse_int,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrsm_solve(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        B: *const f64,
        ldb: rocsparse_int,
        X: *mut f64,
        ldx: rocsparse_int,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrsm_solve(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        B: *const rocsparse_float_complex,
        ldb: rocsparse_int,
        X: *mut rocsparse_float_complex,
        ldx: rocsparse_int,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrsm_solve(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_X: rocsparse_operation,
        mb: rocsparse_int,
        nrhs: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        B: *const rocsparse_double_complex,
        ldb: rocsparse_int,
        X: *mut rocsparse_double_complex,
        ldx: rocsparse_int,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\brief Sparse matrix dense matrix multiplication using the CSR storage format.\n\n  \\details\n  \\p rocsparse_csrmm multiplies the scalar \\f$\\alpha\\f$ with a sparse \\f$m \\times k\\f$\n  matrix \\f$A\\f$, defined in CSR storage format, and the column-oriented dense \\f$k \\times n\\f$\n  matrix \\f$B\\f$ and adds the result to the column-oriented dense \\f$m \\times n\\f$ matrix \\f$C\\f$ that\n  is multiplied by the scalar \\f$\\beta\\f$, such that\n  \\f[\n    C := \\alpha \\cdot op(A) \\cdot op(B) + \\beta \\cdot C,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans_A == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans_A == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n        B^H, & \\text{if trans_B == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\code{.c}\n      for(i = 0; i < ldc; ++i)\n      {\n          for(j = 0; j < n; ++j)\n          {\n              C[i][j] = beta * C[i][j];\n\n              for(k = csr_row_ptr[i]; k < csr_row_ptr[i + 1]; ++k)\n              {\n                  C[i][j] += alpha * csr_val[k] * B[csr_col_ind[k]][j];\n              }\n          }\n      }\n  \\endcode\n\n  \\note\n  This function does not produce deterministic results when A is transposed.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A     matrix \\f$A\\f$ operation type.\n  @param[in]\n  trans_B     matrix \\f$B\\f$ operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  n           number of columns of the column-oriented dense matrix \\f$op(B)\\f$ and \\f$C\\f$.\n  @param[in]\n  k           number of columns of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix \\f$A\\f$. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix \\f$A\\f$.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix \\f$A\\f$.\n  @param[in]\n  B           column-oriented dense matrix of dimension \\f$ldb \\times n\\f$ (\\f$op(B) == B\\f$),\n              \\f$ldb \\times k\\f$ otherwise.\n  @param[in]\n  ldb         leading dimension of \\f$B\\f$, must be at least \\f$\\max{(1, k)}\\f$\n              (\\f$op(B) == B\\f$), \\f$\\max{(1, n)}\\f$ otherwise.\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  C           column-oriented dense matrix of dimension \\f$ldc \\times n\\f$.\n  @param[in]\n  ldc         leading dimension of \\f$C\\f$, must be at least \\f$\\max{(1, m)}\\f$\n              (\\f$op(A) == A\\f$), \\f$\\max{(1, k)}\\f$ otherwise.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, \\p k, \\p nnz, \\p ldb, or \\p ldc\n              is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, \\p B, \\p beta, or \\p C pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example multiplies a CSR matrix with a column-oriented dense matrix.\n  \\snippet example_rocsparse_csrmm.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsrmm(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const f32,
        ldb: rocsparse_int,
        beta: *const f32,
        C: *mut f32,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrmm(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const f64,
        ldb: rocsparse_int,
        beta: *const f64,
        C: *mut f64,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrmm(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const rocsparse_float_complex,
        ldb: rocsparse_int,
        beta: *const rocsparse_float_complex,
        C: *mut rocsparse_float_complex,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrmm(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const rocsparse_double_complex,
        ldb: rocsparse_int,
        beta: *const rocsparse_double_complex,
        C: *mut rocsparse_double_complex,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\details\n  \\p rocsparse_csrsm_zero_pivot returns \\ref rocsparse_status_zero_pivot if either a\n  structural or numerical zero has been found during\n  \\ref rocsparse_scsrsm_solve \"rocsparse_Xcsrsm_solve()\" computation. The first zero\n  pivot \\f$j\\f$ at \\f$A_{j,j}\\f$ is stored in \\p position, using the same index base as\n  the CSR matrix.\n\n  \\p position can be in host or device memory. If no zero pivot has been found,\n  \\p position is set to -1 and \\ref rocsparse_status_success is returned instead.\n\n  \\note \\p rocsparse_csrsm_zero_pivot is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[inout]\n  position    pointer to zero pivot \\f$j\\f$, which can be in host or device memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or \\p position pointer is\n              invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_zero_pivot zero pivot has been found."]
    pub fn rocsparse_csrsm_zero_pivot(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        position: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\details\n  \\p rocsparse_csrsm_buffer_size returns the size of the temporary storage buffer that\n  is required by \\ref rocsparse_scsrsm_analysis \"rocsparse_Xcsrsm_analysis()\" and\n  \\ref rocsparse_scsrsm_solve \"rocsparse_Xcsrsm_solve()\". The temporary storage buffer\n  must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A     matrix A operation type.\n  @param[in]\n  trans_B     matrix B operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix A.\n  @param[in]\n  nrhs        number of columns of the column-oriented dense matrix op(B).\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix A.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix A.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix A.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix A.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix A.\n  @param[in]\n  B           column-oriented dense matrix of dimension \\p m \\f$\\times\\f$ \\p nrhs elements of the rhs matrix B.\n  @param[in]\n  ldb         leading dimension of rhs matrix B.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  policy      \\ref rocsparse_solve_policy_auto.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              rocsparse_scsrsm_analysis(), rocsparse_dcsrsm_analysis(),\n              rocsparse_ccsrsm_analysis(), rocsparse_zcsrsm_analysis(),\n              rocsparse_scsrsm_solve(), rocsparse_dcsrsm_solve(),\n              rocsparse_ccsrsm_solve(), and rocsparse_zcsrsm_solve().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p nrhs, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p alpha, \\p descr, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, \\p B, \\p info, or \\p buffer_size pointer\n              is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans_A == \\ref rocsparse_operation_conjugate_transpose,\n              \\p trans_B == \\ref rocsparse_operation_conjugate_transpose, or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_scsrsm_buffer_size(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const f32,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrsm_buffer_size(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const f64,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrsm_buffer_size(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const rocsparse_float_complex,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrsm_buffer_size(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const rocsparse_double_complex,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\details\n  \\p rocsparse_csrsm_analysis performs the analysis step for\n  \\ref rocsparse_scsrsm_solve \"rocsparse_Xcsrsm_solve()\". It is expected that this\n  function will be executed only once for a given matrix and particular operation\n  type. The analysis metadata can be cleared by \\ref rocsparse_csrsm_clear().\n\n  \\p rocsparse_csrsm_analysis can share its meta data with\n  \\ref rocsparse_scsrilu0_analysis \"rocsparse_Xcsrilu0_analysis()\",\n  \\ref rocsparse_scsric0_analysis \"rocsparse_Xcsric0_analysis()\", and\n  \\ref rocsparse_scsrsv_analysis \"rocsparse_Xcsrsv_analysis()\". Selecting\n  \\ref rocsparse_analysis_policy_reuse policy can greatly improve computation\n  performance of the metadata. However, the user needs to ensure that the sparsity\n  pattern remains unchanged. If this cannot be assured,\n  \\ref rocsparse_analysis_policy_force has to be used.\n\n  \\note\n  If the matrix sparsity pattern changes, the gathered information will become invalid.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A     matrix A operation type.\n  @param[in]\n  trans_B     matrix B operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix A.\n  @param[in]\n  nrhs        number of columns of the column-oriented dense matrix op(B).\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix A.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix A.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix A.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix A.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix A.\n  @param[in]\n  B           column-oriented dense matrix of dimension \\p m \\f$\\times\\f$ \\p nrhs elements of the rhs matrix B.\n  @param[in]\n  ldb         leading dimension of rhs matrix B.\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  analysis    \\ref rocsparse_analysis_policy_reuse or\n              \\ref rocsparse_analysis_policy_force.\n  @param[in]\n  solve       \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p nrhs, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p alpha, \\p descr, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, \\p B, \\p info, or \\p temp_buffer pointer\n              is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans_A == \\ref rocsparse_operation_conjugate_transpose,\n              \\p trans_B == \\ref rocsparse_operation_conjugate_transpose, or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_scsrsm_analysis(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const f32,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrsm_analysis(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const f64,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrsm_analysis(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const rocsparse_float_complex,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrsm_analysis(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *const rocsparse_double_complex,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\details\n  \\p rocsparse_csrsm_clear deallocates all memory that was allocated by\n  \\ref rocsparse_scsrsm_analysis \"rocsparse_Xcsrsm_analysis()\". This is especially\n  useful if memory is an issue and the analysis data is not required for further\n  computation, for example, when switching to another sparse matrix format. Calling\n  \\p rocsparse_csrsm_clear is optional. All allocated resources will be cleared\n  when the opaque \\ref rocsparse_mat_info struct is destroyed using\n  \\ref rocsparse_destroy_mat_info().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[inout]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer holding the metadata could not\n              be deallocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csrsm_clear(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\brief Sparse triangular system solve using the CSR storage format.\n\n  \\details\n  \\p rocsparse_csrsm_solve solves a sparse triangular linear system of a sparse\n  \\f$m \\times m\\f$ matrix, defined in CSR storage format, a column-oriented dense solution matrix\n  \\f$X\\f$ and the column-oriented dense right-hand side matrix \\f$B\\f$ that is multiplied by \\f$\\alpha\\f$, such that\n  \\f[\n    op(A) \\cdot op(X) = \\alpha \\cdot op(B),\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans_A == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans_A == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  ,\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n        B^H, & \\text{if trans_B == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(X) = \\left\\{\n    \\begin{array}{ll}\n        X,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        X^T, & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n        X^H, & \\text{if trans_B == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  The solution is performed inplace, meaning that the matrix B is overwritten with the solution\n  X after calling \\p rocsparse_csrsm_solve. Given that the sparse matrix A is a square matrix, its\n  size is \\f$m \\times m\\f$, regardless of whether A is transposed or not. The size of the column-oriented dense\n  matrices B and X depends on the value of \\p trans_B:\n\n  \\f[\n    op(B)/op(X) = \\left\\{\n    \\begin{array}{ll}\n        ldb \\times nrhs, \\text{  } ldb \\ge m, & \\text{if trans_B == rocsparse_operation_none} \\\\\n        ldb \\times m, \\text{  } ldb \\ge nrhs,  & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n        ldb \\times m, \\text{  } ldb \\ge nrhs, & \\text{if trans_B == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\p rocsparse_csrsm_solve requires a user-allocated temporary buffer. Its size is returned by\n  \\ref rocsparse_scsrsm_buffer_size \"rocsparse_Xcsrsm_buffer_size()\". The size of the required buffer is\n  larger when \\p trans_A equals \\ref rocsparse_operation_transpose or \\ref rocsparse_operation_conjugate_transpose\n  and when \\p trans_B is \\ref rocsparse_operation_none. The subsequent solve will also be faster when \\f$A\\f$\n  is non-transposed and \\f$B\\f$ is transposed (or conjugate transposed). For example, instead of solving:\n\n  \\f[\n    \\begin{bmatrix}\n    a_{00} & 0 & 0 \\\\\n    a_{10} & a_{11} & 0 \\\\\n    a_{20} & a_{21} & a_{22} \\\\\n    \\end{bmatrix}\n    \\cdot\n    \\begin{bmatrix}\n    x_{00} & x_{01} \\\\\n    x_{10} & x_{11} \\\\\n    x_{20} & x_{21} \\\\\n    \\end{bmatrix}\n    =\n    \\begin{bmatrix}\n    b_{00} & b_{01} \\\\\n    b_{10} & b_{11} \\\\\n    b_{20} & b_{21} \\\\\n    \\end{bmatrix}\n  \\f]\n\n  Consider solving:\n\n  \\f[\n    \\begin{bmatrix}\n    a_{00} & 0 & 0 \\\\\n    a_{10} & a_{11} & 0 \\\\\n    a_{20} & a_{21} & a_{22}\n    \\end{bmatrix}\n    \\cdot\n    \\begin{bmatrix}\n    x_{00} & x_{10} & x_{20} \\\\\n    x_{01} & x_{11} & x_{21}\n    \\end{bmatrix}^{T}\n    =\n    \\begin{bmatrix}\n    b_{00} & b_{10} & b_{20} \\\\\n    b_{01} & b_{11} & b_{21}\n    \\end{bmatrix}^{T}\n  \\f]\n\n  After the temporary storage buffer has been allocated, analysis of the metadata is required.\n  It can be obtained by \\ref rocsparse_scsrsm_analysis \"rocsparse_Xcsrsm_analysis()\".\n\n  Solving a triangular system involves division by the diagonal elements. This means that if the sparse matrix is\n  missing the diagonal entry (referred to as a structural zero) or the diagonal entry is zero (referred to as a numerical zero),\n  then a division by zero would occur. \\p rocsparse_csrsm_solve tracks the location of the first zero pivot (either numerical\n  or structural zero). The zero pivot status can be checked by calling \\ref rocsparse_csrsm_zero_pivot(). If\n  \\ref rocsparse_csrsm_zero_pivot() returns \\ref rocsparse_status_success, then no zero pivot was found and therefore\n  the matrix does not have a structural or numerical zero.\n\n  The user can specify that the sparse matrix should be interpreted as having ones on the diagonal by setting the diagonal type\n  on the descriptor \\p descr to \\ref rocsparse_diag_type_unit using \\ref rocsparse_set_mat_diag_type. If\n  \\ref rocsparse_diag_type == \\ref rocsparse_diag_type_unit, no zero pivot will be reported, even if \\f$A_{j,j} = 0\\f$ for\n  some \\f$j\\f$.\n\n  The sparse CSR matrix passed to \\p rocsparse_csrsm_solve does not actually have to be a triangular matrix. Instead, the\n  triangular upper or lower part of the sparse matrix is solved based on the \\ref rocsparse_fill_mode setting on the descriptor\n  \\p descr. If the fill mode is set to \\ref rocsparse_fill_mode_lower, then the lower triangular matrix is solved. If the\n  fill mode is set to \\ref rocsparse_fill_mode_upper, then the upper triangular matrix is solved.\n\n  \\note\n  The sparse CSR matrix has to be sorted. This can be achieved by calling\n  rocsparse_csrsort().\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  Currently, only \\p trans_A != \\ref rocsparse_operation_conjugate_transpose and\n  \\p trans_B != \\ref rocsparse_operation_conjugate_transpose is supported.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A     matrix A operation type.\n  @param[in]\n  trans_B     matrix B operation type.\n  @param[in]\n  m           number of rows of the sparse CSR matrix A.\n  @param[in]\n  nrhs        number of columns of the column-oriented dense matrix op(B).\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix A.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix A.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix A.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix A.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix A.\n  @param[inout]\n  B           column-oriented dense matrix of dimension \\p m \\f$\\times\\f$ \\p nrhs elements of the rhs matrix B.\n  @param[in]\n  ldb         leading dimension of rhs matrix B.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  policy      \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p nrhs, or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p alpha, \\p descr, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, \\p B, \\p info, or \\p temp_buffer pointer\n              is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans_A == \\ref rocsparse_operation_conjugate_transpose,\n              \\p trans_B == \\ref rocsparse_operation_conjugate_transpose, or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  Consider the lower triangular \\f$m \\times m\\f$ matrix \\f$L\\f$, stored in CSR\n  storage format with unit diagonal. The following example solves \\f$L \\cdot X = B\\f$.\n  \\snippet example_rocsparse_csrmm.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsrsm_solve(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *mut f32,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrsm_solve(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *mut f64,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrsm_solve(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *mut rocsparse_float_complex,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrsm_solve(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        nrhs: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        B: *mut rocsparse_double_complex,
        ldb: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\brief Sparse matrix dense matrix multiplication using the general BSR storage format\n\n  \\details\n  \\p rocsparse_gebsrmm multiplies the scalar \\f$\\alpha\\f$ with a sparse \\f$m \\times k\\f$\n  matrix \\f$A\\f$, defined in general BSR storage format, and the column-oriented dense \\f$k \\times n\\f$\n  matrix \\f$B\\f$ and adds the result to the column-oriented dense \\f$m \\times n\\f$ matrix \\f$C\\f$ that\n  is multiplied by the scalar \\f$\\beta\\f$, such that\n  \\f[\n    C := \\alpha \\cdot op(A) \\cdot op(B) + \\beta \\cdot C,\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none} \\\\\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n    \\end{array}\n    \\right.\n  \\f]\n  and where \\f$k = col\\_block\\_dim \\times kb\\f$ and \\f$m = row\\_block\\_dim \\times mb\\f$.\n\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  Currently, only \\p trans_A == \\ref rocsparse_operation_none is supported.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         the storage format of the blocks. Can be \\ref rocsparse_direction_row or \\ref rocsparse_direction_column.\n  @param[in]\n  trans_A     matrix \\f$A\\f$ operation type. Currently, only \\ref rocsparse_operation_none is supported.\n  @param[in]\n  trans_B     matrix \\f$B\\f$ operation type. Currently, only \\ref rocsparse_operation_none and rocsparse_operation_transpose\n              are supported.\n  @param[in]\n  mb          number of block rows of the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  n           number of columns of the column-oriented dense matrix \\f$op(B)\\f$ and \\f$C\\f$.\n  @param[in]\n  kb          number of block columns of the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  nnzb        number of non-zero blocks of the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  descr       descriptor of the sparse general BSR matrix \\f$A\\f$. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  bsr_val     array of \\p nnzb*row_block_dim*col_block_dim elements of the sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of the\n              sparse general BSR matrix \\f$A\\f$.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse\n              general BSR matrix \\f$A\\f$.\n  @param[in]\n  row_block_dim   row size of the blocks in the sparse general BSR matrix.\n  @param[in]\n  col_block_dim   column size of the blocks in the sparse general BSR matrix.\n  @param[in]\n  B           column-oriented dense matrix of dimension \\f$ldb \\times n\\f$ (\\f$op(B) == B\\f$),\n              \\f$ldb \\times k\\f$ otherwise.\n  @param[in]\n  ldb         leading dimension of \\f$B\\f$, which must be at least \\f$\\max{(1, k)}\\f$ (\\f$ op(B) == B\\f$) where \\f$k = col\\_block\\_dim \\times kb\\f$,\n  \\f$\\max{(1, n)}\\f$ otherwise.\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  C           column-oriented dense matrix of dimension \\f$ldc \\times n\\f$.\n  @param[in]\n  ldc         leading dimension of \\f$C\\f$, which must be at least \\f$\\max{(1, m)}\\f$ (\\f$ op(A) == A\\f$) where \\f$m = row\\_block\\_dim \\times mb\\f$,\n  \\f$\\max{(1, k)}\\f$ where \\f$k = col\\_block\\_dim \\times kb\\f$ otherwise.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p n, \\p kb, \\p nnzb, \\p ldb, \\p ldc, \\p row_block_dim,\n              or \\p col_block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p alpha, \\p bsr_val,\n              \\p bsr_row_ptr, \\p bsr_col_ind, \\p B, \\p beta, or \\p C pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_not_implemented\n              \\p trans_A != \\ref rocsparse_operation_none,\n              \\p trans_B == \\ref rocsparse_operation_conjugate_transpose, or\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  This example multiplies a general BSR matrix with a column-oriented dense matrix.\n  \\snippet example_rocsparse_gebsrmm.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgebsrmm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        n: rocsparse_int,
        kb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f32,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        B: *const f32,
        ldb: rocsparse_int,
        beta: *const f32,
        C: *mut f32,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgebsrmm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        n: rocsparse_int,
        kb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const f64,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        B: *const f64,
        ldb: rocsparse_int,
        beta: *const f64,
        C: *mut f64,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgebsrmm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        n: rocsparse_int,
        kb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        B: *const rocsparse_float_complex,
        ldb: rocsparse_int,
        beta: *const rocsparse_float_complex,
        C: *mut rocsparse_float_complex,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgebsrmm(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        mb: rocsparse_int,
        n: rocsparse_int,
        kb: rocsparse_int,
        nnzb: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        B: *const rocsparse_double_complex,
        ldb: rocsparse_int,
        beta: *const rocsparse_double_complex,
        C: *mut rocsparse_double_complex,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup level3_module\n  \\brief Dense matrix sparse matrix multiplication using the CSR storage format.\n\n  \\details\n  \\p rocsparse_gemmi multiplies the scalar \\f$\\alpha\\f$ with a column-oriented dense \\f$m \\times k\\f$\n  matrix \\f$op(A)\\f$ and the sparse \\f$k \\times n\\f$ matrix \\f$op(B)\\f$, defined in CSR\n  storage format, and adds the result to the column-oriented dense \\f$m \\times n\\f$ matrix \\f$C\\f$ that\n  is multiplied by the scalar \\f$\\beta\\f$, such that\n  \\f[\n    C := \\alpha \\cdot op(A) \\cdot op(B) + \\beta \\cdot C\n  \\f]\n  with\n  \\f[\n    op(A) = \\left\\{\n    \\begin{array}{ll}\n        A,   & \\text{if trans_A == rocsparse_operation_none} \\\\\n        A^T, & \\text{if trans_A == rocsparse_operation_transpose} \\\\\n        A^H, & \\text{if trans_A == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n  and\n  \\f[\n    op(B) = \\left\\{\n    \\begin{array}{ll}\n        B,   & \\text{if trans_B == rocsparse_operation_none} \\\\\n        B^T, & \\text{if trans_B == rocsparse_operation_transpose} \\\\\n        B^H, & \\text{if trans_B == rocsparse_operation_conjugate_transpose}\n    \\end{array}\n    \\right.\n  \\f]\n\n  \\note\n  Currently, only \\p trans_A == \\ref rocsparse_operation_none is supported.\n\n  \\note\n  Currently, only \\p trans_B == \\ref rocsparse_operation_transpose is supported.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  trans_A     matrix \\f$A\\f$ operation type.\n  @param[in]\n  trans_B     matrix \\f$B\\f$ operation type.\n  @param[in]\n  m           number of rows of the column-oriented dense matrix \\f$A\\f$.\n  @param[in]\n  n           number of columns of the sparse CSR matrix \\f$op(B)\\f$ and \\f$C\\f$.\n  @param[in]\n  k           number of columns of the column-oriented dense matrix \\f$A\\f$.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  alpha       scalar \\f$\\alpha\\f$.\n  @param[in]\n  A           array of dimension \\f$lda \\times k\\f$ (\\f$op(A) == A\\f$) or\n              \\f$lda \\times m\\f$ (\\f$op(A) == A^T\\f$ or \\f$op(A) == A^H\\f$).\n  @param[in]\n  lda         leading dimension of \\f$A\\f$, must be at least \\f$m\\f$\n              (\\f$op(A) == A\\f$) or \\f$k\\f$ (\\f$op(A) == A^T\\f$ or\n              \\f$op(A) == A^H\\f$).\n  @param[in]\n  descr       descriptor of the sparse CSR matrix \\f$B\\f$. Currently, only\n              \\ref rocsparse_matrix_type_general is supported.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix \\f$B\\f$.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse CSR\n              matrix \\f$B\\f$.\n  @param[in]\n  beta        scalar \\f$\\beta\\f$.\n  @param[inout]\n  C           column-oriented dense matrix of dimension \\f$ldc \\times n\\f$ that holds the values of \\f$C\\f$.\n  @param[in]\n  ldc         leading dimension of \\f$C\\f$, must be at least \\f$m\\f$.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, \\p k, \\p nnz, \\p lda, or \\p ldc\n              is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p alpha, \\p A, \\p csr_val,\n              \\p csr_row_ptr, \\p csr_col_ind, \\p beta, or \\p C pointer is invalid.\n\n  \\par Example\n  This example multiplies a column-oriented dense matrix with a CSC matrix.\n  \\snippet example_rocsparse_gemmi.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgemmi(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f32,
        A: *const f32,
        lda: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        beta: *const f32,
        C: *mut f32,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgemmi(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const f64,
        A: *const f64,
        lda: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        beta: *const f64,
        C: *mut f64,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgemmi(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_float_complex,
        A: *const rocsparse_float_complex,
        lda: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        beta: *const rocsparse_float_complex,
        C: *mut rocsparse_float_complex,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgemmi(
        handle: rocsparse_handle,
        trans_A: rocsparse_operation,
        trans_B: rocsparse_operation,
        m: rocsparse_int,
        n: rocsparse_int,
        k: rocsparse_int,
        nnz: rocsparse_int,
        alpha: *const rocsparse_double_complex,
        A: *const rocsparse_double_complex,
        lda: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        beta: *const rocsparse_double_complex,
        C: *mut rocsparse_double_complex,
        ldc: rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_bsric0_zero_pivot returns \\ref rocsparse_status_zero_pivot if either a\n  structural or numerical zero has been found during \\ref rocsparse_sbsric0 \"rocsparse_Xbsric0()\"\n  computation. The first zero pivot \\f$j\\f$ at \\f$A_{j,j}\\f$ is stored in \\p position, using the same\n  index base as the BSR matrix.\n\n  \\p position can be in host or device memory. If no zero pivot has been found,\n  \\p position is set to -1 and \\ref rocsparse_status_success is returned instead.\n\n  \\note\n  If a zero pivot is found, \\p position=j means that either the diagonal block \\p A(j,j)\n  is missing (structural zero) or the diagonal block \\p A(j,j) is not positive definite\n  (numerical zero).\n\n  \\note \\p rocsparse_bsric0_zero_pivot is a blocking function. It might influence negatively\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[inout]\n  position    pointer to zero pivot \\f$j\\f$, which can be in host or device memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or \\p position pointer is\n              invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_zero_pivot zero pivot has been found."]
    pub fn rocsparse_bsric0_zero_pivot(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        position: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_bsric0_buffer_size returns the size of the temporary storage buffer\n  that is required by \\ref rocsparse_sbsric0_analysis \"rocsparse_Xbsric0_analysis()\" and\n  \\ref rocsparse_sbsric0 \"rocsparse_Xbsric0()\". The temporary storage buffer must be\n  allocated by the user. The size of the temporary storage buffer is identical to the size\n  returned by \\ref rocsparse_sbsrsv_buffer_size \"rocsparse_Xbsrsv_buffer_size()\" and\n  \\ref rocsparse_sbsrilu0_buffer_size \"rocsparse_Xbsrilu0_buffer_size()\" if the matrix sparsity\n  pattern is identical. The user-allocated buffer can therefore be shared between subsequent calls\n  to those functions.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         direction that specifies whether to count non-zero elements by \\ref rocsparse_direction_row or by\n              \\ref rocsparse_direction_column.\n  @param[in]\n  mb          number of block rows in the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero block entries of the sparse BSR matrix.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix.\n  @param[in]\n  bsr_val     array of length \\p nnzb*block_dim*block_dim containing the values of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of the\n              sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse BSR matrix.\n  @param[in]\n  block_dim   the block dimension of the BSR matrix. Between 1 and m, where \\p m=mb*block_dim.\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_sbsric0_analysis \"rocsparse_Xbsric0_analysis()\" and\n              \\ref rocsparse_sbsric0 \"rocsparse_Xbsric0()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p bsr_val, \\p bsr_row_ptr,\n              \\p bsr_col_ind, \\p info, or \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sbsric0_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsric0_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsric0_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsric0_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_bsric0_analysis performs the analysis step for\n  \\ref rocsparse_sbsric0 \"rocsparse_Xbsric0()\". It is expected that this function will\n  be executed only once for a given matrix and particular operation type. The analysis\n  metadata can be cleared by \\ref rocsparse_bsric0_clear().\n\n  \\p rocsparse_bsric0_analysis can share its meta data with\n  \\ref rocsparse_sbsrilu0_analysis \"rocsparse_Xbsrilu0_analysis()\",\n  \\ref rocsparse_sbsrsv_analysis \"rocsparse_Xbsrsv_analysis()\", and\n  \\ref rocsparse_sbsrsm_analysis \"rocsparse_Xbsrsm_analysis()\". Selecting\n  \\ref rocsparse_analysis_policy_reuse policy can greatly improve the computation\n  performance of metadata. However, the user needs to ensure that the sparsity\n  pattern remains unchanged. If this cannot be assured,\n  \\ref rocsparse_analysis_policy_force must be used.\n\n  \\note\n  If the matrix sparsity pattern changes, the gathered information will become invalid.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         direction that specified whether to count non-zero elements by \\ref rocsparse_direction_row or by\n              \\ref rocsparse_direction_column.\n  @param[in]\n  mb          number of block rows in the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero block entries of the sparse BSR matrix.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix.\n  @param[in]\n  bsr_val     array of length \\p nnzb*block_dim*block_dim containing the values of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of the\n              sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse BSR matrix.\n  @param[in]\n  block_dim   the block dimension of the BSR matrix. Between 1 and m, where \\p m=mb*block_dim.\n  @param[out]\n  info        structure that holds the information collected during\n              the analysis step.\n  @param[in]\n  analysis    \\ref rocsparse_analysis_policy_reuse or\n              \\ref rocsparse_analysis_policy_force.\n  @param[in]\n  solve       \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p bsr_val, \\p bsr_row_ptr,\n              \\p bsr_col_ind, \\p info, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sbsric0_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsric0_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsric0_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsric0_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_bsric0_clear deallocates all memory that was allocated by\n  \\ref rocsparse_sbsric0_analysis \"rocsparse_Xbsric0_analysis()\". This is especially useful\n  if memory is an issue and the analysis data is not required for further computation.\n\n  \\note\n  Calling \\p rocsparse_bsric0_clear is optional. All allocated resources will be\n  cleared when the opaque \\ref rocsparse_mat_info struct is destroyed using\n  \\ref rocsparse_destroy_mat_info().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[inout]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer holding the meta data could not\n              be deallocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_bsric0_clear(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\brief Incomplete Cholesky factorization with 0 fill-ins and no pivoting using the BSR\n  storage format.\n\n  \\details\n  \\p rocsparse_bsric0 computes the incomplete Cholesky factorization with 0 fill-ins\n  and no pivoting of a sparse \\f$mb \\times mb\\f$ BSR matrix \\f$A\\f$, such that\n  \\f[\n    A \\approx LL^T\n  \\f]\n\n  Computing the above incomplete Cholesky factorization requires three steps to complete. First,\n  determine the size of the required temporary storage buffer by calling \\ref rocsparse_sbsric0_buffer_size,\n  \\ref rocsparse_dbsric0_buffer_size, \\ref rocsparse_cbsric0_buffer_size, or \\ref rocsparse_zbsric0_buffer_size. After\n  this buffer size has been determined, allocate the buffer and pass it to \\ref rocsparse_sbsric0_analysis,\n  \\ref rocsparse_dbsric0_analysis, \\ref rocsparse_cbsric0_analysis, or \\ref rocsparse_zbsric0_analysis. This will\n  perform analysis on the sparsity pattern of the matrix. Finally, call \\p rocsparse_sbsric0,\n  \\p rocsparse_dbsric0, \\p rocsparse_cbsric0, or \\p rocsparse_zbsric0 to perform the actual factorization. The calculation\n  of the buffer size and the analysis of the sparse matrix only need to be performed once for a given sparsity pattern,\n  while the factorization can be repeatedly applied to multiple matrices having the same sparsity pattern. After all calls\n  to \\ref rocsparse_sbsric0 \"rocsparse_Xbsric0()\" are complete, the temporary buffer can be deallocated.\n\n  \\p rocsparse_bsric0 reports the first zero pivot (either numerical or structural zero).\n  The zero pivot status can be obtained by calling \\ref rocsparse_bsric0_zero_pivot().\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         direction that specified whether to count non-zero elements by \\ref rocsparse_direction_row or by\n              \\ref rocsparse_direction_column.\n  @param[in]\n  mb          number of block rows in the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero block entries of the sparse BSR matrix.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix.\n  @param[inout]\n  bsr_val     array of length \\p nnzb*block_dim*block_dim containing the values of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of the\n              sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse BSR matrix.\n  @param[in]\n  block_dim   the block dimension of the BSR matrix. Between 1 and m, where \\p m=mb*block_dim.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  policy      \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p bsr_val, \\p bsr_row_ptr,\n              or \\p bsr_col_ind pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  Consider the sparse \\f$m \\times m\\f$ matrix \\f$A\\f$, stored in BSR\n  storage format. The following example computes the incomplete Cholesky factorization\n  \\f$M \\approx LL^T\\f$ and solves the preconditioned system \\f$My = x\\f$.\n  \\snippet example_rocsparse_bsric0.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sbsric0(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *mut f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsric0(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *mut f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsric0(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *mut rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsric0(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *mut rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_bsrilu0_zero_pivot returns \\ref rocsparse_status_zero_pivot if either a\n  structural or numerical zero has been found during \\ref rocsparse_sbsrilu0 \"rocsparse_Xbsrilu0()\"\n  computation. The first zero pivot \\f$j\\f$ at \\f$A_{j,j}\\f$ is stored in \\p position, using the same\n  index base as the BSR matrix.\n\n  \\p position can be in host or device memory. If no zero pivot has been found,\n  \\p position is set to -1 and \\ref rocsparse_status_success is returned instead.\n\n  \\note\n  If a zero pivot is found, \\p position \\f$=j\\f$ means that either the diagonal block\n  \\f$A_{j,j}\\f$ is missing (structural zero) or the diagonal block \\f$A_{j,j}\\f$ is not\n  invertible (numerical zero).\n\n  \\note \\p rocsparse_bsrilu0_zero_pivot is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[inout]\n  position    pointer to zero pivot \\f$j\\f$, which can be in host or device memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or \\p position pointer is\n              invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_zero_pivot zero pivot has been found."]
    pub fn rocsparse_bsrilu0_zero_pivot(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        position: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_bsrilu0_numeric_boost enables the user to replace a numerical value in\n  an incomplete LU factorization. \\p tol is used to determine whether a numerical value\n  is replaced by \\p boost_val, such that \\f$A_{j,j} = \\text{boost_val}\\f$ if\n  \\f$\\text{tol} \\ge \\left|A_{j,j}\\right|\\f$.\n\n  \\note The boost value is enabled by setting \\p enable_boost to 1 or disabled by\n  setting \\p enable_boost to 0.\n\n  \\note \\p tol and \\p boost_val can be in host or device memory.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  info            structure that holds the information collected during the analysis step.\n  @param[in]\n  enable_boost    enable/disable numeric boost.\n  @param[in]\n  boost_tol       tolerance to determine whether a numerical value is replaced or not.\n  @param[in]\n  boost_val       boost value to replace a numerical value.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info, \\p tol, or \\p boost_val pointer\n              is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n/\n/**@{"]
    pub fn rocsparse_sbsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f32,
        boost_val: *const f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f64,
        boost_val: *const f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f32,
        boost_val: *const rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f64,
        boost_val: *const rocsparse_double_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dsbsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f64,
        boost_val: *const f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcbsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f64,
        boost_val: *const rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_bsrilu0_buffer_size returns the size of the temporary storage buffer\n  that is required by \\ref rocsparse_sbsrilu0_analysis \"rocsparse_Xbsrilu0_analysis()\" and\n  \\ref rocsparse_sbsrilu0 \"rocsparse_Xbsrilu0()\". The temporary storage buffer must be allocated\n  by the user. The size of the temporary storage buffer is identical to the size returned by\n  \\ref rocsparse_sbsrsv_buffer_size \"rocsparse_Xbsrsv_buffer_size()\" and\n  \\ref rocsparse_sbsric0_buffer_size \"rocsparse_Xbsric0_buffer_size()\" if the matrix sparsity\n  pattern is identical. The user-allocated buffer can therefore be shared between subsequent calls\n  to those functions.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         direction that specifies whether to count non-zero elements by \\ref rocsparse_direction_row or by\n              \\ref rocsparse_direction_column.\n  @param[in]\n  mb          number of block rows in the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero block entries of the sparse BSR matrix.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix.\n  @param[in]\n  bsr_val     array of length \\p nnzb*block_dim*block_dim containing the values of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of the\n              sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse BSR matrix.\n  @param[in]\n  block_dim   the block dimension of the BSR matrix. Between 1 and m, where \\p m=mb*block_dim.\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_sbsrilu0_analysis \"rocsparse_Xbsrilu0_analysis()\" and\n              \\ref rocsparse_sbsrilu0 \"rocsparse_Xbsrilu0()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p bsr_val, \\p bsr_row_ptr,\n              \\p bsr_col_ind, \\p info, or \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sbsrilu0_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrilu0_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrilu0_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrilu0_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_bsrilu0_analysis performs the analysis step for\n  \\ref rocsparse_sbsrilu0 \"rocsparse_Xbsrilu0()\". It is expected that this function will\n  be executed only once for a given matrix. The analysis metadata can be cleared by\n  \\ref rocsparse_bsrilu0_clear().\n\n  \\p rocsparse_bsrilu0_analysis can share its metadata with\n  \\ref rocsparse_sbsric0_analysis \"rocsparse_Xbsric0_analysis()\",\n  \\ref rocsparse_sbsrsv_analysis \"rocsparse_Xbsrsv_analysis()\", and\n  \\ref rocsparse_sbsrsm_analysis \"rocsparse_Xbsrsm_analysis()\". Selecting\n  \\ref rocsparse_analysis_policy_reuse policy can greatly improve the computation\n  performance of metadata. However, the user needs to ensure that the sparsity\n  pattern remains unchanged. If this cannot be assured,\n  \\ref rocsparse_analysis_policy_force must be used.\n\n  \\note\n  If the matrix sparsity pattern changes, the gathered information will become invalid.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         direction that specified whether to count non-zero elements by\n              \\ref rocsparse_direction_row or by \\ref rocsparse_direction_column.\n  @param[in]\n  mb          number of block rows in the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero block entries of the sparse BSR matrix.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix.\n  @param[in]\n  bsr_val     array of length \\p nnzb*block_dim*block_dim containing the values of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of the\n              sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse BSR matrix.\n  @param[in]\n  block_dim   the block dimension of the BSR matrix. Between 1 and m, where \\p m=mb*block_dim.\n  @param[out]\n  info        structure that holds the information collected during\n              the analysis step.\n  @param[in]\n  analysis    \\ref rocsparse_analysis_policy_reuse or\n              \\ref rocsparse_analysis_policy_force.\n  @param[in]\n  solve       \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p bsr_val, \\p bsr_row_ptr,\n              \\p bsr_col_ind, \\p info, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_sbsrilu0_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrilu0_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrilu0_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrilu0_analysis(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_bsrilu0_clear deallocates all memory that was allocated by\n  \\ref rocsparse_sbsrilu0_analysis \"rocsparse_Xbsrilu0_analysis()\". This is especially useful\n  if memory is an issue and the analysis data is not required for further computation.\n\n  \\note\n  Calling \\p rocsparse_bsrilu0_clear is optional. All allocated resources will be\n  cleared when the opaque \\ref rocsparse_mat_info struct is destroyed using\n  \\ref rocsparse_destroy_mat_info().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[inout]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer holding the metadata could not\n              be deallocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_bsrilu0_clear(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\brief Incomplete LU factorization with 0 fill-ins and no pivoting using the BSR storage\n  format\n\n  \\details\n  \\p rocsparse_bsrilu0 computes the incomplete LU factorization with 0 fill-ins and no\n  pivoting of a sparse \\f$mb \\times mb\\f$ BSR matrix \\f$A\\f$, such that\n  \\f[\n    A \\approx LU\n  \\f]\n\n  Computing the above incomplete LU factorization requires three steps to complete. First,\n  determine the size of the required temporary storage buffer by calling\n  \\ref rocsparse_sbsrilu0_buffer_size \"rocsparse_Xbsrilu0_buffer_size()\". After this buffer size\n  has been determined, allocate the buffer and pass it to\n  \\ref rocsparse_sbsrilu0_analysis \"rocsparse_Xbsrilu0_analysis()\". This will perform analysis on\n  the sparsity pattern of the matrix. Finally, call \\p rocsparse_sbsrilu0, \\p rocsparse_dbsrilu0,\n  \\p rocsparse_cbsrilu0, or \\p rocsparse_zbsrilu0 to perform the actual factorization. The calculation of\n  the buffer size and the analysis of the sparse matrix only need to be performed once for a given sparsity\n  pattern, while the factorization can be repeatedly applied to multiple matrices having the same sparsity\n  pattern. After all calls to \\ref rocsparse_sbsrilu0 \"rocsparse_Xbsrilu0()\" are complete, the temporary\n  buffer can be deallocated.\n\n  \\p rocsparse_bsrilu0 reports the first zero pivot (either numerical or structural zero).\n  The zero pivot status can be obtained by calling \\ref rocsparse_bsrilu0_zero_pivot().\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir         direction that specified whether to count non-zero elements by\n              \\ref rocsparse_direction_row or by \\ref rocsparse_direction_column.\n  @param[in]\n  mb          number of block rows in the sparse BSR matrix.\n  @param[in]\n  nnzb        number of non-zero block entries of the sparse BSR matrix.\n  @param[in]\n  descr       descriptor of the sparse BSR matrix.\n  @param[inout]\n  bsr_val     array of length \\p nnzb*block_dim*block_dim containing the values of the sparse BSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every block row of the\n              sparse BSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the block column indices of the sparse BSR matrix.\n  @param[in]\n  block_dim   the block dimension of the BSR matrix. Between 1 and m, where \\p m=mb*block_dim.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  policy      \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p mb, \\p nnzb, or \\p block_dim is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p bsr_val, \\p bsr_row_ptr,\n              or \\p bsr_col_ind pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  Consider the sparse \\f$m \\times m\\f$ matrix \\f$A\\f$, stored in the BSR\n  storage format. The following example computes the incomplete LU factorization\n  \\f$M \\approx LU\\f$ and solves the preconditioned system \\f$My = x\\f$.\n  \\snippet example_rocsparse_bsrilu0.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sbsrilu0(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *mut f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dbsrilu0(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *mut f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cbsrilu0(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *mut rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zbsrilu0(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nnzb: rocsparse_int,
        descr: rocsparse_mat_descr,
        bsr_val: *mut rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        block_dim: rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csric_zero_pivot returns \\ref rocsparse_status_zero_pivot if either a\n  structural or numerical zero has been found during \\ref rocsparse_scsric0 \"rocsparse_Xcsric0()\"\n  computation. The first zero pivot \\f$j\\f$ at \\f$A_{j,j}\\f$ is stored in \\p position, using\n  the same index base as the CSR matrix.\n\n  \\p position can be in host or device memory. If no zero pivot has been found,\n  \\p position is set to -1 and \\ref rocsparse_status_success is returned instead.\n\n  \\note \\p rocsparse_csric0_zero_pivot is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[inout]\n  position    pointer to zero pivot \\f$j\\f$, which can be in host or device memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or \\p position pointer is\n              invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_zero_pivot zero pivot has been found."]
    pub fn rocsparse_csric0_zero_pivot(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        position: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  rocsparse_csric0_singular_pivot() returns the position of a\n  numerical singular pivot (where \\f$|L_{j,j}| \\leq \\text{tolerance}\\f$)\n  that has been found during \\ref rocsparse_scsric0 \"rocsparse_Xcsric0()\" computation.\n  The first singular pivot \\f$j\\f$ at \\f$L_{j,j}\\f$ is stored in \\p position, using the\n  same index base as the CSR matrix.\n\n  \\p position can be in host or device memory. If no singular pivot has been found,\n  \\p position is set to -1.\n\n  \\note rocsparse_csric0_singular_pivot() is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[inout]\n  position    pointer to singular pivot \\f$k\\f$, which can be in host or device memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or \\p position pointer is\n              invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csric0_singular_pivot(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        position: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  rocsparse_csric0_set_tolerance()  sets the numerical tolerance for detecting a\n  numerical singular pivot (where \\f$|L_{j,j}|  \\leq \\text{tolerance}\\f$)\n  that might be found during \\ref rocsparse_scsric0 \"rocsparse_Xcsric0()\" computation.\n\n\n  \\note rocsparse_csric0_set_tolerance() is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  tolerance    tolerance for detecting singular pivot (\\f$|L_{j,j}|  \\leq \\text{tolerance}\\f$).\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer if \\p info tolerance pointer is\n              invalid"]
    pub fn rocsparse_csric0_set_tolerance(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        tolerance: f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  rocsparse_csric0_get_tolerance() returns the numerical tolerance for detecting a\n  numerical singular pivot (where \\f$|L_{j,j}|  \\leq \\text{tolerance}\\f$)\n  that might be found during \\ref rocsparse_scsric0 \"rocsparse_Xcsric0()\" computation.\n\n\n  \\note rocsparse_csric0_get_tolerance() is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[out]\n  tolerance    obtain tolerance for detecting singular pivot (\\f$|L_{j,j}|  \\leq \\text{tolerance}\\f$).\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer if \\p info or \\p tolerance pointer is\n              invalid"]
    pub fn rocsparse_csric0_get_tolerance(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        tolerance: *mut f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csric0_buffer_size returns the size of the temporary storage buffer\n  that is required by \\ref rocsparse_scsric0_analysis \"rocsparse_Xcsric0_analysis()\".\n  The temporary storage buffer must be allocated by the user. The size of the temporary\n  storage buffer is identical to the size returned by\n  \\ref rocsparse_scsrsv_buffer_size \"rocsparse_Xcsrsv_buffer_size()\" and\n  \\ref rocsparse_scsrilu0_buffer_size \"rocsparse_Xcsrilu0_buffer_size()\" if the matrix\n  sparsity pattern is identical. The user-allocated buffer can therefore be shared between\n  subsequent calls to those functions.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_scsric0_analysis \"rocsparse_Xcsric0_analysis()\" and\n              \\ref rocsparse_scsric0 \"rocsparse_Xcsric0()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_val, \\p csr_row_ptr,\n              \\p csr_col_ind, \\p info, or \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_scsric0_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsric0_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsric0_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsric0_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csric0_analysis performs the analysis step for\n  \\ref rocsparse_scsric0 \"rocsparse_Xcsric0()\". It is expected that this function will be\n  executed only once for a given matrix and particular operation type. The analysis metadata\n  can be cleared by \\ref rocsparse_csric0_clear().\n\n  \\p rocsparse_csric0_analysis can share its metadata with\n  \\ref rocsparse_scsrilu0_analysis \"rocsparse_Xcsrilu0_analysis()\",\n  \\ref rocsparse_scsrsv_analysis \"rocsparse_Xcsrsv_analysis()\", and\n  \\ref rocsparse_scsrsm_analysis \"rocsparse_Xcsrsm_analysis()\". Selecting\n  \\ref rocsparse_analysis_policy_reuse policy can greatly improve the computation\n  performance of metadata. However, the user needs to ensure that the sparsity\n  pattern remains unchanged. If this cannot be assured,\n  \\ref rocsparse_analysis_policy_force has to be used.\n\n  \\note\n  If the matrix sparsity pattern changes, the gathered information will become invalid.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[out]\n  info        structure that holds the information collected during\n              the analysis step.\n  @param[in]\n  analysis    \\ref rocsparse_analysis_policy_reuse or\n              \\ref rocsparse_analysis_policy_force.\n  @param[in]\n  solve       \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_val, \\p csr_row_ptr,\n              \\p csr_col_ind, \\p info, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_scsric0_analysis(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsric0_analysis(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsric0_analysis(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsric0_analysis(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csric0_clear deallocates all memory that was allocated by\n  \\ref rocsparse_scsric0_analysis \"rocsparse_Xcsric0_analysis()\". This is especially\n  useful if memory is an issue and the analysis data is not required for further\n  computation.\n\n  \\note\n  Calling \\p rocsparse_csric0_clear is optional. All allocated resources will be\n  cleared when the opaque \\ref rocsparse_mat_info struct is destroyed using\n  \\ref rocsparse_destroy_mat_info().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[inout]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer holding the metadata could not\n              be deallocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csric0_clear(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\brief Incomplete Cholesky factorization with 0 fill-ins and no pivoting using the CSR\n  storage format.\n\n  \\details\n  \\p rocsparse_csric0 computes the incomplete Cholesky factorization with 0 fill-ins\n  and no pivoting of a sparse \\f$m \\times m\\f$ CSR matrix \\f$A\\f$, such that\n  \\f[\n    A \\approx LL^T\n  \\f]\n  where the lower triangular matrix \\f$L\\f$ is computed using:\n  \\f[\n    L_{ij} = \\left\\{\n    \\begin{array}{ll}\n        \\sqrt{A_{jj} - \\sum_{k=0}^{j-1}(L_{jk})^{2}},   & \\text{if i == j} \\\\\n        \\frac{1}{L_{jj}}(A_{ij} - \\sum_{k=0}^{j-1}L_{ik} \\times L_{jk}), & \\text{if i > j}\n    \\end{array}\n    \\right.\n  \\f]\n  for each entry found in the CSR matrix \\f$A\\f$.\n\n  Computing the above incomplete Cholesky factorization requires three steps to complete. First,\n  determine the size of the required temporary storage buffer by calling\n  \\ref rocsparse_scsric0_buffer_size \"rocsparse_Xcsric0_buffer_size()\". After this buffer size has been determined,\n  allocate the buffer and pass it to \\ref rocsparse_scsric0_analysis \"rocsparse_Xcsric0_analysis()\".\n  This will perform analysis on the sparsity pattern of the matrix. Finally, call \\p rocsparse_scsric0,\n  \\p rocsparse_dcsric0, \\p rocsparse_ccsric0, or \\p rocsparse_zcsric0 to perform the actual factorization. The calculation\n  of the buffer size and the analysis of the sparse matrix only need to be performed once for a given sparsity pattern,\n  while the factorization can be repeatedly applied to multiple matrices having the same sparsity pattern. After all calls\n  to \\ref rocsparse_scsric0 \"rocsparse_Xcsric0()\" are complete, the temporary buffer can be deallocated.\n\n  When computing the Cholesky factorization, it is possible that \\f$L_{jj} == 0\\f$, which would result in a division by zero.\n  This could occur from either \\f$A_{jj}\\f$ not existing in the sparse CSR matrix (referred to as a structural zero) or because\n  \\f$A_{jj} - \\sum_{k=0}^{j-1}(L_{jk})^{2} == 0\\f$ (referred to as a numerical zero). For example, running the Cholesky\n  factorization on the following matrix:\n  \\f[\n    \\begin{bmatrix}\n    2 & 1 & 0 \\\\\n    1 & 2 & 1 \\\\\n    0 & 1 & 2\n    \\end{bmatrix}\n  \\f]\n  results in a successful Cholesky factorization, however running with the matrix:\n  \\f[\n    \\begin{bmatrix}\n    2 & 1 & 0 \\\\\n    1 & 1/2 & 1 \\\\\n    0 & 1 & 2\n    \\end{bmatrix}\n  \\f]\n  results in a numerical zero because:\n  \\f[\n    \\begin{array}{ll}\n        L_{00} &= \\sqrt{2} \\\\\n        L_{10} &= \\frac{1}{\\sqrt{2}} \\\\\n        L_{11} &= \\sqrt{\\frac{1}{2} - (\\frac{1}{\\sqrt{2}})^2}\n               &= 0\n    \\end{array}\n  \\f]\n  The user can detect the presence of a structural zero by calling \\ref rocsparse_csric0_zero_pivot() after\n  \\ref rocsparse_scsric0_analysis \"rocsparse_Xcsric0_analysis()\" and/or the presence of a structural or\n  numerical zero by calling \\ref rocsparse_csric0_zero_pivot() after \\ref rocsparse_scsric0 \"rocsparse_Xcsric0()\":\n  \\code{.c}\n  rocsparse_dcsric0(handle,\n                  m,\n                  nnz,\n                  descr_M,\n                  csr_val,\n                  csr_row_ptr,\n                  csr_col_ind,\n                  info,\n                  rocsparse_solve_policy_auto,\n                  temp_buffer);\n\n  // Check for zero pivot\n  if(rocsparse_status_zero_pivot == rocsparse_csric0_zero_pivot(handle,\n                                                                info,\n                                                                &position))\n  {\n      printf(\"L has structural and/or numerical zero at L(%d,%d)\\n\", position, position);\n  }\n  \\endcode\n  In both cases, \\ref rocsparse_csric0_zero_pivot() will report the first zero pivot (either numerical or structural)\n  found. See the full example below. The user can also set the diagonal type to be \\f$1\\f$ using \\ref rocsparse_set_mat_diag_type(),\n  which will interpret the matrix \\f$A\\f$ as having ones on its diagonal (even if no non-zero exists in the sparsity pattern).\n\n  \\p rocsparse_csric0 computes the Cholesky factorization inplace, meaning that the values array \\p csr_val of the \\f$A\\f$\n  matrix is overwritten with the \\f$L\\f$ matrix stored in the lower triangular part of \\f$A\\f$:\n\n  \\f[\n    \\begin{align}\n    \\begin{bmatrix}\n    a_{00} & a_{01} & a_{02} \\\\\n    a_{10} & a_{11} & a_{12} \\\\\n    a_{20} & a_{21} & a_{22}\n    \\end{bmatrix}\n    \\rightarrow\n    \\begin{bmatrix}\n    l_{00} & a_{01} & a_{02} \\\\\n    l_{10} & l_{11} & a_{12} \\\\\n    l_{20} & l_{21} & l_{22}\n    \\end{bmatrix}\n    \\end{align}\n  \\f]\n  The row pointer array \\p csr_row_ptr and the column indices array \\p csr_col_ind remain the same for \\f$A\\f$ and the output, as\n  the incomplete factorization does not generate new non-zeros in the output which do not already exist in \\f$A\\f$.\n\n  The performance of computing the Cholesky factorization with rocSPARSE greatly depends on the sparsity pattern\n  of the matrix \\f$A\\f$, as this is what determines the amount of parallelism available.\n\n  \\note\n  The sparse CSR matrix has to be sorted. This can be achieved by calling\n  rocsparse_csrsort().\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[inout]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start\n              of every row of the sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  policy      \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_val, \\p csr_row_ptr,\n              or \\p csr_col_ind pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  Consider the sparse \\f$m \\times m\\f$ matrix \\f$A\\f$, stored in the CSR\n  storage format. The following example computes the incomplete Cholesky factorization\n  \\f$M \\approx LL^T\\f$ and solves the preconditioned system \\f$My = x\\f$.\n  \\snippet example_rocsparse_csric0.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsric0(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *mut f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsric0(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *mut f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsric0(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *mut rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsric0(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *mut rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csrilu0_zero_pivot returns \\ref rocsparse_status_zero_pivot if either a\n  structural or numerical zero has been found during \\ref rocsparse_scsrilu0 \"rocsparse_Xcsrilu0()\"\n  computation. The first zero pivot \\f$j\\f$ at \\f$A_{j,j}\\f$ is stored in \\p position, using the same index\n  base as the CSR matrix.\n\n  \\p position can be in host or device memory. If no zero pivot has been found,\n  \\p position is set to -1 and \\ref rocsparse_status_success is returned instead.\n\n  \\note \\p rocsparse_csrilu0_zero_pivot is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[inout]\n  position    pointer to zero pivot \\f$j\\f$, which can be in host or device memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or \\p position pointer is\n              invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_zero_pivot zero pivot has been found."]
    pub fn rocsparse_csrilu0_zero_pivot(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        position: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  rocsparse_csrilu0_set_tolerance() sets the numerical tolerance for detecting a\n  near numerical zero entry during \\ref rocsparse_scsrilu0 \"rocsparse_Xcsrilu0()\"\n  computation. The first singular pivot \\f$j\\f$ at \\f$|A_{j,j}| \\leq \\text{tolerance}\\f$.\n\n\n  \\note rocsparse_csrilu0_set_tolerance() is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  tolerance    tolerance value to determine singular pivot \\f$|A_{j,j}| \\leq \\text{tolerance}\\f$,\n               where variable tolerance is in host memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csrilu0_set_tolerance(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        tolerance: f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  rocsparse_csrilu0_get_tolerance() returns the numerical tolerance for detecting\n  a near numerical zero entry during \\ref rocsparse_scsrilu0 \"rocsparse_Xcsrilu0()\"\n  computation. The first singular pivot \\f$j\\f$ at \\f$|A_{j,j}| \\leq \\text{tolerance}\\f$.\n\n  \\note rocsparse_csrilu0_get_tolerance() is a blocking function. It might negatively influence\n  performance.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[out]\n  tolerance   obtain tolerance value to determine the singular pivot \\f$|A_{j,j}| \\leq \\text{tolerance}\\f$,\n              where variable tolerance is in host memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or tolerance pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csrilu0_get_tolerance(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        tolerance: *mut f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  rocsparse_csrilu0_singular_pivot() returns the position of a\n  near numerical zero entry that has been found during \\ref rocsparse_scsrilu0 \"rocsparse_Xcsrilu0()\"\n  computation. The first singular pivot \\f$j\\f$ at \\f$|A_{j,j}| \\leq \\text{tolerance}\\f$  is stored\n  in \\p position, using the same index base as the CSR matrix.\n\n  \\p position can be in host or device memory. If no singular pivot has been found,\n  \\p position is set to -1.\n\n  \\note rocsparse_csrilu0_singular_pivot() is a blocking function. It might influence\n  performance negatively.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[inout]\n  position    pointer to singular pivot \\f$j\\f$, which can be in host or device memory.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info or \\p position pointer is\n              invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csrilu0_singular_pivot(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        position: *mut rocsparse_int,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csrilu0_numeric_boost enables the user to replace a numerical value in\n  an incomplete LU factorization. \\p tol is used to determine whether a numerical value\n  is replaced by \\p boost_val, such that \\f$A_{j,j} = \\text{boost_val}\\f$ if\n  \\f$\\text{tol} \\ge \\left|A_{j,j}\\right|\\f$.\n\n  \\note The boost value is enabled by setting \\p enable_boost to 1 or disabled by\n  setting \\p enable_boost to 0.\n\n  \\note \\p tol and \\p boost_val can be in host or device memory.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle          handle to the rocSPARSE library context queue.\n  @param[in]\n  info            structure that holds the information collected during the analysis step.\n  @param[in]\n  enable_boost    enable/disable numeric boost.\n  @param[in]\n  boost_tol       tolerance to determine whether a numerical value is replaced or not.\n  @param[in]\n  boost_val       boost value to replace a numerical value.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info, \\p tol, or \\p boost_val pointer\n              is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n/\n/**@{"]
    pub fn rocsparse_scsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f32,
        boost_val: *const f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f64,
        boost_val: *const f64,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f32,
        boost_val: *const rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f64,
        boost_val: *const rocsparse_double_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dscsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f64,
        boost_val: *const f32,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dccsrilu0_numeric_boost(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
        enable_boost: ::std::os::raw::c_int,
        boost_tol: *const f64,
        boost_val: *const rocsparse_float_complex,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csrilu0_buffer_size returns the size of the temporary storage buffer\n  that is required by \\ref rocsparse_scsrilu0_analysis \"rocsparse_Xcsrilu0_analysis()\" and\n  \\ref rocsparse_scsrilu0 \"rocsparse_Xcsrilu0()\". The temporary storage buffer must be allocated\n  by the user. The size of the temporary storage buffer is identical to the size returned by\n  \\ref rocsparse_scsrsv_buffer_size \"rocsparse_Xcsrsv_buffer_size()\" if the matrix sparsity pattern\n  is identical. The user-allocated buffer can therefore be shared between subsequent calls to those functions.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[out]\n  info        structure that holds the information collected during the analysis step.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_scsrilu0_analysis \"rocsparse_Xcsrilu0_analysis()\" and\n              \\ref rocsparse_scsrilu0 \"rocsparse_Xcsrilu0()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_val, \\p csr_row_ptr,\n              \\p csr_col_ind, \\p info, or \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_scsrilu0_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrilu0_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrilu0_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrilu0_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csrilu0_analysis performs the analysis step for \\ref rocsparse_scsrilu0 \"rocsparse_Xcsrilu0()\".\n  It is expected that this function will be executed only once for a given matrix and particular\n  operation type. The analysis metadata can be cleared by \\ref rocsparse_csrilu0_clear().\n\n  \\p rocsparse_csrilu0_analysis can share its meta data with\n  \\ref rocsparse_scsric0_analysis \"rocsparse_Xcsric0_analysis()\",\n  \\ref rocsparse_scsrsv_analysis \"rocsparse_Xcsrsv_analysis()\", and\n  \\ref rocsparse_scsrsm_analysis \"rocsparse_Xcsrsm_analysis()\". Selecting\n  \\ref rocsparse_analysis_policy_reuse policy can greatly improve the computation\n  performance of metadata. However, the user needs to ensure that the sparsity\n  pattern remains unchanged. If this cannot be assured,\n  \\ref rocsparse_analysis_policy_force must be used.\n\n  \\note\n  If the matrix sparsity pattern changes, the gathered information will become invalid.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[out]\n  info        structure that holds the information collected during\n              the analysis step.\n  @param[in]\n  analysis    \\ref rocsparse_analysis_policy_reuse or\n              \\ref rocsparse_analysis_policy_force.\n  @param[in]\n  solve       \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_val, \\p csr_row_ptr,\n              \\p csr_col_ind, \\p info, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n/\n/**@{"]
    pub fn rocsparse_scsrilu0_analysis(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrilu0_analysis(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrilu0_analysis(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrilu0_analysis(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        analysis: rocsparse_analysis_policy,
        solve: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csrilu0_clear deallocates all memory that was allocated by\n  \\ref rocsparse_scsrilu0_analysis \"rocsparse_Xcsrilu0_analysis()\". This is especially\n  useful if memory is an issue and the analysis data is not required for further\n  computation.\n\n  \\note\n  Calling \\p rocsparse_csrilu0_clear is optional. All allocated resources will be\n  cleared when the opaque \\ref rocsparse_mat_info struct is destroyed using\n  \\ref rocsparse_destroy_mat_info().\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[inout]\n  info        structure that holds the information collected during the analysis step.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p info pointer is invalid.\n  \\retval     rocsparse_status_memory_error the buffer holding the metadata could not\n              be deallocated.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csrilu0_clear(
        handle: rocsparse_handle,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\brief Incomplete LU factorization with 0 fill-ins and no pivoting using the CSR\n  storage format.\n\n  \\details\n  \\p rocsparse_csrilu0 computes the incomplete LU factorization with 0 fill-ins and no\n  pivoting of a sparse \\f$m \\times m\\f$ CSR matrix \\f$A\\f$, such that\n  \\f[\n    A \\approx LU\n  \\f]\n  where the lower triangular matrix \\f$L\\f$ and the upper triangular matrix \\f$U\\f$ are computed using:\n  \\f[\n    \\begin{array}{ll}\n        L_{ij} = \\frac{1}{U_{jj}}(A_{ij} - \\sum_{k=0}^{j-1}L_{ik} \\times U_{kj}), & \\text{if i > j} \\\\\n        U_{ij} = (A_{ij} - \\sum_{k=0}^{j-1}L_{ik} \\times U_{kj}), & \\text{if i <= j}\n    \\end{array}\n  \\f]\n  for each entry found in the CSR matrix \\f$A\\f$.\n\n  Computing the above incomplete \\f$LU\\f$ factorization requires three steps to complete. First,\n  determine the size of the required temporary storage buffer by calling\n  \\ref rocsparse_scsrilu0_buffer_size \"rocsparse_Xcsrilu0_buffer_size()\". After this buffer size has been determined,\n  allocate the buffer and pass it to \\ref rocsparse_scsrilu0_analysis \"rocsparse_Xcsrilu0_analysis()\".\n  This will perform analysis on the sparsity pattern of the matrix. Finally, call \\p rocsparse_scsrilu0,\n  \\p rocsparse_dcsrilu0, \\p rocsparse_ccsrilu0, or \\p rocsparse_zcsrilu0 to perform the actual factorization. The calculation\n  of the buffer size and the analysis of the sparse matrix only need to be performed once for a given sparsity pattern\n  while the factorization can be repeatedly applied to multiple matrices having the same sparsity pattern. After all calls\n  to \\ref rocsparse_scsrilu0 \"rocsparse_Xcsrilu0()\" are complete, the temporary buffer can be deallocated.\n\n  When computing the \\f$LU\\f$ factorization, it is possible that \\f$U_{jj} == 0\\f$, which would result in a division by zero.\n  This could occur from either \\f$A_{jj}\\f$ not existing in the sparse CSR matrix (referred to as a structural zero) or because\n  \\f$A_{ij} - \\sum_{k=0}^{j-1}L_{ik} \\times U_{kj} == 0\\f$ (referred to as a numerical zero). For example, running the\n  \\f$LU\\f$ factorization on the following matrix:\n  \\f[\n    \\begin{bmatrix}\n    2 & 1 & 0 \\\\\n    1 & 2 & 1 \\\\\n    0 & 1 & 2\n    \\end{bmatrix}\n  \\f]\n  results in a successful \\f$LU\\f$ factorization. However, running with the matrix:\n  \\f[\n    \\begin{bmatrix}\n    2 & 1 & 0 \\\\\n    1 & 1/2 & 1 \\\\\n    0 & 1 & 2\n    \\end{bmatrix}\n  \\f]\n  results in a numerical zero because:\n  \\f[\n    \\begin{array}{ll}\n        U_{00} &= 2 \\\\\n        U_{01} &= 1 \\\\\n        L_{10} &= \\frac{1}{2} \\\\\n        U_{11} &= \\frac{1}{2} - \\frac{1}{2}\n               &= 0\n    \\end{array}\n  \\f]\n  The user can detect the presence of a structural zero by calling \\ref rocsparse_csrilu0_zero_pivot() after\n  \\ref rocsparse_scsrilu0_analysis \"rocsparse_Xcsrilu0_analysis()\" and/or the presence of a structural or\n  numerical zero by calling \\ref rocsparse_csrilu0_zero_pivot() after \\ref rocsparse_scsrilu0 \"rocsparse_Xcsric0()\".\n  In both cases, \\ref rocsparse_csrilu0_zero_pivot() will report the first zero pivot (either numerical or structural)\n  found. See the example below. The user can also set the diagonal type to be \\f$1\\f$ using \\ref rocsparse_set_mat_diag_type(),\n  which will interpret the matrix \\f$A\\f$ as having ones on its diagonal (even if no non-zero exists in the sparsity pattern).\n\n  \\p rocsparse_csrilu0 computes the \\f$LU\\f$ factorization inplace, meaning that the values array \\p csr_val of the \\f$A\\f$\n  matrix is overwritten with the \\f$L\\f$ matrix stored in the strictly lower triangular part of \\f$A\\f$ and the \\f$U\\f$ matrix\n  stored in the upper part of \\f$A\\f$:\n\n  \\f[\n    \\begin{align}\n    \\begin{bmatrix}\n    a_{00} & a_{01} & a_{02} \\\\\n    a_{10} & a_{11} & a_{12} \\\\\n    a_{20} & a_{21} & a_{22}\n    \\end{bmatrix}\n    \\rightarrow\n    \\begin{bmatrix}\n    u_{00} & u_{01} & u_{02} \\\\\n    l_{10} & u_{11} & u_{12} \\\\\n    l_{20} & l_{21} & u_{22}\n    \\end{bmatrix}\n    \\end{align}\n  \\f]\n  The row pointer array \\p csr_row_ptr and the column indices array \\p csr_col_ind remain the same for \\f$A\\f$ and \\f$LU\\f$, as\n  the incomplete factorization does not generate new non-zeros in \\f$LU\\f$ which do not already exist in \\f$A\\f$.\n\n  The performance of computing \\f$LU\\f$ factorization with rocSPARSE greatly depends on the sparsity pattern\n  the the matrix \\f$A\\f$, as this is what determines the amount of parallelism available.\n\n  \\note\n  The sparse CSR matrix has to be sorted. This can be achieved by calling\n  rocsparse_csrsort().\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  descr       descriptor of the sparse CSR matrix.\n  @param[inout]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start\n              of every row of the sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[in]\n  info        structure that holds the information collected during the analysis step.\n  @param[in]\n  policy      \\ref rocsparse_solve_policy_auto.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p descr, \\p csr_val, \\p csr_row_ptr,\n              or \\p csr_col_ind pointer is invalid.\n  \\retval     rocsparse_status_arch_mismatch the device is not supported.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_not_implemented\n              \\ref rocsparse_matrix_type != \\ref rocsparse_matrix_type_general.\n\n  \\par Example\n  Consider the sparse \\f$m \\times m\\f$ matrix \\f$A\\f$, stored in CSR\n  storage format. The following example computes the incomplete LU factorization\n  \\f$M \\approx LU\\f$ and solves the preconditioned system \\f$My = x\\f$.\n  \\snippet example_rocsparse_csrilu0.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_scsrilu0(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *mut f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrilu0(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *mut f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrilu0(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *mut rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrilu0(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *mut rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        info: rocsparse_mat_info,
        policy: rocsparse_solve_policy,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csritilu0_buffer_size computes the size in bytes of the buffer that must be allocated by the user.\n  This buffer is then used in \\ref rocsparse_csritilu0_preprocess, \\ref rocsparse_scsritilu0_compute \"rocsparse_Xcsritilu0_compute()\",\n  \\ref rocsparse_scsritilu0_compute_ex \"rocsparse_Xcsritilu0_compute_ex()\", and \\ref rocsparse_scsritilu0_history \"rocsparse_Xcsritilu0_history()\".\n\n  \\note\n  The sparse CSR matrix has to be sorted. This can be achieved by calling\n  rocsparse_csrsort().\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  alg         algorithm to use, \\ref rocsparse_itilu0_alg.\n  @param[in]\n  option      combination of enumeration values from \\ref rocsparse_itilu0_option.\n  @param[in]\n  nmaxiter     maximum number of iterations.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start\n              of every row of the sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  datatype    Type of numerical values, \\ref rocsparse_datatype.\n  @param[out]\n  buffer_size size of the temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_value \\p alg, \\p base, or datatype is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_row_ptr\n              or \\p csr_col_ind pointer is invalid.\n  \\retval     rocsparse_status_zero_pivot if nnz is zero.\n  \\retval     rocsparse_status_internal_error an internal error occurred."]
    pub fn rocsparse_csritilu0_buffer_size(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        option: rocsparse_int,
        nmaxiter: rocsparse_int,
        m: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        datatype: rocsparse_datatype,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csritilu0_preprocess computes the information required to run \\ref rocsparse_scsritilu0_compute \"rocsparse_Xcsritilu0_compute()\"\n  and \\ref rocsparse_scsritilu0_compute_ex \"rocsparse_Xcsritilu0_compute_ex()\" and stores it in the buffer.\n\n  \\note\n  The sparse CSR matrix has to be sorted. This can be achieved by calling\n  rocsparse_csrsort().\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  alg         algorithm to use, \\ref rocsparse_itilu0_alg.\n  @param[in]\n  option      combination of enumeration values from \\ref rocsparse_itilu0_option.\n  @param[in]\n  nmaxiter    maximum number of iterations.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start\n              of every row of the sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  datatype    type of numerical values, \\ref rocsparse_datatype.\n  @param[in]\n  buffer_size size of the storage buffer allocated by the user.\n  @param[in]\n  buffer      storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_value \\p alg, \\p base, or datatype is invalid.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_row_ptr\n              or \\p csr_col_ind pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n  \\retval     rocsparse_status_zero_pivot if a missing diagonal element is detected."]
    pub fn rocsparse_csritilu0_preprocess(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        option: rocsparse_int,
        nmaxiter: rocsparse_int,
        m: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        datatype: rocsparse_datatype,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\brief Iterative Incomplete LU factorization with 0 fill-ins and no pivoting using the CSR\n  storage format.\n\n  \\details\n  \\p rocsparse_csritilu0_compute computes iteratively the incomplete LU factorization with 0 fill-ins and no\n  pivoting of a sparse \\f$m \\times m\\f$ CSR matrix \\f$A\\f$, such that\n  \\f[\n    A \\approx (L + Id)(D + U)\n  \\f]\n\n  The following notation applies for the equations below: diag is the diagonal part, lower is the strict lower triangular part, and upper is the strict upper triangular part of a given matrix.\n  Starting with \\f$L_{0} = lower(\\f$ \\p ilu0 \\f$)\\f$ and \\f$U_{0} = upper(\\f$ \\p ilu0 \\f$)\\f$, the method iterates with\n  \\f[\n  \\begin{eqnarray}\n     R_k &=& A - L_{k} U_{k},\\\\\n     D_{k+1} &=& diag(R_k),\\\\\n     L_{k+1} &=& lower(R_k) D_{k+1}^{-1},\\\\\n     U_{k+1} &=& upper(R_k),\n  \\end{eqnarray}\n  \\f]\n  if \\f$ 0 \\le k \\lt \\f$ \\p nmaxiter and if\n  \\f[\n     \\Vert R_k \\Vert_{\\infty} \\gt \\epsilon \\Vert A \\Vert_{\\infty},\n  \\f]\n  with \\f$\\epsilon\\f$ = \\p tol. Note that the calculation of \\f$R_k\\f$ is performed with no fill-in.\n\n  Computing the above iterative incomplete LU factorization requires three steps to complete. First,\n  determine the size of the required temporary storage buffer by calling \\ref rocsparse_csritilu0_buffer_size.\n  After this buffer size has been determined, allocate the buffer and pass it to\n  \\ref rocsparse_csritilu0_preprocess. This will perform analysis on the sparsity pattern of the matrix. Finally,\n  call \\p rocsparse_scsritilu0_compute, \\p rocsparse_dcsritilu0_compute, \\p rocsparse_ccsritilu0_compute,\n  or \\p rocsparse_zcsritilu0_compute to perform the actual factorization. The calculation\n  of the buffer size and the analysis of the sparse matrix only need to be performed once for a given sparsity pattern\n  while the factorization can be repeatedly applied to multiple matrices having the same sparsity pattern. After all calls\n  to \\ref rocsparse_scsritilu0_compute \"rocsparse_Xcsritilu0_compute()\" are complete, the temporary buffer can be deallocated.\n\n  \\p rocsparse_csritilu0 has a number of options that can be useful for examining the convergence history, easily printing debug\n  information, and using the COO internal format.\n  <table>\n  <caption id=\"csritilu0 options\">Options</caption>\n  <tr><th>Option                                              <th>Notes\n  <tr><td>rocsparse_itilu0_option_verbose</td>                <td>Print to stdout convergence data as the routine runs. Useful for debugging.</td>\n  <tr><td>rocsparse_itilu0_option_stopping_criteria</td>      <td>Enable stopping criteria.</td>\n  <tr><td>rocsparse_itilu0_option_compute_nrm_correction</td> <td>Compute and store normalized correction. The stored data can then be queried later with \\ref rocsparse_scsritilu0_history \"rocsparse_Xcsritilu0_history\".</td>\n  <tr><td>rocsparse_itilu0_option_compute_nrm_residual</td>   <td>Compute and store the normalized residual of the between the approximate solution and the exact solution per iteration. The stored data can then be queried later with \\ref rocsparse_scsritilu0_history \"rocsparse_Xcsritilu0_history\".</td>\n  <tr><td>rocsparse_itilu0_option_convergence_history</td>    <td>Enable collecting convergence history data with \\ref rocsparse_scsritilu0_history \"rocsparse_Xcsritilu0_history\".</td>\n  <tr><td>rocsparse_itilu0_option_coo_format</td>             <td>Use COO format internally.</td>\n  </table>\n\n  \\note\n  The sparse CSR matrix has to be sorted. This can be achieved by calling\n  rocsparse_csrsort().\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  alg         algorithm to use, \\ref rocsparse_itilu0_alg\n  @param[in]\n  option      combination of enumeration values from \\ref rocsparse_itilu0_option.\n  @param[inout]\n  nmaxiter     maximum number of iterations on input and number of iterations on output. If the output number of iterations is strictly less than the input maximum number of iterations, then the algorithm converged.\n  @param[in]\n  tol tolerance to use for stopping criteria.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start\n              of every row of the sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[inout]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[out]\n  ilu0        incomplete factorization.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  buffer_size size of the storage buffer allocated by the user.\n  @param[in]\n  buffer      storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_value \\p alg or \\p base is invalid.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_row_ptr\n              or \\p csr_col_ind pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n  \\par Example\n  \\include example_rocsparse_csritilu0.cpp\n/\n/**@{"]
    pub fn rocsparse_scsritilu0_compute(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        option: rocsparse_int,
        nmaxiter: *mut rocsparse_int,
        tol: f32,
        m: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csr_val: *const f32,
        ilu0: *mut f32,
        idx_base: rocsparse_index_base,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsritilu0_compute(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        option: rocsparse_int,
        nmaxiter: *mut rocsparse_int,
        tol: f64,
        m: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csr_val: *const f64,
        ilu0: *mut f64,
        idx_base: rocsparse_index_base,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsritilu0_compute(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        option: rocsparse_int,
        nmaxiter: *mut rocsparse_int,
        tol: f32,
        m: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csr_val: *const rocsparse_float_complex,
        ilu0: *mut rocsparse_float_complex,
        idx_base: rocsparse_index_base,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsritilu0_compute(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        option: rocsparse_int,
        nmaxiter: *mut rocsparse_int,
        tol: f64,
        m: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csr_val: *const rocsparse_double_complex,
        ilu0: *mut rocsparse_double_complex,
        idx_base: rocsparse_index_base,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\brief Iterative incomplete LU factorization with 0 fill-ins and no pivoting using the CSR\n  storage format.\n\n  \\details\n  \\p rocsparse_csritilu0_compute computes iteratively the incomplete LU factorization with 0 fill-ins and no\n  pivoting of a sparse \\f$m \\times m\\f$ CSR matrix \\f$A\\f$, such that\n  \\f[\n    A \\approx (L + Id)(D + U)\n  \\f]\n\n\n  The following notation applies for the equations below: diag is the diagonal part, lower is the strict lower triangular part, and upper is the strict upper triangular part of a given matrix.\n  Starting with \\f$L_{0} = lower(\\f$ \\p ilu0 \\f$)\\f$, \\f$U_{0} = upper(\\f$ \\p ilu0 \\f$)\\f$, the method iterates with\n  \\f[\n  \\begin{eqnarray}\n     R_k &=& A - L_{k} U_{k},\\\\\n     D_{k+1} &=& diag(R_k),\\\\\n     L_{k+1} &=& lower(R_k) D_{k+1}^{-1},\\\\\n     U_{k+1} &=& upper(R_k),\n  \\end{eqnarray}\n  \\f]\n  if \\f$ 0 \\le k \\lt \\f$ \\p nmaxiter and if\n  \\f[\n     \\Vert R_k \\Vert_{\\infty} \\gt \\epsilon \\Vert A \\Vert_{\\infty},\n  \\f]\n  with \\f$\\epsilon\\f$ = \\p tol. Note that the calculation of \\f$R_k\\f$ is performed with no fill-in.\n\n  The parameter \\p nfreeiter is used to control the frequence of the stopping criteria evaluation, potentially improving the performance of the algorithm with less norm calculation. Between each iteration of index \\f$ k \\f$, \\p nfreeiter are performed without stopping criteria evaluation. Therefore, if the convergence is obtained with \\f$ k \\f$, this means \\f$ (k + 1)( \\f$ \\p nfreeiter \\f$ ) + k \\f$ iterations.\n\n  \\p rocsparse_csritilu0 requires a user-allocated temporary buffer. Its size is returned\n  by rocsparse_csritilu0_buffer_size(). Furthermore,\n  analysis metadata is required. It can be obtained by rocsparse_csritilu0_preprocess().\n\n  \\note\n  The sparse CSR matrix has to be sorted. This can be achieved by calling\n  rocsparse_csrsort().\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  alg         algorithm to use, \\ref rocsparse_itilu0_alg.\n  @param[in]\n  option      combination of enumeration values from \\ref rocsparse_itilu0_option.\n  @param[inout]\n  nmaxiter     maximum number of iterations on input and number of iterations on output. If the output number of iterations is strictly less than the input maximum number of iterations, then the algorithm converged.\n  @param[inout]\n  nfreeiter    number of free iterations, that is, the number of iterations the algorithm will perform without stopping criteria evaluations.\n  @param[in]\n  tol tolerance to use for stopping criteria.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start\n              of every row of the sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[inout]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[out]\n  ilu0        incomplete factorization.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  buffer_size size of the storage buffer allocated by the user.\n  @param[in]\n  buffer      storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_value \\p alg or \\p base is invalid.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p csr_row_ptr\n              or \\p csr_col_ind pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n/\n/**@{"]
    pub fn rocsparse_scsritilu0_compute_ex(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        option: rocsparse_int,
        nmaxiter: *mut rocsparse_int,
        nfreeiter: rocsparse_int,
        tol: f32,
        m: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csr_val: *const f32,
        ilu0: *mut f32,
        idx_base: rocsparse_index_base,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsritilu0_compute_ex(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        option: rocsparse_int,
        nmaxiter: *mut rocsparse_int,
        nfreeiter: rocsparse_int,
        tol: f64,
        m: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csr_val: *const f64,
        ilu0: *mut f64,
        idx_base: rocsparse_index_base,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsritilu0_compute_ex(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        option: rocsparse_int,
        nmaxiter: *mut rocsparse_int,
        nfreeiter: rocsparse_int,
        tol: f32,
        m: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csr_val: *const rocsparse_float_complex,
        ilu0: *mut rocsparse_float_complex,
        idx_base: rocsparse_index_base,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsritilu0_compute_ex(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        option: rocsparse_int,
        nmaxiter: *mut rocsparse_int,
        nfreeiter: rocsparse_int,
        tol: f64,
        m: rocsparse_int,
        nnz: rocsparse_int,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        csr_val: *const rocsparse_double_complex,
        ilu0: *mut rocsparse_double_complex,
        idx_base: rocsparse_index_base,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_csritilu0_history fetches convergence history data if\n  \\ref rocsparse_itilu0_option_convergence_history has been set when calling\n  \\ref rocsparse_scsritilu0_compute \"rocsparse_Xcsritilu0_compute\" or\n  \\ref rocsparse_scsritilu0_compute_ex \"rocsparse_Xcsritilu0_compute_ex\":\n\n  \\code{.c}\n  int options = 0;\n  options |= rocsparse_itilu0_option_stopping_criteria;\n  options |= rocsparse_itilu0_option_compute_nrm_residual;\n  options |= rocsparse_itilu0_option_convergence_history;\n  rocsparse_scsritilu0_compute(handle,\n                                 alg,\n                                 options,\n                                 &nmaxiter,\n                                 tol,\n                                 m,\n                                 nnz,\n                                 dcsr_row_ptr,\n                                 dcsr_col_ind,\n                                 dcsr_val,\n                                 dilu0,\n                                 idx_base,\n                                 buffer_size,\n                                 dbuffer);\n\n  if((options & rocsparse_itilu0_option_convergence_history) > 0)\n  {\n      std::vector<float> history(nmaxiter * 2);\n      rocsparse_int history_niter = 0;\n      rocsparse_scsritilu0_history(handle, alg, &history_niter, history.data(), buffer_size, dbuffer);\n\n      const bool nrm_residual = (options & rocsparse_itilu0_option_compute_nrm_residual) > 0;\n      for(rocsparse_int i = 0; i < history_niter; ++i)\n      {\n          std::cout << std::setw(12) << i;\n          if(nrm_residual)\n          {\n              std::cout << std::setw(12) << history[history_niter + i];\n          }\n          std::cout << std::endl;\n      }\n  }\n  \\endcode\n\n  \\note\n  The sparse CSR matrix has to be sorted. This can be achieved by calling\n  rocsparse_csrsort().\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  alg         algorithm to use, \\ref rocsparse_itilu0_alg.\n  @param[out]\n  niter       number of performed iterations.\n  @param[out]\n  data        norms.\n  @param[in]\n  buffer_size size of the buffer allocated by the user.\n  @param[in]\n  buffer buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_pointer \\p niter or \\p data is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n/\n/**@{"]
    pub fn rocsparse_scsritilu0_history(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        niter: *mut rocsparse_int,
        data: *mut f32,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsritilu0_history(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        niter: *mut rocsparse_int,
        data: *mut f64,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsritilu0_history(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        niter: *mut rocsparse_int,
        data: *mut f32,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsritilu0_history(
        handle: rocsparse_handle,
        alg: rocsparse_itilu0_alg,
        niter: *mut rocsparse_int,
        data: *mut f64,
        buffer_size: usize,
        buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_gpsv_interleaved_batch_buffer_size calculates the required buffer size\n  for \\ref rocsparse_sgpsv_interleaved_batch \"rocsparse_Xgpsv_interleaved_batch()\". It is the user's\n  responsibility to allocate this buffer.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  alg          algorithm to solve the linear system.\n  @param[in]\n  m            size of the pentadiagonal linear system.\n  @param[in]\n  ds           lower diagonal (distance 2) of pentadiagonal system. The first two entries\n               must be zero.\n  @param[in]\n  dl           lower diagonal of pentadiagonal system. The first entry must be zero.\n  @param[in]\n  d            main diagonal of pentadiagonal system.\n  @param[in]\n  du           upper diagonal of pentadiagonal system. The last entry must be zero.\n  @param[in]\n  dw           upper diagonal (distance 2) of pentadiagonal system. The last two entries\n               must be zero.\n  @param[in]\n  x            Dense array of right-hand-sides, with dimension \\p batch_stride by \\p m.\n  @param[in]\n  batch_count  The number of systems to solve.\n  @param[in]\n  batch_stride The number of elements that separate consecutive elements in a system.\n               Must satisfy \\p batch_stride >= \\p batch_count.\n  @param[out]\n  buffer_size  Number of bytes of the temporary storage buffer required.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p alg, \\p batch_count, or\n              \\p batch_stride is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p ds, \\p dl, \\p d, \\p du, \\p dw, \\p x,\n              or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n/\n/**@{"]
    pub fn rocsparse_sgpsv_interleaved_batch_buffer_size(
        handle: rocsparse_handle,
        alg: rocsparse_gpsv_interleaved_alg,
        m: rocsparse_int,
        ds: *const f32,
        dl: *const f32,
        d: *const f32,
        du: *const f32,
        dw: *const f32,
        x: *const f32,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgpsv_interleaved_batch_buffer_size(
        handle: rocsparse_handle,
        alg: rocsparse_gpsv_interleaved_alg,
        m: rocsparse_int,
        ds: *const f64,
        dl: *const f64,
        d: *const f64,
        du: *const f64,
        dw: *const f64,
        x: *const f64,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgpsv_interleaved_batch_buffer_size(
        handle: rocsparse_handle,
        alg: rocsparse_gpsv_interleaved_alg,
        m: rocsparse_int,
        ds: *const rocsparse_float_complex,
        dl: *const rocsparse_float_complex,
        d: *const rocsparse_float_complex,
        du: *const rocsparse_float_complex,
        dw: *const rocsparse_float_complex,
        x: *const rocsparse_float_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgpsv_interleaved_batch_buffer_size(
        handle: rocsparse_handle,
        alg: rocsparse_gpsv_interleaved_alg,
        m: rocsparse_int,
        ds: *const rocsparse_double_complex,
        dl: *const rocsparse_double_complex,
        d: *const rocsparse_double_complex,
        du: *const rocsparse_double_complex,
        dw: *const rocsparse_double_complex,
        x: *const rocsparse_double_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\brief Batched pentadiagonal solver.\n\n  \\details\n  \\p rocsparse_gpsv_interleaved_batch solves a batch of pentadiagonal linear systems\n  \\f[\n    P^{i}*x^{i} = x^{i}\n  \\f]\n  where for each batch \\f$i=0\\ldots\\f$ \\p batch_count, \\f$P^{i}\\f$ is a sparse pentadiagonal matrix and\n  \\f$x^{i}\\f$ is a dense right-hand side vector. All of the pentadiagonal matrices, \\f$P^{i}\\f$, are\n  packed in an interleaved fashion into five vectors: \\p ds for the lowest diagonals, \\p dl for the lower\n  diagonals, \\p d for the main diagonals, \\p du for the upper diagonals, and \\p dw for the highest diagonals.\n  See below for a description of what this interleaved memory pattern looks like.\n\n  Solving the batched pentadiagonal system involves two steps. First, call\n  \\ref rocsparse_sgpsv_interleaved_batch_buffer_size \"rocsparse_Xgpsv_interleaved_batch_buffer_size()\"\n  to determine the size of the required temporary storage buffer. After this is determined, allocate\n  the buffer and pass it to \\ref rocsparse_sgpsv_interleaved_batch \"rocsparse_Xgpsv_interleaved_batch()\"\n  to perform the actual solve. The \\f$x^{i}\\f$ vectors, which initially stores the right-hand side values, are\n  overwritten with the solution after the call to\n  \\ref rocsparse_sgpsv_interleaved_batch \"rocsparse_Xgpsv_interleaved_batch()\".\n\n  Unlike the strided batch routines, which write each batch matrix one after the other in memory, the interleaved\n  routines write the batch matrices such that each element from each matrix is written consecutively one after\n  the other. For example, consider the following batch matrices:\n\n  \\f[\n    \\begin{bmatrix}\n    t^{0}_{00} & t^{0}_{01} & t^{0}_{02} \\\\\n    t^{0}_{10} & t^{0}_{11} & t^{0}_{12} \\\\\n    t^{0}_{20} & t^{0}_{21} & t^{0}_{22}\n    \\end{bmatrix}\n    \\begin{bmatrix}\n    t^{1}_{00} & t^{1}_{01} & t^{1}_{02} \\\\\n    t^{1}_{10} & t^{1}_{11} & t^{1}_{12} \\\\\n    t^{1}_{20} & t^{1}_{21} & t^{1}_{22}\n    \\end{bmatrix}\n    \\begin{bmatrix}\n    t^{2}_{00} & t^{2}_{01} & t^{2}_{02} \\\\\n    t^{2}_{10} & t^{2}_{11} & t^{2}_{12} \\\\\n    t^{2}_{20} & t^{2}_{21} & t^{2}_{22}\n    \\end{bmatrix}\n  \\f]\n\n  In interleaved format, the highest, higher, lowest, lower, and diagonal arrays would look like:\n  \\f[\n    \\begin{align}\n    \\text{lowest} &= \\begin{bmatrix} 0 & 0 & 0 & 0 & 0 & 0 & t^{0}_{20} & t^{1}_{20} & t^{2}_{20} \\end{bmatrix} \\\\\n    \\text{lower} &= \\begin{bmatrix} 0 & 0 & 0 & t^{0}_{10} & t^{1}_{10} & t^{1}_{10} & t^{0}_{21} & t^{1}_{21} & t^{2}_{21} \\end{bmatrix} \\\\\n    \\text{diagonal} &= \\begin{bmatrix} t^{0}_{00} & t^{1}_{00} & t^{2}_{00} & t^{0}_{11} & t^{1}_{11} & t^{2}_{11} & t^{0}_{22} & t^{1}_{22} & t^{2}_{22} \\end{bmatrix} \\\\\n    \\text{higher} &= \\begin{bmatrix} t^{0}_{01} & t^{1}_{01} & t^{2}_{01} & t^{0}_{12} & t^{1}_{12} & t^{2}_{12} & 0 & 0 & 0 \\end{bmatrix} \\\\\n    \\text{highest} &= \\begin{bmatrix} t^{0}_{02} & t^{1}_{02} & t^{2}_{02} & 0 & 0 & 0 & 0 & 0 & 0 \\end{bmatrix} \\\\\n    \\end{align}\n  \\f]\n  For the lowest array, the first \\p 2*batch_count entries are zero, and for the lower array, the first \\p batch_count entries are zero.\n  For the upper array, the last \\p batch_count entries are zero, and for the highest array, the last \\p 2*batch_count entries are zero.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  The routine is numerically stable because it uses QR to solve the linear systems.\n\n  \\note\n  m need to be at least 3 to be a valid pentadiagonal matrix.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle       handle to the rocSPARSE library context queue.\n  @param[in]\n  alg          algorithm to solve the linear system.\n  @param[in]\n  m            size of the pentadiagonal linear system.\n  @param[inout]\n  ds           lower diagonal (distance 2) of pentadiagonal system. The first two entries\n               must be zero.\n  @param[inout]\n  dl           lower diagonal of pentadiagonal system. The first entry must be zero.\n  @param[inout]\n  d            main diagonal of pentadiagonal system.\n  @param[inout]\n  du           upper diagonal of pentadiagonal system. The last entry must be zero.\n  @param[inout]\n  dw           upper diagonal (distance 2) of pentadiagonal system. The last two entries\n               must be zero.\n  @param[inout]\n  x            Dense array of right-hand-sides, with dimension \\p batch_stride by \\p m.\n  @param[in]\n  batch_count  The number of systems to solve.\n  @param[in]\n  batch_stride The number of elements that separate consecutive elements in a system.\n               Must satisfy \\p batch_stride >= \\p batch_count.\n  @param[in]\n  temp_buffer  Temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p alg, \\p batch_count, or\n              \\p batch_stride is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p ds, \\p dl, \\p d, \\p du, \\p dw, \\p x,\n              or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n  \\par Example\n  \\snippet example_rocsparse_gpsv.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgpsv_interleaved_batch(
        handle: rocsparse_handle,
        alg: rocsparse_gpsv_interleaved_alg,
        m: rocsparse_int,
        ds: *mut f32,
        dl: *mut f32,
        d: *mut f32,
        du: *mut f32,
        dw: *mut f32,
        x: *mut f32,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgpsv_interleaved_batch(
        handle: rocsparse_handle,
        alg: rocsparse_gpsv_interleaved_alg,
        m: rocsparse_int,
        ds: *mut f64,
        dl: *mut f64,
        d: *mut f64,
        du: *mut f64,
        dw: *mut f64,
        x: *mut f64,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgpsv_interleaved_batch(
        handle: rocsparse_handle,
        alg: rocsparse_gpsv_interleaved_alg,
        m: rocsparse_int,
        ds: *mut rocsparse_float_complex,
        dl: *mut rocsparse_float_complex,
        d: *mut rocsparse_float_complex,
        du: *mut rocsparse_float_complex,
        dw: *mut rocsparse_float_complex,
        x: *mut rocsparse_float_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgpsv_interleaved_batch(
        handle: rocsparse_handle,
        alg: rocsparse_gpsv_interleaved_alg,
        m: rocsparse_int,
        ds: *mut rocsparse_double_complex,
        dl: *mut rocsparse_double_complex,
        d: *mut rocsparse_double_complex,
        du: *mut rocsparse_double_complex,
        dw: *mut rocsparse_double_complex,
        x: *mut rocsparse_double_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_gtsv_buffer_size returns the size of the temporary storage buffer\n  that is required by \\ref rocsparse_sgtsv \"rocsparse_Xgtsv()\". The temporary\n  storage buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           size of the tri-diagonal linear system (must be >= 2).\n  @param[in]\n  n           number of columns in the dense matrix B.\n  @param[in]\n  dl          lower diagonal of tri-diagonal system. The first entry must be zero.\n  @param[in]\n  d           main diagonal of tri-diagonal system.\n  @param[in]\n  du          upper diagonal of tri-diagonal system. The last entry must be zero.\n  @param[in]\n  B           dense matrix of size ( \\p ldb, \\p n ).\n  @param[in]\n  ldb         leading dimension of B. Must satisfy \\p ldb >= max(1, m).\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              rocsparse_sgtsv(), rocsparse_dgtsv(), rocsparse_cgtsv(),\n              and rocsparse_zgtsv().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ldb is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p dl, \\p d, \\p du,\n              \\p B, or \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n/\n/**@{"]
    pub fn rocsparse_sgtsv_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const f32,
        d: *const f32,
        du: *const f32,
        B: *const f32,
        ldb: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgtsv_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const f64,
        d: *const f64,
        du: *const f64,
        B: *const f64,
        ldb: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgtsv_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const rocsparse_float_complex,
        d: *const rocsparse_float_complex,
        du: *const rocsparse_float_complex,
        B: *const rocsparse_float_complex,
        ldb: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgtsv_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const rocsparse_double_complex,
        d: *const rocsparse_double_complex,
        du: *const rocsparse_double_complex,
        B: *const rocsparse_double_complex,
        ldb: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\brief Tridiagonal solver with pivoting\n\n  \\details\n  \\p rocsparse_gtsv solves a tridiagonal system for multiple right-hand sides using pivoting\n  \\f[\n    T*B = B\n  \\f]\n  where \\f$T\\f$ is a sparse tridiagonal matrix and \\f$B\\f$ is a dense \\f$ldb \\times n\\f$ matrix storing the\n  right-hand side vectors in column order. The tridiagonal matrix \\f$T\\f$ is defined by three vectors: \\p dl\n  for the lower diagonal, \\p d for the main diagonal, and \\p du for the upper diagonal.\n\n  Solving the tridiagonal system involves two steps. First, call\n  \\ref rocsparse_sgtsv_buffer_size \"rocsparse_Xgtsv_buffer_size()\" to determine the size of the required\n  temporary storage buffer. After this is determined, allocate this buffer and pass it to\n  \\ref rocsparse_sgtsv \"rocsparse_Xgtsv()\" to perform the actual solve. The \\f$B\\f$ dense matrix, which initially\n  stores the \\p n right-hand side vectors, is overwritten with the \\p n solution vectors after the call to\n  \\ref rocsparse_sgtsv \"rocsparse_Xgtsv()\".\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           size of the tri-diagonal linear system (must be >= 2).\n  @param[in]\n  n           number of columns in the dense matrix B.\n  @param[in]\n  dl          lower diagonal of tri-diagonal system. The first entry must be zero.\n  @param[in]\n  d           main diagonal of tri-diagonal system.\n  @param[in]\n  du          upper diagonal of tri-diagonal system. The last entry must be zero.\n  @param[inout]\n  B           dense matrix of size ( \\p ldb, \\p n ).\n  @param[in]\n  ldb         leading dimension of B. Must satisfy \\p ldb >= max(1, m).\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ldb is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p dl, \\p d,\n              \\p du, \\p B, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n  \\par Example\n  \\snippet example_rocsparse_gtsv.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgtsv(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const f32,
        d: *const f32,
        du: *const f32,
        B: *mut f32,
        ldb: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgtsv(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const f64,
        d: *const f64,
        du: *const f64,
        B: *mut f64,
        ldb: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgtsv(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const rocsparse_float_complex,
        d: *const rocsparse_float_complex,
        du: *const rocsparse_float_complex,
        B: *mut rocsparse_float_complex,
        ldb: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgtsv(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const rocsparse_double_complex,
        d: *const rocsparse_double_complex,
        du: *const rocsparse_double_complex,
        B: *mut rocsparse_double_complex,
        ldb: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_gtsv_no_pivot_buffer_size returns the size of the temporary storage buffer\n  that is required by \\ref rocsparse_sgtsv_no_pivot \"rocsparse_Xgtsv_no_pivot()\". The temporary\n  storage buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           size of the tri-diagonal linear system (must be >= 2).\n  @param[in]\n  n           number of columns in the dense matrix B.\n  @param[in]\n  dl          lower diagonal of tri-diagonal system. The first entry must be zero.\n  @param[in]\n  d           main diagonal of tri-diagonal system.\n  @param[in]\n  du          upper diagonal of tri-diagonal system. The last entry must be zero.\n  @param[in]\n  B           dense matrix of size ( \\p ldb, \\p n ).\n  @param[in]\n  ldb         leading dimension of B. Must satisfy \\p ldb >= max(1, m).\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              rocsparse_sgtsv_no_pivot(), rocsparse_dgtsv_no_pivot(), rocsparse_cgtsv_no_pivot(),\n              and rocsparse_zgtsv_no_pivot().\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ldb is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p dl, \\p d, \\p du,\n              \\p B, or \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n/\n/**@{"]
    pub fn rocsparse_sgtsv_no_pivot_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const f32,
        d: *const f32,
        du: *const f32,
        B: *const f32,
        ldb: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgtsv_no_pivot_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const f64,
        d: *const f64,
        du: *const f64,
        B: *const f64,
        ldb: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgtsv_no_pivot_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const rocsparse_float_complex,
        d: *const rocsparse_float_complex,
        du: *const rocsparse_float_complex,
        B: *const rocsparse_float_complex,
        ldb: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgtsv_no_pivot_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const rocsparse_double_complex,
        d: *const rocsparse_double_complex,
        du: *const rocsparse_double_complex,
        B: *const rocsparse_double_complex,
        ldb: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\brief Tridiagonal solver (no pivoting)\n\n  \\details\n  \\p rocsparse_gtsv_no_pivot solves a tridiagonal linear system for multiple right-hand sides without pivoting\n  \\f[\n    T*B = B\n  \\f]\n  where \\f$T\\f$ is a sparse tridiagonal matrix and \\f$B\\f$ is a dense \\f$ldb \\times n\\f$ matrix storing the\n  right-hand side vectors in column order. The tridiagonal matrix \\f$T\\f$ is defined by three vectors: \\p dl\n  for the lower diagonal, \\p d for the main diagonal, and \\p du for the upper diagonal.\n\n  Solving the tridiagonal system with multiple right-hand sides without pivoting involves two steps. First,\n  call \\ref rocsparse_sgtsv_no_pivot_buffer_size \"rocsparse_Xgtsv_no_pivot_buffer_size()\"\n  to determine the size of the required temporary storage buffer. After this is determined, allocate the\n  buffer and pass it to \\ref rocsparse_sgtsv_no_pivot \"rocsparse_Xgtsv_no_pivot()\" to perform the actual\n  solve. The \\f$B\\f$ dense matrix, which initially stores the \\p n right-hand side vectors, is overwritten\n  with the \\p n solution vectors after the call to \\ref rocsparse_sgtsv_no_pivot \"rocsparse_Xgtsv_no_pivot()\".\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           size of the tri-diagonal linear system (must be >= 2).\n  @param[in]\n  n           number of columns in the dense matrix B.\n  @param[in]\n  dl          lower diagonal of tri-diagonal system. The first entry must be zero.\n  @param[in]\n  d           main diagonal of tri-diagonal system.\n  @param[in]\n  du          upper diagonal of tri-diagonal system. The last entry must be zero.\n  @param[inout]\n  B           dense matrix of size ( \\p ldb, \\p n ).\n  @param[in]\n  ldb         leading dimension of B. Must satisfy \\p ldb >= max(1, m).\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p n, or \\p ldb is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p dl, \\p d,\n              \\p du, \\p B, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n  \\par Example\n  \\snippet example_rocsparse_gtsv_no_pivot.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgtsv_no_pivot(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const f32,
        d: *const f32,
        du: *const f32,
        B: *mut f32,
        ldb: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgtsv_no_pivot(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const f64,
        d: *const f64,
        du: *const f64,
        B: *mut f64,
        ldb: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgtsv_no_pivot(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const rocsparse_float_complex,
        d: *const rocsparse_float_complex,
        du: *const rocsparse_float_complex,
        B: *mut rocsparse_float_complex,
        ldb: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgtsv_no_pivot(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        dl: *const rocsparse_double_complex,
        d: *const rocsparse_double_complex,
        du: *const rocsparse_double_complex,
        B: *mut rocsparse_double_complex,
        ldb: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_gtsv_no_pivot_strided_batch_buffer_size returns the size of the temporary storage buffer\n  that is required by \\ref rocsparse_sgtsv_no_pivot_strided_batch \"rocsparse_Xgtsv_no_pivot_strided_batch()\".\n  The temporary storage buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           size of the tri-diagonal linear system.\n  @param[in]\n  dl          lower diagonal of tri-diagonal system, where the ith system lower diagonal starts at \\p dl+batch_stride*i.\n  @param[in]\n  d           main diagonal of tri-diagonal system, where the ith system diagonal starts at \\p d+batch_stride*i.\n  @param[in]\n  du          upper diagonal of tri-diagonal system, where the ith system upper diagonal starts at \\p du+batch_stride*i.\n  @param[inout]\n  x           dense array of righthand-sides where the ith righthand-side starts at \\p x+batch_stride*i.\n  @param[in]\n  batch_count the number of systems to solve.\n  @param[in]\n  batch_stride the number of elements that separate each system. Must satisfy \\p batch_stride >= \\p m.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_sgtsv_no_pivot_strided_batch \"rocsparse_Xgtsv_no_pivot_strided_batch()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p batch_count, or \\p batch_stride is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p dl, \\p d, \\p du,\n              \\p x, or \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n/\n/**@{"]
    pub fn rocsparse_sgtsv_no_pivot_strided_batch_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        dl: *const f32,
        d: *const f32,
        du: *const f32,
        x: *const f32,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgtsv_no_pivot_strided_batch_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        dl: *const f64,
        d: *const f64,
        du: *const f64,
        x: *const f64,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgtsv_no_pivot_strided_batch_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        dl: *const rocsparse_float_complex,
        d: *const rocsparse_float_complex,
        du: *const rocsparse_float_complex,
        x: *const rocsparse_float_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgtsv_no_pivot_strided_batch_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        dl: *const rocsparse_double_complex,
        d: *const rocsparse_double_complex,
        du: *const rocsparse_double_complex,
        x: *const rocsparse_double_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\brief Strided Batch tridiagonal solver (no pivoting)\n\n  \\details\n  \\p rocsparse_gtsv_no_pivot_strided_batch solves a batched tridiagonal linear system\n  \\f[\n    T^{i}*x^{i} = x^{i}\n  \\f]\n  where for each batch \\f$i=0\\ldots\\f$ \\p batch_count, \\f$T^{i}\\f$ is a sparse tridiagonal matrix and\n  \\f$x^{i}\\f$ is a dense right-hand side vector. All of the tridiagonal matrices, \\f$T^{i}\\f$, are\n  packed one after the other into three vectors: \\p dl for the lower diagonals, \\p d for the main\n  diagonals, and \\p du for the upper diagonals. See below for a description of what this strided\n  memory pattern looks like.\n\n  Solving the batched tridiagonal system involves two steps. First, call\n  \\ref rocsparse_sgtsv_no_pivot_strided_batch_buffer_size \"rocsparse_Xgtsv_no_pivot_strided_batch_buffer_size()\"\n  to determine the size of the required temporary storage buffer. After this is determined, allocate\n  the buffer and pass it to \\ref rocsparse_sgtsv_no_pivot_strided_batch \"rocsparse_Xgtsv_no_pivot_strided_batch()\"\n  to perform the actual solve. The \\f$x^{i}\\f$ vectors, which initially stores the right-hand side values, are\n  overwritten with the solution after the call to\n  \\ref rocsparse_sgtsv_no_pivot_strided_batch \"rocsparse_Xgtsv_no_pivot_strided_batch()\".\n\n  The strided batch routines write each batch matrix one after the other in memory. For example, consider\n  the following batch matrices:\n\n  \\f[\n    \\begin{bmatrix}\n    t^{0}_{00} & t^{0}_{01} & 0 \\\\\n    t^{0}_{10} & t^{0}_{11} & t^{0}_{12} \\\\\n    0 & t^{0}_{21} & t^{0}_{22}\n    \\end{bmatrix}\n    \\begin{bmatrix}\n    t^{1}_{00} & t^{1}_{01} & 0 \\\\\n    t^{1}_{10} & t^{1}_{11} & t^{1}_{12} \\\\\n    0 & t^{1}_{21} & t^{1}_{22}\n    \\end{bmatrix}\n    \\begin{bmatrix}\n    t^{2}_{00} & t^{2}_{01} & 0 \\\\\n    t^{2}_{10} & t^{2}_{11} & t^{2}_{12} \\\\\n    0 & t^{2}_{21} & t^{2}_{22}\n    \\end{bmatrix}\n  \\f]\n\n  In strided format, the upper, lower, and diagonal arrays would look like:\n  \\f[\n    \\begin{align}\n    \\text{lower} &= \\begin{bmatrix} 0 & t^{0}_{10} & t^{0}_{21} & 0 & t^{1}_{10} & t^{1}_{21} & 0 & t^{2}_{10} & t^{2}_{21} \\end{bmatrix} \\\\\n    \\text{diagonal} &= \\begin{bmatrix} t^{0}_{00} & t^{0}_{11} & t^{0}_{22} & t^{1}_{00} & t^{1}_{11} & t^{1}_{22} & t^{2}_{00} & t^{2}_{11} & t^{2}_{22} \\end{bmatrix} \\\\\n    \\text{upper} &= \\begin{bmatrix} t^{0}_{01} & t^{0}_{12} & 0 & t^{1}_{01} & t^{1}_{12} & 0 & t^{2}_{01} & t^{2}_{12} & 0 \\end{bmatrix} \\\\\n    \\end{align}\n  \\f]\n  For the lower array, for each batch \\p i, the \\p i*batch_stride entries are zero, and for the upper array, the\n  \\p i*batch_stride+batch_stride-1 entries are zero.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           size of the tri-diagonal linear system (must be >= 2).\n  @param[in]\n  dl          lower diagonal of tri-diagonal system. The first entry must be zero.\n  @param[in]\n  d           main diagonal of tri-diagonal system.\n  @param[in]\n  du          upper diagonal of tri-diagonal system. The last entry must be zero.\n  @param[inout]\n  x           dense array of righthand-sides, where the ith right-hand side starts at \\p x+batch_stride*i.\n  @param[in]\n  batch_count the number of systems to solve.\n  @param[in]\n  batch_stride the number of elements that separate each system. Must satisfy \\p batch_stride >= \\p m.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p batch_count, or \\p batch_stride is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p dl, \\p d,\n              \\p du, \\p x, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n  \\par Example\n  \\snippet example_rocsparse_gtsv_no_pivot_strided_batch.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgtsv_no_pivot_strided_batch(
        handle: rocsparse_handle,
        m: rocsparse_int,
        dl: *const f32,
        d: *const f32,
        du: *const f32,
        x: *mut f32,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgtsv_no_pivot_strided_batch(
        handle: rocsparse_handle,
        m: rocsparse_int,
        dl: *const f64,
        d: *const f64,
        du: *const f64,
        x: *mut f64,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgtsv_no_pivot_strided_batch(
        handle: rocsparse_handle,
        m: rocsparse_int,
        dl: *const rocsparse_float_complex,
        d: *const rocsparse_float_complex,
        du: *const rocsparse_float_complex,
        x: *mut rocsparse_float_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgtsv_no_pivot_strided_batch(
        handle: rocsparse_handle,
        m: rocsparse_int,
        dl: *const rocsparse_double_complex,
        d: *const rocsparse_double_complex,
        du: *const rocsparse_double_complex,
        x: *mut rocsparse_double_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\details\n  \\p rocsparse_gtsv_interleaved_batch_buffer_size returns the size of the temporary storage buffer\n  that is required by \\ref rocsparse_sgtsv_interleaved_batch \"rocsparse_Xgtsv_interleaved_batch()\".\n  The temporary storage buffer must be allocated by the user.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  alg         algorithm to use when solving tridiagonal systems. Options are Thomas ( \\ref rocsparse_gtsv_interleaved_alg_thomas ),\n              LU ( \\ref rocsparse_gtsv_interleaved_alg_lu ), or QR ( \\ref rocsparse_gtsv_interleaved_alg_qr ). Passing\n              \\ref rocsparse_gtsv_interleaved_alg_default defaults to using the QR algorithm. The Thomas algorithm is the fastest but is not\n              stable, while LU and QR are slower but are stable.\n  @param[in]\n  m           size of the tri-diagonal linear system.\n  @param[in]\n  dl          lower diagonal of tri-diagonal system. The first element of the lower diagonal must be zero.\n  @param[in]\n  d           main diagonal of tri-diagonal system.\n  @param[in]\n  du          upper diagonal of tri-diagonal system. The last element of the upper diagonal must be zero.\n  @param[inout]\n  x           dense array of right-hand sides with dimension \\p batch_stride by \\p m.\n  @param[in]\n  batch_count the number of systems to solve.\n  @param[in]\n  batch_stride the number of elements that separate consecutive elements in a system. Must satisfy \\p batch_stride >= \\p batch_count.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_sgtsv_interleaved_batch \"rocsparse_Xgtsv_interleaved_batch()\".\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m, \\p batch_count, \\p batch_stride is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p dl, \\p d, \\p du,\n              \\p x, or \\p buffer_size pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n/\n/**@{"]
    pub fn rocsparse_sgtsv_interleaved_batch_buffer_size(
        handle: rocsparse_handle,
        alg: rocsparse_gtsv_interleaved_alg,
        m: rocsparse_int,
        dl: *const f32,
        d: *const f32,
        du: *const f32,
        x: *const f32,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgtsv_interleaved_batch_buffer_size(
        handle: rocsparse_handle,
        alg: rocsparse_gtsv_interleaved_alg,
        m: rocsparse_int,
        dl: *const f64,
        d: *const f64,
        du: *const f64,
        x: *const f64,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgtsv_interleaved_batch_buffer_size(
        handle: rocsparse_handle,
        alg: rocsparse_gtsv_interleaved_alg,
        m: rocsparse_int,
        dl: *const rocsparse_float_complex,
        d: *const rocsparse_float_complex,
        du: *const rocsparse_float_complex,
        x: *const rocsparse_float_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgtsv_interleaved_batch_buffer_size(
        handle: rocsparse_handle,
        alg: rocsparse_gtsv_interleaved_alg,
        m: rocsparse_int,
        dl: *const rocsparse_double_complex,
        d: *const rocsparse_double_complex,
        du: *const rocsparse_double_complex,
        x: *const rocsparse_double_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup precond_module\n  \\brief Interleaved batch tridiagonal solver.\n\n  \\details\n  \\p rocsparse_gtsv_interleaved_batch solves a batched tridiagonal linear system\n  \\f[\n    T^{i}*x^{i} = x^{i}\n  \\f]\n  where for each batch \\f$i=0\\ldots\\f$ \\p batch_count, \\f$T^{i}\\f$ is a sparse tridiagonal matrix and\n  \\f$x^{i}\\f$ is a dense right-hand side vector. All of the tridiagonal matrices, \\f$T^{i}\\f$, are\n  packed in an interleaved fashion into three vectors: \\p dl for the lower diagonals, \\p d for the main\n  diagonals, and \\p du for the upper diagonals. See below for a description of what this interleaved\n  memory pattern looks like.\n\n  Solving the batched tridiagonal system involves two steps. First, call\n  \\ref rocsparse_sgtsv_interleaved_batch_buffer_size \"rocsparse_Xgtsv_interleaved_batch_buffer_size()\"\n  to determine the size of the required temporary storage buffer. After this is determined, allocate\n  the buffer and pass it to \\ref rocsparse_sgtsv_interleaved_batch \"rocsparse_Xgtsv_interleaved_batch()\"\n  to perform the actual solve. The \\f$x^{i}\\f$ vectors, which initially stores the right-hand side values, are\n  overwritten with the solution after the call to\n  \\ref rocsparse_sgtsv_interleaved_batch \"rocsparse_Xgtsv_interleaved_batch()\".\n\n  The user can specify different algorithms for \\p rocsparse_gtsv_interleaved_batch\n  to use. Options are Thomas ( \\ref rocsparse_gtsv_interleaved_alg_thomas ),\n  LU ( \\ref rocsparse_gtsv_interleaved_alg_lu ), or QR ( \\ref rocsparse_gtsv_interleaved_alg_qr ).\n  Passing \\ref rocsparse_gtsv_interleaved_alg_default defaults to using the QR algorithm.\n\n  Unlike the strided batch routines, which write each batch matrix one after the other in memory, the interleaved\n  routines write the batch matrices such that each element from each matrix is written consecutively one after\n  the other. For example, consider the following batch matrices:\n\n  \\f[\n    \\begin{bmatrix}\n    t^{0}_{00} & t^{0}_{01} & 0 \\\\\n    t^{0}_{10} & t^{0}_{11} & t^{0}_{12} \\\\\n    0 & t^{0}_{21} & t^{0}_{22}\n    \\end{bmatrix}\n    \\begin{bmatrix}\n    t^{1}_{00} & t^{1}_{01} & 0 \\\\\n    t^{1}_{10} & t^{1}_{11} & t^{1}_{12} \\\\\n    0 & t^{1}_{21} & t^{1}_{22}\n    \\end{bmatrix}\n    \\begin{bmatrix}\n    t^{2}_{00} & t^{2}_{01} & 0 \\\\\n    t^{2}_{10} & t^{2}_{11} & t^{2}_{12} \\\\\n    0 & t^{2}_{21} & t^{2}_{22}\n    \\end{bmatrix}\n  \\f]\n\n  In interleaved format, the upper, lower, and diagonal arrays would look like:\n  \\f[\n    \\begin{align}\n    \\text{lower} &= \\begin{bmatrix} 0 & 0 & 0 & t^{0}_{10} & t^{1}_{10} & t^{1}_{10} & t^{0}_{21} & t^{1}_{21} & t^{2}_{21} \\end{bmatrix} \\\\\n    \\text{diagonal} &= \\begin{bmatrix} t^{0}_{00} & t^{1}_{00} & t^{2}_{00} & t^{0}_{11} & t^{1}_{11} & t^{2}_{11} & t^{0}_{22} & t^{1}_{22} & t^{2}_{22} \\end{bmatrix} \\\\\n    \\text{upper} &= \\begin{bmatrix} t^{0}_{01} & t^{1}_{01} & t^{2}_{01} & t^{0}_{12} & t^{1}_{12} & t^{2}_{12} & 0 & 0 & 0 \\end{bmatrix} \\\\\n    \\end{align}\n  \\f]\n  For the lower array, the first \\p batch_count entries are zero, and for the upper array, the last \\p batch_count\n  entries are zero.\n\n  \\note\n  This function is non-blocking and executed asynchronously with respect to the host.\n  It can return before the actual computation has finished.\n\n  \\note\n  This routine supports execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  alg         algorithm to use when solving tridiagonal systems. Options are Thomas ( \\ref rocsparse_gtsv_interleaved_alg_thomas ),\n              LU ( \\ref rocsparse_gtsv_interleaved_alg_lu ), or QR ( \\ref rocsparse_gtsv_interleaved_alg_qr ). Passing\n              \\ref rocsparse_gtsv_interleaved_alg_default defaults to using the QR algorithm. The Thomas algorithm is the fastest but is not\n              stable, while LU and QR are slower but are stable.\n  @param[in]\n  m           size of the tri-diagonal linear system.\n  @param[inout]\n  dl          lower diagonal of tri-diagonal system. The first element of the lower diagonal must be zero.\n  @param[inout]\n  d           main diagonal of tri-diagonal system.\n  @param[inout]\n  du          upper diagonal of tri-diagonal system. The last element of the upper diagonal must be zero.\n  @param[inout]\n  x           dense array of right-hand sides, with dimension \\p batch_stride by \\p m.\n  @param[in]\n  batch_count the number of systems to solve.\n  @param[in]\n  batch_stride the number of elements that separate consecutive elements in a system. Must satisfy \\p batch_stride >= \\p batch_count.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval     rocsparse_status_success the operation completed successfully.\n  \\retval     rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval     rocsparse_status_invalid_size \\p m or \\p batch_count, or \\p batch_stride is invalid.\n  \\retval     rocsparse_status_invalid_pointer \\p dl, \\p d,\n              \\p du, \\p x, or \\p temp_buffer pointer is invalid.\n  \\retval     rocsparse_status_internal_error an internal error occurred.\n\n  \\par Example\n  \\snippet example_rocsparse_gtsv_interleaved_batch.cpp doc example\n/\n/**@{"]
    pub fn rocsparse_sgtsv_interleaved_batch(
        handle: rocsparse_handle,
        alg: rocsparse_gtsv_interleaved_alg,
        m: rocsparse_int,
        dl: *mut f32,
        d: *mut f32,
        du: *mut f32,
        x: *mut f32,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dgtsv_interleaved_batch(
        handle: rocsparse_handle,
        alg: rocsparse_gtsv_interleaved_alg,
        m: rocsparse_int,
        dl: *mut f64,
        d: *mut f64,
        du: *mut f64,
        x: *mut f64,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_cgtsv_interleaved_batch(
        handle: rocsparse_handle,
        alg: rocsparse_gtsv_interleaved_alg,
        m: rocsparse_int,
        dl: *mut rocsparse_float_complex,
        d: *mut rocsparse_float_complex,
        du: *mut rocsparse_float_complex,
        x: *mut rocsparse_float_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zgtsv_interleaved_batch(
        handle: rocsparse_handle,
        alg: rocsparse_gtsv_interleaved_alg,
        m: rocsparse_int,
        dl: *mut rocsparse_double_complex,
        d: *mut rocsparse_double_complex,
        du: *mut rocsparse_double_complex,
        x: *mut rocsparse_double_complex,
        batch_count: rocsparse_int,
        batch_stride: rocsparse_int,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup reordering_module\n  \\brief Coloring of the adjacency graph of the matrix \\f$A\\f$ stored in the CSR format.\n\n  \\details\n  \\p rocsparse_csrcolor performs the coloring of the undirected graph represented by the (symmetric) sparsity pattern of the\n  matrix \\f$A\\f$ stored in CSR format. Graph coloring is a way of coloring the nodes of a graph such that no two adjacent nodes\n  are of the same color. The \\p fraction_to_color is a parameter to only color a given percentage of the graph nodes, while the\n  remaining uncolored nodes receive distinct new colors. The optional \\p reordering array is a permutation array such that\n  unknowns of the same color are grouped. The matrix \\f$A\\f$ must be stored as a general matrix with a symmetric sparsity pattern,\n  and if the matrix \\f$A\\f$ is non-symmetric, then the user is responsible to provide the symmetric part \\f$\\frac{A+A^T}{2}\\f$.\n\n  \\note\n  This function is blocking with respect to the host.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of sparse matrix \\f$A\\f$.\n  @param[in]\n  nnz         number of non-zero entries of sparse matrix \\f$A\\f$.\n  @param[in]\n  descr      sparse matrix descriptor.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[in]\n  fraction_to_color  fraction of nodes to be colored, which should be in the interval [0.0,1.0], for example, 0.8 implies that 80 percent of nodes will be colored.\n  @param[out]\n  ncolors      resulting number of distinct colors.\n  @param[out]\n  coloring     resulting mapping of colors.\n  @param[out]\n  reordering   optional resulting reordering permutation if \\p reordering is a non-null pointer.\n  @param[inout]\n  info    structure that holds the information collected during the coloring algorithm.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_size \\p m or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p descr, \\p csr_val, \\p csr_row_ptr, \\p csr_col_ind, \\p fraction_to_color, \\p ncolors, \\p coloring, or \\p info pointer is invalid.\n/\n/**@{"]
    pub fn rocsparse_scsrcolor(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        fraction_to_color: *const f32,
        ncolors: *mut rocsparse_int,
        coloring: *mut rocsparse_int,
        reordering: *mut rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcsrcolor(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        fraction_to_color: *const f64,
        ncolors: *mut rocsparse_int,
        coloring: *mut rocsparse_int,
        reordering: *mut rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccsrcolor(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        fraction_to_color: *const f32,
        ncolors: *mut rocsparse_int,
        coloring: *mut rocsparse_int,
        reordering: *mut rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcsrcolor(
        handle: rocsparse_handle,
        m: rocsparse_int,
        nnz: rocsparse_int,
        descr: rocsparse_mat_descr,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        fraction_to_color: *const f64,
        ncolors: *mut rocsparse_int,
        coloring: *mut rocsparse_int,
        reordering: *mut rocsparse_int,
        info: rocsparse_mat_info,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\details\n  \\p rocsparse_check_matrix_coo_buffer_size computes the required buffer size needed when\n  calling \\ref rocsparse_scheck_matrix_coo \"rocsparse_Xcheck_matrix_coo()\".\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  n           number of columns of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  coo_val     array of \\p nnz elements of the sparse COO matrix.\n  @param[in]\n  coo_row_ind array of \\p nnz elements containing the row indices of the sparse\n              COO matrix.\n  @param[in]\n  coo_col_ind array of \\p nnz elements containing the column indices of the sparse\n              COO matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_scheck_matrix_coo \"rocsparse_Xcheck_matrix_coo()\".\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p coo_val, \\p coo_row_ind, \\p coo_col_ind, or \\p buffer_size pointer\n          is invalid.\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_coo_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        coo_val: *const f32,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_coo_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        coo_val: *const f64,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_coo_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        coo_val: *const rocsparse_float_complex,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_coo_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        coo_val: *const rocsparse_double_complex,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\brief Check matrix to see if it is valid.\n\n  \\details\n  \\p rocsparse_check_matrix_coo checks whether the input COO matrix is valid. It performs basic sanity checks on the input\n  matrix and tries to detect issues in the data. This includes looking for 'nan' or 'inf' values in the data arrays,\n  invalid row/column indices, whether the matrix is triangular or not, whether there are duplicate row/column\n  indices, or whether the row/column indices are not sorted when they should be. If an issue is found, it is written to the\n  \\p data_status parameter.\n\n  Performing the above checks involves two steps. First, call \\p rocsparse_Xcheck_matrix_coo_buffer_size\n  to determine the required buffer size. Then allocate this buffer and pass it to \\p rocsparse_Xcheck_matrix_coo.\n  Any issues detected will be written to the \\p data_status parameter, which is always a host variable regardless of the pointer mode.\n\n  **Example**\n\n  This example checks whether a COO matrix has the correct row indices. The input matrix\n  is invalid because it contains a -1 entry in the row indices array.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse COO matrix.\n  @param[in]\n  n           number of columns of the sparse COO matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse COO matrix.\n  @param[in]\n  coo_val     array of \\p nnz elements of the sparse COO matrix.\n  @param[in]\n  coo_row_ind array of \\p nnz elements containing the row indices of the sparse\n              COO matrix.\n  @param[in]\n  coo_col_ind array of \\p nnz elements containing the column indices of the sparse\n              COO matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  data_status modified to indicate the status of the data.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p coo_val, \\p coo_row_ind, \\p coo_col_ind, \\p temp_buffer, or \\p data_status  pointer\n          is invalid.\n\n  \\code{.c}\n   // 1 2 0 0\n   // 0 3 4 0\n   // 0 0 1 1\n   // 0 0 0 2\n   std::vector<int> hcoo_row_ind = {0, 0, -1, 1, 2, 2, 3}; // <---- invalid row index\n   std::vector<int> hcoo_col_ind = {0, 1, 1, 2, 2, 3, 3};\n   std::vector<float> hcoo_val = {1, 2, 3, 4, 1, 1, 2};\n\n   int m = 4;\n   int n = 4;\n   int nnz = 7;\n\n   int* dcoo_row_ind = nullptr;\n   int* dcoo_col_ind = nullptr;\n   float* dcoo_val = nullptr;\n   hipMalloc((void**)&dcoo_row_ind, sizeof(int) * nnz);\n   hipMalloc((void**)&dcoo_col_ind, sizeof(int) * nnz);\n   hipMalloc((void**)&dcoo_val, sizeof(float) * nnz);\n\n   hipMemcpy(dcoo_row_ind, hcoo_row_ind.data(), sizeof(int) * nnz, hipMemcpyHostToDevice);\n   hipMemcpy(dcoo_col_ind, hcoo_col_ind.data(), sizeof(int) * nnz, hipMemcpyHostToDevice);\n   hipMemcpy(dcoo_val, hcoo_val.data(), sizeof(float) * nnz, hipMemcpyHostToDevice);\n\n   rocsparse_handle handle;\n   rocsparse_create_handle(&handle);\n\n   const rocsparse_index_base idx_base = rocsparse_index_base_zero;\n   const rocsparse_fill_mode fill_mode = rocsparse_fill_mode_upper;\n   const rocsparse_matrix_type matrix_type = rocsparse_matrix_type_triangular;\n   const rocsparse_storage_mode storage_mode = rocsparse_storage_mode_sorted;\n\n   rocsparse_data_status data_status;\n\n   size_t buffer_size;\n   rocsparse_scheck_matrix_coo_buffer_size(handle, m, n, nnz, dcoo_val, dcoo_row_ind, dcoo_col_ind,\n       idx_base, matrix_type, fill_mode, storage_mode, &buffer_size);\n\n   void* dbuffer = nullptr;\n   hipMalloc((void**)&dbuffer, buffer_size);\n\n   rocsparse_scheck_matrix_coo(handle, m, n, nnz, dcoo_val, dcoo_row_ind, dcoo_col_ind, idx_base,\n       matrix_type, fill_mode, storage_mode, &data_status, dbuffer);\n\n   std::cout << \"data_status: \" << data_status << std::endl;\n\n   hipFree(dbuffer);\n\n   rocsparse_destroy_handle(handle);\n\n   hipFree(dcoo_row_ind);\n   hipFree(dcoo_col_ind);\n   hipFree(dcoo_val);\n  \\endcode\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_coo(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        coo_val: *const f32,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_coo(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        coo_val: *const f64,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_coo(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        coo_val: *const rocsparse_float_complex,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_coo(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        coo_val: *const rocsparse_double_complex,
        coo_row_ind: *const rocsparse_int,
        coo_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\details\n  \\p rocsparse_check_matrix_csc_buffer_size computes the required buffer size needed when\n  calling \\ref rocsparse_scheck_matrix_csc \"rocsparse_Xcheck_matrix_csc()\".\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSC matrix.\n  @param[in]\n  n           number of columns of the sparse CSC matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSC matrix.\n  @param[in]\n  csc_val     array of \\p nnz elements of the sparse CSC matrix.\n  @param[in]\n  csc_col_ptr array of \\p m+1 elements that point to the start of every column of the\n              sparse CSC matrix.\n  @param[in]\n  csc_row_ind array of \\p nnz elements containing the row indices of the sparse\n              CSC matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              \\ref rocsparse_scheck_matrix_csc \"rocsparse_Xcheck_matrix_csc()\".\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p csc_val, \\p csc_col_ptr, \\p csc_row_ind, or \\p buffer_size pointer\n          is invalid.\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_csc_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csc_val: *const f32,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_csc_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csc_val: *const f64,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_csc_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csc_val: *const rocsparse_float_complex,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_csc_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csc_val: *const rocsparse_double_complex,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\brief Check matrix to see if it is valid.\n\n  \\details\n  \\p rocsparse_check_matrix_csc checks if the input CSC matrix is valid. It performs basic sanity checks on the input\n  matrix and tries to detect issues in the data. This includes looking for 'nan' or 'inf' values in the data arrays,\n  invalid row indices or invalid column offsets, whether the matrix is triangular or not, whether there are duplicate row\n  indices, or whether the row indices are not sorted when they should be. If an issue is found, it is written to the\n  \\p data_status parameter.\n\n  Performing the above checks involves two steps. First, call \\p rocsparse_Xcheck_matrix_csc_buffer_size\n  to determine the required buffer size. Then allocate this buffer and pass it to \\p rocsparse_Xcheck_matrix_csc.\n  Any issues detected will be written to the \\p data_status parameter, which is always a host variable regardless of the pointer mode.\n\n  **Example**\n\n  This example checks whether a CSC matrix has the correct row indices. The input matrix\n  is invalid because it contains a duplicate entry in the row indices array.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSC matrix.\n  @param[in]\n  n           number of columns of the sparse CSC matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSC matrix.\n  @param[in]\n  csc_val     array of \\p nnz elements of the sparse CSC matrix.\n  @param[in]\n  csc_col_ptr array of \\p m+1 elements that point to the start of every column of the\n              sparse CSC matrix.\n  @param[in]\n  csc_row_ind array of \\p nnz elements containing the row indices of the sparse\n              CSC matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  data_status modified to indicate the status of the data.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p m \\p n or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p csc_val, \\p csc_col_ptr, \\p csc_row_ind, \\p temp_buffer, or \\p data_status pointer\n          is invalid.\n\n  \\code{.c}\n   // 1 2 0 0\n   // 0 3 4 0\n   // 2 0 1 1\n   // 0 3 0 2\n   std::vector<int> hcsc_row_ind = {0, 2, 0, 1, 1, 1, 2, 2, 3}; //<---duplicate row index in second column\n   std::vector<int> hcsc_col_ptr = {0, 2, 5, 7, 9};\n   std::vector<float> hcsc_val = {1, 2, 2, 3, 3, 4, 1, 1, 2};\n\n   int m = 4;\n   int n = 4;\n   int nnz = 9;\n\n   int* dcsc_row_ind = nullptr;\n   int* dcsc_col_ptr = nullptr;\n   float* dcsc_val = nullptr;\n   hipMalloc((void**)&dcsc_row_ind, sizeof(int) * nnz);\n   hipMalloc((void**)&dcsc_col_ptr, sizeof(int) * (n + 1));\n   hipMalloc((void**)&dcsc_val, sizeof(float) * nnz);\n\n   hipMemcpy(dcsc_row_ind, hcsc_row_ind.data(), sizeof(int) * nnz, hipMemcpyHostToDevice);\n   hipMemcpy(dcsc_col_ptr, hcsc_col_ptr.data(), sizeof(int) * (n + 1), hipMemcpyHostToDevice);\n   hipMemcpy(dcsc_val, hcsc_val.data(), sizeof(float) * nnz, hipMemcpyHostToDevice);\n\n   rocsparse_handle handle;\n   rocsparse_create_handle(&handle);\n\n   const rocsparse_index_base idx_base = rocsparse_index_base_zero;\n   const rocsparse_fill_mode fill_mode = rocsparse_fill_mode_upper;\n   const rocsparse_matrix_type matrix_type = rocsparse_matrix_type_general;\n   const rocsparse_storage_mode storage_mode = rocsparse_storage_mode_sorted;\n\n   rocsparse_data_status data_status;\n\n   size_t buffer_size;\n   rocsparse_scheck_matrix_csc_buffer_size(handle, m, n, nnz, dcsc_val, dcsc_col_ptr, dcsc_row_ind,\n       idx_base, matrix_type, fill_mode, storage_mode, &buffer_size);\n\n   void* dbuffer = nullptr;\n   hipMalloc((void**)&dbuffer, buffer_size);\n\n   rocsparse_scheck_matrix_csc(handle, m, n, nnz, dcsc_val, dcsc_col_ptr, dcsc_row_ind, idx_base,\n       matrix_type, fill_mode, storage_mode, &data_status, dbuffer);\n\n   std::cout << \"data_status: \" << data_status << std::endl;\n\n   hipFree(dbuffer);\n\n   rocsparse_destroy_handle(handle);\n\n   hipFree(dcsc_row_ind);\n   hipFree(dcsc_col_ptr);\n   hipFree(dcsc_val);\n  \\endcode\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csc_val: *const f32,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csc_val: *const f64,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csc_val: *const rocsparse_float_complex,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_csc(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csc_val: *const rocsparse_double_complex,
        csc_col_ptr: *const rocsparse_int,
        csc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\details\n  \\p rocsparse_check_matrix_csr_buffer_size computes the required buffer size needed when calling\n  \\ref rocsparse_scheck_matrix_csr \"rocsparse_Xcheck_matrix_csr()\".\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  n           number of columns of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              rocsparse_scheck_matrix_csr(), rocsparse_dcheck_matrix_csr(),\n              rocsparse_ccheck_matrix_csr(), and rocsparse_zcheck_matrix_csr().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p csr_val, \\p csr_row_ptr, \\p csr_col_ind, or \\p buffer_size pointer\n          is invalid.\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_csr_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_csr_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_csr_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_csr_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\brief Check matrix to see if it is valid.\n\n  \\details\n  \\p rocsparse_check_matrix_csr checks whether the input CSR matrix is valid. It performs basic sanity checks on the input\n  matrix and tries to detect issues in the data. This includes looking for 'nan' or 'inf' values in the data arrays,\n  invalid column indices or row offsets, whether the matrix is triangular or not, whether there are duplicate\n  indices, or whether the column indices are not sorted when they should be. If an issue is found, it is written to the\n  \\p data_status parameter.\n\n  Performing the above checks involves two steps. First, call \\p rocsparse_Xcheck_matrix_csr_buffer_size\n  to determine the required buffer size. Then allocate this buffer and pass it to \\p rocsparse_Xcheck_matrix_csr.\n  Any issues detected will be written to the \\p data_status parameter, which is always a host variable regardless of the pointer mode.\n\n  **Example**\n\n  This example checks whether a CSR matrix has the correct row pointer array. The input matrix\n  is invalid because it contains a -1 entry in the row pointer array.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse CSR matrix.\n  @param[in]\n  n           number of columns of the sparse CSR matrix.\n  @param[in]\n  nnz         number of non-zero entries of the sparse CSR matrix.\n  @param[in]\n  csr_val     array of \\p nnz elements of the sparse CSR matrix.\n  @param[in]\n  csr_row_ptr array of \\p m+1 elements that point to the start of every row of the\n              sparse CSR matrix.\n  @param[in]\n  csr_col_ind array of \\p nnz elements containing the column indices of the sparse\n              CSR matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  data_status modified to indicate the status of the data.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, or \\p nnz is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p csr_val, \\p csr_row_ptr, \\p csr_col_ind, \\p temp_buffer, or \\p data_status pointer\n          is invalid.\n\n  \\code{.c}\n   // 1 2 0 0\n   // 0 3 4 0\n   // 2 0 1 1\n   // 0 3 0 2\n   std::vector<int> hcsr_row_ptr = {0, 2, -1, 7, 9}; // <---- invalid ptr array\n   std::vector<int> hcsr_col_ind = {0, 1, 1, 2, 0, 2, 3, 1, 3};\n   std::vector<float> hcsr_val = {1, 2, 3, 4, 2, 1, 1, 3, 2};\n\n   int m = 4;\n   int n = 4;\n   int nnz = 9;\n\n   int* dcsr_row_ptr = nullptr;\n   int* dcsr_col_ind = nullptr;\n   float* dcsr_val = nullptr;\n   hipMalloc((void**)&dcsr_row_ptr, sizeof(int) * (m + 1));\n   hipMalloc((void**)&dcsr_col_ind, sizeof(int) * nnz);\n   hipMalloc((void**)&dcsr_val, sizeof(float) * nnz);\n\n   hipMemcpy(dcsr_row_ptr, hcsr_row_ptr.data(), sizeof(int) * (m + 1), hipMemcpyHostToDevice);\n   hipMemcpy(dcsr_col_ind, hcsr_col_ind.data(), sizeof(int) * nnz, hipMemcpyHostToDevice);\n   hipMemcpy(dcsr_val, hcsr_val.data(), sizeof(float) * nnz, hipMemcpyHostToDevice);\n\n   rocsparse_handle handle;\n   rocsparse_create_handle(&handle);\n\n   const rocsparse_index_base idx_base = rocsparse_index_base_zero;\n   const rocsparse_fill_mode fill_mode = rocsparse_fill_mode_upper;\n   const rocsparse_matrix_type matrix_type = rocsparse_matrix_type_general;\n   const rocsparse_storage_mode storage_mode = rocsparse_storage_mode_sorted;\n\n   rocsparse_data_status data_status;\n\n   size_t buffer_size;\n   rocsparse_scheck_matrix_csr_buffer_size(handle, m, n, nnz, dcsr_val, dcsr_row_ptr, dcsr_col_ind,\n       idx_base, matrix_type, fill_mode, storage_mode, &buffer_size);\n\n   void* dbuffer = nullptr;\n   hipMalloc((void**)&dbuffer, buffer_size);\n\n   rocsparse_scheck_matrix_csr(handle, m, n, nnz, dcsr_val, dcsr_row_ptr, dcsr_col_ind, idx_base,\n       matrix_type, fill_mode, storage_mode, &data_status, dbuffer);\n\n   std::cout << \"data_status: \" << data_status << std::endl;\n\n   hipFree(dbuffer);\n\n   rocsparse_destroy_handle(handle);\n\n   hipFree(dcsr_row_ptr);\n   hipFree(dcsr_col_ind);\n   hipFree(dcsr_val);\n  \\endcode\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const f32,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const f64,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const rocsparse_float_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_csr(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        nnz: rocsparse_int,
        csr_val: *const rocsparse_double_complex,
        csr_row_ptr: *const rocsparse_int,
        csr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\details\n  \\p rocsparse_check_matrix_ell_buffer_size computes the required buffer size needed when\n  calling \\ref rocsparse_scheck_matrix_ell \"rocsparse_Xcheck_matrix_ell()\".\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse ELL matrix.\n  @param[in]\n  n           number of columns of the sparse ELL matrix.\n  @param[in]\n  ell_width   number of non-zero elements per row of the sparse ELL matrix.\n  @param[in]\n  ell_val     array that contains the elements of the sparse ELL matrix. Padded\n              elements should be zero.\n  @param[in]\n  ell_col_ind array that contains the column indices of the sparse ELL matrix.\n              Padded column indices should be -1.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              rocsparse_scheck_matrix_ell(), rocsparse_dcheck_matrix_ell(),\n              rocsparse_ccheck_matrix_ell(), and rocsparse_zcheck_matrix_ell().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, or \\p ell_width is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p ell_val, \\p ell_col_ind, or \\p buffer_size pointer\n          is invalid.\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_ell_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_width: rocsparse_int,
        ell_val: *const f32,
        ell_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_ell_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_width: rocsparse_int,
        ell_val: *const f64,
        ell_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_ell_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_width: rocsparse_int,
        ell_val: *const rocsparse_float_complex,
        ell_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_ell_buffer_size(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_width: rocsparse_int,
        ell_val: *const rocsparse_double_complex,
        ell_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\brief Check matrix to see if it is valid.\n\n  \\details\n  \\p rocsparse_check_matrix_ell checks if the input ELL matrix is valid. It performs basic sanity checks on the input\n  matrix and tries to detect issues in the data. This includes looking for 'nan' or 'inf' values in the data arrays,\n  invalid column indices, whether there are duplicate indices, or whether the column indices are not sorted when they\n  should be. If an issue is found, it is written to the \\p data_status parameter.\n\n  Performing the above checks involves two steps. First, call \\p rocsparse_Xcheck_matrix_ell_buffer_size\n  to determine the required buffer size. Then allocate this buffer and pass it to \\p rocsparse_Xcheck_matrix_ell.\n  Any issues detected will be written to the \\p data_status parameter, which is always a host variable regardless of the pointer mode.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  m           number of rows of the sparse ELL matrix.\n  @param[in]\n  n           number of columns of the sparse ELL matrix.\n  @param[in]\n  ell_width   number of non-zero elements per row of the sparse ELL matrix.\n  @param[in]\n  ell_val     array that contains the elements of the sparse ELL matrix. Padded\n              elements should be zero.\n  @param[in]\n  ell_col_ind array that contains the column indices of the sparse ELL matrix.\n              Padded column indices should be -1.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  data_status modified to indicate the status of the data.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p m, \\p n, or \\p ell_width is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p ell_val, \\p ell_col_ind, \\p temp_buffer, or \\p data_status pointer\n          is invalid.\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_ell(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_width: rocsparse_int,
        ell_val: *const f32,
        ell_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_ell(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_width: rocsparse_int,
        ell_val: *const f64,
        ell_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_ell(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_width: rocsparse_int,
        ell_val: *const rocsparse_float_complex,
        ell_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_ell(
        handle: rocsparse_handle,
        m: rocsparse_int,
        n: rocsparse_int,
        ell_width: rocsparse_int,
        ell_val: *const rocsparse_double_complex,
        ell_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\details\n  \\p rocsparse_check_matrix_gebsc_buffer_size computes the required buffer size needed when\n  calling \\ref rocsparse_scheck_matrix_gebsc \"rocsparse_Xcheck_matrix_gebsc()\".\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir          matrix storage of GEBSC blocks.\n  @param[in]\n  mb           number of block rows of the sparse GEBSC matrix.\n  @param[in]\n  nb           number of block columns of the sparse GEBSC matrix.\n  @param[in]\n  nnzb         number of non-zero blocks of the sparse GEBSC matrix.\n  @param[in]\n  row_block_dim row block dimension of the sparse GEBSC matrix.\n  @param[in]\n  col_block_dim column block dimension of the sparse GEBSC matrix.\n  @param[in]\n  bsc_val     array of \\p nnzb elements of the sparse GEBSC matrix.\n  @param[in]\n  bsc_col_ptr array of \\p nb+1 elements that point to the start of every column of the\n              sparse GEBSC matrix.\n  @param[in]\n  bsc_row_ind array of \\p nnzb elements containing the row indices of the sparse\n              GEBSC matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              rocsparse_scheck_matrix_gebsc(), rocsparse_dcheck_matrix_gebsc(),\n              rocsparse_ccheck_matrix_gebsc(), and rocsparse_zcheck_matrix_gebsc().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p dir, \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p mb, \\p nb, \\p nnzb, \\p row_block_dim, or \\p col_block_dim is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p bsc_val, \\p bsc_col_ptr, \\p bsc_row_ind, or \\p buffer_size pointer\n          is invalid.\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_gebsc_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *const f32,
        bsc_col_ptr: *const rocsparse_int,
        bsc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_gebsc_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *const f64,
        bsc_col_ptr: *const rocsparse_int,
        bsc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_gebsc_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *const rocsparse_float_complex,
        bsc_col_ptr: *const rocsparse_int,
        bsc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_gebsc_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *const rocsparse_double_complex,
        bsc_col_ptr: *const rocsparse_int,
        bsc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\brief Check matrix to see if it is valid.\n\n  \\details\n  \\p rocsparse_check_matrix_gebsc checks whether the input GEBSC matrix is valid. It performs basic sanity checks on the input\n  matrix and tries to detect issues in the data. This includes looking for 'nan' or 'inf' values in the data arrays,\n  invalid row indices or column offsets, whether the matrix is triangular or not, whether there are duplicate\n  indices, or whether the row indices are not sorted when they should be. If an issue is found, it is written to the\n  \\p data_status parameter.\n\n  Performing the above checks involves two steps. First, call \\p rocsparse_Xcheck_matrix_gebsc_buffer_size\n  to determine the required buffer size. Then allocate this buffer and pass it to \\p rocsparse_Xcheck_matrix_gebsc.\n  Any issues detected will be written to the \\p data_status parameter, which is always a host variable regardless of the pointer mode.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir          matrix storage of GEBSC blocks.\n  @param[in]\n  mb           number of block rows of the sparse GEBSC matrix.\n  @param[in]\n  nb           number of block columns of the sparse GEBSC matrix.\n  @param[in]\n  nnzb         number of non-zero blocks of the sparse GEBSC matrix.\n  @param[in]\n  row_block_dim row block dimension of the sparse GEBSC matrix.\n  @param[in]\n  col_block_dim column block dimension of the sparse GEBSC matrix.\n  @param[in]\n  bsc_val     array of \\p nnzb elements of the sparse GEBSC matrix.\n  @param[in]\n  bsc_col_ptr array of \\p nb+1 elements that point to the start of every column of the\n              sparse GEBSC matrix.\n  @param[in]\n  bsc_row_ind array of \\p nnzb elements containing the row indices of the sparse\n              GEBSC matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  data_status modified to indicate the status of the data.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p dir, \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p mb, \\p nb, \\p nnzb, \\p row_block_dim, or \\p col_block_dim is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p bsc_val, \\p bsc_col_ptr, \\p bsc_row_ind, \\p temp_buffer, or \\p data_status pointer\n          is invalid.\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_gebsc(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *const f32,
        bsc_col_ptr: *const rocsparse_int,
        bsc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_gebsc(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *const f64,
        bsc_col_ptr: *const rocsparse_int,
        bsc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_gebsc(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *const rocsparse_float_complex,
        bsc_col_ptr: *const rocsparse_int,
        bsc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_gebsc(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsc_val: *const rocsparse_double_complex,
        bsc_col_ptr: *const rocsparse_int,
        bsc_row_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\brief Check matrix to see if it is valid.\n\n  \\details\n  \\p rocsparse_check_matrix_gebsr_buffer_size computes the required buffer size needed when\n  calling \\ref rocsparse_scheck_matrix_gebsr \"rocsparse_Xcheck_matrix_gebsr()\".\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir          matrix storage of GEBSR blocks.\n  @param[in]\n  mb           number of block rows of the sparse GEBSR matrix.\n  @param[in]\n  nb           number of block columns of the sparse GEBSR matrix.\n  @param[in]\n  nnzb         number of non-zero blocks of the sparse GEBSR matrix.\n  @param[in]\n  row_block_dim row block dimension of the sparse GEBSR matrix.\n  @param[in]\n  col_block_dim column block dimension of the sparse GEBSR matrix.\n  @param[in]\n  bsr_val     array of \\p nnzb elements of the sparse GEBSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every row of the\n              sparse GEBSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the column indices of the sparse\n              GEBSR matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              rocsparse_scheck_matrix_gebsr(), rocsparse_dcheck_matrix_gebsr(),\n              rocsparse_ccheck_matrix_gebsr(), and rocsparse_zcheck_matrix_gebsr().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p dir, \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p mb, \\p nb, \\p nnzb, \\p row_block_dim, or \\p col_block_dim is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p bsr_val, \\p bsr_row_ptr, \\p bsr_col_ind, or \\p buffer_size pointer\n          is invalid.\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_gebsr_buffer_size(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\brief Check matrix to see if it is valid.\n\n  \\details\n  \\p rocsparse_check_matrix_gebsr checks whether the input GEBSR matrix is valid. It performs basic sanity checks on the input\n  matrix and tries to detect issues in the data. This includes looking for 'nan' or 'inf' values in the data arrays,\n  invalid column indices and row offsets, whether the matrix is triangular or not, whether there are duplicate\n  indices, or whether the column indices are not sorted when they should be. If an issue is found, it is written to the\n  \\p data_status parameter.\n\n  Performing the above checks involves two steps. First, call \\p rocsparse_Xcheck_matrix_gebsr_buffer_size\n  to determine the required buffer size. Then allocate this buffer and pass it to \\p rocsparse_Xcheck_matrix_gebsr.\n  Any issues detected will be written to the \\p data_status parameter, which is always a host variable regardless of the pointer mode.\n\n  **Example**\n\n  This example checks whether a GEBSR matrix has valid values. The input matrix\n  is invalid because it contains a nan entry in the values array.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  dir          matrix storage of GEBSR blocks.\n  @param[in]\n  mb           number of block rows of the sparse GEBSR matrix.\n  @param[in]\n  nb           number of block columns of the sparse GEBSR matrix.\n  @param[in]\n  nnzb         number of non-zero blocks of the sparse GEBSR matrix.\n  @param[in]\n  row_block_dim row block dimension of the sparse GEBSR matrix.\n  @param[in]\n  col_block_dim column block dimension of the sparse GEBSR matrix.\n  @param[in]\n  bsr_val     array of \\p nnzb elements of the sparse GEBSR matrix.\n  @param[in]\n  bsr_row_ptr array of \\p mb+1 elements that point to the start of every row of the\n              sparse GEBSR matrix.\n  @param[in]\n  bsr_col_ind array of \\p nnzb elements containing the column indices of the sparse\n              GEBSR matrix.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  data_status modified to indicate the status of the data.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p dir, \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_size \\p mb, \\p nb, \\p nnzb, \\p row_block_dim, or \\p col_block_dim is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p bsr_val, \\p bsr_row_ptr, \\p bsr_col_ind, \\p temp_buffer, or \\p data_status pointer\n          is invalid.\n\n  \\code{.c}\n   // 1 2 | 0 0\n   // 0 3 | 0 0\n   // ---------\n   // 4 5 | 7 8\n   // 0 6 | 0 9\n   std::vector<int> hbsr_row_ptr = {0, 1, 3};\n   std::vector<int> hbsr_col_ind = {0, 0, 1};\n   std::vector<float> hbsr_val = {1, 2, 0, 3, 4, 5, 0, 6, 7, 8, std::numeric_limits<double>::quiet_NaN(), 9}; //<---contains nan\n\n   int mb = 2;\n   int nb = 2;\n   int nnzb = 3;\n   int block_dim = 2;\n\n   int* dbsr_row_ptr = nullptr;\n   int* dbsr_col_ind = nullptr;\n   float* dbsr_val = nullptr;\n   hipMalloc((void**)&dbsr_row_ptr, sizeof(int) * (mb + 1));\n   hipMalloc((void**)&dbsr_col_ind, sizeof(int) * nnzb);\n   hipMalloc((void**)&dbsr_val, sizeof(float) * nnzb * block_dim * block_dim);\n\n   hipMemcpy(dbsr_row_ptr, hbsr_row_ptr.data(), sizeof(int) * (mb + 1), hipMemcpyHostToDevice);\n   hipMemcpy(dbsr_col_ind, hbsr_col_ind.data(), sizeof(int) * nnzb, hipMemcpyHostToDevice);\n   hipMemcpy(dbsr_val, hbsr_val.data(), sizeof(float) * nnzb * block_dim * block_dim, hipMemcpyHostToDevice);\n\n   rocsparse_handle handle;\n   rocsparse_create_handle(&handle);\n\n   const rocsparse_direction direction = rocsparse_direction_row;\n   const rocsparse_index_base idx_base = rocsparse_index_base_zero;\n   const rocsparse_fill_mode fill_mode = rocsparse_fill_mode_upper;\n   const rocsparse_matrix_type matrix_type = rocsparse_matrix_type_triangular;\n   const rocsparse_storage_mode storage_mode = rocsparse_storage_mode_sorted;\n\n   rocsparse_data_status data_status;\n\n   size_t buffer_size;\n   rocsparse_scheck_matrix_gebsr_buffer_size(handle, direction, mb, nb, nnzb, block_dim, block_dim,\n       dbsr_val, dbsr_row_ptr, dbsr_col_ind, idx_base, matrix_type, fill_mode, storage_mode, &buffer_size);\n\n   void* dbuffer = nullptr;\n   hipMalloc((void**)&dbuffer, buffer_size);\n\n   rocsparse_scheck_matrix_gebsr(handle, direction, mb, nb, nnzb, block_dim, block_dim, dbsr_val, dbsr_row_ptr,\n       dbsr_col_ind, idx_base, matrix_type, fill_mode, storage_mode, &data_status, dbuffer);\n\n   std::cout << \"data_status: \" << data_status << std::endl;\n\n   hipFree(dbuffer);\n\n   rocsparse_destroy_handle(handle);\n\n   hipFree(dbsr_row_ptr);\n   hipFree(dbsr_col_ind);\n   hipFree(dbsr_val);\n  \\endcode\n/\n/**@{"]
    pub fn rocsparse_scheck_matrix_gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsr_val: *const f32,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_dcheck_matrix_gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsr_val: *const f64,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_ccheck_matrix_gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsr_val: *const rocsparse_float_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    pub fn rocsparse_zcheck_matrix_gebsr(
        handle: rocsparse_handle,
        dir: rocsparse_direction,
        mb: rocsparse_int,
        nb: rocsparse_int,
        nnzb: rocsparse_int,
        row_block_dim: rocsparse_int,
        col_block_dim: rocsparse_int,
        bsr_val: *const rocsparse_double_complex,
        bsr_row_ptr: *const rocsparse_int,
        bsr_col_ind: *const rocsparse_int,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\brief Check matrix to see if it is valid.\n\n  \\details\n  \\p rocsparse_check_matrix_hyb_buffer_size computes the required buffer size needed when\n  calling \\ref rocsparse_check_matrix_hyb.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  hyb         matrix in HYB storage format.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  buffer_size number of bytes of the temporary storage buffer required by\n              rocsparse_check_matrix_hyb().\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p hyb or \\p buffer_size pointer is invalid."]
    pub fn rocsparse_check_matrix_hyb_buffer_size(
        handle: rocsparse_handle,
        hyb: rocsparse_hyb_mat,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        buffer_size: *mut usize,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup utility_module\n  \\brief Check matrix to see if it is valid.\n\n  \\details\n  \\p rocsparse_check_matrix_hyb checks whether the input HYB matrix is valid. It performs basic sanity checks on the input\n  matrix and tries to detect issues in the data. This includes looking for 'nan' or 'inf' values in the data arrays,\n  invalid row/column indices, whether the matrix is triangular or not, whether there are duplicate indices, or whether\n  the row/column indices are not sorted when they should be. If an issue is found, it is written to the \\p data_status\n  parameter.\n\n  Performing the above checks involves two steps. First, call \\p rocsparse_Xcheck_matrix_hyb_buffer_size\n  to determine the required buffer size. Then allocate this buffer and pass it to \\p rocsparse_Xcheck_matrix_hyb.\n  Any issues detected will be written to the \\p data_status parameter, which is always a host variable regardless of the pointer mode.\n\n  \\note\n  This routine does not support execution in a hipGraph context.\n\n  @param[in]\n  handle      handle to the rocSPARSE library context queue.\n  @param[in]\n  hyb         matrix in HYB storage format.\n  @param[in]\n  idx_base    \\ref rocsparse_index_base_zero or \\ref rocsparse_index_base_one.\n  @param[in]\n  matrix_type \\ref rocsparse_matrix_type_general, \\ref rocsparse_matrix_type_symmetric,\n              \\ref rocsparse_matrix_type_hermitian, or \\ref rocsparse_matrix_type_triangular.\n  @param[in]\n  uplo        \\ref rocsparse_fill_mode_lower or \\ref rocsparse_fill_mode_upper.\n  @param[in]\n  storage     \\ref rocsparse_storage_mode_sorted or \\ref rocsparse_storage_mode_sorted.\n  @param[out]\n  data_status modified to indicate the status of the data.\n  @param[in]\n  temp_buffer temporary storage buffer allocated by the user.\n\n  \\retval rocsparse_status_success the operation completed successfully.\n  \\retval rocsparse_status_invalid_handle the library context was not initialized.\n  \\retval rocsparse_status_invalid_value \\p idx_base, \\p matrix_type, \\p uplo, or \\p storage is invalid.\n  \\retval rocsparse_status_invalid_pointer \\p hyb or \\p data_status pointer is invalid."]
    pub fn rocsparse_check_matrix_hyb(
        handle: rocsparse_handle,
        hyb: rocsparse_hyb_mat,
        idx_base: rocsparse_index_base,
        matrix_type: rocsparse_matrix_type,
        uplo: rocsparse_fill_mode,
        storage: rocsparse_storage_mode,
        data_status: *mut rocsparse_data_status,
        temp_buffer: *mut ::std::os::raw::c_void,
    ) -> rocsparse_status;
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n \\details Enable rocTX instrumentation.\n \\note This routine ignores the environment variable \\p ROCSPARSE_ROCTX."]
    pub fn rocsparse_enable_roctx();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n \\details Disable rocTX instrumentation.\n \\note This routine ignores the environment variable \\p ROCSPARSE_ROCTX."]
    pub fn rocsparse_disable_roctx();
}
unsafe extern "C" {
    #[doc = " \\ingroup aux_module\n \\details Query whether rocTX instrumentation has been enabled. See \\ref rocsparse_enable_roctx.\n \\return 1 if enabled, 0 otherwise."]
    pub fn rocsparse_state_roctx() -> ::std::os::raw::c_int;
}