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
|
/* automatically generated by rust-bindgen 0.69.1 */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage }
}
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val {
*byte |= mask;
} else {
*byte &= !mask;
}
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
}
pub const hipTextureType1D: u32 = 1;
pub const hipTextureType2D: u32 = 2;
pub const hipTextureType3D: u32 = 3;
pub const hipTextureTypeCubemap: u32 = 12;
pub const hipTextureType1DLayered: u32 = 241;
pub const hipTextureType2DLayered: u32 = 242;
pub const hipTextureTypeCubemapLayered: u32 = 252;
pub const hipIpcMemLazyEnablePeerAccess: u32 = 0;
pub const hipStreamDefault: u32 = 0;
pub const hipStreamNonBlocking: u32 = 1;
pub const hipEventDefault: u32 = 0;
pub const hipEventBlockingSync: u32 = 1;
pub const hipEventDisableTiming: u32 = 2;
pub const hipEventInterprocess: u32 = 4;
pub const hipEventDisableSystemFence: u32 = 536870912;
pub const hipEventReleaseToDevice: u32 = 1073741824;
pub const hipEventReleaseToSystem: u32 = 2147483648;
pub const hipHostMallocDefault: u32 = 0;
pub const hipHostMallocPortable: u32 = 1;
pub const hipHostMallocMapped: u32 = 2;
pub const hipHostMallocWriteCombined: u32 = 4;
pub const hipHostMallocNumaUser: u32 = 536870912;
pub const hipHostMallocCoherent: u32 = 1073741824;
pub const hipHostMallocNonCoherent: u32 = 2147483648;
pub const hipMemAttachGlobal: u32 = 1;
pub const hipMemAttachHost: u32 = 2;
pub const hipMemAttachSingle: u32 = 4;
pub const hipDeviceMallocDefault: u32 = 0;
pub const hipDeviceMallocFinegrained: u32 = 1;
pub const hipMallocSignalMemory: u32 = 2;
pub const hipDeviceMallocUncached: u32 = 3;
pub const hipHostRegisterDefault: u32 = 0;
pub const hipHostRegisterPortable: u32 = 1;
pub const hipHostRegisterMapped: u32 = 2;
pub const hipHostRegisterIoMemory: u32 = 4;
pub const hipHostRegisterReadOnly: u32 = 8;
pub const hipExtHostRegisterCoarseGrained: u32 = 8;
pub const hipDeviceScheduleAuto: u32 = 0;
pub const hipDeviceScheduleSpin: u32 = 1;
pub const hipDeviceScheduleYield: u32 = 2;
pub const hipDeviceScheduleBlockingSync: u32 = 4;
pub const hipDeviceScheduleMask: u32 = 7;
pub const hipDeviceMapHost: u32 = 8;
pub const hipDeviceLmemResizeToMax: u32 = 16;
pub const hipArrayDefault: u32 = 0;
pub const hipArrayLayered: u32 = 1;
pub const hipArraySurfaceLoadStore: u32 = 2;
pub const hipArrayCubemap: u32 = 4;
pub const hipArrayTextureGather: u32 = 8;
pub const hipOccupancyDefault: u32 = 0;
pub const hipOccupancyDisableCachingOverride: u32 = 1;
pub const hipCooperativeLaunchMultiDeviceNoPreSync: u32 = 1;
pub const hipCooperativeLaunchMultiDeviceNoPostSync: u32 = 2;
pub const hipExtAnyOrderLaunch: u32 = 1;
pub const hipStreamWaitValueGte: u32 = 0;
pub const hipStreamWaitValueEq: u32 = 1;
pub const hipStreamWaitValueAnd: u32 = 2;
pub const hipStreamWaitValueNor: u32 = 3;
pub const hipExternalMemoryDedicated: u32 = 1;
#[doc = " @defgroup GlobalDefs Global enum and defines\n @{\n\n/\n/**\n hipDeviceArch_t\n"]
#[repr(C)]
#[repr(align(4))]
#[derive(Copy, Clone)]
pub struct hipDeviceArch_t {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
pub __bindgen_padding_0: u8,
}
impl hipDeviceArch_t {
#[inline]
pub fn hasGlobalInt32Atomics(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasGlobalInt32Atomics(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasGlobalFloatAtomicExch(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasGlobalFloatAtomicExch(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasSharedInt32Atomics(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasSharedInt32Atomics(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasSharedFloatAtomicExch(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasSharedFloatAtomicExch(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(3usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasFloatAtomicAdd(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasFloatAtomicAdd(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(4usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasGlobalInt64Atomics(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasGlobalInt64Atomics(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasSharedInt64Atomics(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasSharedInt64Atomics(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(6usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasDoubles(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasDoubles(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(7usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasWarpVote(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasWarpVote(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasWarpBallot(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasWarpBallot(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(9usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasWarpShuffle(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasWarpShuffle(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(10usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasFunnelShift(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasFunnelShift(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(11usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasThreadFenceSystem(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasThreadFenceSystem(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(12usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasSyncThreadsExt(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasSyncThreadsExt(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(13usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasSurfaceFuncs(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasSurfaceFuncs(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(14usize, 1u8, val as u64)
}
}
#[inline]
pub fn has3dGrid(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
}
#[inline]
pub fn set_has3dGrid(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(15usize, 1u8, val as u64)
}
}
#[inline]
pub fn hasDynamicParallelism(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) }
}
#[inline]
pub fn set_hasDynamicParallelism(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(16usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
hasGlobalInt32Atomics: ::std::os::raw::c_uint,
hasGlobalFloatAtomicExch: ::std::os::raw::c_uint,
hasSharedInt32Atomics: ::std::os::raw::c_uint,
hasSharedFloatAtomicExch: ::std::os::raw::c_uint,
hasFloatAtomicAdd: ::std::os::raw::c_uint,
hasGlobalInt64Atomics: ::std::os::raw::c_uint,
hasSharedInt64Atomics: ::std::os::raw::c_uint,
hasDoubles: ::std::os::raw::c_uint,
hasWarpVote: ::std::os::raw::c_uint,
hasWarpBallot: ::std::os::raw::c_uint,
hasWarpShuffle: ::std::os::raw::c_uint,
hasFunnelShift: ::std::os::raw::c_uint,
hasThreadFenceSystem: ::std::os::raw::c_uint,
hasSyncThreadsExt: ::std::os::raw::c_uint,
hasSurfaceFuncs: ::std::os::raw::c_uint,
has3dGrid: ::std::os::raw::c_uint,
hasDynamicParallelism: ::std::os::raw::c_uint,
) -> __BindgenBitfieldUnit<[u8; 3usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let hasGlobalInt32Atomics: u32 =
unsafe { ::std::mem::transmute(hasGlobalInt32Atomics) };
hasGlobalInt32Atomics as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let hasGlobalFloatAtomicExch: u32 =
unsafe { ::std::mem::transmute(hasGlobalFloatAtomicExch) };
hasGlobalFloatAtomicExch as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let hasSharedInt32Atomics: u32 =
unsafe { ::std::mem::transmute(hasSharedInt32Atomics) };
hasSharedInt32Atomics as u64
});
__bindgen_bitfield_unit.set(3usize, 1u8, {
let hasSharedFloatAtomicExch: u32 =
unsafe { ::std::mem::transmute(hasSharedFloatAtomicExch) };
hasSharedFloatAtomicExch as u64
});
__bindgen_bitfield_unit.set(4usize, 1u8, {
let hasFloatAtomicAdd: u32 = unsafe { ::std::mem::transmute(hasFloatAtomicAdd) };
hasFloatAtomicAdd as u64
});
__bindgen_bitfield_unit.set(5usize, 1u8, {
let hasGlobalInt64Atomics: u32 =
unsafe { ::std::mem::transmute(hasGlobalInt64Atomics) };
hasGlobalInt64Atomics as u64
});
__bindgen_bitfield_unit.set(6usize, 1u8, {
let hasSharedInt64Atomics: u32 =
unsafe { ::std::mem::transmute(hasSharedInt64Atomics) };
hasSharedInt64Atomics as u64
});
__bindgen_bitfield_unit.set(7usize, 1u8, {
let hasDoubles: u32 = unsafe { ::std::mem::transmute(hasDoubles) };
hasDoubles as u64
});
__bindgen_bitfield_unit.set(8usize, 1u8, {
let hasWarpVote: u32 = unsafe { ::std::mem::transmute(hasWarpVote) };
hasWarpVote as u64
});
__bindgen_bitfield_unit.set(9usize, 1u8, {
let hasWarpBallot: u32 = unsafe { ::std::mem::transmute(hasWarpBallot) };
hasWarpBallot as u64
});
__bindgen_bitfield_unit.set(10usize, 1u8, {
let hasWarpShuffle: u32 = unsafe { ::std::mem::transmute(hasWarpShuffle) };
hasWarpShuffle as u64
});
__bindgen_bitfield_unit.set(11usize, 1u8, {
let hasFunnelShift: u32 = unsafe { ::std::mem::transmute(hasFunnelShift) };
hasFunnelShift as u64
});
__bindgen_bitfield_unit.set(12usize, 1u8, {
let hasThreadFenceSystem: u32 = unsafe { ::std::mem::transmute(hasThreadFenceSystem) };
hasThreadFenceSystem as u64
});
__bindgen_bitfield_unit.set(13usize, 1u8, {
let hasSyncThreadsExt: u32 = unsafe { ::std::mem::transmute(hasSyncThreadsExt) };
hasSyncThreadsExt as u64
});
__bindgen_bitfield_unit.set(14usize, 1u8, {
let hasSurfaceFuncs: u32 = unsafe { ::std::mem::transmute(hasSurfaceFuncs) };
hasSurfaceFuncs as u64
});
__bindgen_bitfield_unit.set(15usize, 1u8, {
let has3dGrid: u32 = unsafe { ::std::mem::transmute(has3dGrid) };
has3dGrid as u64
});
__bindgen_bitfield_unit.set(16usize, 1u8, {
let hasDynamicParallelism: u32 =
unsafe { ::std::mem::transmute(hasDynamicParallelism) };
hasDynamicParallelism as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipUUID_t {
pub bytes: [::std::os::raw::c_char; 16usize],
}
pub type hipUUID = hipUUID_t;
#[doc = " hipDeviceProp\n"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipDeviceProp_t {
#[doc = "< Device name."]
pub name: [::std::os::raw::c_char; 256usize],
#[doc = "< Size of global memory region (in bytes)."]
pub totalGlobalMem: usize,
#[doc = "< Size of shared memory region (in bytes)."]
pub sharedMemPerBlock: usize,
#[doc = "< Registers per block."]
pub regsPerBlock: ::std::os::raw::c_int,
#[doc = "< Warp size."]
pub warpSize: ::std::os::raw::c_int,
#[doc = "< Max work items per work group or workgroup max size."]
pub maxThreadsPerBlock: ::std::os::raw::c_int,
#[doc = "< Max number of threads in each dimension (XYZ) of a block."]
pub maxThreadsDim: [::std::os::raw::c_int; 3usize],
#[doc = "< Max grid dimensions (XYZ)."]
pub maxGridSize: [::std::os::raw::c_int; 3usize],
#[doc = "< Max clock frequency of the multiProcessors in khz."]
pub clockRate: ::std::os::raw::c_int,
#[doc = "< Max global memory clock frequency in khz."]
pub memoryClockRate: ::std::os::raw::c_int,
#[doc = "< Global memory bus width in bits."]
pub memoryBusWidth: ::std::os::raw::c_int,
#[doc = "< Size of shared memory region (in bytes)."]
pub totalConstMem: usize,
#[doc = "< Major compute capability. On HCC, this is an approximation and features may\n< differ from CUDA CC. See the arch feature flags for portable ways to query\n< feature caps."]
pub major: ::std::os::raw::c_int,
#[doc = "< Minor compute capability. On HCC, this is an approximation and features may\n< differ from CUDA CC. See the arch feature flags for portable ways to query\n< feature caps."]
pub minor: ::std::os::raw::c_int,
#[doc = "< Number of multi-processors (compute units)."]
pub multiProcessorCount: ::std::os::raw::c_int,
#[doc = "< L2 cache size."]
pub l2CacheSize: ::std::os::raw::c_int,
#[doc = "< Maximum resident threads per multi-processor."]
pub maxThreadsPerMultiProcessor: ::std::os::raw::c_int,
#[doc = "< Compute mode."]
pub computeMode: ::std::os::raw::c_int,
#[doc = "< Frequency in khz of the timer used by the device-side \"clock*\"\n< instructions. New for HIP."]
pub clockInstructionRate: ::std::os::raw::c_int,
#[doc = "< Architectural feature flags. New for HIP."]
pub arch: hipDeviceArch_t,
#[doc = "< Device can possibly execute multiple kernels concurrently."]
pub concurrentKernels: ::std::os::raw::c_int,
#[doc = "< PCI Domain ID"]
pub pciDomainID: ::std::os::raw::c_int,
#[doc = "< PCI Bus ID."]
pub pciBusID: ::std::os::raw::c_int,
#[doc = "< PCI Device ID."]
pub pciDeviceID: ::std::os::raw::c_int,
#[doc = "< Maximum Shared Memory Per Multiprocessor."]
pub maxSharedMemoryPerMultiProcessor: usize,
#[doc = "< 1 if device is on a multi-GPU board, 0 if not."]
pub isMultiGpuBoard: ::std::os::raw::c_int,
#[doc = "< Check whether HIP can map host memory"]
pub canMapHostMemory: ::std::os::raw::c_int,
#[doc = "< DEPRECATED: use gcnArchName instead"]
pub gcnArch: ::std::os::raw::c_int,
#[doc = "< AMD GCN Arch Name."]
pub gcnArchName: [::std::os::raw::c_char; 256usize],
#[doc = "< APU vs dGPU"]
pub integrated: ::std::os::raw::c_int,
#[doc = "< HIP device supports cooperative launch"]
pub cooperativeLaunch: ::std::os::raw::c_int,
#[doc = "< HIP device supports cooperative launch on multiple devices"]
pub cooperativeMultiDeviceLaunch: ::std::os::raw::c_int,
#[doc = "< Maximum size for 1D textures bound to linear memory"]
pub maxTexture1DLinear: ::std::os::raw::c_int,
#[doc = "< Maximum number of elements in 1D images"]
pub maxTexture1D: ::std::os::raw::c_int,
#[doc = "< Maximum dimensions (width, height) of 2D images, in image elements"]
pub maxTexture2D: [::std::os::raw::c_int; 2usize],
#[doc = "< Maximum dimensions (width, height, depth) of 3D images, in image elements"]
pub maxTexture3D: [::std::os::raw::c_int; 3usize],
#[doc = "< Addres of HDP_MEM_COHERENCY_FLUSH_CNTL register"]
pub hdpMemFlushCntl: *mut ::std::os::raw::c_uint,
#[doc = "< Addres of HDP_REG_COHERENCY_FLUSH_CNTL register"]
pub hdpRegFlushCntl: *mut ::std::os::raw::c_uint,
#[doc = "<Maximum pitch in bytes allowed by memory copies"]
pub memPitch: usize,
#[doc = "<Alignment requirement for textures"]
pub textureAlignment: usize,
#[doc = "<Pitch alignment requirement for texture references bound to pitched memory"]
pub texturePitchAlignment: usize,
#[doc = "<Run time limit for kernels executed on the device"]
pub kernelExecTimeoutEnabled: ::std::os::raw::c_int,
#[doc = "<Device has ECC support enabled"]
pub ECCEnabled: ::std::os::raw::c_int,
#[doc = "< 1:If device is Tesla device using TCC driver, else 0"]
pub tccDriver: ::std::os::raw::c_int,
#[doc = "< HIP device supports cooperative launch on multiple"]
pub cooperativeMultiDeviceUnmatchedFunc: ::std::os::raw::c_int,
#[doc = "< HIP device supports cooperative launch on multiple"]
pub cooperativeMultiDeviceUnmatchedGridDim: ::std::os::raw::c_int,
#[doc = "< HIP device supports cooperative launch on multiple"]
pub cooperativeMultiDeviceUnmatchedBlockDim: ::std::os::raw::c_int,
#[doc = "< HIP device supports cooperative launch on multiple"]
pub cooperativeMultiDeviceUnmatchedSharedMem: ::std::os::raw::c_int,
#[doc = "< 1: if it is a large PCI bar device, else 0"]
pub isLargeBar: ::std::os::raw::c_int,
#[doc = "< Revision of the GPU in this device"]
pub asicRevision: ::std::os::raw::c_int,
#[doc = "< Device supports allocating managed memory on this system"]
pub managedMemory: ::std::os::raw::c_int,
#[doc = "< Host can directly access managed memory on the device without migration"]
pub directManagedMemAccessFromHost: ::std::os::raw::c_int,
#[doc = "< Device can coherently access managed memory concurrently with the CPU"]
pub concurrentManagedAccess: ::std::os::raw::c_int,
#[doc = "< Device supports coherently accessing pageable memory\n< without calling hipHostRegister on it"]
pub pageableMemoryAccess: ::std::os::raw::c_int,
#[doc = "< Device accesses pageable memory via the host's page tables"]
pub pageableMemoryAccessUsesHostPageTables: ::std::os::raw::c_int,
}
impl hipMemoryType {
#[doc = "< Memory is physically located on host"]
pub const hipMemoryTypeHost: hipMemoryType = hipMemoryType(0);
}
impl hipMemoryType {
#[doc = "< Memory is physically located on device. (see deviceId for\n< specific device)"]
pub const hipMemoryTypeDevice: hipMemoryType = hipMemoryType(1);
}
impl hipMemoryType {
#[doc = "< Array memory, physically located on device. (see deviceId for\n< specific device)"]
pub const hipMemoryTypeArray: hipMemoryType = hipMemoryType(2);
}
impl hipMemoryType {
#[doc = "< Not used currently"]
pub const hipMemoryTypeUnified: hipMemoryType = hipMemoryType(3);
}
impl hipMemoryType {
#[doc = "< Managed memory, automaticallly managed by the unified\n< memory system"]
pub const hipMemoryTypeManaged: hipMemoryType = hipMemoryType(4);
}
#[repr(transparent)]
#[doc = " hipMemoryType (for pointer attributes)\n\n @note hipMemoryType enum values are different from cudaMemoryType enum values.\n In this case, memory type translation for hipPointerGetAttributes needs to be handled properly\n on nvidia platform to get the correct memory type in CUDA. Developers should use '#ifdef' in order\n to assign the correct enum values depending on Nvidia or AMD platform.\n\n @note cudaMemoryTypeUnregistered is currently not supported due to HIP functionality backward\n compatibility."]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemoryType(pub ::std::os::raw::c_int);
#[doc = " Pointer attributes"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipPointerAttribute_t {
pub __bindgen_anon_1: hipPointerAttribute_t__bindgen_ty_1,
pub device: ::std::os::raw::c_int,
pub devicePointer: *mut ::std::os::raw::c_void,
pub hostPointer: *mut ::std::os::raw::c_void,
pub isManaged: ::std::os::raw::c_int,
pub allocationFlags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipPointerAttribute_t__bindgen_ty_1 {
pub memoryType: hipMemoryType,
pub type_: hipMemoryType,
}
impl hipError_t {
#[doc = "< Successful completion."]
pub const hipSuccess: hipError_t = hipError_t(0);
}
impl hipError_t {
#[doc = "< One or more of the parameters passed to the API call is NULL\n< or not in an acceptable range."]
pub const hipErrorInvalidValue: hipError_t = hipError_t(1);
}
impl hipError_t {
#[doc = "< out of memory range."]
pub const hipErrorOutOfMemory: hipError_t = hipError_t(2);
}
impl hipError_t {
#[doc = "< Memory allocation error."]
pub const hipErrorMemoryAllocation: hipError_t = hipError_t(2);
}
impl hipError_t {
#[doc = "< Invalid not initialized"]
pub const hipErrorNotInitialized: hipError_t = hipError_t(3);
}
impl hipError_t {
pub const hipErrorInitializationError: hipError_t = hipError_t(3);
}
impl hipError_t {
#[doc = "< Deinitialized"]
pub const hipErrorDeinitialized: hipError_t = hipError_t(4);
}
impl hipError_t {
pub const hipErrorProfilerDisabled: hipError_t = hipError_t(5);
}
impl hipError_t {
pub const hipErrorProfilerNotInitialized: hipError_t = hipError_t(6);
}
impl hipError_t {
pub const hipErrorProfilerAlreadyStarted: hipError_t = hipError_t(7);
}
impl hipError_t {
pub const hipErrorProfilerAlreadyStopped: hipError_t = hipError_t(8);
}
impl hipError_t {
#[doc = "< Invalide configuration"]
pub const hipErrorInvalidConfiguration: hipError_t = hipError_t(9);
}
impl hipError_t {
#[doc = "< Invalid pitch value"]
pub const hipErrorInvalidPitchValue: hipError_t = hipError_t(12);
}
impl hipError_t {
#[doc = "< Invalid symbol"]
pub const hipErrorInvalidSymbol: hipError_t = hipError_t(13);
}
impl hipError_t {
#[doc = "< Invalid Device Pointer"]
pub const hipErrorInvalidDevicePointer: hipError_t = hipError_t(17);
}
impl hipError_t {
#[doc = "< Invalid memory copy direction"]
pub const hipErrorInvalidMemcpyDirection: hipError_t = hipError_t(21);
}
impl hipError_t {
pub const hipErrorInsufficientDriver: hipError_t = hipError_t(35);
}
impl hipError_t {
pub const hipErrorMissingConfiguration: hipError_t = hipError_t(52);
}
impl hipError_t {
pub const hipErrorPriorLaunchFailure: hipError_t = hipError_t(53);
}
impl hipError_t {
#[doc = "< Invalid device function"]
pub const hipErrorInvalidDeviceFunction: hipError_t = hipError_t(98);
}
impl hipError_t {
#[doc = "< Call to hipGetDeviceCount returned 0 devices"]
pub const hipErrorNoDevice: hipError_t = hipError_t(100);
}
impl hipError_t {
#[doc = "< DeviceID must be in range from 0 to compute-devices."]
pub const hipErrorInvalidDevice: hipError_t = hipError_t(101);
}
impl hipError_t {
#[doc = "< Invalid image"]
pub const hipErrorInvalidImage: hipError_t = hipError_t(200);
}
impl hipError_t {
#[doc = "< Produced when input context is invalid."]
pub const hipErrorInvalidContext: hipError_t = hipError_t(201);
}
impl hipError_t {
pub const hipErrorContextAlreadyCurrent: hipError_t = hipError_t(202);
}
impl hipError_t {
pub const hipErrorMapFailed: hipError_t = hipError_t(205);
}
impl hipError_t {
#[doc = "< Produced when the IPC memory attach failed from ROCr."]
pub const hipErrorMapBufferObjectFailed: hipError_t = hipError_t(205);
}
impl hipError_t {
pub const hipErrorUnmapFailed: hipError_t = hipError_t(206);
}
impl hipError_t {
pub const hipErrorArrayIsMapped: hipError_t = hipError_t(207);
}
impl hipError_t {
pub const hipErrorAlreadyMapped: hipError_t = hipError_t(208);
}
impl hipError_t {
pub const hipErrorNoBinaryForGpu: hipError_t = hipError_t(209);
}
impl hipError_t {
pub const hipErrorAlreadyAcquired: hipError_t = hipError_t(210);
}
impl hipError_t {
pub const hipErrorNotMapped: hipError_t = hipError_t(211);
}
impl hipError_t {
pub const hipErrorNotMappedAsArray: hipError_t = hipError_t(212);
}
impl hipError_t {
pub const hipErrorNotMappedAsPointer: hipError_t = hipError_t(213);
}
impl hipError_t {
pub const hipErrorECCNotCorrectable: hipError_t = hipError_t(214);
}
impl hipError_t {
#[doc = "< Unsupported limit"]
pub const hipErrorUnsupportedLimit: hipError_t = hipError_t(215);
}
impl hipError_t {
#[doc = "< The context is already in use"]
pub const hipErrorContextAlreadyInUse: hipError_t = hipError_t(216);
}
impl hipError_t {
pub const hipErrorPeerAccessUnsupported: hipError_t = hipError_t(217);
}
impl hipError_t {
#[doc = "< In CUDA DRV, it is CUDA_ERROR_INVALID_PTX"]
pub const hipErrorInvalidKernelFile: hipError_t = hipError_t(218);
}
impl hipError_t {
pub const hipErrorInvalidGraphicsContext: hipError_t = hipError_t(219);
}
impl hipError_t {
#[doc = "< Invalid source."]
pub const hipErrorInvalidSource: hipError_t = hipError_t(300);
}
impl hipError_t {
#[doc = "< the file is not found."]
pub const hipErrorFileNotFound: hipError_t = hipError_t(301);
}
impl hipError_t {
pub const hipErrorSharedObjectSymbolNotFound: hipError_t = hipError_t(302);
}
impl hipError_t {
#[doc = "< Failed to initialize shared object."]
pub const hipErrorSharedObjectInitFailed: hipError_t = hipError_t(303);
}
impl hipError_t {
#[doc = "< Not the correct operating system"]
pub const hipErrorOperatingSystem: hipError_t = hipError_t(304);
}
impl hipError_t {
#[doc = "< Invalide handle"]
pub const hipErrorInvalidHandle: hipError_t = hipError_t(400);
}
impl hipError_t {
#[doc = "< Resource handle (hipEvent_t or hipStream_t) invalid."]
pub const hipErrorInvalidResourceHandle: hipError_t = hipError_t(400);
}
impl hipError_t {
#[doc = "< Resource required is not in a valid state to perform operation."]
pub const hipErrorIllegalState: hipError_t = hipError_t(401);
}
impl hipError_t {
#[doc = "< Not found"]
pub const hipErrorNotFound: hipError_t = hipError_t(500);
}
impl hipError_t {
#[doc = "< Indicates that asynchronous operations enqueued earlier are not\n< ready. This is not actually an error, but is used to distinguish\n< from hipSuccess (which indicates completion). APIs that return\n< this error include hipEventQuery and hipStreamQuery."]
pub const hipErrorNotReady: hipError_t = hipError_t(600);
}
impl hipError_t {
pub const hipErrorIllegalAddress: hipError_t = hipError_t(700);
}
impl hipError_t {
#[doc = "< Out of resources error."]
pub const hipErrorLaunchOutOfResources: hipError_t = hipError_t(701);
}
impl hipError_t {
#[doc = "< Timeout for the launch."]
pub const hipErrorLaunchTimeOut: hipError_t = hipError_t(702);
}
impl hipError_t {
pub const hipErrorPeerAccessAlreadyEnabled: hipError_t = hipError_t(704);
}
impl hipError_t {
pub const hipErrorPeerAccessNotEnabled: hipError_t = hipError_t(705);
}
impl hipError_t {
#[doc = "< The process is active."]
pub const hipErrorSetOnActiveProcess: hipError_t = hipError_t(708);
}
impl hipError_t {
#[doc = "< The context is already destroyed"]
pub const hipErrorContextIsDestroyed: hipError_t = hipError_t(709);
}
impl hipError_t {
#[doc = "< Produced when the kernel calls assert."]
pub const hipErrorAssert: hipError_t = hipError_t(710);
}
impl hipError_t {
pub const hipErrorHostMemoryAlreadyRegistered: hipError_t = hipError_t(712);
}
impl hipError_t {
pub const hipErrorHostMemoryNotRegistered: hipError_t = hipError_t(713);
}
impl hipError_t {
pub const hipErrorLaunchFailure: hipError_t = hipError_t(719);
}
impl hipError_t {
pub const hipErrorCooperativeLaunchTooLarge: hipError_t = hipError_t(720);
}
impl hipError_t {
#[doc = "< Produced when the hip API is not supported/implemented"]
pub const hipErrorNotSupported: hipError_t = hipError_t(801);
}
impl hipError_t {
#[doc = "< The operation is not permitted when the stream\n< is capturing."]
pub const hipErrorStreamCaptureUnsupported: hipError_t = hipError_t(900);
}
impl hipError_t {
#[doc = "< The current capture sequence on the stream\n< has been invalidated due to a previous error."]
pub const hipErrorStreamCaptureInvalidated: hipError_t = hipError_t(901);
}
impl hipError_t {
#[doc = "< The operation would have resulted in a merge of\n< two independent capture sequences."]
pub const hipErrorStreamCaptureMerge: hipError_t = hipError_t(902);
}
impl hipError_t {
#[doc = "< The capture was not initiated in this stream."]
pub const hipErrorStreamCaptureUnmatched: hipError_t = hipError_t(903);
}
impl hipError_t {
#[doc = "< The capture sequence contains a fork that was not\n< joined to the primary stream."]
pub const hipErrorStreamCaptureUnjoined: hipError_t = hipError_t(904);
}
impl hipError_t {
#[doc = "< A dependency would have been created which crosses\n< the capture sequence boundary. Only implicit\n< in-stream ordering dependencies are allowed\n< to cross the boundary"]
pub const hipErrorStreamCaptureIsolation: hipError_t = hipError_t(905);
}
impl hipError_t {
#[doc = "< The operation would have resulted in a disallowed\n< implicit dependency on a current capture sequence\n< from hipStreamLegacy."]
pub const hipErrorStreamCaptureImplicit: hipError_t = hipError_t(906);
}
impl hipError_t {
#[doc = "< The operation is not permitted on an event which was last\n< recorded in a capturing stream."]
pub const hipErrorCapturedEvent: hipError_t = hipError_t(907);
}
impl hipError_t {
#[doc = "< A stream capture sequence not initiated with\n< the hipStreamCaptureModeRelaxed argument to\n< hipStreamBeginCapture was passed to\n< hipStreamEndCapture in a different thread."]
pub const hipErrorStreamCaptureWrongThread: hipError_t = hipError_t(908);
}
impl hipError_t {
#[doc = "< This error indicates that the graph update\n< not performed because it included changes which\n< violated constraintsspecific to instantiated graph\n< update."]
pub const hipErrorGraphExecUpdateFailure: hipError_t = hipError_t(910);
}
impl hipError_t {
#[doc = "< Unknown error."]
pub const hipErrorUnknown: hipError_t = hipError_t(999);
}
impl hipError_t {
#[doc = "< HSA runtime memory call returned error. Typically not seen\n< in production systems."]
pub const hipErrorRuntimeMemory: hipError_t = hipError_t(1052);
}
impl hipError_t {
#[doc = "< HSA runtime call other than memory returned error. Typically\n< not seen in production systems."]
pub const hipErrorRuntimeOther: hipError_t = hipError_t(1053);
}
impl hipError_t {
#[doc = "< Marker that more error codes are needed."]
pub const hipErrorTbd: hipError_t = hipError_t(1054);
}
#[repr(transparent)]
#[doc = " HIP error type\n"]
#[must_use]
#[derive(Copy, Clone, Hash, PartialEq, Eq, Debug)]
pub struct hipError_t(pub ::std::os::raw::c_int);
impl hipDeviceAttribute_t {
pub const hipDeviceAttributeCudaCompatibleBegin: hipDeviceAttribute_t = hipDeviceAttribute_t(0);
}
impl hipDeviceAttribute_t {
#[doc = "< Whether ECC support is enabled."]
pub const hipDeviceAttributeEccEnabled: hipDeviceAttribute_t = hipDeviceAttribute_t(0);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. The maximum size of the window policy in bytes."]
pub const hipDeviceAttributeAccessPolicyMaxWindowSize: hipDeviceAttribute_t =
hipDeviceAttribute_t(1);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Asynchronous engines number."]
pub const hipDeviceAttributeAsyncEngineCount: hipDeviceAttribute_t = hipDeviceAttribute_t(2);
}
impl hipDeviceAttribute_t {
#[doc = "< Whether host memory can be mapped into device address space"]
pub const hipDeviceAttributeCanMapHostMemory: hipDeviceAttribute_t = hipDeviceAttribute_t(3);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Device can access host registered memory\n< at the same virtual address as the CPU"]
pub const hipDeviceAttributeCanUseHostPointerForRegisteredMem: hipDeviceAttribute_t =
hipDeviceAttribute_t(4);
}
impl hipDeviceAttribute_t {
#[doc = "< Peak clock frequency in kilohertz."]
pub const hipDeviceAttributeClockRate: hipDeviceAttribute_t = hipDeviceAttribute_t(5);
}
impl hipDeviceAttribute_t {
#[doc = "< Compute mode that device is currently in."]
pub const hipDeviceAttributeComputeMode: hipDeviceAttribute_t = hipDeviceAttribute_t(6);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Device supports Compute Preemption."]
pub const hipDeviceAttributeComputePreemptionSupported: hipDeviceAttribute_t =
hipDeviceAttribute_t(7);
}
impl hipDeviceAttribute_t {
#[doc = "< Device can possibly execute multiple kernels concurrently."]
pub const hipDeviceAttributeConcurrentKernels: hipDeviceAttribute_t = hipDeviceAttribute_t(8);
}
impl hipDeviceAttribute_t {
#[doc = "< Device can coherently access managed memory concurrently with the CPU"]
pub const hipDeviceAttributeConcurrentManagedAccess: hipDeviceAttribute_t =
hipDeviceAttribute_t(9);
}
impl hipDeviceAttribute_t {
#[doc = "< Support cooperative launch"]
pub const hipDeviceAttributeCooperativeLaunch: hipDeviceAttribute_t = hipDeviceAttribute_t(10);
}
impl hipDeviceAttribute_t {
#[doc = "< Support cooperative launch on multiple devices"]
pub const hipDeviceAttributeCooperativeMultiDeviceLaunch: hipDeviceAttribute_t =
hipDeviceAttribute_t(11);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Device can concurrently copy memory and execute a kernel.\n< Deprecated. Use instead asyncEngineCount."]
pub const hipDeviceAttributeDeviceOverlap: hipDeviceAttribute_t = hipDeviceAttribute_t(12);
}
impl hipDeviceAttribute_t {
#[doc = "< Host can directly access managed memory on\n< the device without migration"]
pub const hipDeviceAttributeDirectManagedMemAccessFromHost: hipDeviceAttribute_t =
hipDeviceAttribute_t(13);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Device supports caching globals in L1"]
pub const hipDeviceAttributeGlobalL1CacheSupported: hipDeviceAttribute_t =
hipDeviceAttribute_t(14);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Link between the device and the host supports native atomic operations"]
pub const hipDeviceAttributeHostNativeAtomicSupported: hipDeviceAttribute_t =
hipDeviceAttribute_t(15);
}
impl hipDeviceAttribute_t {
#[doc = "< Device is integrated GPU"]
pub const hipDeviceAttributeIntegrated: hipDeviceAttribute_t = hipDeviceAttribute_t(16);
}
impl hipDeviceAttribute_t {
#[doc = "< Multiple GPU devices."]
pub const hipDeviceAttributeIsMultiGpuBoard: hipDeviceAttribute_t = hipDeviceAttribute_t(17);
}
impl hipDeviceAttribute_t {
#[doc = "< Run time limit for kernels executed on the device"]
pub const hipDeviceAttributeKernelExecTimeout: hipDeviceAttribute_t = hipDeviceAttribute_t(18);
}
impl hipDeviceAttribute_t {
#[doc = "< Size of L2 cache in bytes. 0 if the device doesn't have L2 cache."]
pub const hipDeviceAttributeL2CacheSize: hipDeviceAttribute_t = hipDeviceAttribute_t(19);
}
impl hipDeviceAttribute_t {
#[doc = "< caching locals in L1 is supported"]
pub const hipDeviceAttributeLocalL1CacheSupported: hipDeviceAttribute_t =
hipDeviceAttribute_t(20);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. 8-byte locally unique identifier in 8 bytes. Undefined on TCC and non-Windows platforms"]
pub const hipDeviceAttributeLuid: hipDeviceAttribute_t = hipDeviceAttribute_t(21);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Luid device node mask. Undefined on TCC and non-Windows platforms"]
pub const hipDeviceAttributeLuidDeviceNodeMask: hipDeviceAttribute_t = hipDeviceAttribute_t(22);
}
impl hipDeviceAttribute_t {
#[doc = "< Major compute capability version number."]
pub const hipDeviceAttributeComputeCapabilityMajor: hipDeviceAttribute_t =
hipDeviceAttribute_t(23);
}
impl hipDeviceAttribute_t {
#[doc = "< Device supports allocating managed memory on this system"]
pub const hipDeviceAttributeManagedMemory: hipDeviceAttribute_t = hipDeviceAttribute_t(24);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Max block size per multiprocessor"]
pub const hipDeviceAttributeMaxBlocksPerMultiProcessor: hipDeviceAttribute_t =
hipDeviceAttribute_t(25);
}
impl hipDeviceAttribute_t {
#[doc = "< Max block size in width."]
pub const hipDeviceAttributeMaxBlockDimX: hipDeviceAttribute_t = hipDeviceAttribute_t(26);
}
impl hipDeviceAttribute_t {
#[doc = "< Max block size in height."]
pub const hipDeviceAttributeMaxBlockDimY: hipDeviceAttribute_t = hipDeviceAttribute_t(27);
}
impl hipDeviceAttribute_t {
#[doc = "< Max block size in depth."]
pub const hipDeviceAttributeMaxBlockDimZ: hipDeviceAttribute_t = hipDeviceAttribute_t(28);
}
impl hipDeviceAttribute_t {
#[doc = "< Max grid size in width."]
pub const hipDeviceAttributeMaxGridDimX: hipDeviceAttribute_t = hipDeviceAttribute_t(29);
}
impl hipDeviceAttribute_t {
#[doc = "< Max grid size in height."]
pub const hipDeviceAttributeMaxGridDimY: hipDeviceAttribute_t = hipDeviceAttribute_t(30);
}
impl hipDeviceAttribute_t {
#[doc = "< Max grid size in depth."]
pub const hipDeviceAttributeMaxGridDimZ: hipDeviceAttribute_t = hipDeviceAttribute_t(31);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum size of 1D surface."]
pub const hipDeviceAttributeMaxSurface1D: hipDeviceAttribute_t = hipDeviceAttribute_t(32);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimensions of 1D layered surface."]
pub const hipDeviceAttributeMaxSurface1DLayered: hipDeviceAttribute_t =
hipDeviceAttribute_t(33);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum dimension (width, height) of 2D surface."]
pub const hipDeviceAttributeMaxSurface2D: hipDeviceAttribute_t = hipDeviceAttribute_t(34);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimensions of 2D layered surface."]
pub const hipDeviceAttributeMaxSurface2DLayered: hipDeviceAttribute_t =
hipDeviceAttribute_t(35);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum dimension (width, height, depth) of 3D surface."]
pub const hipDeviceAttributeMaxSurface3D: hipDeviceAttribute_t = hipDeviceAttribute_t(36);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimensions of Cubemap surface."]
pub const hipDeviceAttributeMaxSurfaceCubemap: hipDeviceAttribute_t = hipDeviceAttribute_t(37);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimension of Cubemap layered surface."]
pub const hipDeviceAttributeMaxSurfaceCubemapLayered: hipDeviceAttribute_t =
hipDeviceAttribute_t(38);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum size of 1D texture."]
pub const hipDeviceAttributeMaxTexture1DWidth: hipDeviceAttribute_t = hipDeviceAttribute_t(39);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimensions of 1D layered texture."]
pub const hipDeviceAttributeMaxTexture1DLayered: hipDeviceAttribute_t =
hipDeviceAttribute_t(40);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum number of elements allocatable in a 1D linear texture.\n< Use cudaDeviceGetTexture1DLinearMaxWidth() instead on Cuda."]
pub const hipDeviceAttributeMaxTexture1DLinear: hipDeviceAttribute_t = hipDeviceAttribute_t(41);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum size of 1D mipmapped texture."]
pub const hipDeviceAttributeMaxTexture1DMipmap: hipDeviceAttribute_t = hipDeviceAttribute_t(42);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum dimension width of 2D texture."]
pub const hipDeviceAttributeMaxTexture2DWidth: hipDeviceAttribute_t = hipDeviceAttribute_t(43);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum dimension hight of 2D texture."]
pub const hipDeviceAttributeMaxTexture2DHeight: hipDeviceAttribute_t = hipDeviceAttribute_t(44);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimensions of 2D texture if gather operations performed."]
pub const hipDeviceAttributeMaxTexture2DGather: hipDeviceAttribute_t = hipDeviceAttribute_t(45);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimensions of 2D layered texture."]
pub const hipDeviceAttributeMaxTexture2DLayered: hipDeviceAttribute_t =
hipDeviceAttribute_t(46);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimensions (width, height, pitch) of 2D textures bound to pitched memory."]
pub const hipDeviceAttributeMaxTexture2DLinear: hipDeviceAttribute_t = hipDeviceAttribute_t(47);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimensions of 2D mipmapped texture."]
pub const hipDeviceAttributeMaxTexture2DMipmap: hipDeviceAttribute_t = hipDeviceAttribute_t(48);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum dimension width of 3D texture."]
pub const hipDeviceAttributeMaxTexture3DWidth: hipDeviceAttribute_t = hipDeviceAttribute_t(49);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum dimension height of 3D texture."]
pub const hipDeviceAttributeMaxTexture3DHeight: hipDeviceAttribute_t = hipDeviceAttribute_t(50);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum dimension depth of 3D texture."]
pub const hipDeviceAttributeMaxTexture3DDepth: hipDeviceAttribute_t = hipDeviceAttribute_t(51);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimensions of alternate 3D texture."]
pub const hipDeviceAttributeMaxTexture3DAlt: hipDeviceAttribute_t = hipDeviceAttribute_t(52);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimensions of Cubemap texture"]
pub const hipDeviceAttributeMaxTextureCubemap: hipDeviceAttribute_t = hipDeviceAttribute_t(53);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum dimensions of Cubemap layered texture."]
pub const hipDeviceAttributeMaxTextureCubemapLayered: hipDeviceAttribute_t =
hipDeviceAttribute_t(54);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum dimension of a block"]
pub const hipDeviceAttributeMaxThreadsDim: hipDeviceAttribute_t = hipDeviceAttribute_t(55);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum number of threads per block."]
pub const hipDeviceAttributeMaxThreadsPerBlock: hipDeviceAttribute_t = hipDeviceAttribute_t(56);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum resident threads per multiprocessor."]
pub const hipDeviceAttributeMaxThreadsPerMultiProcessor: hipDeviceAttribute_t =
hipDeviceAttribute_t(57);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum pitch in bytes allowed by memory copies"]
pub const hipDeviceAttributeMaxPitch: hipDeviceAttribute_t = hipDeviceAttribute_t(58);
}
impl hipDeviceAttribute_t {
#[doc = "< Global memory bus width in bits."]
pub const hipDeviceAttributeMemoryBusWidth: hipDeviceAttribute_t = hipDeviceAttribute_t(59);
}
impl hipDeviceAttribute_t {
#[doc = "< Peak memory clock frequency in kilohertz."]
pub const hipDeviceAttributeMemoryClockRate: hipDeviceAttribute_t = hipDeviceAttribute_t(60);
}
impl hipDeviceAttribute_t {
#[doc = "< Minor compute capability version number."]
pub const hipDeviceAttributeComputeCapabilityMinor: hipDeviceAttribute_t =
hipDeviceAttribute_t(61);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Unique ID of device group on the same multi-GPU board"]
pub const hipDeviceAttributeMultiGpuBoardGroupID: hipDeviceAttribute_t =
hipDeviceAttribute_t(62);
}
impl hipDeviceAttribute_t {
#[doc = "< Number of multiprocessors on the device."]
pub const hipDeviceAttributeMultiprocessorCount: hipDeviceAttribute_t =
hipDeviceAttribute_t(63);
}
impl hipDeviceAttribute_t {
#[doc = "< Device name."]
pub const hipDeviceAttributeName: hipDeviceAttribute_t = hipDeviceAttribute_t(64);
}
impl hipDeviceAttribute_t {
#[doc = "< Device supports coherently accessing pageable memory\n< without calling hipHostRegister on it"]
pub const hipDeviceAttributePageableMemoryAccess: hipDeviceAttribute_t =
hipDeviceAttribute_t(65);
}
impl hipDeviceAttribute_t {
#[doc = "< Device accesses pageable memory via the host's page tables"]
pub const hipDeviceAttributePageableMemoryAccessUsesHostPageTables: hipDeviceAttribute_t =
hipDeviceAttribute_t(66);
}
impl hipDeviceAttribute_t {
#[doc = "< PCI Bus ID."]
pub const hipDeviceAttributePciBusId: hipDeviceAttribute_t = hipDeviceAttribute_t(67);
}
impl hipDeviceAttribute_t {
#[doc = "< PCI Device ID."]
pub const hipDeviceAttributePciDeviceId: hipDeviceAttribute_t = hipDeviceAttribute_t(68);
}
impl hipDeviceAttribute_t {
#[doc = "< PCI Domain ID."]
pub const hipDeviceAttributePciDomainID: hipDeviceAttribute_t = hipDeviceAttribute_t(69);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda11 only. Maximum l2 persisting lines capacity in bytes"]
pub const hipDeviceAttributePersistingL2CacheMaxSize: hipDeviceAttribute_t =
hipDeviceAttribute_t(70);
}
impl hipDeviceAttribute_t {
#[doc = "< 32-bit registers available to a thread block. This number is shared\n< by all thread blocks simultaneously resident on a multiprocessor."]
pub const hipDeviceAttributeMaxRegistersPerBlock: hipDeviceAttribute_t =
hipDeviceAttribute_t(71);
}
impl hipDeviceAttribute_t {
#[doc = "< 32-bit registers available per block."]
pub const hipDeviceAttributeMaxRegistersPerMultiprocessor: hipDeviceAttribute_t =
hipDeviceAttribute_t(72);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda11 only. Shared memory reserved by CUDA driver per block."]
pub const hipDeviceAttributeReservedSharedMemPerBlock: hipDeviceAttribute_t =
hipDeviceAttribute_t(73);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum shared memory available per block in bytes."]
pub const hipDeviceAttributeMaxSharedMemoryPerBlock: hipDeviceAttribute_t =
hipDeviceAttribute_t(74);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Maximum shared memory per block usable by special opt in."]
pub const hipDeviceAttributeSharedMemPerBlockOptin: hipDeviceAttribute_t =
hipDeviceAttribute_t(75);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Shared memory available per multiprocessor."]
pub const hipDeviceAttributeSharedMemPerMultiprocessor: hipDeviceAttribute_t =
hipDeviceAttribute_t(76);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Performance ratio of single precision to double precision."]
pub const hipDeviceAttributeSingleToDoublePrecisionPerfRatio: hipDeviceAttribute_t =
hipDeviceAttribute_t(77);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Whether to support stream priorities."]
pub const hipDeviceAttributeStreamPrioritiesSupported: hipDeviceAttribute_t =
hipDeviceAttribute_t(78);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Alignment requirement for surfaces"]
pub const hipDeviceAttributeSurfaceAlignment: hipDeviceAttribute_t = hipDeviceAttribute_t(79);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Whether device is a Tesla device using TCC driver"]
pub const hipDeviceAttributeTccDriver: hipDeviceAttribute_t = hipDeviceAttribute_t(80);
}
impl hipDeviceAttribute_t {
#[doc = "< Alignment requirement for textures"]
pub const hipDeviceAttributeTextureAlignment: hipDeviceAttribute_t = hipDeviceAttribute_t(81);
}
impl hipDeviceAttribute_t {
#[doc = "< Pitch alignment requirement for 2D texture references bound to pitched memory;"]
pub const hipDeviceAttributeTexturePitchAlignment: hipDeviceAttribute_t =
hipDeviceAttribute_t(82);
}
impl hipDeviceAttribute_t {
#[doc = "< Constant memory size in bytes."]
pub const hipDeviceAttributeTotalConstantMemory: hipDeviceAttribute_t =
hipDeviceAttribute_t(83);
}
impl hipDeviceAttribute_t {
#[doc = "< Global memory available on devicice."]
pub const hipDeviceAttributeTotalGlobalMem: hipDeviceAttribute_t = hipDeviceAttribute_t(84);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. An unified address space shared with the host."]
pub const hipDeviceAttributeUnifiedAddressing: hipDeviceAttribute_t = hipDeviceAttribute_t(85);
}
impl hipDeviceAttribute_t {
#[doc = "< Cuda only. Unique ID in 16 byte."]
pub const hipDeviceAttributeUuid: hipDeviceAttribute_t = hipDeviceAttribute_t(86);
}
impl hipDeviceAttribute_t {
#[doc = "< Warp size in threads."]
pub const hipDeviceAttributeWarpSize: hipDeviceAttribute_t = hipDeviceAttribute_t(87);
}
impl hipDeviceAttribute_t {
#[doc = "< Device supports HIP Stream Ordered Memory Allocator"]
pub const hipDeviceAttributeMemoryPoolsSupported: hipDeviceAttribute_t =
hipDeviceAttribute_t(88);
}
impl hipDeviceAttribute_t {
#[doc = "< Device supports HIP virtual memory management"]
pub const hipDeviceAttributeVirtualMemoryManagementSupported: hipDeviceAttribute_t =
hipDeviceAttribute_t(89);
}
impl hipDeviceAttribute_t {
pub const hipDeviceAttributeCudaCompatibleEnd: hipDeviceAttribute_t =
hipDeviceAttribute_t(9999);
}
impl hipDeviceAttribute_t {
pub const hipDeviceAttributeAmdSpecificBegin: hipDeviceAttribute_t =
hipDeviceAttribute_t(10000);
}
impl hipDeviceAttribute_t {
#[doc = "< Frequency in khz of the timer used by the device-side \"clock*\""]
pub const hipDeviceAttributeClockInstructionRate: hipDeviceAttribute_t =
hipDeviceAttribute_t(10000);
}
impl hipDeviceAttribute_t {
#[doc = "< Device architecture"]
pub const hipDeviceAttributeArch: hipDeviceAttribute_t = hipDeviceAttribute_t(10001);
}
impl hipDeviceAttribute_t {
#[doc = "< Maximum Shared Memory PerMultiprocessor."]
pub const hipDeviceAttributeMaxSharedMemoryPerMultiprocessor: hipDeviceAttribute_t =
hipDeviceAttribute_t(10002);
}
impl hipDeviceAttribute_t {
#[doc = "< Device gcn architecture"]
pub const hipDeviceAttributeGcnArch: hipDeviceAttribute_t = hipDeviceAttribute_t(10003);
}
impl hipDeviceAttribute_t {
#[doc = "< Device gcnArch name in 256 bytes"]
pub const hipDeviceAttributeGcnArchName: hipDeviceAttribute_t = hipDeviceAttribute_t(10004);
}
impl hipDeviceAttribute_t {
#[doc = "< Address of the HDP_MEM_COHERENCY_FLUSH_CNTL register"]
pub const hipDeviceAttributeHdpMemFlushCntl: hipDeviceAttribute_t = hipDeviceAttribute_t(10005);
}
impl hipDeviceAttribute_t {
#[doc = "< Address of the HDP_REG_COHERENCY_FLUSH_CNTL register"]
pub const hipDeviceAttributeHdpRegFlushCntl: hipDeviceAttribute_t = hipDeviceAttribute_t(10006);
}
impl hipDeviceAttribute_t {
#[doc = "< Supports cooperative launch on multiple\n< devices with unmatched functions"]
pub const hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc: hipDeviceAttribute_t =
hipDeviceAttribute_t(10007);
}
impl hipDeviceAttribute_t {
#[doc = "< Supports cooperative launch on multiple\n< devices with unmatched grid dimensions"]
pub const hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim: hipDeviceAttribute_t =
hipDeviceAttribute_t(10008);
}
impl hipDeviceAttribute_t {
#[doc = "< Supports cooperative launch on multiple\n< devices with unmatched block dimensions"]
pub const hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim: hipDeviceAttribute_t =
hipDeviceAttribute_t(10009);
}
impl hipDeviceAttribute_t {
#[doc = "< Supports cooperative launch on multiple\n< devices with unmatched shared memories"]
pub const hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem: hipDeviceAttribute_t =
hipDeviceAttribute_t(10010);
}
impl hipDeviceAttribute_t {
#[doc = "< Whether it is LargeBar"]
pub const hipDeviceAttributeIsLargeBar: hipDeviceAttribute_t = hipDeviceAttribute_t(10011);
}
impl hipDeviceAttribute_t {
#[doc = "< Revision of the GPU in this device"]
pub const hipDeviceAttributeAsicRevision: hipDeviceAttribute_t = hipDeviceAttribute_t(10012);
}
impl hipDeviceAttribute_t {
#[doc = "< '1' if Device supports hipStreamWaitValue32() and\n< hipStreamWaitValue64(), '0' otherwise."]
pub const hipDeviceAttributeCanUseStreamWaitValue: hipDeviceAttribute_t =
hipDeviceAttribute_t(10013);
}
impl hipDeviceAttribute_t {
#[doc = "< '1' if Device supports image, '0' otherwise."]
pub const hipDeviceAttributeImageSupport: hipDeviceAttribute_t = hipDeviceAttribute_t(10014);
}
impl hipDeviceAttribute_t {
#[doc = "< All available physical compute\n< units for the device"]
pub const hipDeviceAttributePhysicalMultiProcessorCount: hipDeviceAttribute_t =
hipDeviceAttribute_t(10015);
}
impl hipDeviceAttribute_t {
#[doc = "< '1' if Device supports fine grain, '0' otherwise"]
pub const hipDeviceAttributeFineGrainSupport: hipDeviceAttribute_t =
hipDeviceAttribute_t(10016);
}
impl hipDeviceAttribute_t {
#[doc = "< Constant frequency of wall clock in kilohertz."]
pub const hipDeviceAttributeWallClockRate: hipDeviceAttribute_t = hipDeviceAttribute_t(10017);
}
impl hipDeviceAttribute_t {
pub const hipDeviceAttributeAmdSpecificEnd: hipDeviceAttribute_t = hipDeviceAttribute_t(19999);
}
impl hipDeviceAttribute_t {
pub const hipDeviceAttributeVendorSpecificBegin: hipDeviceAttribute_t =
hipDeviceAttribute_t(20000);
}
#[repr(transparent)]
#[doc = " hipDeviceAttribute_t\n"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipDeviceAttribute_t(pub ::std::os::raw::c_int);
impl hipComputeMode {
pub const hipComputeModeDefault: hipComputeMode = hipComputeMode(0);
}
impl hipComputeMode {
pub const hipComputeModeExclusive: hipComputeMode = hipComputeMode(1);
}
impl hipComputeMode {
pub const hipComputeModeProhibited: hipComputeMode = hipComputeMode(2);
}
impl hipComputeMode {
pub const hipComputeModeExclusiveProcess: hipComputeMode = hipComputeMode(3);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipComputeMode(pub ::std::os::raw::c_int);
#[repr(transparent)]
#[derive(Copy, Clone)]
pub struct hipDeviceptr_t(pub *mut ::std::os::raw::c_void);
impl hipChannelFormatKind {
pub const hipChannelFormatKindSigned: hipChannelFormatKind = hipChannelFormatKind(0);
}
impl hipChannelFormatKind {
pub const hipChannelFormatKindUnsigned: hipChannelFormatKind = hipChannelFormatKind(1);
}
impl hipChannelFormatKind {
pub const hipChannelFormatKindFloat: hipChannelFormatKind = hipChannelFormatKind(2);
}
impl hipChannelFormatKind {
pub const hipChannelFormatKindNone: hipChannelFormatKind = hipChannelFormatKind(3);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipChannelFormatKind(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipChannelFormatDesc {
pub x: ::std::os::raw::c_int,
pub y: ::std::os::raw::c_int,
pub z: ::std::os::raw::c_int,
pub w: ::std::os::raw::c_int,
pub f: hipChannelFormatKind,
}
impl hipArray_Format {
pub const HIP_AD_FORMAT_UNSIGNED_INT8: hipArray_Format = hipArray_Format(1);
}
impl hipArray_Format {
pub const HIP_AD_FORMAT_UNSIGNED_INT16: hipArray_Format = hipArray_Format(2);
}
impl hipArray_Format {
pub const HIP_AD_FORMAT_UNSIGNED_INT32: hipArray_Format = hipArray_Format(3);
}
impl hipArray_Format {
pub const HIP_AD_FORMAT_SIGNED_INT8: hipArray_Format = hipArray_Format(8);
}
impl hipArray_Format {
pub const HIP_AD_FORMAT_SIGNED_INT16: hipArray_Format = hipArray_Format(9);
}
impl hipArray_Format {
pub const HIP_AD_FORMAT_SIGNED_INT32: hipArray_Format = hipArray_Format(10);
}
impl hipArray_Format {
pub const HIP_AD_FORMAT_HALF: hipArray_Format = hipArray_Format(16);
}
impl hipArray_Format {
pub const HIP_AD_FORMAT_FLOAT: hipArray_Format = hipArray_Format(32);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipArray_Format(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HIP_ARRAY_DESCRIPTOR {
pub Width: usize,
pub Height: usize,
pub Format: hipArray_Format,
pub NumChannels: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HIP_ARRAY3D_DESCRIPTOR {
pub Width: usize,
pub Height: usize,
pub Depth: usize,
pub Format: hipArray_Format,
pub NumChannels: ::std::os::raw::c_uint,
pub Flags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipArray {
pub data: *mut ::std::os::raw::c_void,
pub desc: hipChannelFormatDesc,
pub type_: ::std::os::raw::c_uint,
pub width: ::std::os::raw::c_uint,
pub height: ::std::os::raw::c_uint,
pub depth: ::std::os::raw::c_uint,
pub Format: hipArray_Format,
pub NumChannels: ::std::os::raw::c_uint,
pub isDrv: bool,
pub textureType: ::std::os::raw::c_uint,
pub flags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hip_Memcpy2D {
pub srcXInBytes: usize,
pub srcY: usize,
pub srcMemoryType: hipMemoryType,
pub srcHost: *const ::std::os::raw::c_void,
pub srcDevice: hipDeviceptr_t,
pub srcArray: *mut hipArray,
pub srcPitch: usize,
pub dstXInBytes: usize,
pub dstY: usize,
pub dstMemoryType: hipMemoryType,
pub dstHost: *mut ::std::os::raw::c_void,
pub dstDevice: hipDeviceptr_t,
pub dstArray: *mut hipArray,
pub dstPitch: usize,
pub WidthInBytes: usize,
pub Height: usize,
}
pub type hipArray_t = *mut hipArray;
pub type hiparray = hipArray_t;
pub type hipArray_const_t = *const hipArray;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMipmappedArray {
pub data: *mut ::std::os::raw::c_void,
pub desc: hipChannelFormatDesc,
pub type_: ::std::os::raw::c_uint,
pub width: ::std::os::raw::c_uint,
pub height: ::std::os::raw::c_uint,
pub depth: ::std::os::raw::c_uint,
pub min_mipmap_level: ::std::os::raw::c_uint,
pub max_mipmap_level: ::std::os::raw::c_uint,
pub flags: ::std::os::raw::c_uint,
pub format: hipArray_Format,
pub num_channels: ::std::os::raw::c_uint,
}
pub type hipMipmappedArray_t = *mut hipMipmappedArray;
pub type hipmipmappedArray = hipMipmappedArray_t;
pub type hipMipmappedArray_const_t = *const hipMipmappedArray;
impl hipResourceType {
pub const hipResourceTypeArray: hipResourceType = hipResourceType(0);
}
impl hipResourceType {
pub const hipResourceTypeMipmappedArray: hipResourceType = hipResourceType(1);
}
impl hipResourceType {
pub const hipResourceTypeLinear: hipResourceType = hipResourceType(2);
}
impl hipResourceType {
pub const hipResourceTypePitch2D: hipResourceType = hipResourceType(3);
}
#[repr(transparent)]
#[doc = " hip resource types"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipResourceType(pub ::std::os::raw::c_int);
impl HIPresourcetype_enum {
#[doc = "< Array resoure"]
pub const HIP_RESOURCE_TYPE_ARRAY: HIPresourcetype_enum = HIPresourcetype_enum(0);
}
impl HIPresourcetype_enum {
#[doc = "< Mipmapped array resource"]
pub const HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY: HIPresourcetype_enum = HIPresourcetype_enum(1);
}
impl HIPresourcetype_enum {
#[doc = "< Linear resource"]
pub const HIP_RESOURCE_TYPE_LINEAR: HIPresourcetype_enum = HIPresourcetype_enum(2);
}
impl HIPresourcetype_enum {
#[doc = "< Pitch 2D resource"]
pub const HIP_RESOURCE_TYPE_PITCH2D: HIPresourcetype_enum = HIPresourcetype_enum(3);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct HIPresourcetype_enum(pub ::std::os::raw::c_int);
pub use self::HIPresourcetype_enum as HIPresourcetype;
pub use self::HIPresourcetype_enum as hipResourcetype;
impl HIPaddress_mode_enum {
pub const HIP_TR_ADDRESS_MODE_WRAP: HIPaddress_mode_enum = HIPaddress_mode_enum(0);
}
impl HIPaddress_mode_enum {
pub const HIP_TR_ADDRESS_MODE_CLAMP: HIPaddress_mode_enum = HIPaddress_mode_enum(1);
}
impl HIPaddress_mode_enum {
pub const HIP_TR_ADDRESS_MODE_MIRROR: HIPaddress_mode_enum = HIPaddress_mode_enum(2);
}
impl HIPaddress_mode_enum {
pub const HIP_TR_ADDRESS_MODE_BORDER: HIPaddress_mode_enum = HIPaddress_mode_enum(3);
}
#[repr(transparent)]
#[doc = " hip address modes"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct HIPaddress_mode_enum(pub ::std::os::raw::c_int);
#[doc = " hip address modes"]
pub use self::HIPaddress_mode_enum as HIPaddress_mode;
impl HIPfilter_mode_enum {
pub const HIP_TR_FILTER_MODE_POINT: HIPfilter_mode_enum = HIPfilter_mode_enum(0);
}
impl HIPfilter_mode_enum {
pub const HIP_TR_FILTER_MODE_LINEAR: HIPfilter_mode_enum = HIPfilter_mode_enum(1);
}
#[repr(transparent)]
#[doc = " hip filter modes"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct HIPfilter_mode_enum(pub ::std::os::raw::c_int);
#[doc = " hip filter modes"]
pub use self::HIPfilter_mode_enum as HIPfilter_mode;
#[doc = " Texture descriptor"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HIP_TEXTURE_DESC_st {
#[doc = "< Address modes"]
pub addressMode: [HIPaddress_mode; 3usize],
#[doc = "< Filter mode"]
pub filterMode: HIPfilter_mode,
#[doc = "< Flags"]
pub flags: ::std::os::raw::c_uint,
#[doc = "< Maximum anisotropy ratio"]
pub maxAnisotropy: ::std::os::raw::c_uint,
#[doc = "< Mipmap filter mode"]
pub mipmapFilterMode: HIPfilter_mode,
#[doc = "< Mipmap level bias"]
pub mipmapLevelBias: f32,
#[doc = "< Mipmap minimum level clamp"]
pub minMipmapLevelClamp: f32,
#[doc = "< Mipmap maximum level clamp"]
pub maxMipmapLevelClamp: f32,
#[doc = "< Border Color"]
pub borderColor: [f32; 4usize],
pub reserved: [::std::os::raw::c_int; 12usize],
}
#[doc = " Texture descriptor"]
pub type HIP_TEXTURE_DESC = HIP_TEXTURE_DESC_st;
impl hipResourceViewFormat {
pub const hipResViewFormatNone: hipResourceViewFormat = hipResourceViewFormat(0);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedChar1: hipResourceViewFormat = hipResourceViewFormat(1);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedChar2: hipResourceViewFormat = hipResourceViewFormat(2);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedChar4: hipResourceViewFormat = hipResourceViewFormat(3);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedChar1: hipResourceViewFormat = hipResourceViewFormat(4);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedChar2: hipResourceViewFormat = hipResourceViewFormat(5);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedChar4: hipResourceViewFormat = hipResourceViewFormat(6);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedShort1: hipResourceViewFormat = hipResourceViewFormat(7);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedShort2: hipResourceViewFormat = hipResourceViewFormat(8);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedShort4: hipResourceViewFormat = hipResourceViewFormat(9);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedShort1: hipResourceViewFormat = hipResourceViewFormat(10);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedShort2: hipResourceViewFormat = hipResourceViewFormat(11);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedShort4: hipResourceViewFormat = hipResourceViewFormat(12);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedInt1: hipResourceViewFormat = hipResourceViewFormat(13);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedInt2: hipResourceViewFormat = hipResourceViewFormat(14);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedInt4: hipResourceViewFormat = hipResourceViewFormat(15);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedInt1: hipResourceViewFormat = hipResourceViewFormat(16);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedInt2: hipResourceViewFormat = hipResourceViewFormat(17);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedInt4: hipResourceViewFormat = hipResourceViewFormat(18);
}
impl hipResourceViewFormat {
pub const hipResViewFormatHalf1: hipResourceViewFormat = hipResourceViewFormat(19);
}
impl hipResourceViewFormat {
pub const hipResViewFormatHalf2: hipResourceViewFormat = hipResourceViewFormat(20);
}
impl hipResourceViewFormat {
pub const hipResViewFormatHalf4: hipResourceViewFormat = hipResourceViewFormat(21);
}
impl hipResourceViewFormat {
pub const hipResViewFormatFloat1: hipResourceViewFormat = hipResourceViewFormat(22);
}
impl hipResourceViewFormat {
pub const hipResViewFormatFloat2: hipResourceViewFormat = hipResourceViewFormat(23);
}
impl hipResourceViewFormat {
pub const hipResViewFormatFloat4: hipResourceViewFormat = hipResourceViewFormat(24);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedBlockCompressed1: hipResourceViewFormat =
hipResourceViewFormat(25);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedBlockCompressed2: hipResourceViewFormat =
hipResourceViewFormat(26);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedBlockCompressed3: hipResourceViewFormat =
hipResourceViewFormat(27);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedBlockCompressed4: hipResourceViewFormat =
hipResourceViewFormat(28);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedBlockCompressed4: hipResourceViewFormat =
hipResourceViewFormat(29);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedBlockCompressed5: hipResourceViewFormat =
hipResourceViewFormat(30);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedBlockCompressed5: hipResourceViewFormat =
hipResourceViewFormat(31);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedBlockCompressed6H: hipResourceViewFormat =
hipResourceViewFormat(32);
}
impl hipResourceViewFormat {
pub const hipResViewFormatSignedBlockCompressed6H: hipResourceViewFormat =
hipResourceViewFormat(33);
}
impl hipResourceViewFormat {
pub const hipResViewFormatUnsignedBlockCompressed7: hipResourceViewFormat =
hipResourceViewFormat(34);
}
#[repr(transparent)]
#[doc = " hip texture resource view formats"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipResourceViewFormat(pub ::std::os::raw::c_int);
impl HIPresourceViewFormat_enum {
#[doc = "< No resource view format (use underlying resource format)"]
pub const HIP_RES_VIEW_FORMAT_NONE: HIPresourceViewFormat_enum = HIPresourceViewFormat_enum(0);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 1 channel unsigned 8-bit integers"]
pub const HIP_RES_VIEW_FORMAT_UINT_1X8: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(1);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 2 channel unsigned 8-bit integers"]
pub const HIP_RES_VIEW_FORMAT_UINT_2X8: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(2);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 4 channel unsigned 8-bit integers"]
pub const HIP_RES_VIEW_FORMAT_UINT_4X8: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(3);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 1 channel signed 8-bit integers"]
pub const HIP_RES_VIEW_FORMAT_SINT_1X8: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(4);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 2 channel signed 8-bit integers"]
pub const HIP_RES_VIEW_FORMAT_SINT_2X8: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(5);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 4 channel signed 8-bit integers"]
pub const HIP_RES_VIEW_FORMAT_SINT_4X8: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(6);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 1 channel unsigned 16-bit integers"]
pub const HIP_RES_VIEW_FORMAT_UINT_1X16: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(7);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 2 channel unsigned 16-bit integers"]
pub const HIP_RES_VIEW_FORMAT_UINT_2X16: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(8);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 4 channel unsigned 16-bit integers"]
pub const HIP_RES_VIEW_FORMAT_UINT_4X16: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(9);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 1 channel signed 16-bit integers"]
pub const HIP_RES_VIEW_FORMAT_SINT_1X16: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(10);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 2 channel signed 16-bit integers"]
pub const HIP_RES_VIEW_FORMAT_SINT_2X16: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(11);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 4 channel signed 16-bit integers"]
pub const HIP_RES_VIEW_FORMAT_SINT_4X16: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(12);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 1 channel unsigned 32-bit integers"]
pub const HIP_RES_VIEW_FORMAT_UINT_1X32: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(13);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 2 channel unsigned 32-bit integers"]
pub const HIP_RES_VIEW_FORMAT_UINT_2X32: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(14);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 4 channel unsigned 32-bit integers"]
pub const HIP_RES_VIEW_FORMAT_UINT_4X32: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(15);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 1 channel signed 32-bit integers"]
pub const HIP_RES_VIEW_FORMAT_SINT_1X32: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(16);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 2 channel signed 32-bit integers"]
pub const HIP_RES_VIEW_FORMAT_SINT_2X32: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(17);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 4 channel signed 32-bit integers"]
pub const HIP_RES_VIEW_FORMAT_SINT_4X32: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(18);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 1 channel 16-bit floating point"]
pub const HIP_RES_VIEW_FORMAT_FLOAT_1X16: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(19);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 2 channel 16-bit floating point"]
pub const HIP_RES_VIEW_FORMAT_FLOAT_2X16: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(20);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 4 channel 16-bit floating point"]
pub const HIP_RES_VIEW_FORMAT_FLOAT_4X16: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(21);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 1 channel 32-bit floating point"]
pub const HIP_RES_VIEW_FORMAT_FLOAT_1X32: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(22);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 2 channel 32-bit floating point"]
pub const HIP_RES_VIEW_FORMAT_FLOAT_2X32: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(23);
}
impl HIPresourceViewFormat_enum {
#[doc = "< 4 channel 32-bit floating point"]
pub const HIP_RES_VIEW_FORMAT_FLOAT_4X32: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(24);
}
impl HIPresourceViewFormat_enum {
#[doc = "< Block compressed 1"]
pub const HIP_RES_VIEW_FORMAT_UNSIGNED_BC1: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(25);
}
impl HIPresourceViewFormat_enum {
#[doc = "< Block compressed 2"]
pub const HIP_RES_VIEW_FORMAT_UNSIGNED_BC2: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(26);
}
impl HIPresourceViewFormat_enum {
#[doc = "< Block compressed 3"]
pub const HIP_RES_VIEW_FORMAT_UNSIGNED_BC3: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(27);
}
impl HIPresourceViewFormat_enum {
#[doc = "< Block compressed 4 unsigned"]
pub const HIP_RES_VIEW_FORMAT_UNSIGNED_BC4: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(28);
}
impl HIPresourceViewFormat_enum {
#[doc = "< Block compressed 4 signed"]
pub const HIP_RES_VIEW_FORMAT_SIGNED_BC4: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(29);
}
impl HIPresourceViewFormat_enum {
#[doc = "< Block compressed 5 unsigned"]
pub const HIP_RES_VIEW_FORMAT_UNSIGNED_BC5: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(30);
}
impl HIPresourceViewFormat_enum {
#[doc = "< Block compressed 5 signed"]
pub const HIP_RES_VIEW_FORMAT_SIGNED_BC5: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(31);
}
impl HIPresourceViewFormat_enum {
#[doc = "< Block compressed 6 unsigned half-float"]
pub const HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(32);
}
impl HIPresourceViewFormat_enum {
#[doc = "< Block compressed 6 signed half-float"]
pub const HIP_RES_VIEW_FORMAT_SIGNED_BC6H: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(33);
}
impl HIPresourceViewFormat_enum {
#[doc = "< Block compressed 7"]
pub const HIP_RES_VIEW_FORMAT_UNSIGNED_BC7: HIPresourceViewFormat_enum =
HIPresourceViewFormat_enum(34);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct HIPresourceViewFormat_enum(pub ::std::os::raw::c_int);
pub use self::HIPresourceViewFormat_enum as HIPresourceViewFormat;
#[doc = " HIP resource descriptor"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipResourceDesc {
pub resType: hipResourceType,
pub res: hipResourceDesc__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipResourceDesc__bindgen_ty_1 {
pub array: hipResourceDesc__bindgen_ty_1__bindgen_ty_1,
pub mipmap: hipResourceDesc__bindgen_ty_1__bindgen_ty_2,
pub linear: hipResourceDesc__bindgen_ty_1__bindgen_ty_3,
pub pitch2D: hipResourceDesc__bindgen_ty_1__bindgen_ty_4,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_1 {
pub array: hipArray_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_2 {
pub mipmap: hipMipmappedArray_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_3 {
pub devPtr: *mut ::std::os::raw::c_void,
pub desc: hipChannelFormatDesc,
pub sizeInBytes: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_4 {
pub devPtr: *mut ::std::os::raw::c_void,
pub desc: hipChannelFormatDesc,
pub width: usize,
pub height: usize,
pub pitchInBytes: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HIP_RESOURCE_DESC_st {
#[doc = "< Resource type"]
pub resType: HIPresourcetype,
pub res: HIP_RESOURCE_DESC_st__bindgen_ty_1,
#[doc = "< Flags (must be zero)"]
pub flags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union HIP_RESOURCE_DESC_st__bindgen_ty_1 {
pub array: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1,
pub mipmap: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2,
pub linear: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3,
pub pitch2D: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
pub reserved: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
#[doc = "< HIP array"]
pub hArray: hipArray_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 {
#[doc = "< HIP mipmapped array"]
pub hMipmappedArray: hipMipmappedArray_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 {
#[doc = "< Device pointer"]
pub devPtr: hipDeviceptr_t,
#[doc = "< Array format"]
pub format: hipArray_Format,
#[doc = "< Channels per array element"]
pub numChannels: ::std::os::raw::c_uint,
#[doc = "< Size in bytes"]
pub sizeInBytes: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 {
#[doc = "< Device pointer"]
pub devPtr: hipDeviceptr_t,
#[doc = "< Array format"]
pub format: hipArray_Format,
#[doc = "< Channels per array element"]
pub numChannels: ::std::os::raw::c_uint,
#[doc = "< Width of the array in elements"]
pub width: usize,
#[doc = "< Height of the array in elements"]
pub height: usize,
#[doc = "< Pitch between two rows in bytes"]
pub pitchInBytes: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5 {
pub reserved: [::std::os::raw::c_int; 32usize],
}
pub type HIP_RESOURCE_DESC = HIP_RESOURCE_DESC_st;
#[doc = " hip resource view descriptor"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipResourceViewDesc {
pub format: hipResourceViewFormat,
pub width: usize,
pub height: usize,
pub depth: usize,
pub firstMipmapLevel: ::std::os::raw::c_uint,
pub lastMipmapLevel: ::std::os::raw::c_uint,
pub firstLayer: ::std::os::raw::c_uint,
pub lastLayer: ::std::os::raw::c_uint,
}
#[doc = " Resource view descriptor"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HIP_RESOURCE_VIEW_DESC_st {
#[doc = "< Resource view format"]
pub format: HIPresourceViewFormat,
#[doc = "< Width of the resource view"]
pub width: usize,
#[doc = "< Height of the resource view"]
pub height: usize,
#[doc = "< Depth of the resource view"]
pub depth: usize,
#[doc = "< First defined mipmap level"]
pub firstMipmapLevel: ::std::os::raw::c_uint,
#[doc = "< Last defined mipmap level"]
pub lastMipmapLevel: ::std::os::raw::c_uint,
#[doc = "< First layer index"]
pub firstLayer: ::std::os::raw::c_uint,
#[doc = "< Last layer index"]
pub lastLayer: ::std::os::raw::c_uint,
pub reserved: [::std::os::raw::c_uint; 16usize],
}
#[doc = " Resource view descriptor"]
pub type HIP_RESOURCE_VIEW_DESC = HIP_RESOURCE_VIEW_DESC_st;
impl hipMemcpyKind {
#[doc = "< Host-to-Host Copy"]
pub const hipMemcpyHostToHost: hipMemcpyKind = hipMemcpyKind(0);
}
impl hipMemcpyKind {
#[doc = "< Host-to-Device Copy"]
pub const hipMemcpyHostToDevice: hipMemcpyKind = hipMemcpyKind(1);
}
impl hipMemcpyKind {
#[doc = "< Device-to-Host Copy"]
pub const hipMemcpyDeviceToHost: hipMemcpyKind = hipMemcpyKind(2);
}
impl hipMemcpyKind {
#[doc = "< Device-to-Device Copy"]
pub const hipMemcpyDeviceToDevice: hipMemcpyKind = hipMemcpyKind(3);
}
impl hipMemcpyKind {
pub const hipMemcpyDefault: hipMemcpyKind = hipMemcpyKind(4);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemcpyKind(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipPitchedPtr {
pub ptr: *mut ::std::os::raw::c_void,
pub pitch: usize,
pub xsize: usize,
pub ysize: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExtent {
pub width: usize,
pub height: usize,
pub depth: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipPos {
pub x: usize,
pub y: usize,
pub z: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemcpy3DParms {
pub srcArray: hipArray_t,
pub srcPos: hipPos,
pub srcPtr: hipPitchedPtr,
pub dstArray: hipArray_t,
pub dstPos: hipPos,
pub dstPtr: hipPitchedPtr,
pub extent: hipExtent,
pub kind: hipMemcpyKind,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HIP_MEMCPY3D {
pub srcXInBytes: ::std::os::raw::c_uint,
pub srcY: ::std::os::raw::c_uint,
pub srcZ: ::std::os::raw::c_uint,
pub srcLOD: ::std::os::raw::c_uint,
pub srcMemoryType: hipMemoryType,
pub srcHost: *const ::std::os::raw::c_void,
pub srcDevice: hipDeviceptr_t,
pub srcArray: hipArray_t,
pub srcPitch: ::std::os::raw::c_uint,
pub srcHeight: ::std::os::raw::c_uint,
pub dstXInBytes: ::std::os::raw::c_uint,
pub dstY: ::std::os::raw::c_uint,
pub dstZ: ::std::os::raw::c_uint,
pub dstLOD: ::std::os::raw::c_uint,
pub dstMemoryType: hipMemoryType,
pub dstHost: *mut ::std::os::raw::c_void,
pub dstDevice: hipDeviceptr_t,
pub dstArray: hipArray_t,
pub dstPitch: ::std::os::raw::c_uint,
pub dstHeight: ::std::os::raw::c_uint,
pub WidthInBytes: ::std::os::raw::c_uint,
pub Height: ::std::os::raw::c_uint,
pub Depth: ::std::os::raw::c_uint,
}
impl hipFunction_attribute {
pub const HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: hipFunction_attribute =
hipFunction_attribute(0);
}
impl hipFunction_attribute {
pub const HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: hipFunction_attribute =
hipFunction_attribute(1);
}
impl hipFunction_attribute {
pub const HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: hipFunction_attribute = hipFunction_attribute(2);
}
impl hipFunction_attribute {
pub const HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: hipFunction_attribute = hipFunction_attribute(3);
}
impl hipFunction_attribute {
pub const HIP_FUNC_ATTRIBUTE_NUM_REGS: hipFunction_attribute = hipFunction_attribute(4);
}
impl hipFunction_attribute {
pub const HIP_FUNC_ATTRIBUTE_PTX_VERSION: hipFunction_attribute = hipFunction_attribute(5);
}
impl hipFunction_attribute {
pub const HIP_FUNC_ATTRIBUTE_BINARY_VERSION: hipFunction_attribute = hipFunction_attribute(6);
}
impl hipFunction_attribute {
pub const HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA: hipFunction_attribute = hipFunction_attribute(7);
}
impl hipFunction_attribute {
pub const HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: hipFunction_attribute =
hipFunction_attribute(8);
}
impl hipFunction_attribute {
pub const HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: hipFunction_attribute =
hipFunction_attribute(9);
}
impl hipFunction_attribute {
pub const HIP_FUNC_ATTRIBUTE_MAX: hipFunction_attribute = hipFunction_attribute(10);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipFunction_attribute(pub ::std::os::raw::c_int);
impl hipPointer_attribute {
#[doc = "< The context on which a pointer was allocated\n< @warning - not supported in HIP"]
pub const HIP_POINTER_ATTRIBUTE_CONTEXT: hipPointer_attribute = hipPointer_attribute(1);
}
impl hipPointer_attribute {
#[doc = "< memory type describing location of a pointer"]
pub const HIP_POINTER_ATTRIBUTE_MEMORY_TYPE: hipPointer_attribute = hipPointer_attribute(2);
}
impl hipPointer_attribute {
#[doc = "< address at which the pointer is allocated on device"]
pub const HIP_POINTER_ATTRIBUTE_DEVICE_POINTER: hipPointer_attribute = hipPointer_attribute(3);
}
impl hipPointer_attribute {
#[doc = "< address at which the pointer is allocated on host"]
pub const HIP_POINTER_ATTRIBUTE_HOST_POINTER: hipPointer_attribute = hipPointer_attribute(4);
}
impl hipPointer_attribute {
#[doc = "< A pair of tokens for use with linux kernel interface\n< @warning - not supported in HIP"]
pub const HIP_POINTER_ATTRIBUTE_P2P_TOKENS: hipPointer_attribute = hipPointer_attribute(5);
}
impl hipPointer_attribute {
#[doc = "< Synchronize every synchronous memory operation\n< initiated on this region"]
pub const HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS: hipPointer_attribute = hipPointer_attribute(6);
}
impl hipPointer_attribute {
#[doc = "< Unique ID for an allocated memory region"]
pub const HIP_POINTER_ATTRIBUTE_BUFFER_ID: hipPointer_attribute = hipPointer_attribute(7);
}
impl hipPointer_attribute {
#[doc = "< Indicates if the pointer points to managed memory"]
pub const HIP_POINTER_ATTRIBUTE_IS_MANAGED: hipPointer_attribute = hipPointer_attribute(8);
}
impl hipPointer_attribute {
#[doc = "< device ordinal of a device on which a pointer\n< was allocated or registered"]
pub const HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL: hipPointer_attribute = hipPointer_attribute(9);
}
impl hipPointer_attribute {
#[doc = "< if this pointer maps to an allocation\n< that is suitable for hipIpcGetMemHandle\n< @warning - not supported in HIP"]
pub const HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE: hipPointer_attribute =
hipPointer_attribute(10);
}
impl hipPointer_attribute {
#[doc = "< Starting address for this requested pointer"]
pub const HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR: hipPointer_attribute =
hipPointer_attribute(11);
}
impl hipPointer_attribute {
#[doc = "< Size of the address range for this requested pointer"]
pub const HIP_POINTER_ATTRIBUTE_RANGE_SIZE: hipPointer_attribute = hipPointer_attribute(12);
}
impl hipPointer_attribute {
#[doc = "< tells if this pointer is in a valid address range\n< that is mapped to a backing allocation"]
pub const HIP_POINTER_ATTRIBUTE_MAPPED: hipPointer_attribute = hipPointer_attribute(13);
}
impl hipPointer_attribute {
#[doc = "< Bitmask of allowed hipmemAllocationHandleType\n< for this allocation @warning - not supported in HIP"]
pub const HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES: hipPointer_attribute =
hipPointer_attribute(14);
}
impl hipPointer_attribute {
#[doc = "< returns if the memory referenced by\n< this pointer can be used with the GPUDirect RDMA API\n< @warning - not supported in HIP"]
pub const HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE: hipPointer_attribute =
hipPointer_attribute(15);
}
impl hipPointer_attribute {
#[doc = "< Returns the access flags the device associated with\n< for the corresponding memory referenced by the ptr"]
pub const HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS: hipPointer_attribute = hipPointer_attribute(16);
}
impl hipPointer_attribute {
#[doc = "< Returns the mempool handle for the allocation if\n< it was allocated from a mempool\n< @warning - not supported in HIP"]
pub const HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE: hipPointer_attribute = hipPointer_attribute(17);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipPointer_attribute(pub ::std::os::raw::c_int);
extern "C" {
pub fn hipCreateChannelDesc(
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
z: ::std::os::raw::c_int,
w: ::std::os::raw::c_int,
f: hipChannelFormatKind,
) -> hipChannelFormatDesc;
}
#[doc = " An opaque value that represents a hip texture object"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __hip_texture {
_unused: [u8; 0],
}
pub type hipTextureObject_t = *mut __hip_texture;
impl hipTextureAddressMode {
pub const hipAddressModeWrap: hipTextureAddressMode = hipTextureAddressMode(0);
}
impl hipTextureAddressMode {
pub const hipAddressModeClamp: hipTextureAddressMode = hipTextureAddressMode(1);
}
impl hipTextureAddressMode {
pub const hipAddressModeMirror: hipTextureAddressMode = hipTextureAddressMode(2);
}
impl hipTextureAddressMode {
pub const hipAddressModeBorder: hipTextureAddressMode = hipTextureAddressMode(3);
}
#[repr(transparent)]
#[doc = " hip texture address modes"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipTextureAddressMode(pub ::std::os::raw::c_int);
impl hipTextureFilterMode {
pub const hipFilterModePoint: hipTextureFilterMode = hipTextureFilterMode(0);
}
impl hipTextureFilterMode {
pub const hipFilterModeLinear: hipTextureFilterMode = hipTextureFilterMode(1);
}
#[repr(transparent)]
#[doc = " hip texture filter modes"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipTextureFilterMode(pub ::std::os::raw::c_int);
impl hipTextureReadMode {
pub const hipReadModeElementType: hipTextureReadMode = hipTextureReadMode(0);
}
impl hipTextureReadMode {
pub const hipReadModeNormalizedFloat: hipTextureReadMode = hipTextureReadMode(1);
}
#[repr(transparent)]
#[doc = " hip texture read modes"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipTextureReadMode(pub ::std::os::raw::c_int);
#[doc = " hip texture reference"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct textureReference {
pub normalized: ::std::os::raw::c_int,
pub readMode: hipTextureReadMode,
pub filterMode: hipTextureFilterMode,
pub addressMode: [hipTextureAddressMode; 3usize],
pub channelDesc: hipChannelFormatDesc,
pub sRGB: ::std::os::raw::c_int,
pub maxAnisotropy: ::std::os::raw::c_uint,
pub mipmapFilterMode: hipTextureFilterMode,
pub mipmapLevelBias: f32,
pub minMipmapLevelClamp: f32,
pub maxMipmapLevelClamp: f32,
pub textureObject: hipTextureObject_t,
pub numChannels: ::std::os::raw::c_int,
pub format: hipArray_Format,
}
#[doc = " hip texture descriptor"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipTextureDesc {
pub addressMode: [hipTextureAddressMode; 3usize],
pub filterMode: hipTextureFilterMode,
pub readMode: hipTextureReadMode,
pub sRGB: ::std::os::raw::c_int,
pub borderColor: [f32; 4usize],
pub normalizedCoords: ::std::os::raw::c_int,
pub maxAnisotropy: ::std::os::raw::c_uint,
pub mipmapFilterMode: hipTextureFilterMode,
pub mipmapLevelBias: f32,
pub minMipmapLevelClamp: f32,
pub maxMipmapLevelClamp: f32,
}
#[doc = " An opaque value that represents a hip surface object"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __hip_surface {
_unused: [u8; 0],
}
pub type hipSurfaceObject_t = *mut __hip_surface;
impl hipSurfaceBoundaryMode {
pub const hipBoundaryModeZero: hipSurfaceBoundaryMode = hipSurfaceBoundaryMode(0);
}
impl hipSurfaceBoundaryMode {
pub const hipBoundaryModeTrap: hipSurfaceBoundaryMode = hipSurfaceBoundaryMode(1);
}
impl hipSurfaceBoundaryMode {
pub const hipBoundaryModeClamp: hipSurfaceBoundaryMode = hipSurfaceBoundaryMode(2);
}
#[repr(transparent)]
#[doc = " hip surface boundary modes"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipSurfaceBoundaryMode(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ihipCtx_t {
_unused: [u8; 0],
}
pub type hipCtx_t = *mut ihipCtx_t;
pub type hipDevice_t = ::std::os::raw::c_int;
impl hipDeviceP2PAttr {
pub const hipDevP2PAttrPerformanceRank: hipDeviceP2PAttr = hipDeviceP2PAttr(0);
}
impl hipDeviceP2PAttr {
pub const hipDevP2PAttrAccessSupported: hipDeviceP2PAttr = hipDeviceP2PAttr(1);
}
impl hipDeviceP2PAttr {
pub const hipDevP2PAttrNativeAtomicSupported: hipDeviceP2PAttr = hipDeviceP2PAttr(2);
}
impl hipDeviceP2PAttr {
pub const hipDevP2PAttrHipArrayAccessSupported: hipDeviceP2PAttr = hipDeviceP2PAttr(3);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipDeviceP2PAttr(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ihipStream_t {
_unused: [u8; 0],
}
pub type hipStream_t = *mut ihipStream_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipIpcMemHandle_st {
pub reserved: [::std::os::raw::c_char; 64usize],
}
pub type hipIpcMemHandle_t = hipIpcMemHandle_st;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipIpcEventHandle_st {
pub reserved: [::std::os::raw::c_char; 64usize],
}
pub type hipIpcEventHandle_t = hipIpcEventHandle_st;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ihipModule_t {
_unused: [u8; 0],
}
pub type hipModule_t = *mut ihipModule_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ihipModuleSymbol_t {
_unused: [u8; 0],
}
pub type hipFunction_t = *mut ihipModuleSymbol_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ihipMemPoolHandle_t {
_unused: [u8; 0],
}
#[doc = " HIP memory pool"]
pub type hipMemPool_t = *mut ihipMemPoolHandle_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipFuncAttributes {
pub binaryVersion: ::std::os::raw::c_int,
pub cacheModeCA: ::std::os::raw::c_int,
pub constSizeBytes: usize,
pub localSizeBytes: usize,
pub maxDynamicSharedSizeBytes: ::std::os::raw::c_int,
pub maxThreadsPerBlock: ::std::os::raw::c_int,
pub numRegs: ::std::os::raw::c_int,
pub preferredShmemCarveout: ::std::os::raw::c_int,
pub ptxVersion: ::std::os::raw::c_int,
pub sharedSizeBytes: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ihipEvent_t {
_unused: [u8; 0],
}
pub type hipEvent_t = *mut ihipEvent_t;
impl hipLimit_t {
#[doc = "< limit of stack size in bytes on the current device"]
pub const hipLimitStackSize: hipLimit_t = hipLimit_t(0);
}
impl hipLimit_t {
#[doc = "< size limit in bytes of fifo used by printf call on the device"]
pub const hipLimitPrintfFifoSize: hipLimit_t = hipLimit_t(1);
}
impl hipLimit_t {
#[doc = "< limit of heap size in bytes on the current device"]
pub const hipLimitMallocHeapSize: hipLimit_t = hipLimit_t(2);
}
impl hipLimit_t {
#[doc = "< supported limit range"]
pub const hipLimitRange: hipLimit_t = hipLimit_t(3);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipLimit_t(pub ::std::os::raw::c_int);
impl hipMemoryAdvise {
#[doc = "< Data will mostly be read and only occassionally\n< be written to"]
pub const hipMemAdviseSetReadMostly: hipMemoryAdvise = hipMemoryAdvise(1);
}
impl hipMemoryAdvise {
#[doc = "< Undo the effect of hipMemAdviseSetReadMostly"]
pub const hipMemAdviseUnsetReadMostly: hipMemoryAdvise = hipMemoryAdvise(2);
}
impl hipMemoryAdvise {
#[doc = "< Set the preferred location for the data as\n< the specified device"]
pub const hipMemAdviseSetPreferredLocation: hipMemoryAdvise = hipMemoryAdvise(3);
}
impl hipMemoryAdvise {
#[doc = "< Clear the preferred location for the data"]
pub const hipMemAdviseUnsetPreferredLocation: hipMemoryAdvise = hipMemoryAdvise(4);
}
impl hipMemoryAdvise {
#[doc = "< Data will be accessed by the specified device\n< so prevent page faults as much as possible"]
pub const hipMemAdviseSetAccessedBy: hipMemoryAdvise = hipMemoryAdvise(5);
}
impl hipMemoryAdvise {
#[doc = "< Let HIP to decide on the page faulting policy\n< for the specified device"]
pub const hipMemAdviseUnsetAccessedBy: hipMemoryAdvise = hipMemoryAdvise(6);
}
impl hipMemoryAdvise {
#[doc = "< The default memory model is fine-grain. That allows\n< coherent operations between host and device, while\n< executing kernels. The coarse-grain can be used\n< for data that only needs to be coherent at dispatch\n< boundaries for better performance"]
pub const hipMemAdviseSetCoarseGrain: hipMemoryAdvise = hipMemoryAdvise(100);
}
impl hipMemoryAdvise {
#[doc = "< Restores cache coherency policy back to fine-grain"]
pub const hipMemAdviseUnsetCoarseGrain: hipMemoryAdvise = hipMemoryAdvise(101);
}
#[repr(transparent)]
#[doc = " HIP Memory Advise values\n\n @note This memory advise enumeration is used on Linux, not Windows."]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemoryAdvise(pub ::std::os::raw::c_int);
impl hipMemRangeCoherencyMode {
#[doc = "< Updates to memory with this attribute can be\n< done coherently from all devices"]
pub const hipMemRangeCoherencyModeFineGrain: hipMemRangeCoherencyMode =
hipMemRangeCoherencyMode(0);
}
impl hipMemRangeCoherencyMode {
#[doc = "< Writes to memory with this attribute can be\n< performed by a single device at a time"]
pub const hipMemRangeCoherencyModeCoarseGrain: hipMemRangeCoherencyMode =
hipMemRangeCoherencyMode(1);
}
impl hipMemRangeCoherencyMode {
#[doc = "< Memory region queried contains subregions with\n< both hipMemRangeCoherencyModeFineGrain and\n< hipMemRangeCoherencyModeCoarseGrain attributes"]
pub const hipMemRangeCoherencyModeIndeterminate: hipMemRangeCoherencyMode =
hipMemRangeCoherencyMode(2);
}
#[repr(transparent)]
#[doc = " HIP Coherency Mode"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemRangeCoherencyMode(pub ::std::os::raw::c_int);
impl hipMemRangeAttribute {
#[doc = "< Whether the range will mostly be read and\n< only occassionally be written to"]
pub const hipMemRangeAttributeReadMostly: hipMemRangeAttribute = hipMemRangeAttribute(1);
}
impl hipMemRangeAttribute {
#[doc = "< The preferred location of the range"]
pub const hipMemRangeAttributePreferredLocation: hipMemRangeAttribute = hipMemRangeAttribute(2);
}
impl hipMemRangeAttribute {
#[doc = "< Memory range has hipMemAdviseSetAccessedBy\n< set for the specified device"]
pub const hipMemRangeAttributeAccessedBy: hipMemRangeAttribute = hipMemRangeAttribute(3);
}
impl hipMemRangeAttribute {
#[doc = "< The last location to where the range was\n< prefetched"]
pub const hipMemRangeAttributeLastPrefetchLocation: hipMemRangeAttribute =
hipMemRangeAttribute(4);
}
impl hipMemRangeAttribute {
#[doc = "< Returns coherency mode\n< @ref hipMemRangeCoherencyMode for the range"]
pub const hipMemRangeAttributeCoherencyMode: hipMemRangeAttribute = hipMemRangeAttribute(100);
}
#[repr(transparent)]
#[doc = " HIP range attributes"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemRangeAttribute(pub ::std::os::raw::c_int);
impl hipMemPoolAttr {
#[doc = " (value type = int)\n Allow @p hipMemAllocAsync to use memory asynchronously freed\n in another streams as long as a stream ordering dependency\n of the allocating stream on the free action exists.\n hip events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)"]
pub const hipMemPoolReuseFollowEventDependencies: hipMemPoolAttr = hipMemPoolAttr(1);
}
impl hipMemPoolAttr {
#[doc = " (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)"]
pub const hipMemPoolReuseAllowOpportunistic: hipMemPoolAttr = hipMemPoolAttr(2);
}
impl hipMemPoolAttr {
#[doc = " (value type = int)\n Allow @p hipMemAllocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by cuFreeAsync (default enabled)."]
pub const hipMemPoolReuseAllowInternalDependencies: hipMemPoolAttr = hipMemPoolAttr(3);
}
impl hipMemPoolAttr {
#[doc = " (value type = uint64_t)\n Amount of reserved memory in bytes to hold onto before trying\n to release memory back to the OS. When more than the release\n threshold bytes of memory are held by the memory pool, the\n allocator will try to release memory back to the OS on the\n next call to stream, event or context synchronize. (default 0)"]
pub const hipMemPoolAttrReleaseThreshold: hipMemPoolAttr = hipMemPoolAttr(4);
}
impl hipMemPoolAttr {
#[doc = " (value type = uint64_t)\n Amount of backing memory currently allocated for the mempool."]
pub const hipMemPoolAttrReservedMemCurrent: hipMemPoolAttr = hipMemPoolAttr(5);
}
impl hipMemPoolAttr {
#[doc = " (value type = uint64_t)\n High watermark of backing memory allocated for the mempool since the\n last time it was reset. High watermark can only be reset to zero."]
pub const hipMemPoolAttrReservedMemHigh: hipMemPoolAttr = hipMemPoolAttr(6);
}
impl hipMemPoolAttr {
#[doc = " (value type = uint64_t)\n Amount of memory from the pool that is currently in use by the application."]
pub const hipMemPoolAttrUsedMemCurrent: hipMemPoolAttr = hipMemPoolAttr(7);
}
impl hipMemPoolAttr {
#[doc = " (value type = uint64_t)\n High watermark of the amount of memory from the pool that was in use by the application since\n the last time it was reset. High watermark can only be reset to zero."]
pub const hipMemPoolAttrUsedMemHigh: hipMemPoolAttr = hipMemPoolAttr(8);
}
#[repr(transparent)]
#[doc = " HIP memory pool attributes"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemPoolAttr(pub ::std::os::raw::c_int);
impl hipMemLocationType {
pub const hipMemLocationTypeInvalid: hipMemLocationType = hipMemLocationType(0);
}
impl hipMemLocationType {
#[doc = "< Device location, thus it's HIP device ID"]
pub const hipMemLocationTypeDevice: hipMemLocationType = hipMemLocationType(1);
}
#[repr(transparent)]
#[doc = " Specifies the type of location"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemLocationType(pub ::std::os::raw::c_int);
#[doc = " Specifies a memory location.\n\n To specify a gpu, set type = @p hipMemLocationTypeDevice and set id = the gpu's device ID"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemLocation {
#[doc = "< Specifies the location type, which describes the meaning of id"]
pub type_: hipMemLocationType,
#[doc = "< Identifier for the provided location type @p hipMemLocationType"]
pub id: ::std::os::raw::c_int,
}
impl hipMemAccessFlags {
#[doc = "< Default, make the address range not accessible"]
pub const hipMemAccessFlagsProtNone: hipMemAccessFlags = hipMemAccessFlags(0);
}
impl hipMemAccessFlags {
#[doc = "< Set the address range read accessible"]
pub const hipMemAccessFlagsProtRead: hipMemAccessFlags = hipMemAccessFlags(1);
}
impl hipMemAccessFlags {
#[doc = "< Set the address range read-write accessible"]
pub const hipMemAccessFlagsProtReadWrite: hipMemAccessFlags = hipMemAccessFlags(3);
}
#[repr(transparent)]
#[doc = " Specifies the memory protection flags for mapping\n"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemAccessFlags(pub ::std::os::raw::c_int);
#[doc = " Memory access descriptor"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemAccessDesc {
#[doc = "< Location on which the accessibility has to change"]
pub location: hipMemLocation,
#[doc = "< Accessibility flags to set"]
pub flags: hipMemAccessFlags,
}
impl hipMemAllocationType {
pub const hipMemAllocationTypeInvalid: hipMemAllocationType = hipMemAllocationType(0);
}
impl hipMemAllocationType {
#[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
pub const hipMemAllocationTypePinned: hipMemAllocationType = hipMemAllocationType(1);
}
impl hipMemAllocationType {
#[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
pub const hipMemAllocationTypeMax: hipMemAllocationType = hipMemAllocationType(2147483647);
}
#[repr(transparent)]
#[doc = " Defines the allocation types"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemAllocationType(pub ::std::os::raw::c_int);
impl hipMemAllocationHandleType {
#[doc = "< Does not allow any export mechanism"]
pub const hipMemHandleTypeNone: hipMemAllocationHandleType = hipMemAllocationHandleType(0);
}
impl hipMemAllocationHandleType {
#[doc = "< Allows a file descriptor for exporting. Permitted only on POSIX systems"]
pub const hipMemHandleTypePosixFileDescriptor: hipMemAllocationHandleType =
hipMemAllocationHandleType(1);
}
impl hipMemAllocationHandleType {
#[doc = "< Allows a Win32 NT handle for exporting. (HANDLE)"]
pub const hipMemHandleTypeWin32: hipMemAllocationHandleType = hipMemAllocationHandleType(2);
}
impl hipMemAllocationHandleType {
#[doc = "< Allows a Win32 KMT handle for exporting. (D3DKMT_HANDLE)"]
pub const hipMemHandleTypeWin32Kmt: hipMemAllocationHandleType = hipMemAllocationHandleType(4);
}
#[repr(transparent)]
#[doc = " Flags for specifying handle types for memory pool allocations\n"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemAllocationHandleType(pub ::std::os::raw::c_int);
#[doc = " Specifies the properties of allocations made from the pool."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemPoolProps {
#[doc = "< Allocation type. Currently must be specified as @p hipMemAllocationTypePinned"]
pub allocType: hipMemAllocationType,
#[doc = "< Handle types that will be supported by allocations from the pool"]
pub handleTypes: hipMemAllocationHandleType,
#[doc = "< Location where allocations should reside"]
pub location: hipMemLocation,
#[doc = " Windows-specific LPSECURITYATTRIBUTES required when @p hipMemHandleTypeWin32 is specified"]
pub win32SecurityAttributes: *mut ::std::os::raw::c_void,
#[doc = "< Reserved for future use, must be 0"]
pub reserved: [::std::os::raw::c_uchar; 64usize],
}
#[doc = " Opaque data structure for exporting a pool allocation"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemPoolPtrExportData {
pub reserved: [::std::os::raw::c_uchar; 64usize],
}
impl hipJitOption {
pub const hipJitOptionMaxRegisters: hipJitOption = hipJitOption(0);
}
impl hipJitOption {
pub const hipJitOptionThreadsPerBlock: hipJitOption = hipJitOption(1);
}
impl hipJitOption {
pub const hipJitOptionWallTime: hipJitOption = hipJitOption(2);
}
impl hipJitOption {
pub const hipJitOptionInfoLogBuffer: hipJitOption = hipJitOption(3);
}
impl hipJitOption {
pub const hipJitOptionInfoLogBufferSizeBytes: hipJitOption = hipJitOption(4);
}
impl hipJitOption {
pub const hipJitOptionErrorLogBuffer: hipJitOption = hipJitOption(5);
}
impl hipJitOption {
pub const hipJitOptionErrorLogBufferSizeBytes: hipJitOption = hipJitOption(6);
}
impl hipJitOption {
pub const hipJitOptionOptimizationLevel: hipJitOption = hipJitOption(7);
}
impl hipJitOption {
pub const hipJitOptionTargetFromContext: hipJitOption = hipJitOption(8);
}
impl hipJitOption {
pub const hipJitOptionTarget: hipJitOption = hipJitOption(9);
}
impl hipJitOption {
pub const hipJitOptionFallbackStrategy: hipJitOption = hipJitOption(10);
}
impl hipJitOption {
pub const hipJitOptionGenerateDebugInfo: hipJitOption = hipJitOption(11);
}
impl hipJitOption {
pub const hipJitOptionLogVerbose: hipJitOption = hipJitOption(12);
}
impl hipJitOption {
pub const hipJitOptionGenerateLineInfo: hipJitOption = hipJitOption(13);
}
impl hipJitOption {
pub const hipJitOptionCacheMode: hipJitOption = hipJitOption(14);
}
impl hipJitOption {
pub const hipJitOptionSm3xOpt: hipJitOption = hipJitOption(15);
}
impl hipJitOption {
pub const hipJitOptionFastCompile: hipJitOption = hipJitOption(16);
}
impl hipJitOption {
pub const hipJitOptionNumOptions: hipJitOption = hipJitOption(17);
}
#[repr(transparent)]
#[doc = " hipJitOption"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipJitOption(pub ::std::os::raw::c_int);
impl hipFuncAttribute {
pub const hipFuncAttributeMaxDynamicSharedMemorySize: hipFuncAttribute = hipFuncAttribute(8);
}
impl hipFuncAttribute {
pub const hipFuncAttributePreferredSharedMemoryCarveout: hipFuncAttribute = hipFuncAttribute(9);
}
impl hipFuncAttribute {
pub const hipFuncAttributeMax: hipFuncAttribute = hipFuncAttribute(10);
}
#[repr(transparent)]
#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipFuncAttribute(pub ::std::os::raw::c_int);
impl hipFuncCache_t {
#[doc = "< no preference for shared memory or L1 (default)"]
pub const hipFuncCachePreferNone: hipFuncCache_t = hipFuncCache_t(0);
}
impl hipFuncCache_t {
#[doc = "< prefer larger shared memory and smaller L1 cache"]
pub const hipFuncCachePreferShared: hipFuncCache_t = hipFuncCache_t(1);
}
impl hipFuncCache_t {
#[doc = "< prefer larger L1 cache and smaller shared memory"]
pub const hipFuncCachePreferL1: hipFuncCache_t = hipFuncCache_t(2);
}
impl hipFuncCache_t {
#[doc = "< prefer equal size L1 cache and shared memory"]
pub const hipFuncCachePreferEqual: hipFuncCache_t = hipFuncCache_t(3);
}
#[repr(transparent)]
#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipFuncCache_t(pub ::std::os::raw::c_int);
impl hipSharedMemConfig {
#[doc = "< The compiler selects a device-specific value for the banking."]
pub const hipSharedMemBankSizeDefault: hipSharedMemConfig = hipSharedMemConfig(0);
}
impl hipSharedMemConfig {
#[doc = "< Shared mem is banked at 4-bytes intervals and performs best\n< when adjacent threads access data 4 bytes apart."]
pub const hipSharedMemBankSizeFourByte: hipSharedMemConfig = hipSharedMemConfig(1);
}
impl hipSharedMemConfig {
#[doc = "< Shared mem is banked at 8-byte intervals and performs best\n< when adjacent threads access data 4 bytes apart."]
pub const hipSharedMemBankSizeEightByte: hipSharedMemConfig = hipSharedMemConfig(2);
}
#[repr(transparent)]
#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipSharedMemConfig(pub ::std::os::raw::c_int);
#[doc = " Struct for data in 3D"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct dim3 {
#[doc = "< x"]
pub x: u32,
#[doc = "< y"]
pub y: u32,
#[doc = "< z"]
pub z: u32,
}
#[doc = " struct hipLaunchParams_t"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipLaunchParams_t {
#[doc = "< Device function symbol"]
pub func: *mut ::std::os::raw::c_void,
#[doc = "< Grid dimentions"]
pub gridDim: dim3,
#[doc = "< Block dimentions"]
pub blockDim: dim3,
#[doc = "< Arguments"]
pub args: *mut *mut ::std::os::raw::c_void,
#[doc = "< Shared memory"]
pub sharedMem: usize,
#[doc = "< Stream identifier"]
pub stream: hipStream_t,
}
#[doc = " struct hipLaunchParams_t"]
pub type hipLaunchParams = hipLaunchParams_t;
#[doc = " struct hipFunctionLaunchParams_t"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipFunctionLaunchParams_t {
#[doc = "< Kernel to launch"]
pub function: hipFunction_t,
#[doc = "< Width(X) of grid in blocks"]
pub gridDimX: ::std::os::raw::c_uint,
#[doc = "< Height(Y) of grid in blocks"]
pub gridDimY: ::std::os::raw::c_uint,
#[doc = "< Depth(Z) of grid in blocks"]
pub gridDimZ: ::std::os::raw::c_uint,
#[doc = "< X dimension of each thread block"]
pub blockDimX: ::std::os::raw::c_uint,
#[doc = "< Y dimension of each thread block"]
pub blockDimY: ::std::os::raw::c_uint,
#[doc = "< Z dimension of each thread block"]
pub blockDimZ: ::std::os::raw::c_uint,
#[doc = "< Shared memory"]
pub sharedMemBytes: ::std::os::raw::c_uint,
#[doc = "< Stream identifier"]
pub hStream: hipStream_t,
#[doc = "< Kernel parameters"]
pub kernelParams: *mut *mut ::std::os::raw::c_void,
}
#[doc = " struct hipFunctionLaunchParams_t"]
pub type hipFunctionLaunchParams = hipFunctionLaunchParams_t;
impl hipExternalMemoryHandleType_enum {
pub const hipExternalMemoryHandleTypeOpaqueFd: hipExternalMemoryHandleType_enum =
hipExternalMemoryHandleType_enum(1);
}
impl hipExternalMemoryHandleType_enum {
pub const hipExternalMemoryHandleTypeOpaqueWin32: hipExternalMemoryHandleType_enum =
hipExternalMemoryHandleType_enum(2);
}
impl hipExternalMemoryHandleType_enum {
pub const hipExternalMemoryHandleTypeOpaqueWin32Kmt: hipExternalMemoryHandleType_enum =
hipExternalMemoryHandleType_enum(3);
}
impl hipExternalMemoryHandleType_enum {
pub const hipExternalMemoryHandleTypeD3D12Heap: hipExternalMemoryHandleType_enum =
hipExternalMemoryHandleType_enum(4);
}
impl hipExternalMemoryHandleType_enum {
pub const hipExternalMemoryHandleTypeD3D12Resource: hipExternalMemoryHandleType_enum =
hipExternalMemoryHandleType_enum(5);
}
impl hipExternalMemoryHandleType_enum {
pub const hipExternalMemoryHandleTypeD3D11Resource: hipExternalMemoryHandleType_enum =
hipExternalMemoryHandleType_enum(6);
}
impl hipExternalMemoryHandleType_enum {
pub const hipExternalMemoryHandleTypeD3D11ResourceKmt: hipExternalMemoryHandleType_enum =
hipExternalMemoryHandleType_enum(7);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipExternalMemoryHandleType_enum(pub ::std::os::raw::c_int);
pub use self::hipExternalMemoryHandleType_enum as hipExternalMemoryHandleType;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalMemoryHandleDesc_st {
pub type_: hipExternalMemoryHandleType,
pub handle: hipExternalMemoryHandleDesc_st__bindgen_ty_1,
pub size: ::std::os::raw::c_ulonglong,
pub flags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipExternalMemoryHandleDesc_st__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub win32: hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1 {
pub handle: *mut ::std::os::raw::c_void,
pub name: *const ::std::os::raw::c_void,
}
pub type hipExternalMemoryHandleDesc = hipExternalMemoryHandleDesc_st;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalMemoryBufferDesc_st {
pub offset: ::std::os::raw::c_ulonglong,
pub size: ::std::os::raw::c_ulonglong,
pub flags: ::std::os::raw::c_uint,
}
pub type hipExternalMemoryBufferDesc = hipExternalMemoryBufferDesc_st;
pub type hipExternalMemory_t = *mut ::std::os::raw::c_void;
impl hipExternalSemaphoreHandleType_enum {
pub const hipExternalSemaphoreHandleTypeOpaqueFd: hipExternalSemaphoreHandleType_enum =
hipExternalSemaphoreHandleType_enum(1);
}
impl hipExternalSemaphoreHandleType_enum {
pub const hipExternalSemaphoreHandleTypeOpaqueWin32: hipExternalSemaphoreHandleType_enum =
hipExternalSemaphoreHandleType_enum(2);
}
impl hipExternalSemaphoreHandleType_enum {
pub const hipExternalSemaphoreHandleTypeOpaqueWin32Kmt: hipExternalSemaphoreHandleType_enum =
hipExternalSemaphoreHandleType_enum(3);
}
impl hipExternalSemaphoreHandleType_enum {
pub const hipExternalSemaphoreHandleTypeD3D12Fence: hipExternalSemaphoreHandleType_enum =
hipExternalSemaphoreHandleType_enum(4);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipExternalSemaphoreHandleType_enum(pub ::std::os::raw::c_int);
pub use self::hipExternalSemaphoreHandleType_enum as hipExternalSemaphoreHandleType;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreHandleDesc_st {
pub type_: hipExternalSemaphoreHandleType,
pub handle: hipExternalSemaphoreHandleDesc_st__bindgen_ty_1,
pub flags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipExternalSemaphoreHandleDesc_st__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub win32: hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1 {
pub handle: *mut ::std::os::raw::c_void,
pub name: *const ::std::os::raw::c_void,
}
pub type hipExternalSemaphoreHandleDesc = hipExternalSemaphoreHandleDesc_st;
pub type hipExternalSemaphore_t = *mut ::std::os::raw::c_void;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreSignalParams_st {
pub params: hipExternalSemaphoreSignalParams_st__bindgen_ty_1,
pub flags: ::std::os::raw::c_uint,
pub reserved: [::std::os::raw::c_uint; 16usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1 {
pub fence: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1,
pub keyedMutex: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2,
pub reserved: [::std::os::raw::c_uint; 12usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1 {
pub value: ::std::os::raw::c_ulonglong,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2 {
pub key: ::std::os::raw::c_ulonglong,
}
pub type hipExternalSemaphoreSignalParams = hipExternalSemaphoreSignalParams_st;
#[doc = " External semaphore wait parameters, compatible with driver type"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreWaitParams_st {
pub params: hipExternalSemaphoreWaitParams_st__bindgen_ty_1,
pub flags: ::std::os::raw::c_uint,
pub reserved: [::std::os::raw::c_uint; 16usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1 {
pub fence: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1,
pub keyedMutex: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2,
pub reserved: [::std::os::raw::c_uint; 10usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1 {
pub value: ::std::os::raw::c_ulonglong,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2 {
pub key: ::std::os::raw::c_ulonglong,
pub timeoutMs: ::std::os::raw::c_uint,
}
#[doc = " External semaphore wait parameters, compatible with driver type"]
pub type hipExternalSemaphoreWaitParams = hipExternalSemaphoreWaitParams_st;
impl hipGLDeviceList {
#[doc = "< All hip devices used by current OpenGL context."]
pub const hipGLDeviceListAll: hipGLDeviceList = hipGLDeviceList(1);
}
impl hipGLDeviceList {
#[doc = "< Hip devices used by current OpenGL context in current\n< frame"]
pub const hipGLDeviceListCurrentFrame: hipGLDeviceList = hipGLDeviceList(2);
}
impl hipGLDeviceList {
#[doc = "< Hip devices used by current OpenGL context in next\n< frame."]
pub const hipGLDeviceListNextFrame: hipGLDeviceList = hipGLDeviceList(3);
}
#[repr(transparent)]
#[doc = " HIP Devices used by current OpenGL Context."]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipGLDeviceList(pub ::std::os::raw::c_int);
impl hipGraphicsRegisterFlags {
pub const hipGraphicsRegisterFlagsNone: hipGraphicsRegisterFlags = hipGraphicsRegisterFlags(0);
}
impl hipGraphicsRegisterFlags {
#[doc = "< HIP will not write to this registered resource"]
pub const hipGraphicsRegisterFlagsReadOnly: hipGraphicsRegisterFlags =
hipGraphicsRegisterFlags(1);
}
impl hipGraphicsRegisterFlags {
pub const hipGraphicsRegisterFlagsWriteDiscard: hipGraphicsRegisterFlags =
hipGraphicsRegisterFlags(2);
}
impl hipGraphicsRegisterFlags {
#[doc = "< HIP will bind this resource to a surface"]
pub const hipGraphicsRegisterFlagsSurfaceLoadStore: hipGraphicsRegisterFlags =
hipGraphicsRegisterFlags(4);
}
impl hipGraphicsRegisterFlags {
pub const hipGraphicsRegisterFlagsTextureGather: hipGraphicsRegisterFlags =
hipGraphicsRegisterFlags(8);
}
#[repr(transparent)]
#[doc = " HIP Access falgs for Interop resources."]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipGraphicsRegisterFlags(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _hipGraphicsResource {
_unused: [u8; 0],
}
pub type hipGraphicsResource = _hipGraphicsResource;
pub type hipGraphicsResource_t = *mut hipGraphicsResource;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ihipGraph {
_unused: [u8; 0],
}
#[doc = " An opaque value that represents a hip graph"]
pub type hipGraph_t = *mut ihipGraph;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipGraphNode {
_unused: [u8; 0],
}
#[doc = " An opaque value that represents a hip graph node"]
pub type hipGraphNode_t = *mut hipGraphNode;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipGraphExec {
_unused: [u8; 0],
}
#[doc = " An opaque value that represents a hip graph Exec"]
pub type hipGraphExec_t = *mut hipGraphExec;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipUserObject {
_unused: [u8; 0],
}
#[doc = " An opaque value that represents a user obj"]
pub type hipUserObject_t = *mut hipUserObject;
impl hipGraphNodeType {
#[doc = "< GPU kernel node"]
pub const hipGraphNodeTypeKernel: hipGraphNodeType = hipGraphNodeType(0);
}
impl hipGraphNodeType {
#[doc = "< Memcpy node"]
pub const hipGraphNodeTypeMemcpy: hipGraphNodeType = hipGraphNodeType(1);
}
impl hipGraphNodeType {
#[doc = "< Memset node"]
pub const hipGraphNodeTypeMemset: hipGraphNodeType = hipGraphNodeType(2);
}
impl hipGraphNodeType {
#[doc = "< Host (executable) node"]
pub const hipGraphNodeTypeHost: hipGraphNodeType = hipGraphNodeType(3);
}
impl hipGraphNodeType {
#[doc = "< Node which executes an embedded graph"]
pub const hipGraphNodeTypeGraph: hipGraphNodeType = hipGraphNodeType(4);
}
impl hipGraphNodeType {
#[doc = "< Empty (no-op) node"]
pub const hipGraphNodeTypeEmpty: hipGraphNodeType = hipGraphNodeType(5);
}
impl hipGraphNodeType {
#[doc = "< External event wait node"]
pub const hipGraphNodeTypeWaitEvent: hipGraphNodeType = hipGraphNodeType(6);
}
impl hipGraphNodeType {
#[doc = "< External event record node"]
pub const hipGraphNodeTypeEventRecord: hipGraphNodeType = hipGraphNodeType(7);
}
impl hipGraphNodeType {
#[doc = "< External Semaphore signal node"]
pub const hipGraphNodeTypeExtSemaphoreSignal: hipGraphNodeType = hipGraphNodeType(8);
}
impl hipGraphNodeType {
#[doc = "< External Semaphore wait node"]
pub const hipGraphNodeTypeExtSemaphoreWait: hipGraphNodeType = hipGraphNodeType(9);
}
impl hipGraphNodeType {
#[doc = "< Memory alloc node"]
pub const hipGraphNodeTypeMemAlloc: hipGraphNodeType = hipGraphNodeType(10);
}
impl hipGraphNodeType {
#[doc = "< Memory free node"]
pub const hipGraphNodeTypeMemFree: hipGraphNodeType = hipGraphNodeType(11);
}
impl hipGraphNodeType {
#[doc = "< MemcpyFromSymbol node"]
pub const hipGraphNodeTypeMemcpyFromSymbol: hipGraphNodeType = hipGraphNodeType(12);
}
impl hipGraphNodeType {
#[doc = "< MemcpyToSymbol node"]
pub const hipGraphNodeTypeMemcpyToSymbol: hipGraphNodeType = hipGraphNodeType(13);
}
impl hipGraphNodeType {
pub const hipGraphNodeTypeCount: hipGraphNodeType = hipGraphNodeType(14);
}
#[repr(transparent)]
#[doc = " hipGraphNodeType"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipGraphNodeType(pub ::std::os::raw::c_int);
pub type hipHostFn_t =
::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void)>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipHostNodeParams {
pub fn_: hipHostFn_t,
pub userData: *mut ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipKernelNodeParams {
pub blockDim: dim3,
pub extra: *mut *mut ::std::os::raw::c_void,
pub func: *mut ::std::os::raw::c_void,
pub gridDim: dim3,
pub kernelParams: *mut *mut ::std::os::raw::c_void,
pub sharedMemBytes: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemsetParams {
pub dst: *mut ::std::os::raw::c_void,
pub elementSize: ::std::os::raw::c_uint,
pub height: usize,
pub pitch: usize,
pub value: ::std::os::raw::c_uint,
pub width: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemAllocNodeParams {
#[doc = "< Pool properties, which contain where\n< the location should reside"]
pub poolProps: hipMemPoolProps,
#[doc = "< The number of memory access descriptors.\n< Must not be bigger than the number of GPUs"]
pub accessDescs: *const hipMemAccessDesc,
#[doc = "< The number of access descriptors"]
pub accessDescCount: usize,
#[doc = "< The size of the requested allocation in bytes"]
pub bytesize: usize,
#[doc = "< Returned device address of the allocation"]
pub dptr: *mut ::std::os::raw::c_void,
}
impl hipKernelNodeAttrID {
pub const hipKernelNodeAttributeAccessPolicyWindow: hipKernelNodeAttrID =
hipKernelNodeAttrID(1);
}
impl hipKernelNodeAttrID {
pub const hipKernelNodeAttributeCooperative: hipKernelNodeAttrID = hipKernelNodeAttrID(2);
}
#[repr(transparent)]
#[doc = " Kernel node attributeID"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipKernelNodeAttrID(pub ::std::os::raw::c_int);
impl hipAccessProperty {
pub const hipAccessPropertyNormal: hipAccessProperty = hipAccessProperty(0);
}
impl hipAccessProperty {
pub const hipAccessPropertyStreaming: hipAccessProperty = hipAccessProperty(1);
}
impl hipAccessProperty {
pub const hipAccessPropertyPersisting: hipAccessProperty = hipAccessProperty(2);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipAccessProperty(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipAccessPolicyWindow {
pub base_ptr: *mut ::std::os::raw::c_void,
pub hitProp: hipAccessProperty,
pub hitRatio: f32,
pub missProp: hipAccessProperty,
pub num_bytes: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipKernelNodeAttrValue {
pub accessPolicyWindow: hipAccessPolicyWindow,
pub cooperative: ::std::os::raw::c_int,
}
impl hipGraphExecUpdateResult {
#[doc = "< The update succeeded"]
pub const hipGraphExecUpdateSuccess: hipGraphExecUpdateResult = hipGraphExecUpdateResult(0);
}
impl hipGraphExecUpdateResult {
#[doc = "< The update failed for an unexpected reason which is described\n< in the return value of the function"]
pub const hipGraphExecUpdateError: hipGraphExecUpdateResult = hipGraphExecUpdateResult(1);
}
impl hipGraphExecUpdateResult {
#[doc = "< The update failed because the topology changed"]
pub const hipGraphExecUpdateErrorTopologyChanged: hipGraphExecUpdateResult =
hipGraphExecUpdateResult(2);
}
impl hipGraphExecUpdateResult {
#[doc = "< The update failed because a node type changed"]
pub const hipGraphExecUpdateErrorNodeTypeChanged: hipGraphExecUpdateResult =
hipGraphExecUpdateResult(3);
}
impl hipGraphExecUpdateResult {
pub const hipGraphExecUpdateErrorFunctionChanged: hipGraphExecUpdateResult =
hipGraphExecUpdateResult(4);
}
impl hipGraphExecUpdateResult {
pub const hipGraphExecUpdateErrorParametersChanged: hipGraphExecUpdateResult =
hipGraphExecUpdateResult(5);
}
impl hipGraphExecUpdateResult {
pub const hipGraphExecUpdateErrorNotSupported: hipGraphExecUpdateResult =
hipGraphExecUpdateResult(6);
}
impl hipGraphExecUpdateResult {
pub const hipGraphExecUpdateErrorUnsupportedFunctionChange: hipGraphExecUpdateResult =
hipGraphExecUpdateResult(7);
}
#[repr(transparent)]
#[doc = " Graph execution update result"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipGraphExecUpdateResult(pub ::std::os::raw::c_int);
impl hipStreamCaptureMode {
pub const hipStreamCaptureModeGlobal: hipStreamCaptureMode = hipStreamCaptureMode(0);
}
impl hipStreamCaptureMode {
pub const hipStreamCaptureModeThreadLocal: hipStreamCaptureMode = hipStreamCaptureMode(1);
}
impl hipStreamCaptureMode {
pub const hipStreamCaptureModeRelaxed: hipStreamCaptureMode = hipStreamCaptureMode(2);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipStreamCaptureMode(pub ::std::os::raw::c_int);
impl hipStreamCaptureStatus {
#[doc = "< Stream is not capturing"]
pub const hipStreamCaptureStatusNone: hipStreamCaptureStatus = hipStreamCaptureStatus(0);
}
impl hipStreamCaptureStatus {
#[doc = "< Stream is actively capturing"]
pub const hipStreamCaptureStatusActive: hipStreamCaptureStatus = hipStreamCaptureStatus(1);
}
impl hipStreamCaptureStatus {
#[doc = "< Stream is part of a capture sequence that has been\n< invalidated, but not terminated"]
pub const hipStreamCaptureStatusInvalidated: hipStreamCaptureStatus = hipStreamCaptureStatus(2);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipStreamCaptureStatus(pub ::std::os::raw::c_int);
impl hipStreamUpdateCaptureDependenciesFlags {
#[doc = "< Add new nodes to the dependency set"]
pub const hipStreamAddCaptureDependencies: hipStreamUpdateCaptureDependenciesFlags =
hipStreamUpdateCaptureDependenciesFlags(0);
}
impl hipStreamUpdateCaptureDependenciesFlags {
#[doc = "< Replace the dependency set with the new nodes"]
pub const hipStreamSetCaptureDependencies: hipStreamUpdateCaptureDependenciesFlags =
hipStreamUpdateCaptureDependenciesFlags(1);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipStreamUpdateCaptureDependenciesFlags(pub ::std::os::raw::c_int);
impl hipGraphMemAttributeType {
#[doc = "< Amount of memory, in bytes, currently associated with graphs"]
pub const hipGraphMemAttrUsedMemCurrent: hipGraphMemAttributeType = hipGraphMemAttributeType(0);
}
impl hipGraphMemAttributeType {
#[doc = "< High watermark of memory, in bytes, associated with graphs since the last time."]
pub const hipGraphMemAttrUsedMemHigh: hipGraphMemAttributeType = hipGraphMemAttributeType(1);
}
impl hipGraphMemAttributeType {
#[doc = "< Amount of memory, in bytes, currently allocated for graphs."]
pub const hipGraphMemAttrReservedMemCurrent: hipGraphMemAttributeType =
hipGraphMemAttributeType(2);
}
impl hipGraphMemAttributeType {
#[doc = "< High watermark of memory, in bytes, currently allocated for graphs"]
pub const hipGraphMemAttrReservedMemHigh: hipGraphMemAttributeType =
hipGraphMemAttributeType(3);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipGraphMemAttributeType(pub ::std::os::raw::c_int);
impl hipUserObjectFlags {
#[doc = "< Destructor execution is not synchronized."]
pub const hipUserObjectNoDestructorSync: hipUserObjectFlags = hipUserObjectFlags(1);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipUserObjectFlags(pub ::std::os::raw::c_int);
impl hipUserObjectRetainFlags {
#[doc = "< Add new reference or retain."]
pub const hipGraphUserObjectMove: hipUserObjectRetainFlags = hipUserObjectRetainFlags(1);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipUserObjectRetainFlags(pub ::std::os::raw::c_int);
impl hipGraphInstantiateFlags {
pub const hipGraphInstantiateFlagAutoFreeOnLaunch: hipGraphInstantiateFlags =
hipGraphInstantiateFlags(1);
}
impl hipGraphInstantiateFlags {
pub const hipGraphInstantiateFlagUpload: hipGraphInstantiateFlags = hipGraphInstantiateFlags(2);
}
impl hipGraphInstantiateFlags {
pub const hipGraphInstantiateFlagDeviceLaunch: hipGraphInstantiateFlags =
hipGraphInstantiateFlags(4);
}
impl hipGraphInstantiateFlags {
pub const hipGraphInstantiateFlagUseNodePriority: hipGraphInstantiateFlags =
hipGraphInstantiateFlags(8);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipGraphInstantiateFlags(pub ::std::os::raw::c_int);
impl hipGraphDebugDotFlags {
pub const hipGraphDebugDotFlagsVerbose: hipGraphDebugDotFlags = hipGraphDebugDotFlags(1);
}
impl hipGraphDebugDotFlags {
#[doc = "< Adds hipKernelNodeParams to output"]
pub const hipGraphDebugDotFlagsKernelNodeParams: hipGraphDebugDotFlags =
hipGraphDebugDotFlags(4);
}
impl hipGraphDebugDotFlags {
#[doc = "< Adds hipMemcpy3DParms to output"]
pub const hipGraphDebugDotFlagsMemcpyNodeParams: hipGraphDebugDotFlags =
hipGraphDebugDotFlags(8);
}
impl hipGraphDebugDotFlags {
#[doc = "< Adds hipMemsetParams to output"]
pub const hipGraphDebugDotFlagsMemsetNodeParams: hipGraphDebugDotFlags =
hipGraphDebugDotFlags(16);
}
impl hipGraphDebugDotFlags {
#[doc = "< Adds hipHostNodeParams to output"]
pub const hipGraphDebugDotFlagsHostNodeParams: hipGraphDebugDotFlags =
hipGraphDebugDotFlags(32);
}
impl hipGraphDebugDotFlags {
pub const hipGraphDebugDotFlagsEventNodeParams: hipGraphDebugDotFlags =
hipGraphDebugDotFlags(64);
}
impl hipGraphDebugDotFlags {
pub const hipGraphDebugDotFlagsExtSemasSignalNodeParams: hipGraphDebugDotFlags =
hipGraphDebugDotFlags(128);
}
impl hipGraphDebugDotFlags {
pub const hipGraphDebugDotFlagsExtSemasWaitNodeParams: hipGraphDebugDotFlags =
hipGraphDebugDotFlags(256);
}
impl hipGraphDebugDotFlags {
pub const hipGraphDebugDotFlagsKernelNodeAttributes: hipGraphDebugDotFlags =
hipGraphDebugDotFlags(512);
}
impl hipGraphDebugDotFlags {
pub const hipGraphDebugDotFlagsHandles: hipGraphDebugDotFlags = hipGraphDebugDotFlags(1024);
}
#[repr(transparent)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipGraphDebugDotFlags(pub ::std::os::raw::c_int);
#[doc = " Memory allocation properties"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemAllocationProp {
#[doc = "< Memory allocation type"]
pub type_: hipMemAllocationType,
#[doc = "< Requested handle type"]
pub requestedHandleType: hipMemAllocationHandleType,
#[doc = "< Memory location"]
pub location: hipMemLocation,
#[doc = "< Metadata for Win32 handles"]
pub win32HandleMetaData: *mut ::std::os::raw::c_void,
pub allocFlags: hipMemAllocationProp__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemAllocationProp__bindgen_ty_1 {
#[doc = "< Compression type"]
pub compressionType: ::std::os::raw::c_uchar,
#[doc = "< RDMA capable"]
pub gpuDirectRDMACapable: ::std::os::raw::c_uchar,
#[doc = "< Usage"]
pub usage: ::std::os::raw::c_ushort,
}
#[doc = " External semaphore signal node parameters"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreSignalNodeParams {
pub extSemArray: *mut hipExternalSemaphore_t,
pub paramsArray: *const hipExternalSemaphoreSignalParams,
pub numExtSems: ::std::os::raw::c_uint,
}
#[doc = " External semaphore wait node parameters"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipExternalSemaphoreWaitNodeParams {
pub extSemArray: *mut hipExternalSemaphore_t,
pub paramsArray: *const hipExternalSemaphoreWaitParams,
pub numExtSems: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ihipMemGenericAllocationHandle {
_unused: [u8; 0],
}
#[doc = " Generic handle for memory allocation"]
pub type hipMemGenericAllocationHandle_t = *mut ihipMemGenericAllocationHandle;
impl hipMemAllocationGranularity_flags {
#[doc = "< Minimum granularity"]
pub const hipMemAllocationGranularityMinimum: hipMemAllocationGranularity_flags =
hipMemAllocationGranularity_flags(0);
}
impl hipMemAllocationGranularity_flags {
#[doc = "< Recommended granularity for performance"]
pub const hipMemAllocationGranularityRecommended: hipMemAllocationGranularity_flags =
hipMemAllocationGranularity_flags(1);
}
#[repr(transparent)]
#[doc = " Flags for granularity"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemAllocationGranularity_flags(pub ::std::os::raw::c_int);
impl hipMemHandleType {
#[doc = "< Generic handle type"]
pub const hipMemHandleTypeGeneric: hipMemHandleType = hipMemHandleType(0);
}
#[repr(transparent)]
#[doc = " Memory handle type"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemHandleType(pub ::std::os::raw::c_int);
impl hipMemOperationType {
#[doc = "< Map operation"]
pub const hipMemOperationTypeMap: hipMemOperationType = hipMemOperationType(1);
}
impl hipMemOperationType {
#[doc = "< Unmap operation"]
pub const hipMemOperationTypeUnmap: hipMemOperationType = hipMemOperationType(2);
}
#[repr(transparent)]
#[doc = " Memory operation types"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipMemOperationType(pub ::std::os::raw::c_int);
impl hipArraySparseSubresourceType {
#[doc = "< Sparse level"]
pub const hipArraySparseSubresourceTypeSparseLevel: hipArraySparseSubresourceType =
hipArraySparseSubresourceType(0);
}
impl hipArraySparseSubresourceType {
#[doc = "< Miptail"]
pub const hipArraySparseSubresourceTypeMiptail: hipArraySparseSubresourceType =
hipArraySparseSubresourceType(1);
}
#[repr(transparent)]
#[doc = " Subresource types for sparse arrays"]
#[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct hipArraySparseSubresourceType(pub ::std::os::raw::c_int);
#[doc = " Map info for arrays"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipArrayMapInfo {
#[doc = "< Resource type"]
pub resourceType: hipResourceType,
pub resource: hipArrayMapInfo__bindgen_ty_1,
#[doc = "< Sparse subresource type"]
pub subresourceType: hipArraySparseSubresourceType,
pub subresource: hipArrayMapInfo__bindgen_ty_2,
#[doc = "< Memory operation type"]
pub memOperationType: hipMemOperationType,
#[doc = "< Memory handle type"]
pub memHandleType: hipMemHandleType,
pub memHandle: hipArrayMapInfo__bindgen_ty_3,
#[doc = "< Offset within the memory"]
pub offset: ::std::os::raw::c_ulonglong,
#[doc = "< Device ordinal bit mask"]
pub deviceBitMask: ::std::os::raw::c_uint,
#[doc = "< flags for future use, must be zero now."]
pub flags: ::std::os::raw::c_uint,
#[doc = "< Reserved for future use, must be zero now."]
pub reserved: [::std::os::raw::c_uint; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipArrayMapInfo__bindgen_ty_1 {
pub mipmap: hipMipmappedArray,
pub array: hipArray_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipArrayMapInfo__bindgen_ty_2 {
pub sparseLevel: hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1,
pub miptail: hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1 {
#[doc = "< For mipmapped arrays must be a valid mipmap level. For arrays must be zero"]
pub level: ::std::os::raw::c_uint,
#[doc = "< For layered arrays must be a valid layer index. Otherwise, must be zero"]
pub layer: ::std::os::raw::c_uint,
#[doc = "< X offset in elements"]
pub offsetX: ::std::os::raw::c_uint,
#[doc = "< Y offset in elements"]
pub offsetY: ::std::os::raw::c_uint,
#[doc = "< Z offset in elements"]
pub offsetZ: ::std::os::raw::c_uint,
#[doc = "< Width in elements"]
pub extentWidth: ::std::os::raw::c_uint,
#[doc = "< Height in elements"]
pub extentHeight: ::std::os::raw::c_uint,
#[doc = "< Depth in elements"]
pub extentDepth: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2 {
#[doc = "< For layered arrays must be a valid layer index. Otherwise, must be zero"]
pub layer: ::std::os::raw::c_uint,
#[doc = "< Offset within mip tail"]
pub offset: ::std::os::raw::c_ulonglong,
#[doc = "< Extent in bytes"]
pub size: ::std::os::raw::c_ulonglong,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipArrayMapInfo__bindgen_ty_3 {
pub memHandle: hipMemGenericAllocationHandle_t,
}
extern "C" {
#[must_use]
#[doc = " @}\n/\n/**\n @defgroup API HIP API\n @{\n\n Defines the HIP API. See the individual sections for more information.\n/\n/**\n @defgroup Driver Initialization and Version\n @{\n This section describes the initializtion and version functions of HIP runtime API.\n\n/\n/**\n @brief Explicitly initializes the HIP runtime.\n\n Most HIP APIs implicitly initialize the HIP runtime.\n This API provides control over the timing of the initialization."]
pub fn hipInit(flags: ::std::os::raw::c_uint) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns the approximate HIP driver version.\n\n @param [out] driverVersion driver version\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning The HIP feature set does not correspond to an exact CUDA SDK driver revision.\n This function always set *driverVersion to 4 as an approximation though HIP supports\n some features which were introduced in later CUDA SDK revisions.\n HIP apps code should not rely on the driver revision number here and should\n use arch feature flags to test device capabilities or conditional compilation.\n\n @see hipRuntimeGetVersion"]
pub fn hipDriverGetVersion(driverVersion: *mut ::std::os::raw::c_int) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns the approximate HIP Runtime version.\n\n @param [out] runtimeVersion HIP runtime version\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning The version definition of HIP runtime is different from CUDA.\n On AMD platform, the function returns HIP runtime version,\n while on NVIDIA platform, it returns CUDA runtime version.\n And there is no mapping/correlation between HIP version and CUDA version.\n\n @see hipDriverGetVersion"]
pub fn hipRuntimeGetVersion(runtimeVersion: *mut ::std::os::raw::c_int) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns a handle to a compute device\n @param [out] device Handle of device\n @param [in] ordinal Device ordinal\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
pub fn hipDeviceGet(device: *mut hipDevice_t, ordinal: ::std::os::raw::c_int) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns the compute capability of the device\n @param [out] major Major compute capability version number\n @param [out] minor Minor compute capability version number\n @param [in] device Device ordinal\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
pub fn hipDeviceComputeCapability(
major: *mut ::std::os::raw::c_int,
minor: *mut ::std::os::raw::c_int,
device: hipDevice_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns an identifer string for the device.\n @param [out] name String of the device name\n @param [in] len Maximum length of string to store in device name\n @param [in] device Device ordinal\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
pub fn hipDeviceGetName(
name: *mut ::std::os::raw::c_char,
len: ::std::os::raw::c_int,
device: hipDevice_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns an UUID for the device.[BETA]\n @param [out] uuid UUID for the device\n @param [in] device device ordinal\n\n @beta This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue, #hipErrorNotInitialized,\n #hipErrorDeinitialized"]
pub fn hipDeviceGetUuid(uuid: *mut hipUUID, device: hipDevice_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns a value for attribute of link between two devices\n @param [out] value Pointer of the value for the attrubute\n @param [in] attr enum of hipDeviceP2PAttr to query\n @param [in] srcDevice The source device of the link\n @param [in] dstDevice The destination device of the link\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
pub fn hipDeviceGetP2PAttribute(
value: *mut ::std::os::raw::c_int,
attr: hipDeviceP2PAttr,
srcDevice: ::std::os::raw::c_int,
dstDevice: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns a PCI Bus Id string for the device, overloaded to take int device ID.\n @param [out] pciBusId The string of PCI Bus Id format for the device\n @param [in] len Maximum length of string\n @param [in] device The device ordinal\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
pub fn hipDeviceGetPCIBusId(
pciBusId: *mut ::std::os::raw::c_char,
len: ::std::os::raw::c_int,
device: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns a handle to a compute device.\n @param [out] device The handle of the device\n @param [in] pciBusId The string of PCI Bus Id for the device\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue"]
pub fn hipDeviceGetByPCIBusId(
device: *mut ::std::os::raw::c_int,
pciBusId: *const ::std::os::raw::c_char,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns the total amount of memory on the device.\n @param [out] bytes The size of memory in bytes, on the device\n @param [in] device The ordinal of the device\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
pub fn hipDeviceTotalMem(bytes: *mut usize, device: hipDevice_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @}\n/\n/**\n @defgroup Device Device Management\n @{\n This section describes the device management functions of HIP runtime API.\n/\n/**\n @brief Waits on all active streams on current device\n\n When this command is invoked, the host thread gets blocked until all the commands associated\n with streams associated with the device. HIP does not support multiple blocking modes (yet!).\n\n @returns #hipSuccess\n\n @see hipSetDevice, hipDeviceReset"]
pub fn hipDeviceSynchronize() -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief The state of current device is discarded and updated to a fresh state.\n\n Calling this function deletes all streams created, memory allocated, kernels running, events\n created. Make sure that no other thread is using the device or streams, memory, kernels, events\n associated with the current device.\n\n @returns #hipSuccess\n\n @see hipDeviceSynchronize"]
pub fn hipDeviceReset() -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set default device to be used for subsequent hip API calls from this thread.\n\n @param[in] deviceId Valid device in range 0...hipGetDeviceCount().\n\n Sets @p device as the default device for the calling host thread. Valid device id's are 0...\n (hipGetDeviceCount()-1).\n\n Many HIP APIs implicitly use the \"default device\" :\n\n - Any device memory subsequently allocated from this host thread (using hipMalloc) will be\n allocated on device.\n - Any streams or events created from this host thread will be associated with device.\n - Any kernels launched from this host thread (using hipLaunchKernel) will be executed on device\n (unless a specific stream is specified, in which case the device associated with that stream will\n be used).\n\n This function may be called from any host thread. Multiple host threads may use the same device.\n This function does no synchronization with the previous or new device, and has very little\n runtime overhead. Applications can use hipSetDevice to quickly switch the default device before\n making a HIP runtime call which uses the default device.\n\n The default device is stored in thread-local-storage for each thread.\n Thread-pool implementations may inherit the default device of the previous thread. A good\n practice is to always call hipSetDevice at the start of HIP coding sequency to establish a known\n standard device.\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorDeviceAlreadyInUse\n\n @see hipGetDevice, hipGetDeviceCount"]
pub fn hipSetDevice(deviceId: ::std::os::raw::c_int) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Return the default device id for the calling host thread.\n\n @param [out] deviceId *device is written with the default device\n\n HIP maintains an default device for each thread using thread-local-storage.\n This device is used implicitly for HIP runtime APIs called by this thread.\n hipGetDevice returns in * @p device the default device for the calling host thread.\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see hipSetDevice, hipGetDevicesizeBytes"]
pub fn hipGetDevice(deviceId: *mut ::std::os::raw::c_int) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Return number of compute-capable devices.\n\n @param [out] count Returns number of compute-capable devices.\n\n @returns #hipSuccess, #hipErrorNoDevice\n\n\n Returns in @p *count the number of devices that have ability to run compute commands. If there\n are no such devices, then @ref hipGetDeviceCount will return #hipErrorNoDevice. If 1 or more\n devices can be found, then hipGetDeviceCount returns #hipSuccess."]
pub fn hipGetDeviceCount(count: *mut ::std::os::raw::c_int) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Query for a specific device attribute.\n\n @param [out] pi pointer to value to return\n @param [in] attr attribute to query\n @param [in] deviceId which device to query for information\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue"]
pub fn hipDeviceGetAttribute(
pi: *mut ::std::os::raw::c_int,
attr: hipDeviceAttribute_t,
deviceId: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns the default memory pool of the specified device\n\n @param [out] mem_pool Default memory pool to return\n @param [in] device Device index for query the default memory pool\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipDeviceGetDefaultMemPool, hipMallocAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipDeviceGetDefaultMemPool(
mem_pool: *mut hipMemPool_t,
device: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets the current memory pool of a device\n\n The memory pool must be local to the specified device.\n @p hipMallocAsync allocates from the current mempool of the provided stream's device.\n By default, a device's current memory pool is its default memory pool.\n\n @note Use @p hipMallocFromPoolAsync for asynchronous memory allocations from a device\n different than the one the stream runs on.\n\n @param [in] device Device index for the update\n @param [in] mem_pool Memory pool for update as the current on the specified device\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDevice, #hipErrorNotSupported\n\n @see hipDeviceGetDefaultMemPool, hipMallocAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipDeviceSetMemPool(device: ::std::os::raw::c_int, mem_pool: hipMemPool_t)
-> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the current memory pool for the specified device\n\n Returns the last pool provided to @p hipDeviceSetMemPool for this device\n or the device's default memory pool if @p hipDeviceSetMemPool has never been called.\n By default the current mempool is the default mempool for a device,\n otherwise the returned pool must have been set with @p hipDeviceSetMemPool.\n\n @param [out] mem_pool Current memory pool on the specified device\n @param [in] device Device index to query the current memory pool\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipDeviceGetDefaultMemPool, hipMallocAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipDeviceGetMemPool(
mem_pool: *mut hipMemPool_t,
device: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns device properties.\n\n @param [out] prop written with device properties\n @param [in] deviceId which device to query for information\n\n @return #hipSuccess, #hipErrorInvalidDevice\n @bug HCC always returns 0 for maxThreadsPerMultiProcessor\n @bug HCC always returns 0 for regsPerBlock\n @bug HCC always returns 0 for l2CacheSize\n\n Populates hipGetDeviceProperties with information for the specified device."]
pub fn hipGetDeviceProperties(
prop: *mut hipDeviceProp_t,
deviceId: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set L1/Shared cache partition.\n\n @param [in] cacheConfig Cache configuration\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorNotSupported\n\n Note: AMD devices do not support reconfigurable cache. This API is not implemented\n on AMD platform. If the function is called, it will return hipErrorNotSupported.\n"]
pub fn hipDeviceSetCacheConfig(cacheConfig: hipFuncCache_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get Cache configuration for a specific Device\n\n @param [out] cacheConfig Pointer of cache configuration\n\n @returns #hipSuccess, #hipErrorNotInitialized\n Note: AMD devices do not support reconfigurable cache. This hint is ignored\n on these architectures.\n"]
pub fn hipDeviceGetCacheConfig(cacheConfig: *mut hipFuncCache_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets resource limits of current device\n The funtion querys the size of limit value, as required input enum hipLimit_t, can be either\n hipLimitStackSize, or hipLimitMallocHeapSize.\n\n @param [out] pValue returns the size of the limit in bytes\n @param [in] limit the limit to query\n\n @returns #hipSuccess, #hipErrorUnsupportedLimit, #hipErrorInvalidValue\n"]
pub fn hipDeviceGetLimit(pValue: *mut usize, limit: hipLimit_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets resource limits of current device\n As the input enum limit, hipLimitStackSize sets the limit value of the stack size on current\n GPU devie, hipLimitMallocHeapSize sets the limit value of the heap used by the malloc()/free()\n calls.\n\n @param [in] limit enum of hipLimit_t to set\n @param [in] value the size of limit value in bytes\n\n @returns #hipSuccess, #hipErrorUnsupportedLimit, #hipErrorInvalidValue\n"]
pub fn hipDeviceSetLimit(limit: hipLimit_t, value: usize) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns bank width of shared memory for current device\n\n @param [out] pConfig The pointer of the bank width for shared memory\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized\n\n Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n"]
pub fn hipDeviceGetSharedMemConfig(pConfig: *mut hipSharedMemConfig) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the flags set for current device\n\n @param [out] flags Pointer of the flags\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue"]
pub fn hipGetDeviceFlags(flags: *mut ::std::os::raw::c_uint) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief The bank width of shared memory on current device is set\n\n @param [in] config Configuration for the bank width of shared memory\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized\n\n Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n"]
pub fn hipDeviceSetSharedMemConfig(config: hipSharedMemConfig) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief The current device behavior is changed according the flags passed.\n\n @param [in] flags Flag to set on the current device\n\n The schedule flags impact how HIP waits for the completion of a command running on a device.\n hipDeviceScheduleSpin : HIP runtime will actively spin in the thread which submitted the\n work until the command completes. This offers the lowest latency, but will consume a CPU core\n and may increase power. hipDeviceScheduleYield : The HIP runtime will yield the CPU to\n system so that other tasks can use it. This may increase latency to detect the completion but\n will consume less power and is friendlier to other tasks in the system.\n hipDeviceScheduleBlockingSync : On ROCm platform, this is a synonym for hipDeviceScheduleYield.\n hipDeviceScheduleAuto : Use a hueristic to select between Spin and Yield modes. If the\n number of HIP contexts is greater than the number of logical processors in the system, use Spin\n scheduling. Else use Yield scheduling.\n\n\n hipDeviceMapHost : Allow mapping host memory. On ROCM, this is always allowed and\n the flag is ignored. hipDeviceLmemResizeToMax : @warning ROCm silently ignores this flag.\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorSetOnActiveProcess\n\n"]
pub fn hipSetDeviceFlags(flags: ::std::os::raw::c_uint) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Device which matches hipDeviceProp_t is returned\n\n @param [out] device Pointer of the device\n @param [in] prop Pointer of the properties\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
pub fn hipChooseDevice(
device: *mut ::std::os::raw::c_int,
prop: *const hipDeviceProp_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns the link type and hop count between two devices\n\n @param [in] device1 Ordinal for device1\n @param [in] device2 Ordinal for device2\n @param [out] linktype Returns the link type (See hsa_amd_link_info_type_t) between the two devices\n @param [out] hopcount Returns the hop count between the two devices\n\n Queries and returns the HSA link type and the hop count between the two specified devices.\n\n @returns #hipSuccess, #hipInvalidDevice, #hipErrorRuntimeOther"]
pub fn hipExtGetLinkTypeAndHopCount(
device1: ::std::os::raw::c_int,
device2: ::std::os::raw::c_int,
linktype: *mut u32,
hopcount: *mut u32,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets an interprocess memory handle for an existing device memory\n allocation\n\n Takes a pointer to the base of an existing device memory allocation created\n with hipMalloc and exports it for use in another process. This is a\n lightweight operation and may be called multiple times on an allocation\n without adverse effects.\n\n If a region of memory is freed with hipFree and a subsequent call\n to hipMalloc returns memory with the same device address,\n hipIpcGetMemHandle will return a unique handle for the\n new memory.\n\n @param handle - Pointer to user allocated hipIpcMemHandle to return\n the handle in.\n @param devPtr - Base pointer to previously allocated device memory\n\n @returns\n #hipSuccess\n #hipErrorInvalidHandle\n #hipErrorOutOfMemory\n #hipErrorMapFailed\n\n @note This IPC memory related feature API on Windows may behave differently from Linux.\n"]
pub fn hipIpcGetMemHandle(
handle: *mut hipIpcMemHandle_t,
devPtr: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Opens an interprocess memory handle exported from another process\n and returns a device pointer usable in the local process.\n\n Maps memory exported from another process with hipIpcGetMemHandle into\n the current device address space. For contexts on different devices\n hipIpcOpenMemHandle can attempt to enable peer access between the\n devices as if the user called hipDeviceEnablePeerAccess. This behavior is\n controlled by the hipIpcMemLazyEnablePeerAccess flag.\n hipDeviceCanAccessPeer can determine if a mapping is possible.\n\n Contexts that may open hipIpcMemHandles are restricted in the following way.\n hipIpcMemHandles from each device in a given process may only be opened\n by one context per device per other process.\n\n Memory returned from hipIpcOpenMemHandle must be freed with\n hipIpcCloseMemHandle.\n\n Calling hipFree on an exported memory region before calling\n hipIpcCloseMemHandle in the importing context will result in undefined\n behavior.\n\n @param devPtr - Returned device pointer\n @param handle - hipIpcMemHandle to open\n @param flags - Flags for this operation. Must be specified as hipIpcMemLazyEnablePeerAccess\n\n @returns\n #hipSuccess,\n #hipErrorMapFailed,\n #hipErrorInvalidHandle,\n #hipErrorTooManyPeers\n\n @note During multiple processes, using the same memory handle opened by the current context,\n there is no guarantee that the same device poiter will be returned in @p *devPtr.\n This is diffrent from CUDA.\n @note This IPC memory related feature API on Windows may behave differently from Linux.\n"]
pub fn hipIpcOpenMemHandle(
devPtr: *mut *mut ::std::os::raw::c_void,
handle: hipIpcMemHandle_t,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Close memory mapped with hipIpcOpenMemHandle\n\n Unmaps memory returnd by hipIpcOpenMemHandle. The original allocation\n in the exporting process as well as imported mappings in other processes\n will be unaffected.\n\n Any resources used to enable peer access will be freed if this is the\n last mapping using them.\n\n @param devPtr - Device pointer returned by hipIpcOpenMemHandle\n\n @returns\n #hipSuccess,\n #hipErrorMapFailed,\n #hipErrorInvalidHandle\n\n @note This IPC memory related feature API on Windows may behave differently from Linux.\n"]
pub fn hipIpcCloseMemHandle(devPtr: *mut ::std::os::raw::c_void) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets an opaque interprocess handle for an event.\n\n This opaque handle may be copied into other processes and opened with hipIpcOpenEventHandle.\n Then hipEventRecord, hipEventSynchronize, hipStreamWaitEvent and hipEventQuery may be used in\n either process. Operations on the imported event after the exported event has been freed with hipEventDestroy\n will result in undefined behavior.\n\n @param[out] handle Pointer to hipIpcEventHandle to return the opaque event handle\n @param[in] event Event allocated with hipEventInterprocess and hipEventDisableTiming flags\n\n @returns #hipSuccess, #hipErrorInvalidConfiguration, #hipErrorInvalidValue\n\n @note This IPC event related feature API is currently applicable on Linux.\n"]
pub fn hipIpcGetEventHandle(handle: *mut hipIpcEventHandle_t, event: hipEvent_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Opens an interprocess event handles.\n\n Opens an interprocess event handle exported from another process with cudaIpcGetEventHandle. The returned\n hipEvent_t behaves like a locally created event with the hipEventDisableTiming flag specified. This event\n need be freed with hipEventDestroy. Operations on the imported event after the exported event has been freed\n with hipEventDestroy will result in undefined behavior. If the function is called within the same process where\n handle is returned by hipIpcGetEventHandle, it will return hipErrorInvalidContext.\n\n @param[out] event Pointer to hipEvent_t to return the event\n @param[in] handle The opaque interprocess handle to open\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext\n\n @note This IPC event related feature API is currently applicable on Linux.\n"]
pub fn hipIpcOpenEventHandle(event: *mut hipEvent_t, handle: hipIpcEventHandle_t)
-> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @}\n/\n/**\n\n @defgroup Execution Execution Control\n @{\n This section describes the execution control functions of HIP runtime API.\n\n/\n/**\n @brief Set attribute for a specific function\n\n @param [in] func Pointer of the function\n @param [in] attr Attribute to set\n @param [in] value Value to set\n\n @returns #hipSuccess, #hipErrorInvalidDeviceFunction, #hipErrorInvalidValue\n\n Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n"]
pub fn hipFuncSetAttribute(
func: *const ::std::os::raw::c_void,
attr: hipFuncAttribute,
value: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set Cache configuration for a specific function\n\n @param [in] func Pointer of the function.\n @param [in] config Configuration to set.\n\n @returns #hipSuccess, #hipErrorNotInitialized\n Note: AMD devices and some Nvidia GPUS do not support reconfigurable cache. This hint is ignored\n on those architectures.\n"]
pub fn hipFuncSetCacheConfig(
func: *const ::std::os::raw::c_void,
config: hipFuncCache_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set shared memory configuation for a specific function\n\n @param [in] func Pointer of the function\n @param [in] config Configuration\n\n @returns #hipSuccess, #hipErrorInvalidDeviceFunction, #hipErrorInvalidValue\n\n Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n"]
pub fn hipFuncSetSharedMemConfig(
func: *const ::std::os::raw::c_void,
config: hipSharedMemConfig,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup Error Error Handling\n @{\n This section describes the error handling functions of HIP runtime API.\n/\n/**\n @brief Return last error returned by any HIP runtime API call and resets the stored error code to\n #hipSuccess\n\n @returns return code from last HIP called from the active host thread\n\n Returns the last error that has been returned by any of the runtime calls in the same host\n thread, and then resets the saved error to #hipSuccess.\n\n @see hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t"]
pub fn hipGetLastError() -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Return last error returned by any HIP runtime API call.\n\n @return #hipSuccess\n\n Returns the last error that has been returned by any of the runtime calls in the same host\n thread. Unlike hipGetLastError, this function does not reset the saved error code.\n\n @see hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t"]
pub fn hipPeekAtLastError() -> hipError_t;
}
extern "C" {
#[doc = " @brief Return hip error as text string form.\n\n @param hip_error Error code to convert to name.\n @return const char pointer to the NULL-terminated error name\n\n @see hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t"]
pub fn hipGetErrorName(hip_error: hipError_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " @brief Return handy text string message to explain the error which occurred\n\n @param hipError Error code to convert to string.\n @return const char pointer to the NULL-terminated error string\n\n @see hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t"]
pub fn hipGetErrorString(hipError: hipError_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[must_use]
#[doc = " @brief Return hip error as text string form.\n\n @param [in] hipError Error code to convert to string.\n @param [out] errorString char pointer to the NULL-terminated error string\n @return #hipSuccess, #hipErrorInvalidValue\n\n @see hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t"]
pub fn hipDrvGetErrorName(
hipError: hipError_t,
errorString: *mut *const ::std::os::raw::c_char,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Return handy text string message to explain the error which occurred\n\n @param [in] hipError Error code to convert to string.\n @param [out] errorString char pointer to the NULL-terminated error string\n @return #hipSuccess, #hipErrorInvalidValue\n\n @see hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t"]
pub fn hipDrvGetErrorString(
hipError: hipError_t,
errorString: *mut *const ::std::os::raw::c_char,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Create an asynchronous stream.\n\n @param[in, out] stream Valid pointer to hipStream_t. This function writes the memory with the\n newly created stream.\n @return #hipSuccess, #hipErrorInvalidValue\n\n Create a new asynchronous stream. @p stream returns an opaque handle that can be used to\n reference the newly created stream in subsequent hipStream* commands. The stream is allocated on\n the heap and will remain allocated even if the handle goes out-of-scope. To release the memory\n used by the stream, applicaiton must call hipStreamDestroy.\n\n @return #hipSuccess, #hipErrorInvalidValue\n\n @see hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"]
pub fn hipStreamCreate(stream: *mut hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Create an asynchronous stream.\n\n @param[in, out] stream Pointer to new stream\n @param[in ] flags to control stream creation.\n @return #hipSuccess, #hipErrorInvalidValue\n\n Create a new asynchronous stream. @p stream returns an opaque handle that can be used to\n reference the newly created stream in subsequent hipStream* commands. The stream is allocated on\n the heap and will remain allocated even if the handle goes out-of-scope. To release the memory\n used by the stream, applicaiton must call hipStreamDestroy. Flags controls behavior of the\n stream. See #hipStreamDefault, #hipStreamNonBlocking.\n\n\n @see hipStreamCreate, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"]
pub fn hipStreamCreateWithFlags(
stream: *mut hipStream_t,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Create an asynchronous stream with the specified priority.\n\n @param[in, out] stream Pointer to new stream\n @param[in ] flags to control stream creation.\n @param[in ] priority of the stream. Lower numbers represent higher priorities.\n @return #hipSuccess, #hipErrorInvalidValue\n\n Create a new asynchronous stream with the specified priority. @p stream returns an opaque handle\n that can be used to reference the newly created stream in subsequent hipStream* commands. The\n stream is allocated on the heap and will remain allocated even if the handle goes out-of-scope.\n To release the memory used by the stream, applicaiton must call hipStreamDestroy. Flags controls\n behavior of the stream. See #hipStreamDefault, #hipStreamNonBlocking.\n\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"]
pub fn hipStreamCreateWithPriority(
stream: *mut hipStream_t,
flags: ::std::os::raw::c_uint,
priority: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns numerical values that correspond to the least and greatest stream priority.\n\n @param[in, out] leastPriority pointer in which value corresponding to least priority is returned.\n @param[in, out] greatestPriority pointer in which value corresponding to greatest priority is returned.\n\n Returns in *leastPriority and *greatestPriority the numerical values that correspond to the least\n and greatest stream priority respectively. Stream priorities follow a convention where lower numbers\n imply greater priorities. The range of meaningful stream priorities is given by\n [*greatestPriority, *leastPriority]. If the user attempts to create a stream with a priority value\n that is outside the the meaningful range as specified by this API, the priority is automatically\n clamped to within the valid range."]
pub fn hipDeviceGetStreamPriorityRange(
leastPriority: *mut ::std::os::raw::c_int,
greatestPriority: *mut ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroys the specified stream.\n\n @param[in] stream stream identifier.\n @return #hipSuccess #hipErrorInvalidHandle\n\n Destroys the specified stream.\n\n If commands are still executing on the specified stream, some may complete execution before the\n queue is deleted.\n\n The queue may be destroyed while some commands are still inflight, or may wait for all commands\n queued to the stream before destroying it.\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamQuery, hipStreamWaitEvent,\n hipStreamSynchronize"]
pub fn hipStreamDestroy(stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Return #hipSuccess if all of the operations in the specified @p stream have completed, or\n #hipErrorNotReady if not.\n\n @param[in] stream stream to query\n\n @return #hipSuccess, #hipErrorNotReady, #hipErrorInvalidHandle\n\n This is thread-safe and returns a snapshot of the current state of the queue. However, if other\n host threads are sending work to the stream, the status may change immediately after the function\n is called. It is typically used for debug.\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamWaitEvent, hipStreamSynchronize,\n hipStreamDestroy"]
pub fn hipStreamQuery(stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Wait for all commands in stream to complete.\n\n @param[in] stream stream identifier.\n\n @return #hipSuccess, #hipErrorInvalidHandle\n\n This command is host-synchronous : the host will block until the specified stream is empty.\n\n This command follows standard null-stream semantics. Specifically, specifying the null stream\n will cause the command to wait for other streams on the same device to complete all pending\n operations.\n\n This command honors the hipDeviceLaunchBlocking flag, which controls whether the wait is active\n or blocking.\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamWaitEvent, hipStreamDestroy\n"]
pub fn hipStreamSynchronize(stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Make the specified compute stream wait for an event\n\n @param[in] stream stream to make wait.\n @param[in] event event to wait on\n @param[in] flags control operation [must be 0]\n\n @return #hipSuccess, #hipErrorInvalidHandle\n\n This function inserts a wait operation into the specified stream.\n All future work submitted to @p stream will wait until @p event reports completion before\n beginning execution.\n\n This function only waits for commands in the current stream to complete. Notably,, this function\n does not impliciy wait for commands in the default stream to complete, even if the specified\n stream is created with hipStreamNonBlocking = 0.\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamDestroy"]
pub fn hipStreamWaitEvent(
stream: hipStream_t,
event: hipEvent_t,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Return flags associated with this stream.\n\n @param[in] stream stream to be queried\n @param[in,out] flags Pointer to an unsigned integer in which the stream's flags are returned\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle\n\n @returns #hipSuccess #hipErrorInvalidValue #hipErrorInvalidHandle\n\n Return flags associated with this stream in *@p flags.\n\n @see hipStreamCreateWithFlags"]
pub fn hipStreamGetFlags(stream: hipStream_t, flags: *mut ::std::os::raw::c_uint)
-> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Query the priority of a stream.\n\n @param[in] stream stream to be queried\n @param[in,out] priority Pointer to an unsigned integer in which the stream's priority is returned\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle\n\n @returns #hipSuccess #hipErrorInvalidValue #hipErrorInvalidHandle\n\n Query the priority of a stream. The priority is returned in in priority.\n\n @see hipStreamCreateWithFlags"]
pub fn hipStreamGetPriority(
stream: hipStream_t,
priority: *mut ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get the device assocaited with the stream\n\n @param[in] stream stream to be queried\n @param[out] device device associated with the stream\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorContextIsDestroyed, #hipErrorInvalidHandle,\n #hipErrorNotInitialized, #hipErrorDeinitialized, #hipErrorInvalidContext\n\n @see hipStreamCreate, hipStreamDestroy, hipDeviceGetStreamPriorityRange"]
pub fn hipStreamGetDevice(stream: hipStream_t, device: *mut hipDevice_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Create an asynchronous stream with the specified CU mask.\n\n @param[in, out] stream Pointer to new stream\n @param[in ] cuMaskSize Size of CU mask bit array passed in.\n @param[in ] cuMask Bit-vector representing the CU mask. Each active bit represents using one CU.\n The first 32 bits represent the first 32 CUs, and so on. If its size is greater than physical\n CU number (i.e., multiProcessorCount member of hipDeviceProp_t), the extra elements are ignored.\n It is user's responsibility to make sure the input is meaningful.\n @return #hipSuccess, #hipErrorInvalidHandle, #hipErrorInvalidValue\n\n Create a new asynchronous stream with the specified CU mask. @p stream returns an opaque handle\n that can be used to reference the newly created stream in subsequent hipStream* commands. The\n stream is allocated on the heap and will remain allocated even if the handle goes out-of-scope.\n To release the memory used by the stream, application must call hipStreamDestroy.\n\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"]
pub fn hipExtStreamCreateWithCUMask(
stream: *mut hipStream_t,
cuMaskSize: u32,
cuMask: *const u32,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get CU mask associated with an asynchronous stream\n\n @param[in] stream stream to be queried\n @param[in] cuMaskSize number of the block of memories (uint32_t *) allocated by user\n @param[out] cuMask Pointer to a pre-allocated block of memories (uint32_t *) in which\n the stream's CU mask is returned. The CU mask is returned in a chunck of 32 bits where\n each active bit represents one active CU\n @return #hipSuccess, #hipErrorInvalidHandle, #hipErrorInvalidValue\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"]
pub fn hipExtStreamGetCUMask(
stream: hipStream_t,
cuMaskSize: u32,
cuMask: *mut u32,
) -> hipError_t;
}
#[doc = " Stream CallBack struct"]
pub type hipStreamCallback_t = ::std::option::Option<
unsafe extern "C" fn(
stream: hipStream_t,
status: hipError_t,
userData: *mut ::std::os::raw::c_void,
),
>;
extern "C" {
#[must_use]
#[doc = " @brief Adds a callback to be called on the host after all currently enqueued\n items in the stream have completed. For each\n hipStreamAddCallback call, a callback will be executed exactly once.\n The callback will block later work in the stream until it is finished.\n @param[in] stream - Stream to add callback to\n @param[in] callback - The function to call once preceding stream operations are complete\n @param[in] userData - User specified data to be passed to the callback function\n @param[in] flags - Reserved for future use, must be 0\n @return #hipSuccess, #hipErrorInvalidHandle, #hipErrorNotSupported\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamQuery, hipStreamSynchronize,\n hipStreamWaitEvent, hipStreamDestroy, hipStreamCreateWithPriority\n"]
pub fn hipStreamAddCallback(
stream: hipStream_t,
callback: hipStreamCallback_t,
userData: *mut ::std::os::raw::c_void,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup StreamM Stream Memory Operations\n @{\n This section describes Stream Memory Wait and Write functions of HIP runtime API.\n/\n/**\n @brief Enqueues a wait command to the stream.[BETA]\n\n @param [in] stream - Stream identifier\n @param [in] ptr - Pointer to memory object allocated using 'hipMallocSignalMemory' flag\n @param [in] value - Value to be used in compare operation\n @param [in] flags - Defines the compare operation, supported values are hipStreamWaitValueGte\n hipStreamWaitValueEq, hipStreamWaitValueAnd and hipStreamWaitValueNor\n @param [in] mask - Mask to be applied on value at memory before it is compared with value,\n default value is set to enable every bit\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Enqueues a wait command to the stream, all operations enqueued on this stream after this, will\n not execute until the defined wait condition is true.\n\n hipStreamWaitValueGte: waits until *ptr&mask >= value\n hipStreamWaitValueEq : waits until *ptr&mask == value\n hipStreamWaitValueAnd: waits until ((*ptr&mask) & value) != 0\n hipStreamWaitValueNor: waits until ~((*ptr&mask) | (value&mask)) != 0\n\n @note when using 'hipStreamWaitValueNor', mask is applied on both 'value' and '*ptr'.\n\n @note Support for hipStreamWaitValue32 can be queried using 'hipDeviceGetAttribute()' and\n 'hipDeviceAttributeCanUseStreamWaitValue' flag.\n\n @beta This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @see hipExtMallocWithFlags, hipFree, hipStreamWaitValue64, hipStreamWriteValue64,\n hipStreamWriteValue32, hipDeviceGetAttribute"]
pub fn hipStreamWaitValue32(
stream: hipStream_t,
ptr: *mut ::std::os::raw::c_void,
value: u32,
flags: ::std::os::raw::c_uint,
mask: u32,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Enqueues a wait command to the stream.[BETA]\n\n @param [in] stream - Stream identifier\n @param [in] ptr - Pointer to memory object allocated using 'hipMallocSignalMemory' flag\n @param [in] value - Value to be used in compare operation\n @param [in] flags - Defines the compare operation, supported values are hipStreamWaitValueGte\n hipStreamWaitValueEq, hipStreamWaitValueAnd and hipStreamWaitValueNor.\n @param [in] mask - Mask to be applied on value at memory before it is compared with value\n default value is set to enable every bit\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Enqueues a wait command to the stream, all operations enqueued on this stream after this, will\n not execute until the defined wait condition is true.\n\n hipStreamWaitValueGte: waits until *ptr&mask >= value\n hipStreamWaitValueEq : waits until *ptr&mask == value\n hipStreamWaitValueAnd: waits until ((*ptr&mask) & value) != 0\n hipStreamWaitValueNor: waits until ~((*ptr&mask) | (value&mask)) != 0\n\n @note when using 'hipStreamWaitValueNor', mask is applied on both 'value' and '*ptr'.\n\n @note Support for hipStreamWaitValue64 can be queried using 'hipDeviceGetAttribute()' and\n 'hipDeviceAttributeCanUseStreamWaitValue' flag.\n\n @beta This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @see hipExtMallocWithFlags, hipFree, hipStreamWaitValue32, hipStreamWriteValue64,\n hipStreamWriteValue32, hipDeviceGetAttribute"]
pub fn hipStreamWaitValue64(
stream: hipStream_t,
ptr: *mut ::std::os::raw::c_void,
value: u64,
flags: ::std::os::raw::c_uint,
mask: u64,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Enqueues a write command to the stream.[BETA]\n\n @param [in] stream - Stream identifier\n @param [in] ptr - Pointer to a GPU accessible memory object\n @param [in] value - Value to be written\n @param [in] flags - reserved, ignored for now, will be used in future releases\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Enqueues a write command to the stream, write operation is performed after all earlier commands\n on this stream have completed the execution.\n\n @beta This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @see hipExtMallocWithFlags, hipFree, hipStreamWriteValue32, hipStreamWaitValue32,\n hipStreamWaitValue64"]
pub fn hipStreamWriteValue32(
stream: hipStream_t,
ptr: *mut ::std::os::raw::c_void,
value: u32,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Enqueues a write command to the stream.[BETA]\n\n @param [in] stream - Stream identifier\n @param [in] ptr - Pointer to a GPU accessible memory object\n @param [in] value - Value to be written\n @param [in] flags - reserved, ignored for now, will be used in future releases\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Enqueues a write command to the stream, write operation is performed after all earlier commands\n on this stream have completed the execution.\n\n @beta This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @see hipExtMallocWithFlags, hipFree, hipStreamWriteValue32, hipStreamWaitValue32,\n hipStreamWaitValue64"]
pub fn hipStreamWriteValue64(
stream: hipStream_t,
ptr: *mut ::std::os::raw::c_void,
value: u64,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup Event Event Management\n @{\n This section describes the event management functions of HIP runtime API.\n/\n/**\n @brief Create an event with the specified flags\n\n @param[in,out] event Returns the newly created event.\n @param[in] flags Flags to control event behavior. Valid values are #hipEventDefault,\n#hipEventBlockingSync, #hipEventDisableTiming, #hipEventInterprocess\n #hipEventDefault : Default flag. The event will use active synchronization and will support\ntiming. Blocking synchronization provides lowest possible latency at the expense of dedicating a\nCPU to poll on the event.\n #hipEventBlockingSync : The event will use blocking synchronization : if hipEventSynchronize is\ncalled on this event, the thread will block until the event completes. This can increase latency\nfor the synchroniation but can result in lower power and more resources for other CPU threads.\n #hipEventDisableTiming : Disable recording of timing information. Events created with this flag\nwould not record profiling data and provide best performance if used for synchronization.\n #hipEventInterprocess : The event can be used as an interprocess event. hipEventDisableTiming\nflag also must be set when hipEventInterprocess flag is set.\n #hipEventDisableSystemFence : Disable acquire and release system scope fence. This may\nimprove performance but device memory may not be visible to the host and other devices\nif this flag is set.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue,\n#hipErrorLaunchFailure, #hipErrorOutOfMemory\n\n @see hipEventCreate, hipEventSynchronize, hipEventDestroy, hipEventElapsedTime"]
pub fn hipEventCreateWithFlags(
event: *mut hipEvent_t,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " Create an event\n\n @param[in,out] event Returns the newly created event.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue,\n #hipErrorLaunchFailure, #hipErrorOutOfMemory\n\n @see hipEventCreateWithFlags, hipEventRecord, hipEventQuery, hipEventSynchronize,\n hipEventDestroy, hipEventElapsedTime"]
pub fn hipEventCreate(event: *mut hipEvent_t) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipEventRecord(event: hipEvent_t, stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroy the specified event.\n\n @param[in] event Event to destroy.\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue,\n #hipErrorLaunchFailure\n\n Releases memory associated with the event. If the event is recording but has not completed\n recording when hipEventDestroy() is called, the function will return immediately and the\n completion_future resources will be released later, when the hipDevice is synchronized.\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventSynchronize, hipEventRecord,\n hipEventElapsedTime\n\n @returns #hipSuccess"]
pub fn hipEventDestroy(event: hipEvent_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Wait for an event to complete.\n\n This function will block until the event is ready, waiting for all previous work in the stream\n specified when event was recorded with hipEventRecord().\n\n If hipEventRecord() has not been called on @p event, this function returns immediately.\n\n TODO-hip- This function needs to support hipEventBlockingSync parameter.\n\n @param[in] event Event on which to wait.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized,\n #hipErrorInvalidHandle, #hipErrorLaunchFailure\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventDestroy, hipEventRecord,\n hipEventElapsedTime"]
pub fn hipEventSynchronize(event: hipEvent_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Return the elapsed time between two events.\n\n @param[out] ms : Return time between start and stop in ms.\n @param[in] start : Start event.\n @param[in] stop : Stop event.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotReady, #hipErrorInvalidHandle,\n #hipErrorNotInitialized, #hipErrorLaunchFailure\n\n Computes the elapsed time between two events. Time is computed in ms, with\n a resolution of approximately 1 us.\n\n Events which are recorded in a NULL stream will block until all commands\n on all other streams complete execution, and then record the timestamp.\n\n Events which are recorded in a non-NULL stream will record their timestamp\n when they reach the head of the specified stream, after all previous\n commands in that stream have completed executing. Thus the time that\n the event recorded may be significantly after the host calls hipEventRecord().\n\n If hipEventRecord() has not been called on either event, then #hipErrorInvalidHandle is\n returned. If hipEventRecord() has been called on both events, but the timestamp has not yet been\n recorded on one or both events (that is, hipEventQuery() would return #hipErrorNotReady on at\n least one of the events), then #hipErrorNotReady is returned.\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventDestroy, hipEventRecord,\n hipEventSynchronize"]
pub fn hipEventElapsedTime(ms: *mut f32, start: hipEvent_t, stop: hipEvent_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Query event status\n\n @param[in] event Event to query.\n @returns #hipSuccess, #hipErrorNotReady, #hipErrorInvalidHandle, #hipErrorInvalidValue,\n #hipErrorNotInitialized, #hipErrorLaunchFailure\n\n Query the status of the specified event. This function will return #hipSuccess if all\n commands in the appropriate stream (specified to hipEventRecord()) have completed. If that work\n has not completed, or if hipEventRecord() was not called on the event, then #hipErrorNotReady is\n returned.\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventRecord, hipEventDestroy,\n hipEventSynchronize, hipEventElapsedTime"]
pub fn hipEventQuery(event: hipEvent_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets information on the specified pointer.[BETA]\n\n @param [in] value sets pointer attribute value\n @param [in] atribute attribute to set\n @param [in] ptr pointer to set attributes for\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @beta This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipPointerSetAttribute(
value: *const ::std::os::raw::c_void,
attribute: hipPointer_attribute,
ptr: hipDeviceptr_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Return attributes for the specified pointer\n\n @param [out] attributes attributes for the specified pointer\n @param [in] ptr pointer to get attributes for\n\n @note To get pointer's memory type, the parameter attributes has 'type' as member variable.\n The 'type' indicates input pointer is allocated on device or host. That means the input\n pointer must be returned or passed through an HIP API such as hipHostMalloc, hipMallocManaged,\n hipHostRegister, etc. Otherwise, the pointer couldn't be handled by this API and attributes\n returned hipErrorInvalidValue, due to the hipMemoryType enums values, unrecognized memory type\n is currently not supported due to HIP functionality backward compatibility.\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see hipPointerGetAttribute\n"]
pub fn hipPointerGetAttributes(
attributes: *mut hipPointerAttribute_t,
ptr: *const ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns information about the specified pointer.[BETA]\n\n @param [in, out] data returned pointer attribute value\n @param [in] atribute attribute to query for\n @param [in] ptr pointer to get attributes for\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @beta This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @see hipPointerGetAttributes"]
pub fn hipPointerGetAttribute(
data: *mut ::std::os::raw::c_void,
attribute: hipPointer_attribute,
ptr: hipDeviceptr_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns information about the specified pointer.[BETA]\n\n @param [in] numAttributes number of attributes to query for\n @param [in] attributes attributes to query for\n @param [in, out] data a two-dimensional containing pointers to memory locations\n where the result of each attribute query will be written to\n @param [in] ptr pointer to get attributes for\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @beta This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @see hipPointerGetAttribute"]
pub fn hipDrvPointerGetAttributes(
numAttributes: ::std::os::raw::c_uint,
attributes: *mut hipPointer_attribute,
data: *mut *mut ::std::os::raw::c_void,
ptr: hipDeviceptr_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = "-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup External External Resource Interoperability\n @{\n @ingroup API\n\n This section describes the external resource interoperability functions of HIP runtime API.\n\n/\n/**\n @brief Imports an external semaphore.\n\n @param[out] extSem_out External semaphores to be waited on\n @param[in] semHandleDesc Semaphore import handle descriptor\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"]
pub fn hipImportExternalSemaphore(
extSem_out: *mut hipExternalSemaphore_t,
semHandleDesc: *const hipExternalSemaphoreHandleDesc,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Signals a set of external semaphore objects.\n\n @param[in] extSem_out External semaphores to be waited on\n @param[in] paramsArray Array of semaphore parameters\n @param[in] numExtSems Number of semaphores to wait on\n @param[in] stream Stream to enqueue the wait operations in\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"]
pub fn hipSignalExternalSemaphoresAsync(
extSemArray: *const hipExternalSemaphore_t,
paramsArray: *const hipExternalSemaphoreSignalParams,
numExtSems: ::std::os::raw::c_uint,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Waits on a set of external semaphore objects\n\n @param[in] extSem_out External semaphores to be waited on\n @param[in] paramsArray Array of semaphore parameters\n @param[in] numExtSems Number of semaphores to wait on\n @param[in] stream Stream to enqueue the wait operations in\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"]
pub fn hipWaitExternalSemaphoresAsync(
extSemArray: *const hipExternalSemaphore_t,
paramsArray: *const hipExternalSemaphoreWaitParams,
numExtSems: ::std::os::raw::c_uint,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroys an external semaphore object and releases any references to the underlying resource. Any outstanding signals or waits must have completed before the semaphore is destroyed.\n\n @param[in] extSem handle to an external memory object\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"]
pub fn hipDestroyExternalSemaphore(extSem: hipExternalSemaphore_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Imports an external memory object.\n\n @param[out] extMem_out Returned handle to an external memory object\n @param[in] memHandleDesc Memory import handle descriptor\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"]
pub fn hipImportExternalMemory(
extMem_out: *mut hipExternalMemory_t,
memHandleDesc: *const hipExternalMemoryHandleDesc,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Maps a buffer onto an imported memory object.\n\n @param[out] devPtr Returned device pointer to buffer\n @param[in] extMem Handle to external memory object\n @param[in] bufferDesc Buffer descriptor\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"]
pub fn hipExternalMemoryGetMappedBuffer(
devPtr: *mut *mut ::std::os::raw::c_void,
extMem: hipExternalMemory_t,
bufferDesc: *const hipExternalMemoryBufferDesc,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroys an external memory object.\n\n @param[in] extMem External memory object to be destroyed\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"]
pub fn hipDestroyExternalMemory(extMem: hipExternalMemory_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @}"]
pub fn hipMalloc(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Allocate memory on the default accelerator\n\n @param[out] ptr Pointer to the allocated memory\n @param[in] size Requested memory size\n @param[in] flags Type of memory allocation\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @return #hipSuccess, #hipErrorOutOfMemory, #hipErrorInvalidValue (bad context, null *ptr)\n\n @see hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D, hipMalloc3DArray,\n hipHostFree, hipHostMalloc"]
pub fn hipExtMallocWithFlags(
ptr: *mut *mut ::std::os::raw::c_void,
sizeBytes: usize,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Allocate pinned host memory [Deprecated]\n\n @param[out] ptr Pointer to the allocated host pinned memory\n @param[in] size Requested memory size\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @return #hipSuccess, #hipErrorOutOfMemory\n\n @warning This API is deprecated use hipHostMalloc() instead"]
pub fn hipMallocHost(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Allocate pinned host memory [Deprecated]\n\n @param[out] ptr Pointer to the allocated host pinned memory\n @param[in] size Requested memory size\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @return #hipSuccess, #hipErrorOutOfMemory\n\n @warning This API is deprecated, use hipHostMalloc() instead"]
pub fn hipMemAllocHost(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Allocates device accessible page locked (pinned) host memory\n\n This API allocates pinned host memory which is mapped into the address space of all GPUs\n in the system, the memory can be accessed directly by the GPU device, and can be read or\n written with much higher bandwidth than pageable memory obtained with functions such as\n malloc().\n\n Using the pinned host memory, applications can implement faster data transfers for HostToDevice\n and DeviceToHost. The runtime tracks the hipHostMalloc allocations and can avoid some of the\n setup required for regular unpinned memory.\n\n When the memory accesses are infrequent, zero-copy memory can be a good choice, for coherent\n allocation. GPU can directly access the host memory over the CPU/GPU interconnect, without need\n to copy the data.\n\n Currently the allocation granularity is 4KB for the API.\n\n Developers need to choose proper allocation flag with consideration of synchronization.\n\n @param[out] ptr Pointer to the allocated host pinned memory\n @param[in] size Requested memory size in bytes\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n @param[in] flags Type of host memory allocation\n\n If no input for flags, it will be the default pinned memory allocation on the host.\n\n @return #hipSuccess, #hipErrorOutOfMemory\n\n @see hipSetDeviceFlags, hipHostFree"]
pub fn hipHostMalloc(
ptr: *mut *mut ::std::os::raw::c_void,
size: usize,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = "-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup MemoryM Managed Memory\n\n @ingroup Memory\n @{\n This section describes the managed memory management functions of HIP runtime API.\n\n @note The managed memory management APIs are implemented on Linux, under developement\n on Windows.\n\n/\n/**\n @brief Allocates memory that will be automatically managed by HIP.\n\n This API is used for managed memory, allows data be shared and accessible to both CPU and\n GPU using a single pointer.\n\n The API returns the allocation pointer, managed by HMM, can be used further to execute kernels\n on device and fetch data between the host and device as needed.\n\n @note It is recommend to do the capability check before call this API.\n\n @param [out] dev_ptr - pointer to allocated device memory\n @param [in] size - requested allocation size in bytes, it should be granularity of 4KB\n @param [in] flags - must be either hipMemAttachGlobal or hipMemAttachHost\n (defaults to hipMemAttachGlobal)\n\n @returns #hipSuccess, #hipErrorMemoryAllocation, #hipErrorNotSupported, #hipErrorInvalidValue\n"]
pub fn hipMallocManaged(
dev_ptr: *mut *mut ::std::os::raw::c_void,
size: usize,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Prefetches memory to the specified destination device using HIP.\n\n @param [in] dev_ptr pointer to be prefetched\n @param [in] count size in bytes for prefetching\n @param [in] device destination device to prefetch to\n @param [in] stream stream to enqueue prefetch operation\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPrefetchAsync(
dev_ptr: *const ::std::os::raw::c_void,
count: usize,
device: ::std::os::raw::c_int,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Advise about the usage of a given memory range to HIP.\n\n @param [in] dev_ptr pointer to memory to set the advice for\n @param [in] count size in bytes of the memory range, it should be CPU page size alligned.\n @param [in] advice advice to be applied for the specified memory range\n @param [in] device device to apply the advice for\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n This HIP API advises about the usage to be applied on unified memory allocation in the\n range starting from the pointer address devPtr, with the size of count bytes. The memory range\n must refer to managed memory allocated via the API hipMallocManaged, and the range will be\n handled with proper round down and round up respectively in the driver to be aligned to\n CPU page size.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemAdvise(
dev_ptr: *const ::std::os::raw::c_void,
count: usize,
advice: hipMemoryAdvise,
device: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Query an attribute of a given memory range in HIP.\n\n @param [in,out] data a pointer to a memory location where the result of each\n attribute query will be written to\n @param [in] data_size the size of data\n @param [in] attribute the attribute to query\n @param [in] dev_ptr start of the range to query\n @param [in] count size of the range to query\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemRangeGetAttribute(
data: *mut ::std::os::raw::c_void,
data_size: usize,
attribute: hipMemRangeAttribute,
dev_ptr: *const ::std::os::raw::c_void,
count: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Query attributes of a given memory range in HIP.\n\n @param [in,out] data a two-dimensional array containing pointers to memory locations\n where the result of each attribute query will be written to\n @param [in] data_sizes an array, containing the sizes of each result\n @param [in] attributes the attribute to query\n @param [in] num_attributes an array of attributes to query (numAttributes and the number\n of attributes in this array should match)\n @param [in] dev_ptr start of the range to query\n @param [in] count size of the range to query\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemRangeGetAttributes(
data: *mut *mut ::std::os::raw::c_void,
data_sizes: *mut usize,
attributes: *mut hipMemRangeAttribute,
num_attributes: usize,
dev_ptr: *const ::std::os::raw::c_void,
count: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Attach memory to a stream asynchronously in HIP.\n\n @param [in] stream - stream in which to enqueue the attach operation\n @param [in] dev_ptr - pointer to memory (must be a pointer to managed memory or\n to a valid host-accessible region of system-allocated memory)\n @param [in] length - length of memory (defaults to zero)\n @param [in] flags - must be one of hipMemAttachGlobal, hipMemAttachHost or\n hipMemAttachSingle (defaults to hipMemAttachSingle)\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipStreamAttachMemAsync(
stream: hipStream_t,
dev_ptr: *mut ::std::os::raw::c_void,
length: usize,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Allocates memory with stream ordered semantics\n\n Inserts a memory allocation operation into @p stream.\n A pointer to the allocated memory is returned immediately in *dptr.\n The allocation must not be accessed until the the allocation operation completes.\n The allocation comes from the memory pool associated with the stream's device.\n\n @note The default memory pool of a device contains device memory from that device.\n @note Basic stream ordering allows future work submitted into the same stream to use the\n allocation. Stream query, stream synchronize, and HIP events can be used to guarantee that\n the allocation operation completes before work submitted in a separate stream runs.\n @note During stream capture, this function results in the creation of an allocation node.\n In this case, the allocation is owned by the graph instead of the memory pool. The memory\n pool's properties are used to set the node's creation parameters.\n\n @param [out] dev_ptr Returned device pointer of memory allocation\n @param [in] size Number of bytes to allocate\n @param [in] stream The stream establishing the stream ordering contract and\n the memory pool to allocate from\n\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported, #hipErrorOutOfMemory\n\n @see hipMallocFromPoolAsync, hipFreeAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMallocAsync(
dev_ptr: *mut *mut ::std::os::raw::c_void,
size: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Frees memory with stream ordered semantics\n\n Inserts a free operation into @p stream.\n The allocation must not be used after stream execution reaches the free.\n After this API returns, accessing the memory from any subsequent work launched on the GPU\n or querying its pointer attributes results in undefined behavior.\n\n @note During stream capture, this function results in the creation of a free node and\n must therefore be passed the address of a graph allocation.\n\n @param [in] dev_ptr Pointer to device memory to free\n @param [in] stream The stream, where the destruciton will occur according to the execution order\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipFreeAsync(dev_ptr: *mut ::std::os::raw::c_void, stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Releases freed memory back to the OS\n\n Releases memory back to the OS until the pool contains fewer than @p min_bytes_to_keep\n reserved bytes, or there is no more memory that the allocator can safely release.\n The allocator cannot release OS allocations that back outstanding asynchronous allocations.\n The OS allocations may happen at different granularity from the user allocations.\n\n @note: Allocations that have not been freed count as outstanding.\n @note: Allocations that have been asynchronously freed but whose completion has\n not been observed on the host (eg. by a synchronize) can count as outstanding.\n\n @param[in] mem_pool The memory pool to trim allocations\n @param[in] min_bytes_to_hold If the pool has less than min_bytes_to_hold reserved,\n then the TrimTo operation is a no-op. Otherwise the memory pool will contain\n at least min_bytes_to_hold bytes reserved after the operation.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPoolTrimTo(mem_pool: hipMemPool_t, min_bytes_to_hold: usize) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets attributes of a memory pool\n\n Supported attributes are:\n - @p hipMemPoolAttrReleaseThreshold: (value type = cuuint64_t)\n Amount of reserved memory in bytes to hold onto before trying\n to release memory back to the OS. When more than the release\n threshold bytes of memory are held by the memory pool, the\n allocator will try to release memory back to the OS on the\n next call to stream, event or context synchronize. (default 0)\n - @p hipMemPoolReuseFollowEventDependencies: (value type = int)\n Allow @p hipMallocAsync to use memory asynchronously freed\n in another stream as long as a stream ordering dependency\n of the allocating stream on the free action exists.\n HIP events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)\n - @p hipMemPoolReuseAllowOpportunistic: (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)\n - @p hipMemPoolReuseAllowInternalDependencies: (value type = int)\n Allow @p hipMallocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by @p hipFreeAsync (default enabled).\n\n @param [in] mem_pool The memory pool to modify\n @param [in] attr The attribute to modify\n @param [in] value Pointer to the value to assign\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPoolSetAttribute(
mem_pool: hipMemPool_t,
attr: hipMemPoolAttr,
value: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets attributes of a memory pool\n\n Supported attributes are:\n - @p hipMemPoolAttrReleaseThreshold: (value type = cuuint64_t)\n Amount of reserved memory in bytes to hold onto before trying\n to release memory back to the OS. When more than the release\n threshold bytes of memory are held by the memory pool, the\n allocator will try to release memory back to the OS on the\n next call to stream, event or context synchronize. (default 0)\n - @p hipMemPoolReuseFollowEventDependencies: (value type = int)\n Allow @p hipMallocAsync to use memory asynchronously freed\n in another stream as long as a stream ordering dependency\n of the allocating stream on the free action exists.\n HIP events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)\n - @p hipMemPoolReuseAllowOpportunistic: (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)\n - @p hipMemPoolReuseAllowInternalDependencies: (value type = int)\n Allow @p hipMallocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by @p hipFreeAsync (default enabled).\n\n @param [in] mem_pool The memory pool to get attributes of\n @param [in] attr The attribute to get\n @param [in] value Retrieved value\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPoolGetAttribute(
mem_pool: hipMemPool_t,
attr: hipMemPoolAttr,
value: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Controls visibility of the specified pool between devices\n\n @param [in] mem_pool Memory pool for acccess change\n @param [in] desc_list Array of access descriptors. Each descriptor instructs the access to enable for a single gpu\n @param [in] count Number of descriptors in the map array.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPoolSetAccess(
mem_pool: hipMemPool_t,
desc_list: *const hipMemAccessDesc,
count: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns the accessibility of a pool from a device\n\n Returns the accessibility of the pool's memory from the specified location.\n\n @param [out] flags Accessibility of the memory pool from the specified location/device\n @param [in] mem_pool Memory pool being queried\n @param [in] location Location/device for memory pool access\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPoolGetAccess(
flags: *mut hipMemAccessFlags,
mem_pool: hipMemPool_t,
location: *mut hipMemLocation,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a memory pool\n\n Creates a HIP memory pool and returns the handle in @p mem_pool. The @p pool_props determines\n the properties of the pool such as the backing device and IPC capabilities.\n\n By default, the memory pool will be accessible from the device it is allocated on.\n\n @param [out] mem_pool Contains createed memory pool\n @param [in] pool_props Memory pool properties\n\n @note Specifying hipMemHandleTypeNone creates a memory pool that will not support IPC.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolDestroy,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPoolCreate(
mem_pool: *mut hipMemPool_t,
pool_props: *const hipMemPoolProps,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroys the specified memory pool\n\n If any pointers obtained from this pool haven't been freed or\n the pool has free operations that haven't completed\n when @p hipMemPoolDestroy is invoked, the function will return immediately and the\n resources associated with the pool will be released automatically\n once there are no more outstanding allocations.\n\n Destroying the current mempool of a device sets the default mempool of\n that device as the current mempool for that device.\n\n @param [in] mem_pool Memory pool for destruction\n\n @note A device's default memory pool cannot be destroyed.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolCreate\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPoolDestroy(mem_pool: hipMemPool_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Allocates memory from a specified pool with stream ordered semantics.\n\n Inserts an allocation operation into @p stream.\n A pointer to the allocated memory is returned immediately in @p dev_ptr.\n The allocation must not be accessed until the the allocation operation completes.\n The allocation comes from the specified memory pool.\n\n @note The specified memory pool may be from a device different than that of the specified @p stream.\n\n Basic stream ordering allows future work submitted into the same stream to use the allocation.\n Stream query, stream synchronize, and HIP events can be used to guarantee that the allocation\n operation completes before work submitted in a separate stream runs.\n\n @note During stream capture, this function results in the creation of an allocation node. In this case,\n the allocation is owned by the graph instead of the memory pool. The memory pool's properties\n are used to set the node's creation parameters.\n\n @param [out] dev_ptr Returned device pointer\n @param [in] size Number of bytes to allocate\n @param [in] mem_pool The pool to allocate from\n @param [in] stream The stream establishing the stream ordering semantic\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported, #hipErrorOutOfMemory\n\n @see hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolCreate\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess,\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMallocFromPoolAsync(
dev_ptr: *mut *mut ::std::os::raw::c_void,
size: usize,
mem_pool: hipMemPool_t,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Exports a memory pool to the requested handle type.\n\n Given an IPC capable mempool, create an OS handle to share the pool with another process.\n A recipient process can convert the shareable handle into a mempool with @p hipMemPoolImportFromShareableHandle.\n Individual pointers can then be shared with the @p hipMemPoolExportPointer and @p hipMemPoolImportPointer APIs.\n The implementation of what the shareable handle is and how it can be transferred is defined by the requested\n handle type.\n\n @note: To create an IPC capable mempool, create a mempool with a @p hipMemAllocationHandleType other\n than @p hipMemHandleTypeNone.\n\n @param [out] shared_handle Pointer to the location in which to store the requested handle\n @param [in] mem_pool Pool to export\n @param [in] handle_type The type of handle to create\n @param [in] flags Must be 0\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorOutOfMemory\n\n @see hipMemPoolImportFromShareableHandle\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPoolExportToShareableHandle(
shared_handle: *mut ::std::os::raw::c_void,
mem_pool: hipMemPool_t,
handle_type: hipMemAllocationHandleType,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Imports a memory pool from a shared handle.\n\n Specific allocations can be imported from the imported pool with @p hipMemPoolImportPointer.\n\n @note Imported memory pools do not support creating new allocations.\n As such imported memory pools may not be used in @p hipDeviceSetMemPool\n or @p hipMallocFromPoolAsync calls.\n\n @param [out] mem_pool Returned memory pool\n @param [in] shared_handle OS handle of the pool to open\n @param [in] handle_type The type of handle being imported\n @param [in] flags Must be 0\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorOutOfMemory\n\n @see hipMemPoolExportToShareableHandle\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPoolImportFromShareableHandle(
mem_pool: *mut hipMemPool_t,
shared_handle: *mut ::std::os::raw::c_void,
handle_type: hipMemAllocationHandleType,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Export data to share a memory pool allocation between processes.\n\n Constructs @p export_data for sharing a specific allocation from an already shared memory pool.\n The recipient process can import the allocation with the @p hipMemPoolImportPointer api.\n The data is not a handle and may be shared through any IPC mechanism.\n\n @param[out] export_data Returned export data\n @param[in] dev_ptr Pointer to memory being exported\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorOutOfMemory\n\n @see hipMemPoolImportPointer\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPoolExportPointer(
export_data: *mut hipMemPoolPtrExportData,
dev_ptr: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Import a memory pool allocation from another process.\n\n Returns in @p dev_ptr a pointer to the imported memory.\n The imported memory must not be accessed before the allocation operation completes\n in the exporting process. The imported memory must be freed from all importing processes before\n being freed in the exporting process. The pointer may be freed with @p hipFree\n or @p hipFreeAsync. If @p hipFreeAsync is used, the free must be completed\n on the importing process before the free operation on the exporting process.\n\n @note The @p hipFreeAsync api may be used in the exporting process before\n the @p hipFreeAsync operation completes in its stream as long as the\n @p hipFreeAsync in the exporting process specifies a stream with\n a stream dependency on the importing process's @p hipFreeAsync.\n\n @param [out] dev_ptr Pointer to imported memory\n @param [in] mem_pool Memory pool from which to import a pointer\n @param [in] export_data Data specifying the memory to import\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized, #hipErrorOutOfMemory\n\n @see hipMemPoolExportPointer\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemPoolImportPointer(
dev_ptr: *mut *mut ::std::os::raw::c_void,
mem_pool: hipMemPool_t,
export_data: *mut hipMemPoolPtrExportData,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Allocate device accessible page locked host memory [Deprecated]\n\n @param[out] ptr Pointer to the allocated host pinned memory\n @param[in] size Requested memory size in bytes\n @param[in] flags Type of host memory allocation\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @return #hipSuccess, #hipErrorOutOfMemory\n\n @warning This API is deprecated, use hipHostMalloc() instead"]
pub fn hipHostAlloc(
ptr: *mut *mut ::std::os::raw::c_void,
size: usize,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get Device pointer from Host Pointer allocated through hipHostMalloc\n\n @param[out] dstPtr Device Pointer mapped to passed host pointer\n @param[in] hstPtr Host Pointer allocated through hipHostMalloc\n @param[in] flags Flags to be passed for extension\n\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorOutOfMemory\n\n @see hipSetDeviceFlags, hipHostMalloc"]
pub fn hipHostGetDevicePointer(
devPtr: *mut *mut ::std::os::raw::c_void,
hstPtr: *mut ::std::os::raw::c_void,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Return flags associated with host pointer\n\n @param[out] flagsPtr Memory location to store flags\n @param[in] hostPtr Host Pointer allocated through hipHostMalloc\n @return #hipSuccess, #hipErrorInvalidValue\n\n @see hipHostMalloc"]
pub fn hipHostGetFlags(
flagsPtr: *mut ::std::os::raw::c_uint,
hostPtr: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Register host memory so it can be accessed from the current device.\n\n @param[out] hostPtr Pointer to host memory to be registered.\n @param[in] sizeBytes size of the host memory\n @param[in] flags. See below.\n\n Flags:\n - #hipHostRegisterDefault Memory is Mapped and Portable\n - #hipHostRegisterPortable Memory is considered registered by all contexts. HIP only supports\n one context so this is always assumed true.\n - #hipHostRegisterMapped Map the allocation into the address space for the current device.\n The device pointer can be obtained with #hipHostGetDevicePointer.\n\n\n After registering the memory, use #hipHostGetDevicePointer to obtain the mapped device pointer.\n On many systems, the mapped device pointer will have a different value than the mapped host\n pointer. Applications must use the device pointer in device code, and the host pointer in device\n code.\n\n On some systems, registered memory is pinned. On some systems, registered memory may not be\n actually be pinned but uses OS or hardware facilities to all GPU access to the host memory.\n\n Developers are strongly encouraged to register memory blocks which are aligned to the host\n cache-line size. (typically 64-bytes but can be obtains from the CPUID instruction).\n\n If registering non-aligned pointers, the application must take care when register pointers from\n the same cache line on different devices. HIP's coarse-grained synchronization model does not\n guarantee correct results if different devices write to different parts of the same cache block -\n typically one of the writes will \"win\" and overwrite data from the other registered memory\n region.\n\n @return #hipSuccess, #hipErrorOutOfMemory\n\n @see hipHostUnregister, hipHostGetFlags, hipHostGetDevicePointer"]
pub fn hipHostRegister(
hostPtr: *mut ::std::os::raw::c_void,
sizeBytes: usize,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Un-register host pointer\n\n @param[in] hostPtr Host pointer previously registered with #hipHostRegister\n @return Error code\n\n @see hipHostRegister"]
pub fn hipHostUnregister(hostPtr: *mut ::std::os::raw::c_void) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " Allocates at least width (in bytes) * height bytes of linear memory\n Padding may occur to ensure alighnment requirements are met for the given row\n The change in width size due to padding will be returned in *pitch.\n Currently the alignment is set to 128 bytes\n\n @param[out] ptr Pointer to the allocated device memory\n @param[out] pitch Pitch for allocation (in bytes)\n @param[in] width Requested pitched allocation width (in bytes)\n @param[in] height Requested pitched allocation height\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @return Error code\n\n @see hipMalloc, hipFree, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc"]
pub fn hipMallocPitch(
ptr: *mut *mut ::std::os::raw::c_void,
pitch: *mut usize,
width: usize,
height: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " Allocates at least width (in bytes) * height bytes of linear memory\n Padding may occur to ensure alighnment requirements are met for the given row\n The change in width size due to padding will be returned in *pitch.\n Currently the alignment is set to 128 bytes\n\n @param[out] dptr Pointer to the allocated device memory\n @param[out] pitch Pitch for allocation (in bytes)\n @param[in] width Requested pitched allocation width (in bytes)\n @param[in] height Requested pitched allocation height\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n The intended usage of pitch is as a separate parameter of the allocation, used to compute addresses within the 2D array.\n Given the row and column of an array element of type T, the address is computed as:\n T* pElement = (T*)((char*)BaseAddress + Row * Pitch) + Column;\n\n @return Error code\n\n @see hipMalloc, hipFree, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc"]
pub fn hipMemAllocPitch(
dptr: *mut hipDeviceptr_t,
pitch: *mut usize,
widthInBytes: usize,
height: usize,
elementSizeBytes: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Free memory allocated by the hcc hip memory allocation API.\n This API performs an implicit hipDeviceSynchronize() call.\n If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.\n\n @param[in] ptr Pointer to memory to be freed\n @return #hipSuccess\n @return #hipErrorInvalidDevicePointer (if pointer is invalid, including host pointers allocated\n with hipHostMalloc)\n\n @see hipMalloc, hipMallocPitch, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc"]
pub fn hipFree(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Free memory allocated by the hcc hip host memory allocation API [Deprecated]\n\n @param[in] ptr Pointer to memory to be freed\n @return #hipSuccess, #hipErrorInvalidValue (if pointer is invalid, including device pointers\n allocated with hipMalloc)\n\n @warning This API is deprecated, use hipHostFree() instead"]
pub fn hipFreeHost(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Free memory allocated by the hcc hip host memory allocation API\n This API performs an implicit hipDeviceSynchronize() call.\n If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.\n\n @param[in] ptr Pointer to memory to be freed\n @return #hipSuccess,\n #hipErrorInvalidValue (if pointer is invalid, including device pointers allocated with\n hipMalloc)\n\n @see hipMalloc, hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc"]
pub fn hipHostFree(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copy data from src to dst.\n\n It supports memory from host to device,\n device to host, device to device and host to host\n The src and dst must not overlap.\n\n For hipMemcpy, the copy is always performed by the current device (set by hipSetDevice).\n For multi-gpu or peer-to-peer configurations, it is recommended to set the current device to the\n device where the src data is physically located. For optimal peer-to-peer copies, the copy device\n must be able to access the src and dst pointers (by calling hipDeviceEnablePeerAccess with copy\n agent as the current device and src/dest as the peerDevice argument. if this is not done, the\n hipMemcpy will still work, but will perform the copy using a staging buffer on the host.\n Calling hipMemcpy with dst and src pointers that do not match the hipMemcpyKind results in\n undefined behavior.\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] copyType Memory copy type\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree, #hipErrorUnknown\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
pub fn hipMemcpy(
dst: *mut ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
sizeBytes: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Memory copy on the stream.\n It allows single or multiple devices to do memory copy on single or multiple streams.\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] copyType Memory copy type\n @param[in] stream Valid stream\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree, #hipErrorUnknown, #hipErrorContextIsDestroyed\n\n @see hipMemcpy, hipStreamCreate, hipStreamSynchronize, hipStreamDestroy, hipSetDevice, hipLaunchKernelGGL\n"]
pub fn hipMemcpyWithStream(
dst: *mut ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
sizeBytes: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copy data from Host to Device\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n\n @return #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
pub fn hipMemcpyHtoD(
dst: hipDeviceptr_t,
src: *mut ::std::os::raw::c_void,
sizeBytes: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copy data from Device to Host\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n\n @return #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
pub fn hipMemcpyDtoH(
dst: *mut ::std::os::raw::c_void,
src: hipDeviceptr_t,
sizeBytes: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copy data from Device to Device\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n\n @return #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
pub fn hipMemcpyDtoD(dst: hipDeviceptr_t, src: hipDeviceptr_t, sizeBytes: usize) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copy data from Host to Device asynchronously\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n\n @return #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
pub fn hipMemcpyHtoDAsync(
dst: hipDeviceptr_t,
src: *mut ::std::os::raw::c_void,
sizeBytes: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copy data from Device to Host asynchronously\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n\n @return #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
pub fn hipMemcpyDtoHAsync(
dst: *mut ::std::os::raw::c_void,
src: hipDeviceptr_t,
sizeBytes: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copy data from Device to Device asynchronously\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n\n @return #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
pub fn hipMemcpyDtoDAsync(
dst: hipDeviceptr_t,
src: hipDeviceptr_t,
sizeBytes: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns a global pointer from a module.\n Returns in *dptr and *bytes the pointer and size of the global of name name located in module hmod.\n If no variable of that name exists, it returns hipErrorNotFound. Both parameters dptr and bytes are optional.\n If one of them is NULL, it is ignored and hipSuccess is returned.\n\n @param[out] dptr Returns global device pointer\n @param[out] bytes Returns global size in bytes\n @param[in] hmod Module to retrieve global from\n @param[in] name Name of global to retrieve\n\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotFound, #hipErrorInvalidContext\n"]
pub fn hipModuleGetGlobal(
dptr: *mut hipDeviceptr_t,
bytes: *mut usize,
hmod: hipModule_t,
name: *const ::std::os::raw::c_char,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets device pointer associated with symbol on the device.\n\n @param[out] devPtr pointer to the device associated the symbole\n @param[in] symbol pointer to the symbole of the device\n\n @return #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipGetSymbolAddress(
devPtr: *mut *mut ::std::os::raw::c_void,
symbol: *const ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the size of the given symbol on the device.\n\n @param[in] symbol pointer to the device symbole\n @param[out] size pointer to the size\n\n @return #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipGetSymbolSize(size: *mut usize, symbol: *const ::std::os::raw::c_void) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data to the given symbol on the device.\n Symbol HIP APIs allow a kernel to define a device-side data symbol which can be accessed on\n the host side. The symbol can be in __constant or device space.\n Note that the symbol name needs to be encased in the HIP_SYMBOL macro.\n This also applies to hipMemcpyFromSymbol, hipGetSymbolAddress, and hipGetSymbolSize.\n For detail usage, see the example at\n https://github.com/ROCm-Developer-Tools/HIP/blob/rocm-5.0.x/docs/markdown/hip_porting_guide.md\n\n @param[out] symbol pointer to the device symbole\n @param[in] src pointer to the source address\n @param[in] sizeBytes size in bytes to copy\n @param[in] offset offset in bytes from start of symbole\n @param[in] kind type of memory transfer\n\n @return #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipMemcpyToSymbol(
symbol: *const ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
sizeBytes: usize,
offset: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data to the given symbol on the device asynchronously.\n\n @param[out] symbol pointer to the device symbole\n @param[in] src pointer to the source address\n @param[in] sizeBytes size in bytes to copy\n @param[in] offset offset in bytes from start of symbole\n @param[in] kind type of memory transfer\n @param[in] stream stream identifier\n\n @return #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipMemcpyToSymbolAsync(
symbol: *const ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
sizeBytes: usize,
offset: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data from the given symbol on the device.\n\n @param[out] dptr Returns pointer to destinition memory address\n @param[in] symbol pointer to the symbole address on the device\n @param[in] sizeBytes size in bytes to copy\n @param[in] offset offset in bytes from the start of symbole\n @param[in] kind type of memory transfer\n\n @return #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipMemcpyFromSymbol(
dst: *mut ::std::os::raw::c_void,
symbol: *const ::std::os::raw::c_void,
sizeBytes: usize,
offset: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data from the given symbol on the device asynchronously.\n\n @param[out] dptr Returns pointer to destinition memory address\n @param[in] symbol pointer to the symbole address on the device\n @param[in] sizeBytes size in bytes to copy\n @param[in] offset offset in bytes from the start of symbole\n @param[in] kind type of memory transfer\n @param[in] stream stream identifier\n\n @return #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipMemcpyFromSymbolAsync(
dst: *mut ::std::os::raw::c_void,
symbol: *const ::std::os::raw::c_void,
sizeBytes: usize,
offset: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copy data from src to dst asynchronously.\n\n @warning If host or dest are not pinned, the memory copy will be performed synchronously. For\n best performance, use hipHostMalloc to allocate host memory that is transferred asynchronously.\n\n @warning on HCC hipMemcpyAsync does not support overlapped H2D and D2H copies.\n For hipMemcpy, the copy is always performed by the device associated with the specified stream.\n\n For multi-gpu or peer-to-peer configurations, it is recommended to use a stream which is a\n attached to the device where the src data is physically located. For optimal peer-to-peer copies,\n the copy device must be able to access the src and dst pointers (by calling\n hipDeviceEnablePeerAccess with copy agent as the current device and src/dest as the peerDevice\n argument. if this is not done, the hipMemcpy will still work, but will perform the copy using a\n staging buffer on the host.\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] accelerator_view Accelerator view which the copy is being enqueued\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree, #hipErrorUnknown\n\n @see hipMemcpy, hipMemcpy2D, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray,\n hipMemcpy2DFromArray, hipMemcpyArrayToArray, hipMemcpy2DArrayToArray, hipMemcpyToSymbol,\n hipMemcpyFromSymbol, hipMemcpy2DAsync, hipMemcpyToArrayAsync, hipMemcpy2DToArrayAsync,\n hipMemcpyFromArrayAsync, hipMemcpy2DFromArrayAsync, hipMemcpyToSymbolAsync,\n hipMemcpyFromSymbolAsync"]
pub fn hipMemcpyAsync(
dst: *mut ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
sizeBytes: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant\n byte value value.\n\n @param[out] dst Data being filled\n @param[in] constant value to be set\n @param[in] sizeBytes Data size in bytes\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
pub fn hipMemset(
dst: *mut ::std::os::raw::c_void,
value: ::std::os::raw::c_int,
sizeBytes: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant\n byte value value.\n\n @param[out] dst Data ptr to be filled\n @param[in] constant value to be set\n @param[in] number of values to be set\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
pub fn hipMemsetD8(
dest: hipDeviceptr_t,
value: ::std::os::raw::c_uchar,
count: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant\n byte value value.\n\n hipMemsetD8Async() is asynchronous with respect to the host, so the call may return before the\n memset is complete. The operation can optionally be associated to a stream by passing a non-zero\n stream argument. If stream is non-zero, the operation may overlap with operations in other\n streams.\n\n @param[out] dst Data ptr to be filled\n @param[in] constant value to be set\n @param[in] number of values to be set\n @param[in] stream - Stream identifier\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
pub fn hipMemsetD8Async(
dest: hipDeviceptr_t,
value: ::std::os::raw::c_uchar,
count: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant\n short value value.\n\n @param[out] dst Data ptr to be filled\n @param[in] constant value to be set\n @param[in] number of values to be set\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
pub fn hipMemsetD16(
dest: hipDeviceptr_t,
value: ::std::os::raw::c_ushort,
count: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant\n short value value.\n\n hipMemsetD16Async() is asynchronous with respect to the host, so the call may return before the\n memset is complete. The operation can optionally be associated to a stream by passing a non-zero\n stream argument. If stream is non-zero, the operation may overlap with operations in other\n streams.\n\n @param[out] dst Data ptr to be filled\n @param[in] constant value to be set\n @param[in] number of values to be set\n @param[in] stream - Stream identifier\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
pub fn hipMemsetD16Async(
dest: hipDeviceptr_t,
value: ::std::os::raw::c_ushort,
count: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills the memory area pointed to by dest with the constant integer\n value for specified number of times.\n\n @param[out] dst Data being filled\n @param[in] constant value to be set\n @param[in] number of values to be set\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
pub fn hipMemsetD32(
dest: hipDeviceptr_t,
value: ::std::os::raw::c_int,
count: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dev with the constant\n byte value value.\n\n hipMemsetAsync() is asynchronous with respect to the host, so the call may return before the\n memset is complete. The operation can optionally be associated to a stream by passing a non-zero\n stream argument. If stream is non-zero, the operation may overlap with operations in other\n streams.\n\n @param[out] dst Pointer to device memory\n @param[in] value - Value to set for each byte of specified memory\n @param[in] sizeBytes - Size in bytes to set\n @param[in] stream - Stream identifier\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree"]
pub fn hipMemsetAsync(
dst: *mut ::std::os::raw::c_void,
value: ::std::os::raw::c_int,
sizeBytes: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills the memory area pointed to by dev with the constant integer\n value for specified number of times.\n\n hipMemsetD32Async() is asynchronous with respect to the host, so the call may return before the\n memset is complete. The operation can optionally be associated to a stream by passing a non-zero\n stream argument. If stream is non-zero, the operation may overlap with operations in other\n streams.\n\n @param[out] dst Pointer to device memory\n @param[in] value - Value to set for each byte of specified memory\n @param[in] count - number of values to be set\n @param[in] stream - Stream identifier\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree"]
pub fn hipMemsetD32Async(
dst: hipDeviceptr_t,
value: ::std::os::raw::c_int,
count: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills the memory area pointed to by dst with the constant value.\n\n @param[out] dst Pointer to device memory\n @param[in] pitch - data size in bytes\n @param[in] value - constant value to be set\n @param[in] width\n @param[in] height\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree"]
pub fn hipMemset2D(
dst: *mut ::std::os::raw::c_void,
pitch: usize,
value: ::std::os::raw::c_int,
width: usize,
height: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills asynchronously the memory area pointed to by dst with the constant value.\n\n @param[in] dst Pointer to device memory\n @param[in] pitch - data size in bytes\n @param[in] value - constant value to be set\n @param[in] width\n @param[in] height\n @param[in] stream\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree"]
pub fn hipMemset2DAsync(
dst: *mut ::std::os::raw::c_void,
pitch: usize,
value: ::std::os::raw::c_int,
width: usize,
height: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills synchronously the memory area pointed to by pitchedDevPtr with the constant value.\n\n @param[in] pitchedDevPtr\n @param[in] value - constant value to be set\n @param[in] extent\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree"]
pub fn hipMemset3D(
pitchedDevPtr: hipPitchedPtr,
value: ::std::os::raw::c_int,
extent: hipExtent,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Fills asynchronously the memory area pointed to by pitchedDevPtr with the constant value.\n\n @param[in] pitchedDevPtr\n @param[in] value - constant value to be set\n @param[in] extent\n @param[in] stream\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree"]
pub fn hipMemset3DAsync(
pitchedDevPtr: hipPitchedPtr,
value: ::std::os::raw::c_int,
extent: hipExtent,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Query memory info.\n\n On ROCM, this function gets the actual free memory left on the current device, so supports\n the cases while running multi-workload (such as multiple processes, multiple threads, and\n multiple GPUs).\n\n @warning On Windows, the free memory only accounts for memory allocated by this process and may\n be optimistic.\n\n @param[out] free Returns free memory on the current device in bytes\n @param[out] total Returns total allocatable memory on the current device in bytes\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n"]
pub fn hipMemGetInfo(free: *mut usize, total: *mut usize) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get allocated memory size via memory pointer.\n\n This function gets the allocated shared virtual memory size from memory pointer.\n\n @param[in] ptr Pointer to allocated memory\n @param[out] size Returns the allocated memory size in bytes\n\n @return #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipMemPtrGetInfo(ptr: *mut ::std::os::raw::c_void, size: *mut usize) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Allocate an array on the device.\n\n @param[out] array Pointer to allocated array in device memory\n @param[in] desc Requested channel format\n @param[in] width Requested array allocation width\n @param[in] height Requested array allocation height\n @param[in] flags Requested properties of allocated array\n @return #hipSuccess, #hipErrorOutOfMemory\n\n @see hipMalloc, hipMallocPitch, hipFree, hipFreeArray, hipHostMalloc, hipHostFree"]
pub fn hipMallocArray(
array: *mut *mut hipArray,
desc: *const hipChannelFormatDesc,
width: usize,
height: usize,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Create an array memory pointer on the device.\n\n @param[out] pHandle Pointer to the array memory\n @param[in] pAllocateArray Requested array desciptor\n\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocArray, hipArrayDestroy, hipFreeArray"]
pub fn hipArrayCreate(
pHandle: *mut *mut hipArray,
pAllocateArray: *const HIP_ARRAY_DESCRIPTOR,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroy an array memory pointer on the device.\n\n @param[in] array Pointer to the array memory\n\n @return #hipSuccess, #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipFreeArray"]
pub fn hipArrayDestroy(array: *mut hipArray) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Create a 3D array memory pointer on the device.\n\n @param[out] array Pointer to the 3D array memory\n @param[in] pAllocateArray Requested array desciptor\n\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocArray, hipArrayDestroy, hipFreeArray"]
pub fn hipArray3DCreate(
array: *mut *mut hipArray,
pAllocateArray: *const HIP_ARRAY3D_DESCRIPTOR,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Create a 3D memory pointer on the device.\n\n @param[out] pitchedDevPtr Pointer to the 3D memory\n @param[in] extent Requested extent\n\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocPitch, hipMemGetInfo, hipFree"]
pub fn hipMalloc3D(pitchedDevPtr: *mut hipPitchedPtr, extent: hipExtent) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Frees an array on the device.\n\n @param[in] array Pointer to array to free\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized\n\n @see hipMalloc, hipMallocPitch, hipFree, hipMallocArray, hipHostMalloc, hipHostFree"]
pub fn hipFreeArray(array: *mut hipArray) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Allocate an array on the device.\n\n @param[out] array Pointer to allocated array in device memory\n @param[in] desc Requested channel format\n @param[in] extent Requested array allocation width, height and depth\n @param[in] flags Requested properties of allocated array\n @return #hipSuccess, #hipErrorOutOfMemory\n\n @see hipMalloc, hipMallocPitch, hipFree, hipFreeArray, hipHostMalloc, hipHostFree"]
pub fn hipMalloc3DArray(
array: *mut *mut hipArray,
desc: *const hipChannelFormatDesc,
extent: hipExtent,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets info about the specified array\n\n @param[out] desc - Returned array type\n @param[out] extent - Returned array shape. 2D arrays will have depth of zero\n @param[out] flags - Returned array flags\n @param[in] array - The HIP array to get info for\n\n @return #hipSuccess, #hipErrorInvalidValue #hipErrorInvalidHandle\n\n @see hipArrayGetDescriptor, hipArray3DGetDescriptor"]
pub fn hipArrayGetInfo(
desc: *mut hipChannelFormatDesc,
extent: *mut hipExtent,
flags: *mut ::std::os::raw::c_uint,
array: *mut hipArray,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets a 1D or 2D array descriptor\n\n @param[out] pArrayDescriptor - Returned array descriptor\n @param[in] array - Array to get descriptor of\n\n @return #hipSuccess, #hipErrorDeInitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue #hipErrorInvalidHandle\n\n @see hipArray3DCreate, hipArray3DGetDescriptor, hipArrayCreate, hipArrayDestroy, hipMemAlloc,\n hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned,\n hipMemcpy3D, hipMemcpy3DAsync, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync,\n hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync,\n hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoD, hipMemcpyHtoDAsync, hipMemFree,\n hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc,\n hipMemHostGetDevicePointer, hipMemsetD8, hipMemsetD16, hipMemsetD32, hipArrayGetInfo"]
pub fn hipArrayGetDescriptor(
pArrayDescriptor: *mut HIP_ARRAY_DESCRIPTOR,
array: *mut hipArray,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets a 3D array descriptor\n\n @param[out] pArrayDescriptor - Returned 3D array descriptor\n @param[in] array - 3D array to get descriptor of\n\n @return #hipSuccess, #hipErrorDeInitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue #hipErrorInvalidHandle, #hipErrorContextIsDestroyed\n\n @see hipArray3DCreate, hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc,\n hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned,\n hipMemcpy3D, hipMemcpy3DAsync, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync,\n hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync,\n hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoD, hipMemcpyHtoDAsync, hipMemFree,\n hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc,\n hipMemHostGetDevicePointer, hipMemsetD8, hipMemsetD16, hipMemsetD32, hipArrayGetInfo"]
pub fn hipArray3DGetDescriptor(
pArrayDescriptor: *mut HIP_ARRAY3D_DESCRIPTOR,
array: *mut hipArray,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] dpitch Pitch of destination memory\n @param[in] src Source memory address\n @param[in] spitch Pitch of source memory\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipMemcpy2D(
dst: *mut ::std::os::raw::c_void,
dpitch: usize,
src: *const ::std::os::raw::c_void,
spitch: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies memory for 2D arrays.\n @param[in] pCopy Parameters for the memory copy\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2D, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray,\n hipMemcpyToSymbol, hipMemcpyAsync"]
pub fn hipMemcpyParam2D(pCopy: *const hip_Memcpy2D) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies memory for 2D arrays.\n @param[in] pCopy Parameters for the memory copy\n @param[in] stream Stream to use\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2D, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray,\n hipMemcpyToSymbol, hipMemcpyAsync"]
pub fn hipMemcpyParam2DAsync(pCopy: *const hip_Memcpy2D, stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] dpitch Pitch of destination memory\n @param[in] src Source memory address\n @param[in] spitch Pitch of source memory\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n @param[in] stream Stream to use\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipMemcpy2DAsync(
dst: *mut ::std::os::raw::c_void,
dpitch: usize,
src: *const ::std::os::raw::c_void,
spitch: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] wOffset Destination starting X offset\n @param[in] hOffset Destination starting Y offset\n @param[in] src Source memory address\n @param[in] spitch Pitch of source memory\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipMemcpy2DToArray(
dst: *mut hipArray,
wOffset: usize,
hOffset: usize,
src: *const ::std::os::raw::c_void,
spitch: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] wOffset Destination starting X offset\n @param[in] hOffset Destination starting Y offset\n @param[in] src Source memory address\n @param[in] spitch Pitch of source memory\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n @param[in] stream Accelerator view which the copy is being enqueued\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipMemcpy2DToArrayAsync(
dst: *mut hipArray,
wOffset: usize,
hOffset: usize,
src: *const ::std::os::raw::c_void,
spitch: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] wOffset Destination starting X offset\n @param[in] hOffset Destination starting Y offset\n @param[in] src Source memory address\n @param[in] count size in bytes to copy\n @param[in] kind Type of transfer\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync\n\n @warning This API is deprecated."]
pub fn hipMemcpyToArray(
dst: *mut hipArray,
wOffset: usize,
hOffset: usize,
src: *const ::std::os::raw::c_void,
count: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] srcArray Source memory address\n @param[in] wOffset Source starting X offset\n @param[in] hOffset Source starting Y offset\n @param[in] count Size in bytes to copy\n @param[in] kind Type of transfer\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync\n\n @warning This API is deprecated."]
pub fn hipMemcpyFromArray(
dst: *mut ::std::os::raw::c_void,
srcArray: hipArray_const_t,
wOffset: usize,
hOffset: usize,
count: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] dpitch Pitch of destination memory\n @param[in] src Source memory address\n @param[in] wOffset Source starting X offset\n @param[in] hOffset Source starting Y offset\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipMemcpy2DFromArray(
dst: *mut ::std::os::raw::c_void,
dpitch: usize,
src: hipArray_const_t,
wOffset: usize,
hOffset: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device asynchronously.\n\n @param[in] dst Destination memory address\n @param[in] dpitch Pitch of destination memory\n @param[in] src Source memory address\n @param[in] wOffset Source starting X offset\n @param[in] hOffset Source starting Y offset\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n @param[in] stream Accelerator view which the copy is being enqueued\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipMemcpy2DFromArrayAsync(
dst: *mut ::std::os::raw::c_void,
dpitch: usize,
src: hipArray_const_t,
wOffset: usize,
hOffset: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] srcArray Source array\n @param[in] srcoffset Offset in bytes of source array\n @param[in] count Size of memory copy in bytes\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipMemcpyAtoH(
dst: *mut ::std::os::raw::c_void,
srcArray: *mut hipArray,
srcOffset: usize,
count: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device.\n\n @param[in] dstArray Destination memory address\n @param[in] dstOffset Offset in bytes of destination array\n @param[in] srcHost Source host pointer\n @param[in] count Size of memory copy in bytes\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipMemcpyHtoA(
dstArray: *mut hipArray,
dstOffset: usize,
srcHost: *const ::std::os::raw::c_void,
count: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device.\n\n @param[in] p 3D memory copy parameters\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipMemcpy3D(p: *const hipMemcpy3DParms) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device asynchronously.\n\n @param[in] p 3D memory copy parameters\n @param[in] stream Stream to use\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipMemcpy3DAsync(p: *const hipMemcpy3DParms, stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device.\n\n @param[in] pCopy 3D memory copy parameters\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipDrvMemcpy3D(pCopy: *const HIP_MEMCPY3D) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies data between host and device asynchronously.\n\n @param[in] pCopy 3D memory copy parameters\n @param[in] stream Stream to use\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
pub fn hipDrvMemcpy3DAsync(pCopy: *const HIP_MEMCPY3D, stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup PeerToPeer PeerToPeer Device Memory Access\n @{\n @warning PeerToPeer support is experimental.\n This section describes the PeerToPeer device memory access functions of HIP runtime API.\n/\n/**\n @brief Determine if a device can access a peer's memory.\n\n @param [out] canAccessPeer Returns the peer access capability (0 or 1)\n @param [in] device - device from where memory may be accessed.\n @param [in] peerDevice - device where memory is physically located\n\n Returns \"1\" in @p canAccessPeer if the specified @p device is capable\n of directly accessing memory physically located on peerDevice , or \"0\" if not.\n\n Returns \"0\" in @p canAccessPeer if deviceId == peerDeviceId, and both are valid devices : a\n device is not a peer of itself.\n\n @returns #hipSuccess,\n @returns #hipErrorInvalidDevice if deviceId or peerDeviceId are not valid devices"]
pub fn hipDeviceCanAccessPeer(
canAccessPeer: *mut ::std::os::raw::c_int,
deviceId: ::std::os::raw::c_int,
peerDeviceId: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Enable direct access from current device's virtual address space to memory allocations\n physically located on a peer device.\n\n Memory which already allocated on peer device will be mapped into the address space of the\n current device. In addition, all future memory allocations on peerDeviceId will be mapped into\n the address space of the current device when the memory is allocated. The peer memory remains\n accessible from the current device until a call to hipDeviceDisablePeerAccess or hipDeviceReset.\n\n\n @param [in] peerDeviceId\n @param [in] flags\n\n Returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue,\n @returns #hipErrorPeerAccessAlreadyEnabled if peer access is already enabled for this device."]
pub fn hipDeviceEnablePeerAccess(
peerDeviceId: ::std::os::raw::c_int,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Disable direct access from current device's virtual address space to memory allocations\n physically located on a peer device.\n\n Returns hipErrorPeerAccessNotEnabled if direct access to memory on peerDevice has not yet been\n enabled from the current device.\n\n @param [in] peerDeviceId\n\n @returns #hipSuccess, #hipErrorPeerAccessNotEnabled"]
pub fn hipDeviceDisablePeerAccess(peerDeviceId: ::std::os::raw::c_int) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get information on memory allocations.\n\n @param [out] pbase - BAse pointer address\n @param [out] psize - Size of allocation\n @param [in] dptr- Device Pointer\n\n @returns #hipSuccess, #hipErrorInvalidDevicePointer\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"]
pub fn hipMemGetAddressRange(
pbase: *mut hipDeviceptr_t,
psize: *mut usize,
dptr: hipDeviceptr_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies memory from one device to memory on another device.\n\n @param [out] dst - Destination device pointer.\n @param [in] dstDeviceId - Destination device\n @param [in] src - Source device pointer\n @param [in] srcDeviceId - Source device\n @param [in] sizeBytes - Size of memory copy in bytes\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDevice"]
pub fn hipMemcpyPeer(
dst: *mut ::std::os::raw::c_void,
dstDeviceId: ::std::os::raw::c_int,
src: *const ::std::os::raw::c_void,
srcDeviceId: ::std::os::raw::c_int,
sizeBytes: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies memory from one device to memory on another device.\n\n @param [out] dst - Destination device pointer.\n @param [in] dstDevice - Destination device\n @param [in] src - Source device pointer\n @param [in] srcDevice - Source device\n @param [in] sizeBytes - Size of memory copy in bytes\n @param [in] stream - Stream identifier\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDevice"]
pub fn hipMemcpyPeerAsync(
dst: *mut ::std::os::raw::c_void,
dstDeviceId: ::std::os::raw::c_int,
src: *const ::std::os::raw::c_void,
srcDevice: ::std::os::raw::c_int,
sizeBytes: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup Context Context Management\n @{\n This section describes the context management functions of HIP runtime API.\n/\n/**\n\n @addtogroup ContextD Context Management [Deprecated]\n @{\n @ingroup Context\n This section describes the deprecated context management functions of HIP runtime API.\n/\n/**\n @brief Create a context and set it as current/default context.\n\n @param [out] ctx Context to create\n @param [in] flags Context creation flags\n @param [in] device device handle\n\n @return #hipSuccess\n\n @see hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent,\n hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxCreate(
ctx: *mut hipCtx_t,
flags: ::std::os::raw::c_uint,
device: hipDevice_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroy a HIP context.\n\n @param [in] ctx Context to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipCtxCreate, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,hipCtxSetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxDestroy(ctx: hipCtx_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Pop the current/default context and return the popped context.\n\n @param [out] ctx\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxSetCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxPopCurrent(ctx: *mut hipCtx_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Push the context to be set as current/ default context.\n\n @param [in] ctx\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxPushCurrent(ctx: hipCtx_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set the passed context as current/default.\n\n @param [in] ctx\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxSetCurrent(ctx: hipCtx_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get the handle of the current/ default context.\n\n @param [out] ctx\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxGetCurrent(ctx: *mut hipCtx_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get the handle of the device associated with current/default context.\n\n @param [out] device\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxGetDevice(device: *mut hipDevice_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns the approximate HIP api version.\n\n @param [in] ctx Context to check\n @param [out] apiVersion\n\n @return #hipSuccess\n\n @warning The HIP feature set does not correspond to an exact CUDA SDK api revision.\n This function always set *apiVersion to 4 as an approximation though HIP supports\n some features which were introduced in later CUDA SDK revisions.\n HIP apps code should not rely on the api revision number here and should\n use arch feature flags to test device capabilities or conditional compilation.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxGetApiVersion(ctx: hipCtx_t, apiVersion: *mut ::std::os::raw::c_int)
-> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get Cache configuration for a specific function.\n\n @param [out] cacheConfig Cache configuration\n\n @return #hipSuccess\n\n @warning AMD devices and some Nvidia GPUS do not support reconfigurable cache. This hint is\n ignored on those architectures.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxGetCacheConfig(cacheConfig: *mut hipFuncCache_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set L1/Shared cache partition.\n\n @param [in] cacheConfig Cache configuration to set\n\n @return #hipSuccess\n\n @warning AMD devices and some Nvidia GPUS do not support reconfigurable cache. This hint is\n ignored on those architectures.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxSetCacheConfig(cacheConfig: hipFuncCache_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set Shared memory bank configuration.\n\n @param [in] config Shared memory configuration to set\n\n @return #hipSuccess\n\n @warning AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxSetSharedMemConfig(config: hipSharedMemConfig) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get Shared memory bank configuration.\n\n @param [out] pConfig Pointer of shared memory configuration\n\n @return #hipSuccess\n\n @warning AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxGetSharedMemConfig(pConfig: *mut hipSharedMemConfig) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Blocks until the default context has completed all preceding requested tasks.\n\n @return #hipSuccess\n\n @warning This function waits for all streams on the default context to complete execution, and\n then returns.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxSynchronize() -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Return flags used for creating default context.\n\n @param [out] flags Pointer of flags\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxGetFlags(flags: *mut ::std::os::raw::c_uint) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Enables direct access to memory allocations in a peer context.\n\n Memory which already allocated on peer device will be mapped into the address space of the\n current device. In addition, all future memory allocations on peerDeviceId will be mapped into\n the address space of the current device when the memory is allocated. The peer memory remains\n accessible from the current device until a call to hipDeviceDisablePeerAccess or hipDeviceReset.\n\n\n @param [in] peerCtx Peer context\n @param [in] flags flags, need to set as 0\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue,\n #hipErrorPeerAccessAlreadyEnabled\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n @warning PeerToPeer support is experimental.\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxEnablePeerAccess(peerCtx: hipCtx_t, flags: ::std::os::raw::c_uint) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Disable direct access from current context's virtual address space to memory allocations\n physically located on a peer context.Disables direct access to memory allocations in a peer\n context and unregisters any registered allocations.\n\n Returns #hipErrorPeerAccessNotEnabled if direct access to memory on peerDevice has not yet been\n enabled from the current device.\n\n @param [in] peerCtx Peer context to be disabled\n\n @returns #hipSuccess, #hipErrorPeerAccessNotEnabled\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n @warning PeerToPeer support is experimental.\n\n @warning : This HIP API is deprecated."]
pub fn hipCtxDisablePeerAccess(peerCtx: hipCtx_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @}\n/\n/**\n @brief Get the state of the primary context.\n\n @param [in] dev Device to get primary context flags for\n @param [out] flags Pointer to store flags\n @param [out] active Pointer to store context state; 0 = inactive, 1 = active\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"]
pub fn hipDevicePrimaryCtxGetState(
dev: hipDevice_t,
flags: *mut ::std::os::raw::c_uint,
active: *mut ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Release the primary context on the GPU.\n\n @param [in] dev Device which primary context is released\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n @warning This function return #hipSuccess though doesn't release the primaryCtx by design on\n HIP/HCC path."]
pub fn hipDevicePrimaryCtxRelease(dev: hipDevice_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Retain the primary context on the GPU.\n\nhipError_t hipDevicePrimaryCtxRetain(hipCtx_t* pctx, hipDevice_t dev);\n @param [out] pctx Returned context handle of the new context\n @param [in] dev Device which primary context is released\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"]
pub fn hipDevicePrimaryCtxRetain(pctx: *mut hipCtx_t, dev: hipDevice_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Resets the primary context on the GPU.\n\n @param [in] dev Device which primary context is reset\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"]
pub fn hipDevicePrimaryCtxReset(dev: hipDevice_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set flags for the primary context.\n\n @param [in] dev Device for which the primary context flags are set\n @param [in] flags New flags for the device\n\n @returns #hipSuccess, #hipErrorContextAlreadyInUse\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"]
pub fn hipDevicePrimaryCtxSetFlags(
dev: hipDevice_t,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n\n @defgroup Module Module Management\n @{\n @ingroup API\n This section describes the module management functions of HIP runtime API.\n\n/\n/**\n @brief Loads code object from file into a module the currrent context.\n\n @param [in] fname Filename of code object to load\n\n @param [out] module Module\n\n @warning File/memory resources allocated in this function are released only in hipModuleUnload.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext, #hipErrorFileNotFound,\n #hipErrorOutOfMemory, #hipErrorSharedObjectInitFailed, #hipErrorNotInitialized\n"]
pub fn hipModuleLoad(
module: *mut hipModule_t,
fname: *const ::std::os::raw::c_char,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Frees the module\n\n @param [in] module Module to free\n\n @returns #hipSuccess, #hipErrorInvalidResourceHandle\n\n The module is freed, and the code objects associated with it are destroyed."]
pub fn hipModuleUnload(module: hipModule_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Function with kname will be extracted if present in module\n\n @param [in] module Module to get function from\n @param [in] kname Pointer to the name of function\n @param [out] function Pointer to function handle\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext, #hipErrorNotInitialized,\n #hipErrorNotFound,"]
pub fn hipModuleGetFunction(
function: *mut hipFunction_t,
module: hipModule_t,
kname: *const ::std::os::raw::c_char,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Find out attributes for a given function.\n\n @param [out] attr Attributes of funtion\n @param [in] func Pointer to the function handle\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction"]
pub fn hipFuncGetAttributes(
attr: *mut hipFuncAttributes,
func: *const ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Find out a specific attribute for a given function.\n\n @param [out] value Pointer to the value\n @param [in] attrib Attributes of the given funtion\n @param [in] hfunc Function to get attributes from\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction"]
pub fn hipFuncGetAttribute(
value: *mut ::std::os::raw::c_int,
attrib: hipFunction_attribute,
hfunc: hipFunction_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief returns the handle of the texture reference with the name from the module.\n\n @param [in] hmod Module\n @param [in] name Pointer of name of texture reference\n @param [out] texRef Pointer of texture reference\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorNotFound, #hipErrorInvalidValue"]
pub fn hipModuleGetTexRef(
texRef: *mut *mut textureReference,
hmod: hipModule_t,
name: *const ::std::os::raw::c_char,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief builds module from code object which resides in host memory. Image is pointer to that\n location.\n\n @param [in] image\n @param [out] module\n\n @returns hipSuccess, hipErrorNotInitialized, hipErrorOutOfMemory, hipErrorNotInitialized"]
pub fn hipModuleLoadData(
module: *mut hipModule_t,
image: *const ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief builds module from code object which resides in host memory. Image is pointer to that\n location. Options are not used. hipModuleLoadData is called.\n\n @param [in] image\n @param [out] module\n @param [in] number of options\n @param [in] options for JIT\n @param [in] option values for JIT\n\n @returns hipSuccess, hipErrorNotInitialized, hipErrorOutOfMemory, hipErrorNotInitialized"]
pub fn hipModuleLoadDataEx(
module: *mut hipModule_t,
image: *const ::std::os::raw::c_void,
numOptions: ::std::os::raw::c_uint,
options: *mut hipJitOption,
optionValues: *mut *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief launches kernel f with launch parameters and shared memory on stream with arguments passed\n to kernelparams or extra\n\n @param [in] f Kernel to launch.\n @param [in] gridDimX X grid dimension specified as multiple of blockDimX.\n @param [in] gridDimY Y grid dimension specified as multiple of blockDimY.\n @param [in] gridDimZ Z grid dimension specified as multiple of blockDimZ.\n @param [in] blockDimX X block dimensions specified in work-items\n @param [in] blockDimY Y grid dimension specified in work-items\n @param [in] blockDimZ Z grid dimension specified in work-items\n @param [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream Stream where the kernel should be dispatched. May be 0, in which case th\n default stream is used with associated synchronization rules.\n @param [in] kernelParams\n @param [in] extra Pointer to kernel arguments. These are passed directly to the kernel and\n must be in the memory layout and alignment expected by the kernel.\n All passed arguments must be naturally aligned according to their type. The memory address of each\n argument should be a multiple of its size in bytes. Please refer to hip_porting_driver_api.md\n for sample usage.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32. So gridDim.x * blockDim.x, gridDim.y * blockDim.y\n and gridDim.z * blockDim.z are always less than 2^32.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue"]
pub fn hipModuleLaunchKernel(
f: hipFunction_t,
gridDimX: ::std::os::raw::c_uint,
gridDimY: ::std::os::raw::c_uint,
gridDimZ: ::std::os::raw::c_uint,
blockDimX: ::std::os::raw::c_uint,
blockDimY: ::std::os::raw::c_uint,
blockDimZ: ::std::os::raw::c_uint,
sharedMemBytes: ::std::os::raw::c_uint,
stream: hipStream_t,
kernelParams: *mut *mut ::std::os::raw::c_void,
extra: *mut *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief launches kernel f with launch parameters and shared memory on stream with arguments passed\n to kernelParams, where thread blocks can cooperate and synchronize as they execute\n\n @param [in] f Kernel to launch.\n @param [in] gridDimX X grid dimension specified as multiple of blockDimX.\n @param [in] gridDimY Y grid dimension specified as multiple of blockDimY.\n @param [in] gridDimZ Z grid dimension specified as multiple of blockDimZ.\n @param [in] blockDimX X block dimension specified in work-items.\n @param [in] blockDimY Y block dimension specified in work-items.\n @param [in] blockDimZ Z block dimension specified in work-items.\n @param [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream Stream where the kernel should be dispatched. May be 0,\n in which case the default stream is used with associated synchronization rules.\n @param [in] kernelParams A list of kernel arguments.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns hipSuccess, hipErrorDeinitialized, hipErrorNotInitialized, hipErrorInvalidContext,\n hipErrorInvalidHandle, hipErrorInvalidImage, hipErrorInvalidValue, hipInvalidDevice,\n hipErrorInvalidConfiguration, hipErrorLaunchFailure, hipErrorLaunchOutOfResources,\n hipErrorLaunchTimeOut, hipErrorCooperativeLaunchTooLarge, hipErrorSharedObjectInitFailed"]
pub fn hipModuleLaunchCooperativeKernel(
f: hipFunction_t,
gridDimX: ::std::os::raw::c_uint,
gridDimY: ::std::os::raw::c_uint,
gridDimZ: ::std::os::raw::c_uint,
blockDimX: ::std::os::raw::c_uint,
blockDimY: ::std::os::raw::c_uint,
blockDimZ: ::std::os::raw::c_uint,
sharedMemBytes: ::std::os::raw::c_uint,
stream: hipStream_t,
kernelParams: *mut *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Launches kernels on multiple devices where thread blocks can cooperate and\n synchronize as they execute.\n\n @param [in] launchParamsList List of launch parameters, one per device.\n @param [in] numDevices Size of the launchParamsList array.\n @param [in] flags Flags to control launch behavior.\n\n @returns hipSuccess, hipErrorDeinitialized, hipErrorNotInitialized, hipErrorInvalidContext,\n hipErrorInvalidHandle, hipErrorInvalidImage, hipErrorInvalidValue, hipInvalidDevice,\n hipErrorInvalidConfiguration, hipErrorInvalidResourceHandle, hipErrorLaunchFailure,\n hipErrorLaunchOutOfResources, hipErrorLaunchTimeOut, hipErrorCooperativeLaunchTooLarge,\n hipErrorSharedObjectInitFailed"]
pub fn hipModuleLaunchCooperativeKernelMultiDevice(
launchParamsList: *mut hipFunctionLaunchParams,
numDevices: ::std::os::raw::c_uint,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief launches kernel f with launch parameters and shared memory on stream with arguments passed\n to kernelparams or extra, where thread blocks can cooperate and synchronize as they execute\n\n @param [in] f Kernel to launch.\n @param [in] gridDim Grid dimensions specified as multiple of blockDim.\n @param [in] blockDim Block dimensions specified in work-items\n @param [in] kernelParams A list of kernel arguments\n @param [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream Stream where the kernel should be dispatched. May be 0, in which case th\n default stream is used with associated synchronization rules.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue, hipErrorCooperativeLaunchTooLarge"]
pub fn hipLaunchCooperativeKernel(
f: *const ::std::os::raw::c_void,
gridDim: dim3,
blockDimX: dim3,
kernelParams: *mut *mut ::std::os::raw::c_void,
sharedMemBytes: ::std::os::raw::c_uint,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Launches kernels on multiple devices where thread blocks can cooperate and\n synchronize as they execute.\n\n @param [in] launchParamsList List of launch parameters, one per device.\n @param [in] numDevices Size of the launchParamsList array.\n @param [in] flags Flags to control launch behavior.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue, hipErrorCooperativeLaunchTooLarge"]
pub fn hipLaunchCooperativeKernelMultiDevice(
launchParamsList: *mut hipLaunchParams,
numDevices: ::std::os::raw::c_int,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Launches kernels on multiple devices and guarantees all specified kernels are dispatched\n on respective streams before enqueuing any other work on the specified streams from any other threads\n\n\n @param [in] hipLaunchParams List of launch parameters, one per device.\n @param [in] numDevices Size of the launchParamsList array.\n @param [in] flags Flags to control launch behavior.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue"]
pub fn hipExtLaunchMultiKernelMultiDevice(
launchParamsList: *mut hipLaunchParams,
numDevices: ::std::os::raw::c_int,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = "-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup Occupancy Occupancy\n @{\n This section describes the occupancy functions of HIP runtime API.\n\n/\n/**\n @brief determine the grid and block sizes to achieves maximum occupancy for a kernel\n\n @param [out] gridSize minimum grid size for maximum potential occupancy\n @param [out] blockSize block size for maximum potential occupancy\n @param [in] f kernel function for which occupancy is calulated\n @param [in] dynSharedMemPerBlk dynamic shared memory usage (in bytes) intended for each block\n @param [in] blockSizeLimit the maximum block size for the kernel, use 0 for no limit\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorInvalidValue"]
pub fn hipModuleOccupancyMaxPotentialBlockSize(
gridSize: *mut ::std::os::raw::c_int,
blockSize: *mut ::std::os::raw::c_int,
f: hipFunction_t,
dynSharedMemPerBlk: usize,
blockSizeLimit: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief determine the grid and block sizes to achieves maximum occupancy for a kernel\n\n @param [out] gridSize minimum grid size for maximum potential occupancy\n @param [out] blockSize block size for maximum potential occupancy\n @param [in] f kernel function for which occupancy is calulated\n @param [in] dynSharedMemPerBlk dynamic shared memory usage (in bytes) intended for each block\n @param [in] blockSizeLimit the maximum block size for the kernel, use 0 for no limit\n @param [in] flags Extra flags for occupancy calculation (only default supported)\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorInvalidValue"]
pub fn hipModuleOccupancyMaxPotentialBlockSizeWithFlags(
gridSize: *mut ::std::os::raw::c_int,
blockSize: *mut ::std::os::raw::c_int,
f: hipFunction_t,
dynSharedMemPerBlk: usize,
blockSizeLimit: ::std::os::raw::c_int,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns occupancy for a device function.\n\n @param [out] numBlocks Returned occupancy\n @param [in] func Kernel function (hipFunction) for which occupancy is calulated\n @param [in] blockSize Block size the kernel is intended to be launched with\n @param [in] dynSharedMemPerBlk dynamic shared memory usage (in bytes) intended for each block"]
pub fn hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(
numBlocks: *mut ::std::os::raw::c_int,
f: hipFunction_t,
blockSize: ::std::os::raw::c_int,
dynSharedMemPerBlk: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns occupancy for a device function.\n\n @param [out] numBlocks Returned occupancy\n @param [in] f Kernel function(hipFunction_t) for which occupancy is calulated\n @param [in] blockSize Block size the kernel is intended to be launched with\n @param [in] dynSharedMemPerBlk dynamic shared memory usage (in bytes) intended for each block\n @param [in] flags Extra flags for occupancy calculation (only default supported)"]
pub fn hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
numBlocks: *mut ::std::os::raw::c_int,
f: hipFunction_t,
blockSize: ::std::os::raw::c_int,
dynSharedMemPerBlk: usize,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns occupancy for a device function.\n\n @param [out] numBlocks Returned occupancy\n @param [in] func Kernel function for which occupancy is calulated\n @param [in] blockSize Block size the kernel is intended to be launched with\n @param [in] dynSharedMemPerBlk dynamic shared memory usage (in bytes) intended for each block"]
pub fn hipOccupancyMaxActiveBlocksPerMultiprocessor(
numBlocks: *mut ::std::os::raw::c_int,
f: *const ::std::os::raw::c_void,
blockSize: ::std::os::raw::c_int,
dynSharedMemPerBlk: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns occupancy for a device function.\n\n @param [out] numBlocks Returned occupancy\n @param [in] f Kernel function for which occupancy is calulated\n @param [in] blockSize Block size the kernel is intended to be launched with\n @param [in] dynSharedMemPerBlk dynamic shared memory usage (in bytes) intended for each block\n @param [in] flags Extra flags for occupancy calculation (currently ignored)"]
pub fn hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
numBlocks: *mut ::std::os::raw::c_int,
f: *const ::std::os::raw::c_void,
blockSize: ::std::os::raw::c_int,
dynSharedMemPerBlk: usize,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief determine the grid and block sizes to achieves maximum occupancy for a kernel\n\n @param [out] gridSize minimum grid size for maximum potential occupancy\n @param [out] blockSize block size for maximum potential occupancy\n @param [in] f kernel function for which occupancy is calulated\n @param [in] dynSharedMemPerBlk dynamic shared memory usage (in bytes) intended for each block\n @param [in] blockSizeLimit the maximum block size for the kernel, use 0 for no limit\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorInvalidValue"]
pub fn hipOccupancyMaxPotentialBlockSize(
gridSize: *mut ::std::os::raw::c_int,
blockSize: *mut ::std::os::raw::c_int,
f: *const ::std::os::raw::c_void,
dynSharedMemPerBlk: usize,
blockSizeLimit: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Start recording of profiling information.\n When using this API, start the profiler with profiling disabled. (--startdisabled)\n @warning hipProfilerStart API is deprecated, use roctracer/rocTX instead."]
pub fn hipProfilerStart() -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Stop recording of profiling information.\n When using this API, start the profiler with profiling disabled. (--startdisabled)\n @warning hipProfilerStop API is deprecated, use roctracer/rocTX instead."]
pub fn hipProfilerStop() -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup Clang Launch API to support the triple-chevron syntax\n @{\n This section describes the API to support the triple-chevron syntax.\n/\n/**\n @brief Configure a kernel launch.\n\n @param [in] gridDim grid dimension specified as multiple of blockDim.\n @param [in] blockDim block dimensions specified in work-items\n @param [in] sharedMem Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream Stream where the kernel should be dispatched. May be 0, in which case the\n default stream is used with associated synchronization rules.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue\n"]
pub fn hipConfigureCall(
gridDim: dim3,
blockDim: dim3,
sharedMem: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set a kernel argument.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue\n\n @param [in] arg Pointer the argument in host memory.\n @param [in] size Size of the argument.\n @param [in] offset Offset of the argument on the argument stack.\n"]
pub fn hipSetupArgument(
arg: *const ::std::os::raw::c_void,
size: usize,
offset: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Launch a kernel.\n\n @param [in] func Kernel to launch.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue\n"]
pub fn hipLaunchByPtr(func: *const ::std::os::raw::c_void) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief C compliant kernel launch API\n\n @param [in] function_address - kernel stub function pointer.\n @param [in] numBlocks - number of blocks\n @param [in] dimBlocks - dimension of a block\n @param [in] args - kernel arguments\n @param [in] sharedMemBytes - Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream - Stream where the kernel should be dispatched. May be 0, in which case th\n default stream is used with associated synchronization rules.\n\n @returns #hipSuccess, #hipErrorInvalidValue, hipInvalidDevice\n"]
pub fn hipLaunchKernel(
function_address: *const ::std::os::raw::c_void,
numBlocks: dim3,
dimBlocks: dim3,
args: *mut *mut ::std::os::raw::c_void,
sharedMemBytes: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Enqueues a host function call in a stream.\n\n @param [in] stream - stream to enqueue work to.\n @param [in] fn - function to call once operations enqueued preceeding are complete.\n @param [in] userData - User-specified data to be passed to the function.\n @returns #hipSuccess, #hipErrorInvalidResourceHandle, #hipErrorInvalidValue,\n #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipLaunchHostFunc(
stream: hipStream_t,
fn_: hipHostFn_t,
userData: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " Copies memory for 2D arrays.\n\n @param pCopy - Parameters for the memory copy\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
pub fn hipDrvMemcpy2DUnaligned(pCopy: *const hip_Memcpy2D) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Launches kernel from the pointer address, with arguments and shared memory on stream.\n\n @param [in] function_address pointer to the Kernel to launch.\n @param [in] numBlocks number of blocks.\n @param [in] dimBlocks dimension of a block.\n @param [in] args pointer to kernel arguments.\n @param [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel.\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream Stream where the kernel should be dispatched.\n May be 0, in which case the default stream is used with associated synchronization rules.\n @param [in] startEvent If non-null, specified event will be updated to track the start time of\n the kernel launch. The event must be created before calling this API.\n @param [in] stopEvent If non-null, specified event will be updated to track the stop time of\n the kernel launch. The event must be created before calling this API.\n @param [in] flags. The value of hipExtAnyOrderLaunch, signifies if kernel can be\n launched in any order.\n @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue.\n"]
pub fn hipExtLaunchKernel(
function_address: *const ::std::os::raw::c_void,
numBlocks: dim3,
dimBlocks: dim3,
args: *mut *mut ::std::os::raw::c_void,
sharedMemBytes: usize,
stream: hipStream_t,
startEvent: hipEvent_t,
stopEvent: hipEvent_t,
flags: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a texture object.\n\n @param [out] pTexObject pointer to the texture object to create\n @param [in] pResDesc pointer to resource descriptor\n @param [in] pTexDesc pointer to texture descriptor\n @param [in] pResViewDesc pointer to resource view descriptor\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported, #hipErrorOutOfMemory\n\n @note 3D liner filter isn't supported on GFX90A boards, on which the API @p hipCreateTextureObject will\n return hipErrorNotSupported.\n"]
pub fn hipCreateTextureObject(
pTexObject: *mut hipTextureObject_t,
pResDesc: *const hipResourceDesc,
pTexDesc: *const hipTextureDesc,
pResViewDesc: *const hipResourceViewDesc,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroys a texture object.\n\n @param [in] textureObject texture object to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipDestroyTextureObject(textureObject: hipTextureObject_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the channel descriptor in an array.\n\n @param [in] desc pointer to channel format descriptor\n @param [out] array memory array on the device\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipGetChannelDesc(
desc: *mut hipChannelFormatDesc,
array: hipArray_const_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets resource descriptor for the texture object.\n\n @param [out] pResDesc pointer to resource descriptor\n @param [in] textureObject texture object\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipGetTextureObjectResourceDesc(
pResDesc: *mut hipResourceDesc,
textureObject: hipTextureObject_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets resource view descriptor for the texture object.\n\n @param [out] pResViewDesc pointer to resource view descriptor\n @param [in] textureObject texture object\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipGetTextureObjectResourceViewDesc(
pResViewDesc: *mut hipResourceViewDesc,
textureObject: hipTextureObject_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets texture descriptor for the texture object.\n\n @param [out] pTexDesc pointer to texture descriptor\n @param [in] textureObject texture object\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipGetTextureObjectTextureDesc(
pTexDesc: *mut hipTextureDesc,
textureObject: hipTextureObject_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a texture object.\n\n @param [out] pTexObject pointer to texture object to create\n @param [in] pResDesc pointer to resource descriptor\n @param [in] pTexDesc pointer to texture descriptor\n @param [in] pResViewDesc pointer to resource view descriptor\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipTexObjectCreate(
pTexObject: *mut hipTextureObject_t,
pResDesc: *const HIP_RESOURCE_DESC,
pTexDesc: *const HIP_TEXTURE_DESC,
pResViewDesc: *const HIP_RESOURCE_VIEW_DESC,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroys a texture object.\n\n @param [in] texObject texture object to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipTexObjectDestroy(texObject: hipTextureObject_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets resource descriptor of a texture object.\n\n @param [out] pResDesc pointer to resource descriptor\n @param [in] texObject texture object\n\n @returns #hipSuccess, #hipErrorNotSupported, #hipErrorInvalidValue\n"]
pub fn hipTexObjectGetResourceDesc(
pResDesc: *mut HIP_RESOURCE_DESC,
texObject: hipTextureObject_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets resource view descriptor of a texture object.\n\n @param [out] pResViewDesc pointer to resource view descriptor\n @param [in] texObject texture object\n\n @returns #hipSuccess, #hipErrorNotSupported, #hipErrorInvalidValue\n"]
pub fn hipTexObjectGetResourceViewDesc(
pResViewDesc: *mut HIP_RESOURCE_VIEW_DESC,
texObject: hipTextureObject_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets texture descriptor of a texture object.\n\n @param [out] pTexDesc pointer to texture descriptor\n @param [in] texObject texture object\n\n @returns #hipSuccess, #hipErrorNotSupported, #hipErrorInvalidValue\n"]
pub fn hipTexObjectGetTextureDesc(
pTexDesc: *mut HIP_TEXTURE_DESC,
texObject: hipTextureObject_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Allocate a mipmapped array on the device.\n\n @param[out] mipmappedArray - Pointer to allocated mipmapped array in device memory\n @param[in] desc - Requested channel format\n @param[in] extent - Requested allocation size (width field in elements)\n @param[in] numLevels - Number of mipmap levels to allocate\n @param[in] flags - Flags for extensions\n\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryAllocation\n\n @note This API is implemented on Windows, under development on Linux.\n"]
pub fn hipMallocMipmappedArray(
mipmappedArray: *mut hipMipmappedArray_t,
desc: *const hipChannelFormatDesc,
extent: hipExtent,
numLevels: ::std::os::raw::c_uint,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Frees a mipmapped array on the device.\n\n @param[in] mipmappedArray - Pointer to mipmapped array to free\n\n @return #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Windows, under development on Linux.\n"]
pub fn hipFreeMipmappedArray(mipmappedArray: hipMipmappedArray_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets a mipmap level of a HIP mipmapped array.\n\n @param[out] levelArray - Returned mipmap level HIP array\n @param[in] mipmappedArray - HIP mipmapped array\n @param[in] level - Mipmap level\n\n @return #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Windows, under development on Linux.\n"]
pub fn hipGetMipmappedArrayLevel(
levelArray: *mut hipArray_t,
mipmappedArray: hipMipmappedArray_const_t,
level: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Create a mipmapped array.\n\n @param [out] pHandle pointer to mipmapped array\n @param [in] pMipmappedArrayDesc mipmapped array descriptor\n @param [in] numMipmapLevels mipmap level\n\n @returns #hipSuccess, #hipErrorNotSupported, #hipErrorInvalidValue\n\n @note This API is implemented on Windows, under development on Linux."]
pub fn hipMipmappedArrayCreate(
pHandle: *mut hipMipmappedArray_t,
pMipmappedArrayDesc: *mut HIP_ARRAY3D_DESCRIPTOR,
numMipmapLevels: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroy a mipmapped array.\n\n @param [out] hMipmappedArray pointer to mipmapped array to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Windows, under development on Linux.\n"]
pub fn hipMipmappedArrayDestroy(hMipmappedArray: hipMipmappedArray_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get a mipmapped array on a mipmapped level.\n\n @param [in] pLevelArray Pointer of array\n @param [out] hMipMappedArray Pointer of mipmapped array on the requested mipmap level\n @param [out] level Mipmap level\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Windows, under development on Linux.\n"]
pub fn hipMipmappedArrayGetLevel(
pLevelArray: *mut hipArray_t,
hMipMappedArray: hipMipmappedArray_t,
level: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Binds a mipmapped array to a texture.\n\n @param [in] tex pointer to the texture reference to bind\n @param [in] mipmappedArray memory mipmapped array on the device\n @param [in] desc opointer to the channel format\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipBindTextureToMipmappedArray(
tex: *const textureReference,
mipmappedArray: hipMipmappedArray_const_t,
desc: *const hipChannelFormatDesc,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the texture reference related with the symbol.\n\n @param [out] texref texture reference\n @param [in] symbol pointer to the symbol related with the texture for the reference\n\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning This API is deprecated.\n"]
pub fn hipGetTextureReference(
texref: *mut *const textureReference,
symbol: *const ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets address mode for a texture reference.\n\n @param [in] texRef texture reference.\n @param [in] dim Dimension of the texture.\n @param [in] am Value of the texture address mode.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetAddressMode(
texRef: *mut textureReference,
dim: ::std::os::raw::c_int,
am: hipTextureAddressMode,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Binds an array as a texture reference.\n\n @param [in] tex Pointer texture reference.\n @param [in] array Array to bind.\n @param [in] flags Flags should be set as HIP_TRSA_OVERRIDE_FORMAT, as a valid value.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetArray(
tex: *mut textureReference,
array: hipArray_const_t,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set filter mode for a texture reference.\n\n @param [in] texRef Pointer texture reference.\n @param [in] fm Value of texture filter mode.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetFilterMode(
texRef: *mut textureReference,
fm: hipTextureFilterMode,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set flags for a texture reference.\n\n @param [in] texRef Pointer texture reference.\n @param [in] Flags Value of flags.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetFlags(
texRef: *mut textureReference,
Flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set format for a texture reference.\n\n @param [in] texRef Pointer texture reference.\n @param [in] fmt Value of format.\n @param [in] NumPackedComponents Number of components per array.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetFormat(
texRef: *mut textureReference,
fmt: hipArray_Format,
NumPackedComponents: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Binds a memory area to a texture.\n\n @param [in] offset Offset in bytes.\n @param [in] tex Texture to bind.\n @param [in] devPtr Pointer of memory on the device.\n @param [in] desc Pointer of channel format descriptor.\n @param [in] size Size of memory in bites.\n\n @warning This API is deprecated.\n"]
pub fn hipBindTexture(
offset: *mut usize,
tex: *const textureReference,
devPtr: *const ::std::os::raw::c_void,
desc: *const hipChannelFormatDesc,
size: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Binds a 2D memory area to a texture.\n\n @param [in] offset Offset in bytes.\n @param [in] tex Texture to bind.\n @param [in] devPtr Pointer of 2D memory area on the device.\n @param [in] desc Pointer of channel format descriptor.\n @param [in] width Width in texel units.\n @param [in] height Height in texel units.\n @param [in] pitch Pitch in bytes.\n\n @warning This API is deprecated.\n"]
pub fn hipBindTexture2D(
offset: *mut usize,
tex: *const textureReference,
devPtr: *const ::std::os::raw::c_void,
desc: *const hipChannelFormatDesc,
width: usize,
height: usize,
pitch: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Binds a memory area to a texture.\n\n @param [in] tex Pointer of texture reference.\n @param [in] array Array to bind.\n @param [in] desc Pointer of channel format descriptor.\n\n @warning This API is deprecated.\n"]
pub fn hipBindTextureToArray(
tex: *const textureReference,
array: hipArray_const_t,
desc: *const hipChannelFormatDesc,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get the offset of the alignment in a texture.\n\n @param [in] offset Offset in bytes.\n @param [in] texref Pointer of texture reference.\n\n @warning This API is deprecated.\n"]
pub fn hipGetTextureAlignmentOffset(
offset: *mut usize,
texref: *const textureReference,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Unbinds a texture.\n\n @param [in] tex Texture to unbind.\n\n @warning This API is deprecated.\n"]
pub fn hipUnbindTexture(tex: *const textureReference) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the the address for a texture reference.\n\n @param [out] dev_ptr Pointer of device address.\n @param [in] texRef Pointer of texture reference.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefGetAddress(
dev_ptr: *mut hipDeviceptr_t,
texRef: *const textureReference,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the address mode for a texture reference.\n\n @param [out] pam Pointer of address mode.\n @param [in] texRef Pointer of texture reference.\n @param [in] dim Dimension.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefGetAddressMode(
pam: *mut hipTextureAddressMode,
texRef: *const textureReference,
dim: ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets filter mode for a texture reference.\n\n @param [out] pfm Pointer of filter mode.\n @param [in] texRef Pointer of texture reference.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefGetFilterMode(
pfm: *mut hipTextureFilterMode,
texRef: *const textureReference,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets flags for a texture reference.\n\n @param [out] pFlags Pointer of flags.\n @param [in] texRef Pointer of texture reference.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefGetFlags(
pFlags: *mut ::std::os::raw::c_uint,
texRef: *const textureReference,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets texture format for a texture reference.\n\n @param [out] pFormat Pointer of the format.\n @param [out] pNumChannels Pointer of number of channels.\n @param [in] texRef Pointer of texture reference.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefGetFormat(
pFormat: *mut hipArray_Format,
pNumChannels: *mut ::std::os::raw::c_int,
texRef: *const textureReference,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the maximum anisotropy for a texture reference.\n\n @param [out] pmaxAnsio Pointer of the maximum anisotropy.\n @param [in] texRef Pointer of texture reference.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefGetMaxAnisotropy(
pmaxAnsio: *mut ::std::os::raw::c_int,
texRef: *const textureReference,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the mipmap filter mode for a texture reference.\n\n @param [out] pfm Pointer of the mipmap filter mode.\n @param [in] texRef Pointer of texture reference.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefGetMipmapFilterMode(
pfm: *mut hipTextureFilterMode,
texRef: *const textureReference,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the mipmap level bias for a texture reference.\n\n @param [out] pbias Pointer of the mipmap level bias.\n @param [in] texRef Pointer of texture reference.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefGetMipmapLevelBias(
pbias: *mut f32,
texRef: *const textureReference,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the minimum and maximum mipmap level clamps for a texture reference.\n\n @param [out] pminMipmapLevelClamp Pointer of the minimum mipmap level clamp.\n @param [out] pmaxMipmapLevelClamp Pointer of the maximum mipmap level clamp.\n @param [in] texRef Pointer of texture reference.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefGetMipmapLevelClamp(
pminMipmapLevelClamp: *mut f32,
pmaxMipmapLevelClamp: *mut f32,
texRef: *const textureReference,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets the mipmapped array bound to a texture reference.\n\n @param [out] pArray Pointer of the mipmapped array.\n @param [in] texRef Pointer of texture reference.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefGetMipMappedArray(
pArray: *mut hipMipmappedArray_t,
texRef: *const textureReference,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets an bound address for a texture reference.\n\n @param [out] ByteOffset Pointer of the offset in bytes.\n @param [in] texRef Pointer of texture reference.\n @param [in] dptr Pointer of device address to bind.\n @param [in] bytes Size in bytes.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetAddress(
ByteOffset: *mut usize,
texRef: *mut textureReference,
dptr: hipDeviceptr_t,
bytes: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set a bind an address as a 2D texture reference.\n\n @param [in] texRef Pointer of texture reference.\n @param [in] desc Pointer of array descriptor.\n @param [in] dptr Pointer of device address to bind.\n @param [in] Pitch Pitch in bytes.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetAddress2D(
texRef: *mut textureReference,
desc: *const HIP_ARRAY_DESCRIPTOR,
dptr: hipDeviceptr_t,
Pitch: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets the maximum anisotropy for a texture reference.\n\n @param [in] texRef Pointer of texture reference.\n @param [out] maxAniso Value of the maximum anisotropy.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetMaxAnisotropy(
texRef: *mut textureReference,
maxAniso: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets border color for a texture reference.\n\n @param [in] texRef Pointer of texture reference.\n @param [in] pBorderColor Pointer of border color.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetBorderColor(
texRef: *mut textureReference,
pBorderColor: *mut f32,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets mipmap filter mode for a texture reference.\n\n @param [in] texRef Pointer of texture reference.\n @param [in] fm Value of filter mode.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetMipmapFilterMode(
texRef: *mut textureReference,
fm: hipTextureFilterMode,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets mipmap level bias for a texture reference.\n\n @param [in] texRef Pointer of texture reference.\n @param [in] bias Value of mipmap bias.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetMipmapLevelBias(texRef: *mut textureReference, bias: f32) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets mipmap level clamp for a texture reference.\n\n @param [in] texRef Pointer of texture reference.\n @param [in] minMipMapLevelClamp Value of minimum mipmap level clamp.\n @param [in] maxMipMapLevelClamp Value of maximum mipmap level clamp.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetMipmapLevelClamp(
texRef: *mut textureReference,
minMipMapLevelClamp: f32,
maxMipMapLevelClamp: f32,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Binds mipmapped array to a texture reference.\n\n @param [in] texRef Pointer of texture reference to bind.\n @param [in] mipmappedArray Pointer of mipmapped array to bind.\n @param [in] Flags Flags should be set as HIP_TRSA_OVERRIDE_FORMAT, as a valid value.\n\n @warning This API is deprecated.\n"]
pub fn hipTexRefSetMipmappedArray(
texRef: *mut textureReference,
mipmappedArray: *mut hipMipmappedArray,
Flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[doc = " @defgroup Callback Callback Activity APIs\n @{\n This section describes the callback/Activity of HIP runtime API.\n/\n/**\n @brief Returns HIP API name by ID.\n\n @param [in] id ID of HIP API\n\n @returns hipSuccess, hipErrorInvalidValue\n"]
pub fn hipApiName(id: u32) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " @brief Returns kernel name reference by function name.\n\n @param [in] f name of function\n\n @returns hipSuccess, hipErrorInvalidValue\n"]
pub fn hipKernelNameRef(f: hipFunction_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " @brief Retrives kernel for a given host pointer, unless stated otherwise.\n\n @param [in] hostFunction Pointer of host function.\n @param [in] stream stream the kernel is executed on.\n\n @returns hipSuccess, hipErrorInvalidValue\n"]
pub fn hipKernelNameRefByPtr(
hostFunction: *const ::std::os::raw::c_void,
stream: hipStream_t,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " @brief Returns device ID on the stream.\n\n @param [in] stream stream of device executed on.\n\n @returns hipSuccess, hipErrorInvalidValue\n"]
pub fn hipGetStreamDeviceId(stream: hipStream_t) -> ::std::os::raw::c_int;
}
extern "C" {
#[must_use]
#[doc = " @brief Begins graph capture on a stream.\n\n @param [in] stream - Stream to initiate capture.\n @param [in] mode - Controls the interaction of this capture sequence with other API calls that\n are not safe.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipStreamBeginCapture(stream: hipStream_t, mode: hipStreamCaptureMode) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Ends capture on a stream, returning the captured graph.\n\n @param [in] stream - Stream to end capture.\n @param [out] pGraph - returns the graph captured.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipStreamEndCapture(stream: hipStream_t, pGraph: *mut hipGraph_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get capture status of a stream.\n\n @param [in] stream - Stream under capture.\n @param [out] pCaptureStatus - returns current status of the capture.\n @param [out] pId - unique ID of the capture.\n\n @returns #hipSuccess, #hipErrorStreamCaptureImplicit\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipStreamGetCaptureInfo(
stream: hipStream_t,
pCaptureStatus: *mut hipStreamCaptureStatus,
pId: *mut ::std::os::raw::c_ulonglong,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get stream's capture state\n\n @param [in] stream - Stream under capture.\n @param [out] captureStatus_out - returns current status of the capture.\n @param [out] id_out - unique ID of the capture.\n @param [in] graph_out - returns the graph being captured into.\n @param [out] dependencies_out - returns pointer to an array of nodes.\n @param [out] numDependencies_out - returns size of the array returned in dependencies_out.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorStreamCaptureImplicit\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipStreamGetCaptureInfo_v2(
stream: hipStream_t,
captureStatus_out: *mut hipStreamCaptureStatus,
id_out: *mut ::std::os::raw::c_ulonglong,
graph_out: *mut hipGraph_t,
dependencies_out: *mut *const hipGraphNode_t,
numDependencies_out: *mut usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get stream's capture state\n\n @param [in] stream - Stream under capture.\n @param [out] pCaptureStatus - returns current status of the capture.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorStreamCaptureImplicit\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipStreamIsCapturing(
stream: hipStream_t,
pCaptureStatus: *mut hipStreamCaptureStatus,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Update the set of dependencies in a capturing stream\n\n @param [in] stream - Stream under capture.\n @param [in] dependencies - pointer to an array of nodes to Add/Replace.\n @param [in] numDependencies - size of the array in dependencies.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorIllegalState\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipStreamUpdateCaptureDependencies(
stream: hipStream_t,
dependencies: *mut hipGraphNode_t,
numDependencies: usize,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Swaps the stream capture mode of a thread.\n\n @param [in] mode - Pointer to mode value to swap with the current mode\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipThreadExchangeStreamCaptureMode(mode: *mut hipStreamCaptureMode) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a graph\n\n @param [out] pGraph - pointer to graph to create.\n @param [in] flags - flags for graph creation, must be 0.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryAllocation\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphCreate(pGraph: *mut hipGraph_t, flags: ::std::os::raw::c_uint) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroys a graph\n\n @param [in] graph - instance of graph to destroy.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphDestroy(graph: hipGraph_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Adds dependency edges to a graph.\n\n @param [in] graph - instance of the graph to add dependencies.\n @param [in] from - pointer to the graph nodes with dependenties to add from.\n @param [in] to - pointer to the graph nodes to add dependenties to.\n @param [in] numDependencies - the number of dependencies to add.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphAddDependencies(
graph: hipGraph_t,
from: *const hipGraphNode_t,
to: *const hipGraphNode_t,
numDependencies: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Removes dependency edges from a graph.\n\n @param [in] graph - instance of the graph to remove dependencies.\n @param [in] from - Array of nodes that provide the dependencies.\n @param [in] to - Array of dependent nodes.\n @param [in] numDependencies - the number of dependencies to remove.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphRemoveDependencies(
graph: hipGraph_t,
from: *const hipGraphNode_t,
to: *const hipGraphNode_t,
numDependencies: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns a graph's dependency edges.\n\n @param [in] graph - instance of the graph to get the edges from.\n @param [out] from - pointer to the graph nodes to return edge endpoints.\n @param [out] to - pointer to the graph nodes to return edge endpoints.\n @param [out] numEdges - returns number of edges.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n from and to may both be NULL, in which case this function only returns the number of edges in\n numEdges. Otherwise, numEdges entries will be filled in. If numEdges is higher than the actual\n number of edges, the remaining entries in from and to will be set to NULL, and the number of\n edges actually returned will be written to numEdges\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphGetEdges(
graph: hipGraph_t,
from: *mut hipGraphNode_t,
to: *mut hipGraphNode_t,
numEdges: *mut usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns graph nodes.\n\n @param [in] graph - instance of graph to get the nodes.\n @param [out] nodes - pointer to return the graph nodes.\n @param [out] numNodes - returns number of graph nodes.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n nodes may be NULL, in which case this function will return the number of nodes in numNodes.\n Otherwise, numNodes entries will be filled in. If numNodes is higher than the actual number of\n nodes, the remaining entries in nodes will be set to NULL, and the number of nodes actually\n obtained will be returned in numNodes.\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphGetNodes(
graph: hipGraph_t,
nodes: *mut hipGraphNode_t,
numNodes: *mut usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns graph's root nodes.\n\n @param [in] graph - instance of the graph to get the nodes.\n @param [out] pRootNodes - pointer to return the graph's root nodes.\n @param [out] pNumRootNodes - returns the number of graph's root nodes.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n pRootNodes may be NULL, in which case this function will return the number of root nodes in\n pNumRootNodes. Otherwise, pNumRootNodes entries will be filled in. If pNumRootNodes is higher\n than the actual number of root nodes, the remaining entries in pRootNodes will be set to NULL,\n and the number of nodes actually obtained will be returned in pNumRootNodes.\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphGetRootNodes(
graph: hipGraph_t,
pRootNodes: *mut hipGraphNode_t,
pNumRootNodes: *mut usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns a node's dependencies.\n\n @param [in] node - graph node to get the dependencies from.\n @param [out] pDependencies - pointer to to return the dependencies.\n @param [out] pNumDependencies - returns the number of graph node dependencies.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n pDependencies may be NULL, in which case this function will return the number of dependencies in\n pNumDependencies. Otherwise, pNumDependencies entries will be filled in. If pNumDependencies is\n higher than the actual number of dependencies, the remaining entries in pDependencies will be set\n to NULL, and the number of nodes actually obtained will be returned in pNumDependencies.\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphNodeGetDependencies(
node: hipGraphNode_t,
pDependencies: *mut hipGraphNode_t,
pNumDependencies: *mut usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns a node's dependent nodes.\n\n @param [in] node - graph node to get the Dependent nodes from.\n @param [out] pDependentNodes - pointer to return the graph dependent nodes.\n @param [out] pNumDependentNodes - returns the number of graph node dependent nodes.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n DependentNodes may be NULL, in which case this function will return the number of dependent nodes\n in pNumDependentNodes. Otherwise, pNumDependentNodes entries will be filled in. If\n pNumDependentNodes is higher than the actual number of dependent nodes, the remaining entries in\n pDependentNodes will be set to NULL, and the number of nodes actually obtained will be returned\n in pNumDependentNodes.\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphNodeGetDependentNodes(
node: hipGraphNode_t,
pDependentNodes: *mut hipGraphNode_t,
pNumDependentNodes: *mut usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns a node's type.\n\n @param [in] node - instance of the graph to add dependencies.\n @param [out] pType - pointer to the return the type\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphNodeGetType(node: hipGraphNode_t, pType: *mut hipGraphNodeType) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Remove a node from the graph.\n\n @param [in] node - graph node to remove\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphDestroyNode(node: hipGraphNode_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Clones a graph.\n\n @param [out] pGraphClone - Returns newly created cloned graph.\n @param [in] originalGraph - original graph to clone from.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryAllocation\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphClone(pGraphClone: *mut hipGraph_t, originalGraph: hipGraph_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Finds a cloned version of a node.\n\n @param [out] pNode - Returns the cloned node.\n @param [in] originalNode - original node handle.\n @param [in] clonedGraph - Cloned graph to query.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphNodeFindInClone(
pNode: *mut hipGraphNode_t,
originalNode: hipGraphNode_t,
clonedGraph: hipGraph_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates an executable graph from a graph\n\n @param [out] pGraphExec - pointer to instantiated executable graph that is created.\n @param [in] graph - instance of graph to instantiate.\n @param [out] pErrorNode - pointer to error node in case error occured in graph instantiation,\n it could modify the correponding node.\n @param [out] pLogBuffer - pointer to log buffer.\n @param [out] bufferSize - the size of log buffer.\n\n @returns #hipSuccess, #hipErrorOutOfMemory\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"]
pub fn hipGraphInstantiate(
pGraphExec: *mut hipGraphExec_t,
graph: hipGraph_t,
pErrorNode: *mut hipGraphNode_t,
pLogBuffer: *mut ::std::os::raw::c_char,
bufferSize: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates an executable graph from a graph.\n\n @param [out] pGraphExec - pointer to instantiated executable graph that is created.\n @param [in] graph - instance of graph to instantiate.\n @param [in] flags - Flags to control instantiation.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.It does not support\n any of flag and is behaving as hipGraphInstantiate."]
pub fn hipGraphInstantiateWithFlags(
pGraphExec: *mut hipGraphExec_t,
graph: hipGraph_t,
flags: ::std::os::raw::c_ulonglong,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief launches an executable graph in a stream\n\n @param [in] graphExec - instance of executable graph to launch.\n @param [in] stream - instance of stream in which to launch executable graph.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphLaunch(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief uploads an executable graph in a stream\n\n @param [in] graphExec - instance of executable graph to launch.\n @param [in] stream - instance of stream in which to launch executable graph.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphUpload(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroys an executable graph\n\n @param [in] graphExec - instance of executable graph to destry.\n\n @returns #hipSuccess.\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecDestroy(graphExec: hipGraphExec_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Check whether an executable graph can be updated with a graph and perform the update if *\n possible.\n\n @param [in] hGraphExec - instance of executable graph to update.\n @param [in] hGraph - graph that contains the updated parameters.\n @param [in] hErrorNode_out - node which caused the permissibility check to forbid the update.\n @param [in] updateResult_out - Whether the graph update was permitted.\n @returns #hipSuccess, #hipErrorGraphExecUpdateFailure\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecUpdate(
hGraphExec: hipGraphExec_t,
hGraph: hipGraph_t,
hErrorNode_out: *mut hipGraphNode_t,
updateResult_out: *mut hipGraphExecUpdateResult,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a kernel execution node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to graph node to create.\n @param [in] graph - instance of graph to add the created node.\n @param [in] pDependencies - pointer to the dependencies on the kernel execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] pNodeParams - pointer to the parameters to the kernel execution node on the GPU.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddKernelNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
pNodeParams: *const hipKernelNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets kernel node's parameters.\n\n @param [in] node - instance of the node to get parameters from.\n @param [out] pNodeParams - pointer to the parameters\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphKernelNodeGetParams(
node: hipGraphNode_t,
pNodeParams: *mut hipKernelNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets a kernel node's parameters.\n\n @param [in] node - instance of the node to set parameters to.\n @param [in] pNodeParams - const pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphKernelNodeSetParams(
node: hipGraphNode_t,
pNodeParams: *const hipKernelNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets the parameters for a kernel node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] node - instance of the node to set parameters to.\n @param [in] pNodeParams - const pointer to the kernel node parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecKernelNodeSetParams(
hGraphExec: hipGraphExec_t,
node: hipGraphNode_t,
pNodeParams: *const hipKernelNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a memcpy node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to graph node to create.\n @param [in] graph - instance of graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memcpy execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] pCopyParams - const pointer to the parameters for the memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddMemcpyNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
pCopyParams: *const hipMemcpy3DParms,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets a memcpy node's parameters.\n\n @param [in] node - instance of the node to get parameters from.\n @param [out] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphMemcpyNodeGetParams(
node: hipGraphNode_t,
pNodeParams: *mut hipMemcpy3DParms,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets a memcpy node's parameters.\n\n @param [in] node - instance of the node to set parameters to.\n @param [in] pNodeParams - const pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphMemcpyNodeSetParams(
node: hipGraphNode_t,
pNodeParams: *const hipMemcpy3DParms,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets a node attribute.\n\n @param [in] hNode - instance of the node to set parameters to.\n @param [in] attr - the attribute node is set to.\n @param [in] value - const pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphKernelNodeSetAttribute(
hNode: hipGraphNode_t,
attr: hipKernelNodeAttrID,
value: *const hipKernelNodeAttrValue,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets a node attribute.\n\n @param [in] hNode - instance of the node to set parameters to.\n @param [in] attr - the attribute node is set to.\n @param [in] value - const pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphKernelNodeGetAttribute(
hNode: hipGraphNode_t,
attr: hipKernelNodeAttrID,
value: *mut hipKernelNodeAttrValue,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets the parameters for a memcpy node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] node - instance of the node to set parameters to.\n @param [in] pNodeParams - const pointer to the kernel node parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecMemcpyNodeSetParams(
hGraphExec: hipGraphExec_t,
node: hipGraphNode_t,
pNodeParams: *mut hipMemcpy3DParms,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a 1D memcpy node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to graph node to create.\n @param [in] graph - instance of graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memcpy execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] src - pointer to memory address to the source.\n @param [in] count - the size of the memory to copy.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddMemcpyNode1D(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
dst: *mut ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
count: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets a memcpy node's parameters to perform a 1-dimensional copy.\n\n @param [in] node - instance of the node to set parameters to.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] src - pointer to memory address to the source.\n @param [in] count - the size of the memory to copy.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphMemcpyNodeSetParams1D(
node: hipGraphNode_t,
dst: *mut ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
count: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets the parameters for a memcpy node in the given graphExec to perform a 1-dimensional\n copy.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] node - instance of the node to set parameters to.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] src - pointer to memory address to the source.\n @param [in] count - the size of the memory to copy.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecMemcpyNodeSetParams1D(
hGraphExec: hipGraphExec_t,
node: hipGraphNode_t,
dst: *mut ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
count: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a memcpy node to copy from a symbol on the device and adds it to a graph.\n\n @param [out] pGraphNode - pointer to graph node to create.\n @param [in] graph - instance of graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memcpy execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] symbol - Device symbol address.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddMemcpyNodeFromSymbol(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
dst: *mut ::std::os::raw::c_void,
symbol: *const ::std::os::raw::c_void,
count: usize,
offset: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets a memcpy node's parameters to copy from a symbol on the device.\n\n @param [in] node - instance of the node to set parameters to.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] symbol - Device symbol address.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphMemcpyNodeSetParamsFromSymbol(
node: hipGraphNode_t,
dst: *mut ::std::os::raw::c_void,
symbol: *const ::std::os::raw::c_void,
count: usize,
offset: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets the parameters for a memcpy node in the given graphExec to copy from a symbol on the\n * device.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] node - instance of the node to set parameters to.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] symbol - Device symbol address.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecMemcpyNodeSetParamsFromSymbol(
hGraphExec: hipGraphExec_t,
node: hipGraphNode_t,
dst: *mut ::std::os::raw::c_void,
symbol: *const ::std::os::raw::c_void,
count: usize,
offset: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a memcpy node to copy to a symbol on the device and adds it to a graph.\n\n @param [out] pGraphNode - pointer to graph node to create.\n @param [in] graph - instance of graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memcpy execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] symbol - Device symbol address.\n @param [in] src - pointer to memory address of the src.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddMemcpyNodeToSymbol(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
symbol: *const ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
count: usize,
offset: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets a memcpy node's parameters to copy to a symbol on the device.\n\n @param [in] node - instance of the node to set parameters to.\n @param [in] symbol - Device symbol address.\n @param [in] src - pointer to memory address of the src.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphMemcpyNodeSetParamsToSymbol(
node: hipGraphNode_t,
symbol: *const ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
count: usize,
offset: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets the parameters for a memcpy node in the given graphExec to copy to a symbol on the\n device.\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] node - instance of the node to set parameters to.\n @param [in] symbol - Device symbol address.\n @param [in] src - pointer to memory address of the src.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecMemcpyNodeSetParamsToSymbol(
hGraphExec: hipGraphExec_t,
node: hipGraphNode_t,
symbol: *const ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
count: usize,
offset: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a memset node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to the graph node to create.\n @param [in] graph - instance of the graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memset execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] pMemsetParams - const pointer to the parameters for the memory set.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddMemsetNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
pMemsetParams: *const hipMemsetParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets a memset node's parameters.\n\n @param [in] node - instane of the node to get parameters from.\n @param [out] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphMemsetNodeGetParams(
node: hipGraphNode_t,
pNodeParams: *mut hipMemsetParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets a memset node's parameters.\n\n @param [in] node - instance of the node to set parameters to.\n @param [in] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphMemsetNodeSetParams(
node: hipGraphNode_t,
pNodeParams: *const hipMemsetParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets the parameters for a memset node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] node - instance of the node to set parameters to.\n @param [in] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecMemsetNodeSetParams(
hGraphExec: hipGraphExec_t,
node: hipGraphNode_t,
pNodeParams: *const hipMemsetParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a host execution node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to the graph node to create.\n @param [in] graph - instance of the graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memset execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] pNodeParams -pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddHostNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
pNodeParams: *const hipHostNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns a host node's parameters.\n\n @param [in] node - instane of the node to get parameters from.\n @param [out] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphHostNodeGetParams(
node: hipGraphNode_t,
pNodeParams: *mut hipHostNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets a host node's parameters.\n\n @param [in] node - instance of the node to set parameters to.\n @param [in] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphHostNodeSetParams(
node: hipGraphNode_t,
pNodeParams: *const hipHostNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets the parameters for a host node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] node - instance of the node to set parameters to.\n @param [in] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecHostNodeSetParams(
hGraphExec: hipGraphExec_t,
node: hipGraphNode_t,
pNodeParams: *const hipHostNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a child graph node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to the graph node to create.\n @param [in] graph - instance of the graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memset execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] childGraph - the graph to clone into this node\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddChildGraphNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
childGraph: hipGraph_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets a handle to the embedded graph of a child graph node.\n\n @param [in] node - instane of the node to get child graph.\n @param [out] pGraph - pointer to get the graph.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphChildGraphNodeGetGraph(
node: hipGraphNode_t,
pGraph: *mut hipGraph_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Updates node parameters in the child graph node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] node - node from the graph which was used to instantiate graphExec.\n @param [in] childGraph - child graph with updated parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecChildGraphNodeSetParams(
hGraphExec: hipGraphExec_t,
node: hipGraphNode_t,
childGraph: hipGraph_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates an empty node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to the graph node to create and add to the graph.\n @param [in] graph - instane of the graph the node is add to.\n @param [in] pDependencies - const pointer to the node dependenties.\n @param [in] numDependencies - the number of dependencies.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddEmptyNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates an event record node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to the graph node to create and add to the graph.\n @param [in] graph - instane of the graph the node to be added.\n @param [in] pDependencies - const pointer to the node dependenties.\n @param [in] numDependencies - the number of dependencies.\n @param [in] event - Event for the node.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddEventRecordNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
event: hipEvent_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns the event associated with an event record node.\n\n @param [in] node - instane of the node to get event from.\n @param [out] event_out - Pointer to return the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphEventRecordNodeGetEvent(
node: hipGraphNode_t,
event_out: *mut hipEvent_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets an event record node's event.\n\n @param [in] node - instane of the node to set event to.\n @param [in] event - pointer to the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphEventRecordNodeSetEvent(node: hipGraphNode_t, event: hipEvent_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets the event for an event record node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] hNode - node from the graph which was used to instantiate graphExec.\n @param [in] event - pointer to the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecEventRecordNodeSetEvent(
hGraphExec: hipGraphExec_t,
hNode: hipGraphNode_t,
event: hipEvent_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates an event wait node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to the graph node to create and add to the graph.\n @param [in] graph - instane of the graph the node to be added.\n @param [in] pDependencies - const pointer to the node dependenties.\n @param [in] numDependencies - the number of dependencies.\n @param [in] event - Event for the node.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddEventWaitNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
event: hipEvent_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns the event associated with an event wait node.\n\n @param [in] node - instane of the node to get event from.\n @param [out] event_out - Pointer to return the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphEventWaitNodeGetEvent(
node: hipGraphNode_t,
event_out: *mut hipEvent_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets an event wait node's event.\n\n @param [in] node - instane of the node to set event to.\n @param [in] event - pointer to the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphEventWaitNodeSetEvent(node: hipGraphNode_t, event: hipEvent_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Sets the event for an event record node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] hNode - node from the graph which was used to instantiate graphExec.\n @param [in] event - pointer to the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecEventWaitNodeSetEvent(
hGraphExec: hipGraphExec_t,
hNode: hipGraphNode_t,
event: hipEvent_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a memory allocation node and adds it to a graph\n\n @param [out] pGraphNode - Pointer to the graph node to create and add to the graph\n @param [in] graph - Instane of the graph the node to be added\n @param [in] pDependencies - Const pointer to the node dependenties\n @param [in] numDependencies - The number of dependencies\n @param [in] pNodeParams - Node parameters for memory allocation\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddMemAllocNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
pNodeParams: *mut hipMemAllocNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns parameters for memory allocation node\n\n @param [in] node - Memory allocation node for a query\n @param [out] pNodeParams - Parameters for the specified memory allocation node\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphMemAllocNodeGetParams(
node: hipGraphNode_t,
pNodeParams: *mut hipMemAllocNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a memory free node and adds it to a graph\n\n @param [out] pGraphNode - Pointer to the graph node to create and add to the graph\n @param [in] graph - Instane of the graph the node to be added\n @param [in] pDependencies - Const pointer to the node dependenties\n @param [in] numDependencies - The number of dependencies\n @param [in] dev_ptr - Pointer to the memory to be freed\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddMemFreeNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
dev_ptr: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns parameters for memory free node\n\n @param [in] node - Memory free node for a query\n @param [out] dev_ptr - Device pointer for the specified memory free node\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphMemFreeNodeGetParams(
node: hipGraphNode_t,
dev_ptr: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get the mem attribute for graphs.\n\n @param [in] device - device the attr is get for.\n @param [in] attr - attr to get.\n @param [out] value - value for specific attr.\n @returns #hipSuccess, #hipErrorInvalidDevice\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipDeviceGetGraphMemAttribute(
device: ::std::os::raw::c_int,
attr: hipGraphMemAttributeType,
value: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set the mem attribute for graphs.\n\n @param [in] device - device the attr is set for.\n @param [in] attr - attr to set.\n @param [in] value - value for specific attr.\n @returns #hipSuccess, #hipErrorInvalidDevice\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipDeviceSetGraphMemAttribute(
device: ::std::os::raw::c_int,
attr: hipGraphMemAttributeType,
value: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Free unused memory on specific device used for graph back to OS.\n\n @param [in] device - device the memory is used for graphs\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipDeviceGraphMemTrim(device: ::std::os::raw::c_int) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Create an instance of userObject to manage lifetime of a resource.\n\n @param [out] object_out - pointer to instace of userobj.\n @param [in] ptr - pointer to pass to destroy function.\n @param [in] destroy - destroy callback to remove resource.\n @param [in] initialRefcount - reference to resource.\n @param [in] flags - flags passed to API.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipUserObjectCreate(
object_out: *mut hipUserObject_t,
ptr: *mut ::std::os::raw::c_void,
destroy: hipHostFn_t,
initialRefcount: ::std::os::raw::c_uint,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Release number of references to resource.\n\n @param [in] object - pointer to instace of userobj.\n @param [in] count - reference to resource to be retained.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipUserObjectRelease(
object: hipUserObject_t,
count: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Retain number of references to resource.\n\n @param [in] object - pointer to instace of userobj.\n @param [in] count - reference to resource to be retained.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipUserObjectRetain(
object: hipUserObject_t,
count: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Retain user object for graphs.\n\n @param [in] graph - pointer to graph to retain the user object for.\n @param [in] object - pointer to instace of userobj.\n @param [in] count - reference to resource to be retained.\n @param [in] flags - flags passed to API.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphRetainUserObject(
graph: hipGraph_t,
object: hipUserObject_t,
count: ::std::os::raw::c_uint,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Release user object from graphs.\n\n @param [in] graph - pointer to graph to retain the user object for.\n @param [in] object - pointer to instace of userobj.\n @param [in] count - reference to resource to be retained.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphReleaseUserObject(
graph: hipGraph_t,
object: hipUserObject_t,
count: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Write a DOT file describing graph structure.\n\n @param [in] graph - graph object for which DOT file has to be generated.\n @param [in] path - path to write the DOT file.\n @param [in] flags - Flags from hipGraphDebugDotFlags to get additional node information.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorOperatingSystem\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphDebugDotPrint(
graph: hipGraph_t,
path: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Copies attributes from source node to destination node.\n\n Copies attributes from source node to destination node.\n Both node must have the same context.\n\n @param [out] hDst - Destination node.\n @param [in] hSrc - Source node.\n For list of attributes see ::hipKernelNodeAttrID.\n\n @returns #hipSuccess, #hipErrorInvalidContext\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphKernelNodeCopyAttributes(
hSrc: hipGraphNode_t,
hDst: hipGraphNode_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Enables or disables the specified node in the given graphExec\n\n Sets hNode to be either enabled or disabled. Disabled nodes are functionally equivalent\n to empty nodes until they are reenabled. Existing node parameters are not affected by\n disabling/enabling the node.\n\n The node is identified by the corresponding hNode in the non-executable graph, from which the\n executable graph was instantiated.\n\n hNode must not have been removed from the original graph.\n\n @note Currently only kernel, memset and memcpy nodes are supported.\n\n @param [in] hGraphExec - The executable graph in which to set the specified node.\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [in] isEnabled - Node is enabled if != 0, otherwise the node is disabled.\n\n @returns #hipSuccess, #hipErrorInvalidValue,\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphNodeSetEnabled(
hGraphExec: hipGraphExec_t,
hNode: hipGraphNode_t,
isEnabled: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Query whether a node in the given graphExec is enabled\n\n Sets isEnabled to 1 if hNode is enabled, or 0 if it is disabled.\n\n The node is identified by the corresponding node in the non-executable graph, from which the\n executable graph was instantiated.\n\n hNode must not have been removed from the original graph.\n\n @note Currently only kernel, memset and memcpy nodes are supported.\n\n @param [in] hGraphExec - The executable graph in which to set the specified node.\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [out] isEnabled - Location to return the enabled status of the node.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphNodeGetEnabled(
hGraphExec: hipGraphExec_t,
hNode: hipGraphNode_t,
isEnabled: *mut ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a external semaphor wait node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to the graph node to create.\n @param [in] graph - instance of the graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memset execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] nodeParams -pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddExternalSemaphoresWaitNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
nodeParams: *const hipExternalSemaphoreWaitNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a external semaphor signal node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to the graph node to create.\n @param [in] graph - instance of the graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memset execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] nodeParams -pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphAddExternalSemaphoresSignalNode(
pGraphNode: *mut hipGraphNode_t,
graph: hipGraph_t,
pDependencies: *const hipGraphNode_t,
numDependencies: usize,
nodeParams: *const hipExternalSemaphoreSignalNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Updates node parameters in the external semaphore signal node.\n\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [in] nodeParams - Pointer to the params to be set.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExternalSemaphoresSignalNodeSetParams(
hNode: hipGraphNode_t,
nodeParams: *const hipExternalSemaphoreSignalNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Updates node parameters in the external semaphore wait node.\n\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [in] nodeParams - Pointer to the params to be set.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExternalSemaphoresWaitNodeSetParams(
hNode: hipGraphNode_t,
nodeParams: *const hipExternalSemaphoreWaitNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns external semaphore signal node params.\n\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [out] params_out - Pointer to params.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExternalSemaphoresSignalNodeGetParams(
hNode: hipGraphNode_t,
params_out: *const hipExternalSemaphoreSignalNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns external semaphore wait node params.\n\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [out] params_out - Pointer to params.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExternalSemaphoresWaitNodeGetParams(
hNode: hipGraphNode_t,
params_out: *const hipExternalSemaphoreWaitNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Updates node parameters in the external semaphore signal node in the given graphExec.\n\n @param [in] hGraphExec - The executable graph in which to set the specified node.\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [in] nodeParams - Pointer to the params to be set.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecExternalSemaphoresSignalNodeSetParams(
hGraphExec: hipGraphExec_t,
hNode: hipGraphNode_t,
nodeParams: *const hipExternalSemaphoreSignalNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Updates node parameters in the external semaphore wait node in the given graphExec.\n\n @param [in] hGraphExec - The executable graph in which to set the specified node.\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [in] nodeParams - Pointer to the params to be set.\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
pub fn hipGraphExecExternalSemaphoresWaitNodeSetParams(
hGraphExec: hipGraphExec_t,
hNode: hipGraphNode_t,
nodeParams: *const hipExternalSemaphoreWaitNodeParams,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Frees an address range reservation made via hipMemAddressReserve\n\n @param [in] devPtr - starting address of the range.\n @param [in] size - size of the range.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemAddressFree(devPtr: *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Reserves an address range\n\n @param [out] ptr - starting address of the reserved range.\n @param [in] size - size of the reservation.\n @param [in] alignment - alignment of the address.\n @param [in] addr - requested starting address of the range.\n @param [in] flags - currently unused, must be zero.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemAddressReserve(
ptr: *mut *mut ::std::os::raw::c_void,
size: usize,
alignment: usize,
addr: *mut ::std::os::raw::c_void,
flags: ::std::os::raw::c_ulonglong,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Creates a memory allocation described by the properties and size\n\n @param [out] handle - value of the returned handle.\n @param [in] size - size of the allocation.\n @param [in] prop - properties of the allocation.\n @param [in] flags - currently unused, must be zero.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemCreate(
handle: *mut hipMemGenericAllocationHandle_t,
size: usize,
prop: *const hipMemAllocationProp,
flags: ::std::os::raw::c_ulonglong,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Exports an allocation to a requested shareable handle type.\n\n @param [out] shareableHandle - value of the returned handle.\n @param [in] handle - handle to share.\n @param [in] handleType - type of the shareable handle.\n @param [in] flags - currently unused, must be zero.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemExportToShareableHandle(
shareableHandle: *mut ::std::os::raw::c_void,
handle: hipMemGenericAllocationHandle_t,
handleType: hipMemAllocationHandleType,
flags: ::std::os::raw::c_ulonglong,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get the access flags set for the given location and ptr.\n\n @param [out] flags - flags for this location.\n @param [in] location - target location.\n @param [in] ptr - address to check the access flags.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemGetAccess(
flags: *mut ::std::os::raw::c_ulonglong,
location: *const hipMemLocation,
ptr: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Calculates either the minimal or recommended granularity.\n\n @param [out] granularity - returned granularity.\n @param [in] prop - location properties.\n @param [in] option - determines which granularity to return.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows.\n"]
pub fn hipMemGetAllocationGranularity(
granularity: *mut usize,
prop: *const hipMemAllocationProp,
option: hipMemAllocationGranularity_flags,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Retrieve the property structure of the given handle.\n\n @param [out] prop - properties of the given handle.\n @param [in] handle - handle to perform the query on.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux under development on Windows."]
pub fn hipMemGetAllocationPropertiesFromHandle(
prop: *mut hipMemAllocationProp,
handle: hipMemGenericAllocationHandle_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Imports an allocation from a requested shareable handle type.\n\n @param [out] handle - returned value.\n @param [in] osHandle - shareable handle representing the memory allocation.\n @param [in] shHandleType - handle type.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemImportFromShareableHandle(
handle: *mut hipMemGenericAllocationHandle_t,
osHandle: *mut ::std::os::raw::c_void,
shHandleType: hipMemAllocationHandleType,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Maps an allocation handle to a reserved virtual address range.\n\n @param [in] ptr - address where the memory will be mapped.\n @param [in] size - size of the mapping.\n @param [in] offset - offset into the memory, currently must be zero.\n @param [in] handle - memory allocation to be mapped.\n @param [in] flags - currently unused, must be zero.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemMap(
ptr: *mut ::std::os::raw::c_void,
size: usize,
offset: usize,
handle: hipMemGenericAllocationHandle_t,
flags: ::std::os::raw::c_ulonglong,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Maps or unmaps subregions of sparse HIP arrays and sparse HIP mipmapped arrays.\n\n @param [in] mapInfoList - list of hipArrayMapInfo.\n @param [in] count - number of hipArrayMapInfo in mapInfoList.\n @param [in] stream - stream identifier for the stream to use for map or unmap operations.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemMapArrayAsync(
mapInfoList: *mut hipArrayMapInfo,
count: ::std::os::raw::c_uint,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Release a memory handle representing a memory allocation which was previously allocated through hipMemCreate.\n\n @param [in] handle - handle of the memory allocation.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemRelease(handle: hipMemGenericAllocationHandle_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Returns the allocation handle of the backing memory allocation given the address.\n\n @param [out] handle - handle representing addr.\n @param [in] addr - address to look up.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemRetainAllocationHandle(
handle: *mut hipMemGenericAllocationHandle_t,
addr: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Set the access flags for each location specified in desc for the given virtual address range.\n\n @param [in] ptr - starting address of the virtual address range.\n @param [in] size - size of the range.\n @param [in] desc - array of hipMemAccessDesc.\n @param [in] count - number of hipMemAccessDesc in desc.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemSetAccess(
ptr: *mut ::std::os::raw::c_void,
size: usize,
desc: *const hipMemAccessDesc,
count: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Unmap memory allocation of a given address range.\n\n @param [in] ptr - starting address of the range to unmap.\n @param [in] size - size of the virtual address range.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @note This API is implemented on Linux, under development on Windows."]
pub fn hipMemUnmap(ptr: *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
}
#[doc = "-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup GL OpenGL Interop\n @{\n This section describes the OpenGL and graphics interoperability functions of HIP runtime API.\n/\n/** GLuint as uint."]
pub type GLuint = ::std::os::raw::c_uint;
#[doc = " GLenum as uint."]
pub type GLenum = ::std::os::raw::c_uint;
extern "C" {
#[must_use]
#[doc = " @brief Queries devices associated with the current OpenGL context.\n\n @param [out] pHipDeviceCount - Pointer of number of devices on the current GL context.\n @param [out] pHipDevices - Pointer of devices on the current OpenGL context.\n @param [in] hipDeviceCount - Size of device.\n @param [in] deviceList - The setting of devices. It could be either hipGLDeviceListCurrentFrame\n for the devices used to render the current frame, or hipGLDeviceListAll for all devices.\n The default setting is Invalid deviceList value.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n"]
pub fn hipGLGetDevices(
pHipDeviceCount: *mut ::std::os::raw::c_uint,
pHipDevices: *mut ::std::os::raw::c_int,
hipDeviceCount: ::std::os::raw::c_uint,
deviceList: hipGLDeviceList,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Registers a GL Buffer for interop and returns corresponding graphics resource.\n\n @param [out] resource - Returns pointer of graphics resource.\n @param [in] buffer - Buffer to be registered.\n @param [in] flags - Register flags.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorInvalidResourceHandle\n"]
pub fn hipGraphicsGLRegisterBuffer(
resource: *mut *mut hipGraphicsResource,
buffer: GLuint,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Register a GL Image for interop and returns the corresponding graphic resource.\n\n @param [out] resource - Returns pointer of graphics resource.\n @param [in] image - Image to be registered.\n @param [in] target - Valid target value Id.\n @param [in] flags - Register flags.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorInvalidResourceHandle\n"]
pub fn hipGraphicsGLRegisterImage(
resource: *mut *mut hipGraphicsResource,
image: GLuint,
target: GLenum,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Maps a graphics resource for access.\n\n @param [in] count - Number of resources to map.\n @param [in] resources - Pointer of resources to map.\n @param [in] stream - Stream for synchronization.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorInvalidResourceHandle\n"]
pub fn hipGraphicsMapResources(
count: ::std::os::raw::c_int,
resources: *mut hipGraphicsResource_t,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Get an array through which to access a subresource of a mapped graphics resource.\n\n @param [out] array - Pointer of array through which a subresource of resource may be accessed.\n @param [in] resource - Mapped resource to access.\n @param [in] arrayIndex - Array index for the subresource to access.\n @param [in] mipLevel - Mipmap level for the subresource to access.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note In this API, the value of arrayIndex higher than zero is currently not supported.\n"]
pub fn hipGraphicsSubResourceGetMappedArray(
array: *mut hipArray_t,
resource: hipGraphicsResource_t,
arrayIndex: ::std::os::raw::c_uint,
mipLevel: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Gets device accessible address of a graphics resource.\n\n @param [out] devPtr - Pointer of device through which graphic resource may be accessed.\n @param [out] size - Size of the buffer accessible from devPtr.\n @param [in] resource - Mapped resource to access.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipGraphicsResourceGetMappedPointer(
devPtr: *mut *mut ::std::os::raw::c_void,
size: *mut usize,
resource: hipGraphicsResource_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Unmaps graphics resources.\n\n @param [in] count - Number of resources to unmap.\n @param [in] resources - Pointer of resources to unmap.\n @param [in] stream - Stream for synchronization.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorContextIsDestroyed\n"]
pub fn hipGraphicsUnmapResources(
count: ::std::os::raw::c_int,
resources: *mut hipGraphicsResource_t,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Unregisters a graphics resource.\n\n @param [in] resource - Graphics resources to unregister.\n\n @returns #hipSuccess\n"]
pub fn hipGraphicsUnregisterResource(resource: hipGraphicsResource_t) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Create a surface object.\n\n @param [out] pSurfObject Pointer of surface object to be created.\n @param [in] pResDesc Pointer of suface object descriptor.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
pub fn hipCreateSurfaceObject(
pSurfObject: *mut hipSurfaceObject_t,
pResDesc: *const hipResourceDesc,
) -> hipError_t;
}
extern "C" {
#[must_use]
#[doc = " @brief Destroy a surface object.\n\n @param [in] surfaceObject Surface object to be destroyed.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
pub fn hipDestroySurfaceObject(surfaceObject: hipSurfaceObject_t) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpy_spt(
dst: *mut ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
sizeBytes: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpyToSymbol_spt(
symbol: *const ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
sizeBytes: usize,
offset: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpyFromSymbol_spt(
dst: *mut ::std::os::raw::c_void,
symbol: *const ::std::os::raw::c_void,
sizeBytes: usize,
offset: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpy2D_spt(
dst: *mut ::std::os::raw::c_void,
dpitch: usize,
src: *const ::std::os::raw::c_void,
spitch: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpy2DFromArray_spt(
dst: *mut ::std::os::raw::c_void,
dpitch: usize,
src: hipArray_const_t,
wOffset: usize,
hOffset: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpy3D_spt(p: *const hipMemcpy3DParms) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemset_spt(
dst: *mut ::std::os::raw::c_void,
value: ::std::os::raw::c_int,
sizeBytes: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemsetAsync_spt(
dst: *mut ::std::os::raw::c_void,
value: ::std::os::raw::c_int,
sizeBytes: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemset2D_spt(
dst: *mut ::std::os::raw::c_void,
pitch: usize,
value: ::std::os::raw::c_int,
width: usize,
height: usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemset2DAsync_spt(
dst: *mut ::std::os::raw::c_void,
pitch: usize,
value: ::std::os::raw::c_int,
width: usize,
height: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemset3DAsync_spt(
pitchedDevPtr: hipPitchedPtr,
value: ::std::os::raw::c_int,
extent: hipExtent,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemset3D_spt(
pitchedDevPtr: hipPitchedPtr,
value: ::std::os::raw::c_int,
extent: hipExtent,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpyAsync_spt(
dst: *mut ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
sizeBytes: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpy3DAsync_spt(p: *const hipMemcpy3DParms, stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpy2DAsync_spt(
dst: *mut ::std::os::raw::c_void,
dpitch: usize,
src: *const ::std::os::raw::c_void,
spitch: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpyFromSymbolAsync_spt(
dst: *mut ::std::os::raw::c_void,
symbol: *const ::std::os::raw::c_void,
sizeBytes: usize,
offset: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpyToSymbolAsync_spt(
symbol: *const ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
sizeBytes: usize,
offset: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpyFromArray_spt(
dst: *mut ::std::os::raw::c_void,
src: hipArray_const_t,
wOffsetSrc: usize,
hOffset: usize,
count: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpy2DToArray_spt(
dst: *mut hipArray,
wOffset: usize,
hOffset: usize,
src: *const ::std::os::raw::c_void,
spitch: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpy2DFromArrayAsync_spt(
dst: *mut ::std::os::raw::c_void,
dpitch: usize,
src: hipArray_const_t,
wOffsetSrc: usize,
hOffsetSrc: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipMemcpy2DToArrayAsync_spt(
dst: *mut hipArray,
wOffset: usize,
hOffset: usize,
src: *const ::std::os::raw::c_void,
spitch: usize,
width: usize,
height: usize,
kind: hipMemcpyKind,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipStreamQuery_spt(stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipStreamSynchronize_spt(stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipStreamGetPriority_spt(
stream: hipStream_t,
priority: *mut ::std::os::raw::c_int,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipStreamWaitEvent_spt(
stream: hipStream_t,
event: hipEvent_t,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipStreamGetFlags_spt(
stream: hipStream_t,
flags: *mut ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipStreamAddCallback_spt(
stream: hipStream_t,
callback: hipStreamCallback_t,
userData: *mut ::std::os::raw::c_void,
flags: ::std::os::raw::c_uint,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipEventRecord_spt(event: hipEvent_t, stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipLaunchCooperativeKernel_spt(
f: *const ::std::os::raw::c_void,
gridDim: dim3,
blockDim: dim3,
kernelParams: *mut *mut ::std::os::raw::c_void,
sharedMemBytes: u32,
hStream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipLaunchKernel_spt(
function_address: *const ::std::os::raw::c_void,
numBlocks: dim3,
dimBlocks: dim3,
args: *mut *mut ::std::os::raw::c_void,
sharedMemBytes: usize,
stream: hipStream_t,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipGraphLaunch_spt(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipStreamBeginCapture_spt(stream: hipStream_t, mode: hipStreamCaptureMode)
-> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipStreamEndCapture_spt(stream: hipStream_t, pGraph: *mut hipGraph_t) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipStreamIsCapturing_spt(
stream: hipStream_t,
pCaptureStatus: *mut hipStreamCaptureStatus,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipStreamGetCaptureInfo_spt(
stream: hipStream_t,
pCaptureStatus: *mut hipStreamCaptureStatus,
pId: *mut ::std::os::raw::c_ulonglong,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipStreamGetCaptureInfo_v2_spt(
stream: hipStream_t,
captureStatus_out: *mut hipStreamCaptureStatus,
id_out: *mut ::std::os::raw::c_ulonglong,
graph_out: *mut hipGraph_t,
dependencies_out: *mut *const hipGraphNode_t,
numDependencies_out: *mut usize,
) -> hipError_t;
}
extern "C" {
#[must_use]
pub fn hipLaunchHostFunc_spt(
stream: hipStream_t,
fn_: hipHostFn_t,
userData: *mut ::std::os::raw::c_void,
) -> hipError_t;
}
|