rocm-sys 0.0.1

ROCm system bindings configured by release version
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
#[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]
    fn extract_bit(byte: u8, index: usize) -> bool {
        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 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];
        Self::extract_bit(byte, index)
    }
    #[inline]
    pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
        debug_assert!(index / 8 < core::mem::size_of::<Storage>());
        let byte_index = index / 8;
        let byte = unsafe {
            *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize)
        };
        Self::extract_bit(byte, index)
    }
    #[inline]
    fn change_bit(byte: u8, index: usize, val: bool) -> u8 {
        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 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];
        *byte = Self::change_bit(*byte, index, val);
    }
    #[inline]
    pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
        debug_assert!(index / 8 < core::mem::size_of::<Storage>());
        let byte_index = index / 8;
        let byte = unsafe {
            (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize)
        };
        unsafe { *byte = Self::change_bit(*byte, index, val) };
    }
    #[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) + 7) / 8 <= self.storage.as_ref().len());
        if bit_width == 0 {
            return 0;
        }
        let mut val = 0u64;
        let storage = self.storage.as_ref();
        let start_byte = bit_offset / 8;
        let bit_shift = bit_offset % 8;
        let bytes_needed = (bit_width as usize + bit_shift + 7) / 8;
        if cfg!(target_endian = "big") {
            for i in 0..bytes_needed {
                val |= (storage[start_byte + i].reverse_bits() as u64) << (i * 8);
            }
        } else {
            for i in 0..bytes_needed {
                val |= (storage[start_byte + i] as u64) << (i * 8);
            }
        }
        val >>= bit_shift;
        if bit_width < 64 {
            val &= (1u64 << bit_width) - 1;
        }
        if cfg!(target_endian = "big") {
            val = val.reverse_bits() >> (64 - bit_width as usize);
        }
        val
    }
    #[inline]
    pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
        debug_assert!(
            (bit_offset + (bit_width as usize) + 7) / 8 <= core::mem::size_of::<Storage>()
        );
        if bit_width == 0 {
            return 0;
        }
        let mut val = 0u64;
        let start_byte = bit_offset / 8;
        let bit_shift = bit_offset % 8;
        let bytes_needed = (bit_width as usize + bit_shift + 7) / 8;
        let storage_ptr = unsafe { core::ptr::addr_of!((*this).storage) as *const u8 };
        if cfg!(target_endian = "big") {
            for i in 0..bytes_needed {
                let byte = unsafe { *storage_ptr.add(start_byte + i) };
                val |= (byte.reverse_bits() as u64) << (i * 8);
            }
        } else {
            for i in 0..bytes_needed {
                let byte = unsafe { *storage_ptr.add(start_byte + i) };
                val |= (byte as u64) << (i * 8);
            }
        }
        val >>= bit_shift;
        if bit_width < 64 {
            val &= (1u64 << bit_width) - 1;
        }
        if cfg!(target_endian = "big") {
            val = val.reverse_bits() >> (64 - bit_width as usize);
        }
        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) + 7) / 8 <= self.storage.as_ref().len());
        if bit_width == 0 {
            return;
        }
        let mut val = val;
        if bit_width < 64 {
            val &= (1u64 << bit_width) - 1;
        }
        if cfg!(target_endian = "big") {
            val = val.reverse_bits() >> (64 - bit_width as usize);
        }
        let storage = self.storage.as_mut();
        let start_byte = bit_offset / 8;
        let bit_shift = bit_offset % 8;
        let bytes_needed = (bit_width as usize + bit_shift + 7) / 8;
        val <<= bit_shift;
        let field_mask = if bit_width as usize + bit_shift >= 64 {
            !0u64 << bit_shift
        } else {
            ((1u64 << bit_width) - 1) << bit_shift
        };
        for i in 0..bytes_needed {
            let byte_val = (val >> (i * 8)) as u8;
            let byte_mask = (field_mask >> (i * 8)) as u8;
            if cfg!(target_endian = "big") {
                let byte = storage[start_byte + i].reverse_bits();
                let new_byte = (byte & !byte_mask) | (byte_val & byte_mask);
                storage[start_byte + i] = new_byte.reverse_bits();
            } else {
                storage[start_byte + i] =
                    (storage[start_byte + i] & !byte_mask) | (byte_val & byte_mask);
            }
        }
    }
    #[inline]
    pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
        debug_assert!(
            (bit_offset + (bit_width as usize) + 7) / 8 <= core::mem::size_of::<Storage>()
        );
        if bit_width == 0 {
            return;
        }
        let mut val = val;
        if bit_width < 64 {
            val &= (1u64 << bit_width) - 1;
        }
        if cfg!(target_endian = "big") {
            val = val.reverse_bits() >> (64 - bit_width as usize);
        }
        let start_byte = bit_offset / 8;
        let bit_shift = bit_offset % 8;
        let bytes_needed = (bit_width as usize + bit_shift + 7) / 8;
        val <<= bit_shift;
        let field_mask = if bit_width as usize + bit_shift >= 64 {
            !0u64 << bit_shift
        } else {
            ((1u64 << bit_width) - 1) << bit_shift
        };
        let storage_ptr = unsafe { core::ptr::addr_of_mut!((*this).storage) as *mut u8 };
        for i in 0..bytes_needed {
            let byte_val = (val >> (i * 8)) as u8;
            let byte_mask = (field_mask >> (i * 8)) as u8;
            let byte_ptr = unsafe { storage_ptr.add(start_byte + i) };
            if cfg!(target_endian = "big") {
                let byte = unsafe { (*byte_ptr).reverse_bits() };
                let new_byte = (byte & !byte_mask) | (byte_val & byte_mask);
                unsafe { *byte_ptr = new_byte.reverse_bits() };
            } else {
                unsafe { *byte_ptr = (*byte_ptr & !byte_mask) | (byte_val & byte_mask) };
            }
        }
    }
}
#[doc = " Const-generic methods for efficient bitfield access when offset and width"]
#[doc = " are known at compile time."]
impl<const N: usize> __BindgenBitfieldUnit<[u8; N]> {
    #[doc = " Get a field using const generics for compile-time optimization."]
    #[doc = " Uses native word size operations when the field fits in usize."]
    #[inline]
    pub const fn get_const<const BIT_OFFSET: usize, const BIT_WIDTH: u8>(&self) -> u64 {
        debug_assert!(BIT_WIDTH <= 64);
        debug_assert!(BIT_OFFSET / 8 < N);
        debug_assert!((BIT_OFFSET + (BIT_WIDTH as usize) + 7) / 8 <= N);
        if BIT_WIDTH == 0 {
            return 0;
        }
        let start_byte = BIT_OFFSET / 8;
        let bit_shift = BIT_OFFSET % 8;
        let bytes_needed = (BIT_WIDTH as usize + bit_shift + 7) / 8;
        if BIT_WIDTH as usize + bit_shift <= usize::BITS as usize {
            let mut val = 0usize;
            if cfg!(target_endian = "big") {
                let mut i = 0;
                while i < bytes_needed {
                    val |= (self.storage[start_byte + i].reverse_bits() as usize) << (i * 8);
                    i += 1;
                }
            } else {
                let mut i = 0;
                while i < bytes_needed {
                    val |= (self.storage[start_byte + i] as usize) << (i * 8);
                    i += 1;
                }
            }
            val >>= bit_shift;
            if (BIT_WIDTH as u32) < usize::BITS {
                val &= (1usize << BIT_WIDTH) - 1;
            }
            if cfg!(target_endian = "big") {
                val = val.reverse_bits() >> (usize::BITS as usize - BIT_WIDTH as usize);
            }
            val as u64
        } else {
            let mut val = 0u64;
            if cfg!(target_endian = "big") {
                let mut i = 0;
                while i < bytes_needed {
                    val |= (self.storage[start_byte + i].reverse_bits() as u64) << (i * 8);
                    i += 1;
                }
            } else {
                let mut i = 0;
                while i < bytes_needed {
                    val |= (self.storage[start_byte + i] as u64) << (i * 8);
                    i += 1;
                }
            }
            val >>= bit_shift;
            if BIT_WIDTH < 64 {
                val &= (1u64 << BIT_WIDTH) - 1;
            }
            if cfg!(target_endian = "big") {
                val = val.reverse_bits() >> (64 - BIT_WIDTH as usize);
            }
            val
        }
    }
    #[doc = " Set a field using const generics for compile-time optimization."]
    #[doc = " Uses native word size operations when the field fits in usize."]
    #[inline]
    pub fn set_const<const BIT_OFFSET: usize, const BIT_WIDTH: u8>(&mut self, val: u64) {
        debug_assert!(BIT_WIDTH <= 64);
        debug_assert!(BIT_OFFSET / 8 < N);
        debug_assert!((BIT_OFFSET + (BIT_WIDTH as usize) + 7) / 8 <= N);
        if BIT_WIDTH == 0 {
            return;
        }
        let start_byte = BIT_OFFSET / 8;
        let bit_shift = BIT_OFFSET % 8;
        let bytes_needed = (BIT_WIDTH as usize + bit_shift + 7) / 8;
        if BIT_WIDTH as usize + bit_shift <= usize::BITS as usize {
            let mut val = val as usize;
            if (BIT_WIDTH as u32) < usize::BITS {
                val &= (1usize << BIT_WIDTH) - 1;
            }
            if cfg!(target_endian = "big") {
                val = val.reverse_bits() >> (usize::BITS as usize - BIT_WIDTH as usize);
            }
            val <<= bit_shift;
            let field_mask = if BIT_WIDTH as usize + bit_shift >= usize::BITS as usize {
                !0usize << bit_shift
            } else {
                ((1usize << BIT_WIDTH) - 1) << bit_shift
            };
            let mut i = 0;
            while i < bytes_needed {
                let byte_val = (val >> (i * 8)) as u8;
                let byte_mask = (field_mask >> (i * 8)) as u8;
                if cfg!(target_endian = "big") {
                    let byte = self.storage[start_byte + i].reverse_bits();
                    let new_byte = (byte & !byte_mask) | (byte_val & byte_mask);
                    self.storage[start_byte + i] = new_byte.reverse_bits();
                } else {
                    self.storage[start_byte + i] =
                        (self.storage[start_byte + i] & !byte_mask) | (byte_val & byte_mask);
                }
                i += 1;
            }
        } else {
            let mut val = val;
            if BIT_WIDTH < 64 {
                val &= (1u64 << BIT_WIDTH) - 1;
            }
            if cfg!(target_endian = "big") {
                val = val.reverse_bits() >> (64 - BIT_WIDTH as usize);
            }
            val <<= bit_shift;
            let field_mask = if BIT_WIDTH as usize + bit_shift >= 64 {
                !0u64 << bit_shift
            } else {
                ((1u64 << BIT_WIDTH) - 1) << bit_shift
            };
            let mut i = 0;
            while i < bytes_needed {
                let byte_val = (val >> (i * 8)) as u8;
                let byte_mask = (field_mask >> (i * 8)) as u8;
                if cfg!(target_endian = "big") {
                    let byte = self.storage[start_byte + i].reverse_bits();
                    let new_byte = (byte & !byte_mask) | (byte_val & byte_mask);
                    self.storage[start_byte + i] = new_byte.reverse_bits();
                } else {
                    self.storage[start_byte + i] =
                        (self.storage[start_byte + i] & !byte_mask) | (byte_val & byte_mask);
                }
                i += 1;
            }
        }
    }
    #[doc = " Raw pointer get using const generics for compile-time optimization."]
    #[doc = " Uses native word size operations when the field fits in usize."]
    #[inline]
    pub const unsafe fn raw_get_const<const BIT_OFFSET: usize, const BIT_WIDTH: u8>(
        this: *const Self,
    ) -> u64 {
        debug_assert!(BIT_WIDTH <= 64);
        debug_assert!(BIT_OFFSET / 8 < N);
        debug_assert!((BIT_OFFSET + (BIT_WIDTH as usize) + 7) / 8 <= N);
        if BIT_WIDTH == 0 {
            return 0;
        }
        let start_byte = BIT_OFFSET / 8;
        let bit_shift = BIT_OFFSET % 8;
        let bytes_needed = (BIT_WIDTH as usize + bit_shift + 7) / 8;
        let storage_ptr = unsafe { core::ptr::addr_of!((*this).storage) as *const u8 };
        if BIT_WIDTH as usize + bit_shift <= usize::BITS as usize {
            let mut val = 0usize;
            if cfg!(target_endian = "big") {
                let mut i = 0;
                while i < bytes_needed {
                    let byte = unsafe { *storage_ptr.add(start_byte + i) };
                    val |= (byte.reverse_bits() as usize) << (i * 8);
                    i += 1;
                }
            } else {
                let mut i = 0;
                while i < bytes_needed {
                    let byte = unsafe { *storage_ptr.add(start_byte + i) };
                    val |= (byte as usize) << (i * 8);
                    i += 1;
                }
            }
            val >>= bit_shift;
            if (BIT_WIDTH as u32) < usize::BITS {
                val &= (1usize << BIT_WIDTH) - 1;
            }
            if cfg!(target_endian = "big") {
                val = val.reverse_bits() >> (usize::BITS as usize - BIT_WIDTH as usize);
            }
            val as u64
        } else {
            let mut val = 0u64;
            if cfg!(target_endian = "big") {
                let mut i = 0;
                while i < bytes_needed {
                    let byte = unsafe { *storage_ptr.add(start_byte + i) };
                    val |= (byte.reverse_bits() as u64) << (i * 8);
                    i += 1;
                }
            } else {
                let mut i = 0;
                while i < bytes_needed {
                    let byte = unsafe { *storage_ptr.add(start_byte + i) };
                    val |= (byte as u64) << (i * 8);
                    i += 1;
                }
            }
            val >>= bit_shift;
            if BIT_WIDTH < 64 {
                val &= (1u64 << BIT_WIDTH) - 1;
            }
            if cfg!(target_endian = "big") {
                val = val.reverse_bits() >> (64 - BIT_WIDTH as usize);
            }
            val
        }
    }
    #[doc = " Raw pointer set using const generics for compile-time optimization."]
    #[doc = " Uses native word size operations when the field fits in usize."]
    #[inline]
    pub unsafe fn raw_set_const<const BIT_OFFSET: usize, const BIT_WIDTH: u8>(
        this: *mut Self,
        val: u64,
    ) {
        debug_assert!(BIT_WIDTH <= 64);
        debug_assert!(BIT_OFFSET / 8 < N);
        debug_assert!((BIT_OFFSET + (BIT_WIDTH as usize) + 7) / 8 <= N);
        if BIT_WIDTH == 0 {
            return;
        }
        let start_byte = BIT_OFFSET / 8;
        let bit_shift = BIT_OFFSET % 8;
        let bytes_needed = (BIT_WIDTH as usize + bit_shift + 7) / 8;
        let storage_ptr = this.cast::<[u8; N]>().cast::<u8>();
        if BIT_WIDTH as usize + bit_shift <= usize::BITS as usize {
            let mut val = val as usize;
            if (BIT_WIDTH as u32) < usize::BITS {
                val &= (1usize << BIT_WIDTH) - 1;
            }
            if cfg!(target_endian = "big") {
                val = val.reverse_bits() >> (usize::BITS as usize - BIT_WIDTH as usize);
            }
            val <<= bit_shift;
            let field_mask = if BIT_WIDTH as usize + bit_shift >= usize::BITS as usize {
                !0usize << bit_shift
            } else {
                ((1usize << BIT_WIDTH) - 1) << bit_shift
            };
            let mut i = 0;
            while i < bytes_needed {
                let byte_val = (val >> (i * 8)) as u8;
                let byte_mask = (field_mask >> (i * 8)) as u8;
                let byte_ptr = unsafe { storage_ptr.add(start_byte + i) };
                if cfg!(target_endian = "big") {
                    let byte = unsafe { (*byte_ptr).reverse_bits() };
                    let new_byte = (byte & !byte_mask) | (byte_val & byte_mask);
                    unsafe { *byte_ptr = new_byte.reverse_bits() };
                } else {
                    unsafe { *byte_ptr = (*byte_ptr & !byte_mask) | (byte_val & byte_mask) };
                }
                i += 1;
            }
        } else {
            let mut val = val;
            if BIT_WIDTH < 64 {
                val &= (1u64 << BIT_WIDTH) - 1;
            }
            if cfg!(target_endian = "big") {
                val = val.reverse_bits() >> (64 - BIT_WIDTH as usize);
            }
            val <<= bit_shift;
            let field_mask = if BIT_WIDTH as usize + bit_shift >= 64 {
                !0u64 << bit_shift
            } else {
                ((1u64 << BIT_WIDTH) - 1) << bit_shift
            };
            let mut i = 0;
            while i < bytes_needed {
                let byte_val = (val >> (i * 8)) as u8;
                let byte_mask = (field_mask >> (i * 8)) as u8;
                let byte_ptr = unsafe { storage_ptr.add(start_byte + i) };
                if cfg!(target_endian = "big") {
                    let byte = unsafe { (*byte_ptr).reverse_bits() };
                    let new_byte = (byte & !byte_mask) | (byte_val & byte_mask);
                    unsafe { *byte_ptr = new_byte.reverse_bits() };
                } else {
                    unsafe { *byte_ptr = (*byte_ptr & !byte_mask) | (byte_val & byte_mask) };
                }
                i += 1;
            }
        }
    }
}
pub type wchar_t = ::std::os::raw::c_int;
pub type _Float32 = f32;
pub type _Float64 = f64;
pub type _Float32x = f64;
pub type _Float64x = u128;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct div_t {
    pub quot: ::std::os::raw::c_int,
    pub rem: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ldiv_t {
    pub quot: ::std::os::raw::c_long,
    pub rem: ::std::os::raw::c_long,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lldiv_t {
    pub quot: ::std::os::raw::c_longlong,
    pub rem: ::std::os::raw::c_longlong,
}
pub type __u_char = ::std::os::raw::c_uchar;
pub type __u_short = ::std::os::raw::c_ushort;
pub type __u_int = ::std::os::raw::c_uint;
pub type __u_long = ::std::os::raw::c_ulong;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::std::os::raw::c_long;
pub type __u_quad_t = ::std::os::raw::c_ulong;
pub type __intmax_t = ::std::os::raw::c_long;
pub type __uintmax_t = ::std::os::raw::c_ulong;
pub type __dev_t = ::std::os::raw::c_ulong;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __ino64_t = ::std::os::raw::c_ulong;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __nlink_t = ::std::os::raw::c_ulong;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __fsid_t {
    pub __val: [::std::os::raw::c_int; 2usize],
}
pub type __clock_t = ::std::os::raw::c_long;
pub type __rlim_t = ::std::os::raw::c_ulong;
pub type __rlim64_t = ::std::os::raw::c_ulong;
pub type __id_t = ::std::os::raw::c_uint;
pub type __time_t = ::std::os::raw::c_long;
pub type __useconds_t = ::std::os::raw::c_uint;
pub type __suseconds_t = ::std::os::raw::c_long;
pub type __suseconds64_t = ::std::os::raw::c_long;
pub type __daddr_t = ::std::os::raw::c_int;
pub type __key_t = ::std::os::raw::c_int;
pub type __clockid_t = ::std::os::raw::c_int;
pub type __timer_t = *mut ::std::os::raw::c_void;
pub type __blksize_t = ::std::os::raw::c_long;
pub type __blkcnt_t = ::std::os::raw::c_long;
pub type __blkcnt64_t = ::std::os::raw::c_long;
pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
pub type __fsword_t = ::std::os::raw::c_long;
pub type __ssize_t = ::std::os::raw::c_long;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::std::os::raw::c_char;
pub type __intptr_t = ::std::os::raw::c_long;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type __sig_atomic_t = ::std::os::raw::c_int;
pub type u_char = __u_char;
pub type u_short = __u_short;
pub type u_int = __u_int;
pub type u_long = __u_long;
pub type quad_t = __quad_t;
pub type u_quad_t = __u_quad_t;
pub type fsid_t = __fsid_t;
pub type loff_t = __loff_t;
pub type ino_t = __ino_t;
pub type dev_t = __dev_t;
pub type gid_t = __gid_t;
pub type mode_t = __mode_t;
pub type nlink_t = __nlink_t;
pub type uid_t = __uid_t;
pub type off_t = __off_t;
pub type pid_t = __pid_t;
pub type id_t = __id_t;
pub type daddr_t = __daddr_t;
pub type caddr_t = __caddr_t;
pub type key_t = __key_t;
pub type clock_t = __clock_t;
pub type clockid_t = __clockid_t;
pub type time_t = __time_t;
pub type timer_t = __timer_t;
pub type ulong = ::std::os::raw::c_ulong;
pub type ushort = ::std::os::raw::c_ushort;
pub type uint = ::std::os::raw::c_uint;
pub type u_int8_t = __uint8_t;
pub type u_int16_t = __uint16_t;
pub type u_int32_t = __uint32_t;
pub type u_int64_t = __uint64_t;
pub type register_t = ::std::os::raw::c_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sigset_t {
    pub __val: [::std::os::raw::c_ulong; 16usize],
}
pub type sigset_t = __sigset_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timeval {
    pub tv_sec: __time_t,
    pub tv_usec: __suseconds_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timespec {
    pub tv_sec: __time_t,
    pub tv_nsec: __syscall_slong_t,
}
pub type suseconds_t = __suseconds_t;
pub type __fd_mask = ::std::os::raw::c_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fd_set {
    pub __fds_bits: [__fd_mask; 16usize],
}
pub type fd_mask = __fd_mask;
pub type blksize_t = __blksize_t;
pub type blkcnt_t = __blkcnt_t;
pub type fsblkcnt_t = __fsblkcnt_t;
pub type fsfilcnt_t = __fsfilcnt_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub union __atomic_wide_counter {
    pub __value64: ::std::os::raw::c_ulonglong,
    pub __value32: __atomic_wide_counter__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __atomic_wide_counter__bindgen_ty_1 {
    pub __low: ::std::os::raw::c_uint,
    pub __high: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_list {
    pub __prev: *mut __pthread_internal_list,
    pub __next: *mut __pthread_internal_list,
}
pub type __pthread_list_t = __pthread_internal_list;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_slist {
    pub __next: *mut __pthread_internal_slist,
}
pub type __pthread_slist_t = __pthread_internal_slist;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_mutex_s {
    pub __lock: ::std::os::raw::c_int,
    pub __count: ::std::os::raw::c_uint,
    pub __owner: ::std::os::raw::c_int,
    pub __nusers: ::std::os::raw::c_uint,
    pub __kind: ::std::os::raw::c_int,
    pub __spins: ::std::os::raw::c_short,
    pub __elision: ::std::os::raw::c_short,
    pub __list: __pthread_list_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_rwlock_arch_t {
    pub __readers: ::std::os::raw::c_uint,
    pub __writers: ::std::os::raw::c_uint,
    pub __wrphase_futex: ::std::os::raw::c_uint,
    pub __writers_futex: ::std::os::raw::c_uint,
    pub __pad3: ::std::os::raw::c_uint,
    pub __pad4: ::std::os::raw::c_uint,
    pub __cur_writer: ::std::os::raw::c_int,
    pub __shared: ::std::os::raw::c_int,
    pub __rwelision: ::std::os::raw::c_schar,
    pub __pad1: [::std::os::raw::c_uchar; 7usize],
    pub __pad2: ::std::os::raw::c_ulong,
    pub __flags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __pthread_cond_s {
    pub __wseq: __atomic_wide_counter,
    pub __g1_start: __atomic_wide_counter,
    pub __g_refs: [::std::os::raw::c_uint; 2usize],
    pub __g_size: [::std::os::raw::c_uint; 2usize],
    pub __g1_orig_size: ::std::os::raw::c_uint,
    pub __wrefs: ::std::os::raw::c_uint,
    pub __g_signals: [::std::os::raw::c_uint; 2usize],
}
pub type __tss_t = ::std::os::raw::c_uint;
pub type __thrd_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __once_flag {
    pub __data: ::std::os::raw::c_int,
}
pub type pthread_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutexattr_t {
    pub __size: [::std::os::raw::c_char; 4usize],
    pub __align: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_condattr_t {
    pub __size: [::std::os::raw::c_char; 4usize],
    pub __align: ::std::os::raw::c_int,
}
pub type pthread_key_t = ::std::os::raw::c_uint;
pub type pthread_once_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_attr_t {
    pub __size: [::std::os::raw::c_char; 56usize],
    pub __align: ::std::os::raw::c_long,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutex_t {
    pub __data: __pthread_mutex_s,
    pub __size: [::std::os::raw::c_char; 40usize],
    pub __align: ::std::os::raw::c_long,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_cond_t {
    pub __data: __pthread_cond_s,
    pub __size: [::std::os::raw::c_char; 48usize],
    pub __align: ::std::os::raw::c_longlong,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlock_t {
    pub __data: __pthread_rwlock_arch_t,
    pub __size: [::std::os::raw::c_char; 56usize],
    pub __align: ::std::os::raw::c_long,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlockattr_t {
    pub __size: [::std::os::raw::c_char; 8usize],
    pub __align: ::std::os::raw::c_long,
}
pub type pthread_spinlock_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrier_t {
    pub __size: [::std::os::raw::c_char; 32usize],
    pub __align: ::std::os::raw::c_long,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrierattr_t {
    pub __size: [::std::os::raw::c_char; 4usize],
    pub __align: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct random_data {
    pub fptr: *mut i32,
    pub rptr: *mut i32,
    pub state: *mut i32,
    pub rand_type: ::std::os::raw::c_int,
    pub rand_deg: ::std::os::raw::c_int,
    pub rand_sep: ::std::os::raw::c_int,
    pub end_ptr: *mut i32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct drand48_data {
    pub __x: [::std::os::raw::c_ushort; 3usize],
    pub __old_x: [::std::os::raw::c_ushort; 3usize],
    pub __c: ::std::os::raw::c_ushort,
    pub __init: ::std::os::raw::c_ushort,
    pub __a: ::std::os::raw::c_ulonglong,
}
pub type __compar_fn_t = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *const ::std::os::raw::c_void,
        arg2: *const ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int,
>;
#[doc = "  @defgroup DriverTypes Driver Types\n  @{\n  This section describes the driver data types.\n"]
pub type hipDeviceptr_t = *mut ::std::os::raw::c_void;
#[repr(u32)]
#[doc = " HIP channel format kinds"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipChannelFormatKind {
    #[doc = "< Signed channel format"]
    hipChannelFormatKindSigned = 0,
    #[doc = "< Unsigned channel format"]
    hipChannelFormatKindUnsigned = 1,
    #[doc = "< Float channel format"]
    hipChannelFormatKindFloat = 2,
    #[doc = "< No channel format"]
    hipChannelFormatKindNone = 3,
}
#[doc = " HIP channel format descriptor"]
#[repr(C)]
#[derive(Debug, 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,
    #[doc = "< Channel format kind"]
    pub f: hipChannelFormatKind,
}
#[repr(C)]
#[derive(Debug)]
pub struct hipArray {
    _unused: [u8; 0],
}
pub type hipArray_t = *mut hipArray;
pub type hipArray_const_t = *const hipArray;
#[repr(u32)]
#[doc = " HIP array format"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipArray_Format {
    #[doc = "< Unsigned 8-bit array format"]
    HIP_AD_FORMAT_UNSIGNED_INT8 = 1,
    #[doc = "< Unsigned 16-bit array format"]
    HIP_AD_FORMAT_UNSIGNED_INT16 = 2,
    #[doc = "< Unsigned 32-bit array format"]
    HIP_AD_FORMAT_UNSIGNED_INT32 = 3,
    #[doc = "< Signed 8-bit array format"]
    HIP_AD_FORMAT_SIGNED_INT8 = 8,
    #[doc = "< Signed 16-bit array format"]
    HIP_AD_FORMAT_SIGNED_INT16 = 9,
    #[doc = "< Signed 32-bit array format"]
    HIP_AD_FORMAT_SIGNED_INT32 = 10,
    #[doc = "< Half array format"]
    HIP_AD_FORMAT_HALF = 16,
    #[doc = "< Float array format"]
    HIP_AD_FORMAT_FLOAT = 32,
}
#[doc = " HIP array descriptor"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HIP_ARRAY_DESCRIPTOR {
    #[doc = "< Width of the array"]
    pub Width: usize,
    #[doc = "< Height of the array"]
    pub Height: usize,
    #[doc = "< Format of the array"]
    pub Format: hipArray_Format,
    #[doc = "< Number of channels of the array"]
    pub NumChannels: ::std::os::raw::c_uint,
}
#[doc = " HIP 3D array descriptor"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HIP_ARRAY3D_DESCRIPTOR {
    #[doc = "< Width of the array"]
    pub Width: usize,
    #[doc = "< Height of the array"]
    pub Height: usize,
    #[doc = "< Depth of the array"]
    pub Depth: usize,
    #[doc = "< Format of the array"]
    pub Format: hipArray_Format,
    #[doc = "< Number of channels of the array"]
    pub NumChannels: ::std::os::raw::c_uint,
    #[doc = "< Flags of the array"]
    pub Flags: ::std::os::raw::c_uint,
}
#[repr(u32)]
#[doc = " hipMemoryType (for pointer attributes)\n\n @note hipMemoryType enum values are combination of cudaMemoryType and cuMemoryType and AMD\n specific enum values.\n"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemoryType {
    #[doc = "< Unregistered memory"]
    hipMemoryTypeUnregistered = 0,
    #[doc = "< Memory is physically located on host"]
    hipMemoryTypeHost = 1,
    #[doc = "< Memory is physically located on device. (see deviceId for\n< specific device)"]
    hipMemoryTypeDevice = 2,
    #[doc = "< Managed memory, automaticallly managed by the unified\n< memory system\n< place holder for new values."]
    hipMemoryTypeManaged = 3,
    #[doc = "< Array memory, physically located on device. (see deviceId for\n< specific device)"]
    hipMemoryTypeArray = 10,
    #[doc = "< unified address space"]
    hipMemoryTypeUnified = 11,
}
#[doc = " HIP 2D memory copy parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hip_Memcpy2D {
    #[doc = "< Source width in bytes"]
    pub srcXInBytes: usize,
    #[doc = "< Source height"]
    pub srcY: usize,
    #[doc = "< Source memory type"]
    pub srcMemoryType: hipMemoryType,
    #[doc = "< Source pointer"]
    pub srcHost: *const ::std::os::raw::c_void,
    #[doc = "< Source device"]
    pub srcDevice: hipDeviceptr_t,
    #[doc = "< Source array"]
    pub srcArray: hipArray_t,
    #[doc = "< Source pitch"]
    pub srcPitch: usize,
    #[doc = "< Destination width in bytes"]
    pub dstXInBytes: usize,
    #[doc = "< Destination height"]
    pub dstY: usize,
    #[doc = "< Destination memory type"]
    pub dstMemoryType: hipMemoryType,
    #[doc = "< Destination pointer"]
    pub dstHost: *mut ::std::os::raw::c_void,
    #[doc = "< Destination device"]
    pub dstDevice: hipDeviceptr_t,
    #[doc = "< Destination array"]
    pub dstArray: hipArray_t,
    #[doc = "< Destination pitch"]
    pub dstPitch: usize,
    #[doc = "< Width in bytes of the 2D memory copy"]
    pub WidthInBytes: usize,
    #[doc = "< Height of the 2D memory copy"]
    pub Height: usize,
}
#[doc = " HIP mipmapped array"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipMipmappedArray {
    #[doc = "< Data pointer of the mipmapped array"]
    pub data: *mut ::std::os::raw::c_void,
    #[doc = "< Description of the mipmapped array"]
    pub desc: hipChannelFormatDesc,
    #[doc = "< Type of the mipmapped array"]
    pub type_: ::std::os::raw::c_uint,
    #[doc = "< Width of the mipmapped array"]
    pub width: ::std::os::raw::c_uint,
    #[doc = "< Height of the mipmapped array"]
    pub height: ::std::os::raw::c_uint,
    #[doc = "< Depth of the mipmapped array"]
    pub depth: ::std::os::raw::c_uint,
    #[doc = "< Minimum level of the mipmapped array"]
    pub min_mipmap_level: ::std::os::raw::c_uint,
    #[doc = "< Maximum level of the mipmapped array"]
    pub max_mipmap_level: ::std::os::raw::c_uint,
    #[doc = "< Flags of the mipmapped array"]
    pub flags: ::std::os::raw::c_uint,
    #[doc = "< Format of the mipmapped array"]
    pub format: hipArray_Format,
    #[doc = "< Number of channels of the mipmapped array"]
    pub num_channels: ::std::os::raw::c_uint,
}
#[doc = " HIP mipmapped array pointer"]
pub type hipMipmappedArray_t = *mut hipMipmappedArray;
pub type hipmipmappedArray = hipMipmappedArray_t;
pub type hipMipmappedArray_const_t = *const hipMipmappedArray;
#[repr(u32)]
#[doc = " HIP resource types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipResourceType {
    #[doc = "< Array resource"]
    hipResourceTypeArray = 0,
    #[doc = "< Mipmapped array resource"]
    hipResourceTypeMipmappedArray = 1,
    #[doc = "< Linear resource"]
    hipResourceTypeLinear = 2,
    #[doc = "< Pitch 2D resource"]
    hipResourceTypePitch2D = 3,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum HIPresourcetype_enum {
    #[doc = "< Array resource"]
    HIP_RESOURCE_TYPE_ARRAY = 0,
    #[doc = "< Mipmapped array resource"]
    HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY = 1,
    #[doc = "< Linear resource"]
    HIP_RESOURCE_TYPE_LINEAR = 2,
    #[doc = "< Pitch 2D resource"]
    HIP_RESOURCE_TYPE_PITCH2D = 3,
}
pub use self::HIPresourcetype_enum as HIPresourcetype;
pub use self::HIPresourcetype_enum as hipResourcetype;
#[repr(u32)]
#[doc = " HIP texture address modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum HIPaddress_mode_enum {
    #[doc = "< Wrap address mode"]
    HIP_TR_ADDRESS_MODE_WRAP = 0,
    #[doc = "< Clamp address mode"]
    HIP_TR_ADDRESS_MODE_CLAMP = 1,
    #[doc = "< Mirror address mode"]
    HIP_TR_ADDRESS_MODE_MIRROR = 2,
    #[doc = "< Border address mode"]
    HIP_TR_ADDRESS_MODE_BORDER = 3,
}
#[doc = " HIP texture address modes"]
pub use self::HIPaddress_mode_enum as HIPaddress_mode;
#[repr(u32)]
#[doc = " HIP filter modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum HIPfilter_mode_enum {
    #[doc = "< Filter mode point"]
    HIP_TR_FILTER_MODE_POINT = 0,
    #[doc = "< Filter mode linear"]
    HIP_TR_FILTER_MODE_LINEAR = 1,
}
#[doc = " HIP filter modes"]
pub use self::HIPfilter_mode_enum as HIPfilter_mode;
#[doc = " HIP texture descriptor"]
#[repr(C)]
#[derive(Debug, 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 = " HIP texture descriptor"]
pub type HIP_TEXTURE_DESC = HIP_TEXTURE_DESC_st;
#[repr(u32)]
#[doc = " HIP texture resource view formats"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipResourceViewFormat {
    #[doc = "< No resource view format (use underlying resource format)"]
    hipResViewFormatNone = 0,
    #[doc = "< 1 channel, unsigned 8-bit integers"]
    hipResViewFormatUnsignedChar1 = 1,
    #[doc = "< 2 channels, unsigned 8-bit integers"]
    hipResViewFormatUnsignedChar2 = 2,
    #[doc = "< 4 channels, unsigned 8-bit integers"]
    hipResViewFormatUnsignedChar4 = 3,
    #[doc = "< 1 channel, signed 8-bit integers"]
    hipResViewFormatSignedChar1 = 4,
    #[doc = "< 2 channels, signed 8-bit integers"]
    hipResViewFormatSignedChar2 = 5,
    #[doc = "< 4 channels, signed 8-bit integers"]
    hipResViewFormatSignedChar4 = 6,
    #[doc = "< 1 channel, unsigned 16-bit integers"]
    hipResViewFormatUnsignedShort1 = 7,
    #[doc = "< 2 channels, unsigned 16-bit integers"]
    hipResViewFormatUnsignedShort2 = 8,
    #[doc = "< 4 channels, unsigned 16-bit integers"]
    hipResViewFormatUnsignedShort4 = 9,
    #[doc = "< 1 channel, signed 16-bit integers"]
    hipResViewFormatSignedShort1 = 10,
    #[doc = "< 2 channels, signed 16-bit integers"]
    hipResViewFormatSignedShort2 = 11,
    #[doc = "< 4 channels, signed 16-bit integers"]
    hipResViewFormatSignedShort4 = 12,
    #[doc = "< 1 channel, unsigned 32-bit integers"]
    hipResViewFormatUnsignedInt1 = 13,
    #[doc = "< 2 channels, unsigned 32-bit integers"]
    hipResViewFormatUnsignedInt2 = 14,
    #[doc = "< 4 channels, unsigned 32-bit integers"]
    hipResViewFormatUnsignedInt4 = 15,
    #[doc = "< 1 channel, signed 32-bit integers"]
    hipResViewFormatSignedInt1 = 16,
    #[doc = "< 2 channels, signed 32-bit integers"]
    hipResViewFormatSignedInt2 = 17,
    #[doc = "< 4 channels, signed 32-bit integers"]
    hipResViewFormatSignedInt4 = 18,
    #[doc = "< 1 channel, 16-bit floating point"]
    hipResViewFormatHalf1 = 19,
    #[doc = "< 2 channels, 16-bit floating point"]
    hipResViewFormatHalf2 = 20,
    #[doc = "< 4 channels, 16-bit floating point"]
    hipResViewFormatHalf4 = 21,
    #[doc = "< 1 channel, 32-bit floating point"]
    hipResViewFormatFloat1 = 22,
    #[doc = "< 2 channels, 32-bit floating point"]
    hipResViewFormatFloat2 = 23,
    #[doc = "< 4 channels, 32-bit floating point"]
    hipResViewFormatFloat4 = 24,
    #[doc = "< Block-compressed 1"]
    hipResViewFormatUnsignedBlockCompressed1 = 25,
    #[doc = "< Block-compressed 2"]
    hipResViewFormatUnsignedBlockCompressed2 = 26,
    #[doc = "< Block-compressed 3"]
    hipResViewFormatUnsignedBlockCompressed3 = 27,
    #[doc = "< Block-compressed 4 unsigned"]
    hipResViewFormatUnsignedBlockCompressed4 = 28,
    #[doc = "< Block-compressed 4 signed"]
    hipResViewFormatSignedBlockCompressed4 = 29,
    #[doc = "< Block-compressed 5 unsigned"]
    hipResViewFormatUnsignedBlockCompressed5 = 30,
    #[doc = "< Block-compressed 5 signed"]
    hipResViewFormatSignedBlockCompressed5 = 31,
    #[doc = "< Block-compressed 6 unsigned half-float"]
    hipResViewFormatUnsignedBlockCompressed6H = 32,
    #[doc = "< Block-compressed 6 signed half-float"]
    hipResViewFormatSignedBlockCompressed6H = 33,
    #[doc = "< Block-compressed 7"]
    hipResViewFormatUnsignedBlockCompressed7 = 34,
}
#[repr(u32)]
#[doc = " HIP texture resource view formats"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum HIPresourceViewFormat_enum {
    #[doc = "< No resource view format (use underlying resource format)"]
    HIP_RES_VIEW_FORMAT_NONE = 0,
    #[doc = "< 1 channel, unsigned 8-bit integers"]
    HIP_RES_VIEW_FORMAT_UINT_1X8 = 1,
    #[doc = "< 2 channels, unsigned 8-bit integers"]
    HIP_RES_VIEW_FORMAT_UINT_2X8 = 2,
    #[doc = "< 4 channels, unsigned 8-bit integers"]
    HIP_RES_VIEW_FORMAT_UINT_4X8 = 3,
    #[doc = "< 1 channel, signed 8-bit integers"]
    HIP_RES_VIEW_FORMAT_SINT_1X8 = 4,
    #[doc = "< 2 channels, signed 8-bit integers"]
    HIP_RES_VIEW_FORMAT_SINT_2X8 = 5,
    #[doc = "< 4 channels, signed 8-bit integers"]
    HIP_RES_VIEW_FORMAT_SINT_4X8 = 6,
    #[doc = "< 1 channel, unsigned 16-bit integers"]
    HIP_RES_VIEW_FORMAT_UINT_1X16 = 7,
    #[doc = "< 2 channels, unsigned 16-bit integers"]
    HIP_RES_VIEW_FORMAT_UINT_2X16 = 8,
    #[doc = "< 4 channels, unsigned 16-bit integers"]
    HIP_RES_VIEW_FORMAT_UINT_4X16 = 9,
    #[doc = "< 1 channel, signed 16-bit integers"]
    HIP_RES_VIEW_FORMAT_SINT_1X16 = 10,
    #[doc = "< 2 channels, signed 16-bit integers"]
    HIP_RES_VIEW_FORMAT_SINT_2X16 = 11,
    #[doc = "< 4 channels, signed 16-bit integers"]
    HIP_RES_VIEW_FORMAT_SINT_4X16 = 12,
    #[doc = "< 1 channel, unsigned 32-bit integers"]
    HIP_RES_VIEW_FORMAT_UINT_1X32 = 13,
    #[doc = "< 2 channels, unsigned 32-bit integers"]
    HIP_RES_VIEW_FORMAT_UINT_2X32 = 14,
    #[doc = "< 4 channels, unsigned 32-bit integers"]
    HIP_RES_VIEW_FORMAT_UINT_4X32 = 15,
    #[doc = "< 1 channel, signed 32-bit integers"]
    HIP_RES_VIEW_FORMAT_SINT_1X32 = 16,
    #[doc = "< 2 channels, signed 32-bit integers"]
    HIP_RES_VIEW_FORMAT_SINT_2X32 = 17,
    #[doc = "< 4 channels, signed 32-bit integers"]
    HIP_RES_VIEW_FORMAT_SINT_4X32 = 18,
    #[doc = "< 1 channel, 16-bit floating point"]
    HIP_RES_VIEW_FORMAT_FLOAT_1X16 = 19,
    #[doc = "< 2 channels, 16-bit floating point"]
    HIP_RES_VIEW_FORMAT_FLOAT_2X16 = 20,
    #[doc = "< 4 channels, 16-bit floating point"]
    HIP_RES_VIEW_FORMAT_FLOAT_4X16 = 21,
    #[doc = "< 1 channel, 32-bit floating point"]
    HIP_RES_VIEW_FORMAT_FLOAT_1X32 = 22,
    #[doc = "< 2 channels, 32-bit floating point"]
    HIP_RES_VIEW_FORMAT_FLOAT_2X32 = 23,
    #[doc = "< 4 channels, 32-bit floating point"]
    HIP_RES_VIEW_FORMAT_FLOAT_4X32 = 24,
    #[doc = "< Block-compressed 1"]
    HIP_RES_VIEW_FORMAT_UNSIGNED_BC1 = 25,
    #[doc = "< Block-compressed 2"]
    HIP_RES_VIEW_FORMAT_UNSIGNED_BC2 = 26,
    #[doc = "< Block-compressed 3"]
    HIP_RES_VIEW_FORMAT_UNSIGNED_BC3 = 27,
    #[doc = "< Block-compressed 4 unsigned"]
    HIP_RES_VIEW_FORMAT_UNSIGNED_BC4 = 28,
    #[doc = "< Block-compressed 4 signed"]
    HIP_RES_VIEW_FORMAT_SIGNED_BC4 = 29,
    #[doc = "< Block-compressed 5 unsigned"]
    HIP_RES_VIEW_FORMAT_UNSIGNED_BC5 = 30,
    #[doc = "< Block-compressed 5 signed"]
    HIP_RES_VIEW_FORMAT_SIGNED_BC5 = 31,
    #[doc = "< Block-compressed 6 unsigned half-float"]
    HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H = 32,
    #[doc = "< Block-compressed 6 signed half-float"]
    HIP_RES_VIEW_FORMAT_SIGNED_BC6H = 33,
    #[doc = "< Block-compressed 7"]
    HIP_RES_VIEW_FORMAT_UNSIGNED_BC7 = 34,
}
#[doc = " HIP texture resource view formats"]
pub use self::HIPresourceViewFormat_enum as HIPresourceViewFormat;
#[doc = " HIP resource descriptor"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipResourceDesc {
    #[doc = "< Resource type"]
    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(Debug, Copy, Clone)]
pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_1 {
    #[doc = "< HIP array"]
    pub array: hipArray_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_2 {
    #[doc = "< HIP mipmapped array"]
    pub mipmap: hipMipmappedArray_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_3 {
    #[doc = "< Device pointer"]
    pub devPtr: *mut ::std::os::raw::c_void,
    #[doc = "< Channel format description"]
    pub desc: hipChannelFormatDesc,
    #[doc = "< Size in bytes"]
    pub sizeInBytes: usize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_4 {
    #[doc = "< Device pointer"]
    pub devPtr: *mut ::std::os::raw::c_void,
    #[doc = "< Channel format description"]
    pub desc: hipChannelFormatDesc,
    #[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,
}
#[doc = " HIP resource view descriptor struct"]
#[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(Debug, Copy, Clone)]
pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
    #[doc = "< HIP array"]
    pub hArray: hipArray_t,
}
#[repr(C)]
#[derive(Debug, 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(Debug, 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(Debug, 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(Debug, Copy, Clone)]
pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5 {
    pub reserved: [::std::os::raw::c_int; 32usize],
}
#[doc = " HIP resource view descriptor struct"]
pub type HIP_RESOURCE_DESC = HIP_RESOURCE_DESC_st;
#[doc = " HIP resource view descriptor"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipResourceViewDesc {
    #[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,
}
#[doc = " Resource view descriptor"]
#[repr(C)]
#[derive(Debug, 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;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemcpyKind {
    #[doc = "< Host-to-Host Copy"]
    hipMemcpyHostToHost = 0,
    #[doc = "< Host-to-Device Copy"]
    hipMemcpyHostToDevice = 1,
    #[doc = "< Device-to-Host Copy"]
    hipMemcpyDeviceToHost = 2,
    #[doc = "< Device-to-Device Copy"]
    hipMemcpyDeviceToDevice = 3,
    #[doc = "< Runtime will automatically determine\n< copy-kind based on virtual addresses."]
    hipMemcpyDefault = 4,
    #[doc = "< Device-to-Device Copy without using compute units"]
    hipMemcpyDeviceToDeviceNoCU = 1024,
}
#[doc = " HIP pithed pointer"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipPitchedPtr {
    #[doc = "< Pointer to the allocated memory"]
    pub ptr: *mut ::std::os::raw::c_void,
    #[doc = "< Pitch in bytes"]
    pub pitch: usize,
    #[doc = "< Logical size of the first dimension of allocation in elements"]
    pub xsize: usize,
    #[doc = "< Logical size of the second dimension of allocation in elements"]
    pub ysize: usize,
}
#[doc = " HIP extent"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipExtent {
    pub width: usize,
    pub height: usize,
    pub depth: usize,
}
#[doc = "  HIP position"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipPos {
    #[doc = "< X coordinate"]
    pub x: usize,
    #[doc = "< Y coordinate"]
    pub y: usize,
    #[doc = "< Z coordinate"]
    pub z: usize,
}
#[doc = " HIP 3D memory copy parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipMemcpy3DParms {
    #[doc = "< Source array"]
    pub srcArray: hipArray_t,
    #[doc = "< Source position"]
    pub srcPos: hipPos,
    #[doc = "< Source pointer"]
    pub srcPtr: hipPitchedPtr,
    #[doc = "< Destination array"]
    pub dstArray: hipArray_t,
    #[doc = "< Destination position"]
    pub dstPos: hipPos,
    #[doc = "< Destination pointer"]
    pub dstPtr: hipPitchedPtr,
    #[doc = "< Extent of 3D memory copy"]
    pub extent: hipExtent,
    #[doc = "< Kind of 3D memory copy"]
    pub kind: hipMemcpyKind,
}
#[doc = " HIP 3D memory copy"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HIP_MEMCPY3D {
    #[doc = "< Source X in bytes"]
    pub srcXInBytes: usize,
    #[doc = "< Source Y"]
    pub srcY: usize,
    #[doc = "< Source Z"]
    pub srcZ: usize,
    #[doc = "< Source LOD"]
    pub srcLOD: usize,
    #[doc = "< Source memory type"]
    pub srcMemoryType: hipMemoryType,
    #[doc = "< Source host pointer"]
    pub srcHost: *const ::std::os::raw::c_void,
    #[doc = "< Source device"]
    pub srcDevice: hipDeviceptr_t,
    #[doc = "< Source array"]
    pub srcArray: hipArray_t,
    #[doc = "< Source pitch"]
    pub srcPitch: usize,
    #[doc = "< Source height"]
    pub srcHeight: usize,
    #[doc = "< Destination X in bytes"]
    pub dstXInBytes: usize,
    #[doc = "< Destination Y"]
    pub dstY: usize,
    #[doc = "< Destination Z"]
    pub dstZ: usize,
    #[doc = "< Destination LOD"]
    pub dstLOD: usize,
    #[doc = "< Destination memory type"]
    pub dstMemoryType: hipMemoryType,
    #[doc = "< Destination host pointer"]
    pub dstHost: *mut ::std::os::raw::c_void,
    #[doc = "< Destination device"]
    pub dstDevice: hipDeviceptr_t,
    #[doc = "< Destination array"]
    pub dstArray: hipArray_t,
    #[doc = "< Destination pitch"]
    pub dstPitch: usize,
    #[doc = "< Destination height"]
    pub dstHeight: usize,
    #[doc = "< Width in bytes of 3D memory copy"]
    pub WidthInBytes: usize,
    #[doc = "< Height in bytes of 3D memory copy"]
    pub Height: usize,
    #[doc = "< Depth in bytes of 3D memory copy"]
    pub Depth: usize,
}
impl hipMemLocationType {
    pub const hipMemLocationTypeNone: hipMemLocationType =
        hipMemLocationType::hipMemLocationTypeInvalid;
}
#[repr(u32)]
#[doc = " Specifies the type of location"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemLocationType {
    hipMemLocationTypeInvalid = 0,
    #[doc = "< Device location, thus it's HIP device ID"]
    hipMemLocationTypeDevice = 1,
    #[doc = "< Host location, id is ignored"]
    hipMemLocationTypeHost = 2,
    #[doc = "< Host NUMA node location, id is host NUMA node id"]
    hipMemLocationTypeHostNuma = 3,
    hipMemLocationTypeHostNumaCurrent = 4,
}
#[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(Debug, 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,
}
#[repr(u32)]
#[doc = " Flags to specify for copies within a batch. Used with hipMemcpyBatchAsync"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemcpyFlags {
    #[doc = "< Default flag"]
    hipMemcpyFlagDefault = 0,
    #[doc = "< Tries to overlap copy with compute work."]
    hipMemcpyFlagPreferOverlapWithCompute = 1,
    #[doc = "< Prefer copy engine over compute engine."]
    hipMemcpyFlagExtPreferCE = 256,
    #[doc = "< Swap contents of src and dst."]
    hipMemcpyFlagExtOpSwap = 512,
}
#[repr(u32)]
#[doc = " Flags to specify order in which source pointer is accessed by Batch memcpy"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemcpySrcAccessOrder {
    #[doc = "< Default Invalid."]
    hipMemcpySrcAccessOrderInvalid = 0,
    #[doc = "< Access to source pointer must be in stream order."]
    hipMemcpySrcAccessOrderStream = 1,
    hipMemcpySrcAccessOrderDuringApiCall = 2,
    hipMemcpySrcAccessOrderAny = 3,
    hipMemcpySrcAccessOrderMax = 2147483647,
}
#[doc = " Attributes for copies within a batch."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipMemcpyAttributes {
    #[doc = "< Source access ordering to be observed for copies with this attribute."]
    pub srcAccessOrder: hipMemcpySrcAccessOrder,
    #[doc = "< Location hint for src operand."]
    pub srcLocHint: hipMemLocation,
    #[doc = "< Location hint for destination operand."]
    pub dstLocHint: hipMemLocation,
    #[doc = "< Additional Flags for copies. See hipMemcpyFlags."]
    pub flags: ::std::os::raw::c_uint,
}
#[repr(u32)]
#[doc = " Operand types for individual copies within a batch"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemcpy3DOperandType {
    #[doc = "< Mempcy operand is a valid pointer."]
    hipMemcpyOperandTypePointer = 1,
    #[doc = "< Memcpy operand is a valid hipArray."]
    hipMemcpyOperandTypeArray = 2,
    hipMemcpyOperandTypeMax = 2147483647,
}
#[doc = " Struct representing offset into a hipArray_t in elements."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipOffset3D {
    pub x: usize,
    pub y: usize,
    pub z: usize,
}
#[doc = "  Struct representing an operand for copy with hipMemcpy3DBatchAsync."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemcpy3DOperand {
    pub type_: hipMemcpy3DOperandType,
    pub op: hipMemcpy3DOperand__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipMemcpy3DOperand__bindgen_ty_1 {
    pub ptr: hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1,
    pub array: hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1 {
    pub ptr: *mut ::std::os::raw::c_void,
    #[doc = "< Length of each row in elements."]
    pub rowLength: usize,
    #[doc = "< Height of each layer in elements."]
    pub layerHeight: usize,
    #[doc = "< Location Hint for the operand."]
    pub locHint: hipMemLocation,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2 {
    #[doc = "< Array struct for hipMemcpyOperandTypeArray."]
    pub array: hipArray_t,
    #[doc = "< Offset into array in elements."]
    pub offset: hipOffset3D,
}
#[doc = " HIP 3D Batch Op"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemcpy3DBatchOp {
    pub src: hipMemcpy3DOperand,
    pub dst: hipMemcpy3DOperand,
    pub extent: hipExtent,
    pub srcAccessOrder: hipMemcpySrcAccessOrder,
    pub flags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipMemcpy3DPeerParms {
    #[doc = "< Source memory address"]
    pub srcArray: hipArray_t,
    #[doc = "< Source position offset"]
    pub srcPos: hipPos,
    #[doc = "< Pitched source memory address"]
    pub srcPtr: hipPitchedPtr,
    #[doc = "< Source device"]
    pub srcDevice: ::std::os::raw::c_int,
    #[doc = "< Destination memory address"]
    pub dstArray: hipArray_t,
    #[doc = "< Destination position offset"]
    pub dstPos: hipPos,
    #[doc = "< Pitched destination memory address"]
    pub dstPtr: hipPitchedPtr,
    #[doc = "< Destination device"]
    pub dstDevice: ::std::os::raw::c_int,
    #[doc = "< Requested memory copy size"]
    pub extent: hipExtent,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipFunction_attribute {
    #[doc = "< The maximum number of threads per block. Depends\n< on function and device."]
    HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0,
    #[doc = "< The statically allocated shared memory size in bytes\n< per block required by the function."]
    HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1,
    #[doc = "< The user-allocated constant memory by the function in\n< bytes."]
    HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2,
    #[doc = "< The local memory usage of each thread by this function\n< in bytes."]
    HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3,
    #[doc = "< The number of registers used by each thread of this function."]
    HIP_FUNC_ATTRIBUTE_NUM_REGS = 4,
    #[doc = "< PTX version"]
    HIP_FUNC_ATTRIBUTE_PTX_VERSION = 5,
    #[doc = "< Binary version"]
    HIP_FUNC_ATTRIBUTE_BINARY_VERSION = 6,
    #[doc = "< Cache mode"]
    HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA = 7,
    #[doc = "< The maximum dynamic shared memory per\n< block for this function in bytes."]
    HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = 8,
    #[doc = "< The shared memory carveout preference\n< in percent of the maximum shared\n< memory."]
    HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 9,
    HIP_FUNC_ATTRIBUTE_MAX = 10,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipPointer_attribute {
    #[doc = "< The context on which a pointer was allocated\n< @warning This attribute is not supported in HIP"]
    HIP_POINTER_ATTRIBUTE_CONTEXT = 1,
    #[doc = "< memory type describing the location of a pointer"]
    HIP_POINTER_ATTRIBUTE_MEMORY_TYPE = 2,
    #[doc = "< address at which the pointer is allocated on the\n< device"]
    HIP_POINTER_ATTRIBUTE_DEVICE_POINTER = 3,
    #[doc = "< address at which the pointer is allocated on the host"]
    HIP_POINTER_ATTRIBUTE_HOST_POINTER = 4,
    #[doc = "< A pair of tokens for use with Linux kernel interface\n< @warning This attribute is not supported in HIP"]
    HIP_POINTER_ATTRIBUTE_P2P_TOKENS = 5,
    #[doc = "< Synchronize every synchronous memory operation\n< initiated on this region"]
    HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS = 6,
    #[doc = "< Unique ID for an allocated memory region"]
    HIP_POINTER_ATTRIBUTE_BUFFER_ID = 7,
    #[doc = "< Indicates if the pointer points to managed memory"]
    HIP_POINTER_ATTRIBUTE_IS_MANAGED = 8,
    #[doc = "< device ordinal of a device on which a pointer\n< was allocated or registered"]
    HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL = 9,
    #[doc = "< if this pointer maps to an allocation\n< that is suitable for hipIpcGetMemHandle\n< @warning This attribute is not supported in\n< HIP"]
    HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE = 10,
    #[doc = "< Starting address for this requested pointer"]
    HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR = 11,
    #[doc = "< Size of the address range for this requested pointer"]
    HIP_POINTER_ATTRIBUTE_RANGE_SIZE = 12,
    #[doc = "< tells if this pointer is in a valid address range\n< that is mapped to a backing allocation"]
    HIP_POINTER_ATTRIBUTE_MAPPED = 13,
    #[doc = "< Bitmask of allowed hipmemAllocationHandleType\n< for this allocation @warning This attribute is\n< not supported in HIP"]
    HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = 14,
    #[doc = "< returns if the memory referenced by\n< this pointer can be used with the\n< GPUDirect RDMA API\n< @warning This attribute is not supported\n< in HIP"]
    HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = 15,
    #[doc = "< Returns the access flags the device associated with\n< for the corresponding memory referenced by the ptr"]
    HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS = 16,
    #[doc = "< Returns the mempool handle for the allocation if\n< it was allocated from a mempool\n< @warning This attribute is not supported in HIP"]
    HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = 17,
}
#[repr(u32)]
#[doc = " hipJitOption"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipJitOption {
    #[doc = "< CUDA Only Maximum registers may be used in a thread,\n< passed to compiler"]
    hipJitOptionMaxRegisters = 0,
    #[doc = "< CUDA Only Number of thread per block"]
    hipJitOptionThreadsPerBlock = 1,
    #[doc = "< CUDA Only Value for total wall clock time"]
    hipJitOptionWallTime = 2,
    #[doc = "< CUDA Only Pointer to the buffer with logged information"]
    hipJitOptionInfoLogBuffer = 3,
    #[doc = "< CUDA Only Size of the buffer in bytes for logged info"]
    hipJitOptionInfoLogBufferSizeBytes = 4,
    #[doc = "< CUDA Only Pointer to the buffer with logged error(s)"]
    hipJitOptionErrorLogBuffer = 5,
    #[doc = "< CUDA Only Size of the buffer in bytes for logged\n< error(s)"]
    hipJitOptionErrorLogBufferSizeBytes = 6,
    #[doc = "< Value of optimization level for generated codes, acceptable\n< options -O0, -O1, -O2, -O3"]
    hipJitOptionOptimizationLevel = 7,
    #[doc = "< CUDA Only The target context, which is the default"]
    hipJitOptionTargetFromContext = 8,
    #[doc = "< CUDA Only JIT target"]
    hipJitOptionTarget = 9,
    #[doc = "< CUDA Only Fallback strategy"]
    hipJitOptionFallbackStrategy = 10,
    #[doc = "< CUDA Only Generate debug information"]
    hipJitOptionGenerateDebugInfo = 11,
    #[doc = "< CUDA Only Generate log verbose"]
    hipJitOptionLogVerbose = 12,
    #[doc = "< CUDA Only Generate line number information"]
    hipJitOptionGenerateLineInfo = 13,
    #[doc = "< CUDA Only Set cache mode"]
    hipJitOptionCacheMode = 14,
    #[doc = "< @deprecated CUDA Only New SM3X option."]
    hipJitOptionSm3xOpt = 15,
    #[doc = "< CUDA Only Set fast compile"]
    hipJitOptionFastCompile = 16,
    #[doc = "< CUDA Only Array of device symbol names to be relocated to the\n< host"]
    hipJitOptionGlobalSymbolNames = 17,
    #[doc = "< CUDA Only Array of host addresses to be relocated to the\n< device"]
    hipJitOptionGlobalSymbolAddresses = 18,
    #[doc = "< CUDA Only Number of symbol count."]
    hipJitOptionGlobalSymbolCount = 19,
    #[doc = "< @deprecated CUDA Only Enable link-time optimization for device code"]
    hipJitOptionLto = 20,
    #[doc = "< @deprecated CUDA Only Set single-precision denormals."]
    hipJitOptionFtz = 21,
    #[doc = "< @deprecated CUDA Only Set single-precision floating-point division\n< and reciprocals"]
    hipJitOptionPrecDiv = 22,
    #[doc = "< @deprecated CUDA Only Set single-precision floating-point square root"]
    hipJitOptionPrecSqrt = 23,
    #[doc = "< @deprecated CUDA Only Enable floating-point multiplies and\n< adds/subtracts operations"]
    hipJitOptionFma = 24,
    #[doc = "< CUDA Only Generates Position Independent code"]
    hipJitOptionPositionIndependentCode = 25,
    #[doc = "< CUDA Only Hints to JIT compiler the minimum number of CTAs frin\n< kernel's grid to be mapped to SM"]
    hipJitOptionMinCTAPerSM = 26,
    #[doc = "< CUDA only Maximum number of threads in a thread block"]
    hipJitOptionMaxThreadsPerBlock = 27,
    #[doc = "< Cuda only Override Directive values"]
    hipJitOptionOverrideDirectiveValues = 28,
    #[doc = "< Number of options"]
    hipJitOptionNumOptions = 29,
    #[doc = "< Hip Only Linker options to be passed on to compiler"]
    hipJitOptionIRtoISAOptExt = 10000,
    #[doc = "< Hip Only Count of linker options to be passed on to compiler"]
    hipJitOptionIRtoISAOptCountExt = 10001,
}
#[repr(u32)]
#[doc = " hipJitInputType"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipJitInputType {
    #[doc = "< Cuda only Input cubin"]
    hipJitInputCubin = 0,
    #[doc = "< Cuda only Input PTX"]
    hipJitInputPtx = 1,
    #[doc = "< Cuda Only Input FAT Binary"]
    hipJitInputFatBinary = 2,
    #[doc = "< Cuda Only Host Object with embedded device code"]
    hipJitInputObject = 3,
    #[doc = "< Cuda Only Archive of Host Objects with embedded\n< device code"]
    hipJitInputLibrary = 4,
    #[doc = "< @deprecated Cuda only High Level intermediate\n< code for LTO"]
    hipJitInputNvvm = 5,
    #[doc = "< Count of Legacy Input Types"]
    hipJitNumLegacyInputTypes = 6,
    #[doc = "< HIP Only LLVM Bitcode or IR assembly"]
    hipJitInputLLVMBitcode = 100,
    #[doc = "< HIP Only LLVM Clang Bundled Code"]
    hipJitInputLLVMBundledBitcode = 101,
    #[doc = "< HIP Only LLVM Archive of Bundled Bitcode"]
    hipJitInputLLVMArchivesOfBundledBitcode = 102,
    #[doc = "< HIP Only SPIRV Code Object"]
    hipJitInputSpirv = 103,
    #[doc = "< Count of Input Types"]
    hipJitNumInputTypes = 10,
}
#[repr(u32)]
#[doc = " hipJitCacheMode"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipJitCacheMode {
    hipJitCacheOptionNone = 0,
    hipJitCacheOptionCG = 1,
    hipJitCacheOptionCA = 2,
}
#[repr(u32)]
#[doc = " hipJitFallback"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipJitFallback {
    hipJitPreferPTX = 0,
    hipJitPreferBinary = 1,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipLibraryOption_e {
    hipLibraryHostUniversalFunctionAndDataTable = 0,
    hipLibraryBinaryIsPreserved = 1,
}
pub use self::hipLibraryOption_e as hipLibraryOption;
#[repr(u32)]
#[doc = " @addtogroup GlobalDefs\n @{\n\n/\n/**\n hiprtc error code"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hiprtcResult {
    #[doc = "< Success"]
    HIPRTC_SUCCESS = 0,
    #[doc = "< Out of memory"]
    HIPRTC_ERROR_OUT_OF_MEMORY = 1,
    #[doc = "< Failed to create program"]
    HIPRTC_ERROR_PROGRAM_CREATION_FAILURE = 2,
    #[doc = "< Invalid input"]
    HIPRTC_ERROR_INVALID_INPUT = 3,
    #[doc = "< Invalid program"]
    HIPRTC_ERROR_INVALID_PROGRAM = 4,
    #[doc = "< Invalid option"]
    HIPRTC_ERROR_INVALID_OPTION = 5,
    #[doc = "< Compilation error"]
    HIPRTC_ERROR_COMPILATION = 6,
    #[doc = "< Failed in builtin operation"]
    HIPRTC_ERROR_BUILTIN_OPERATION_FAILURE = 7,
    #[doc = "< No name expression after compilation"]
    HIPRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = 8,
    #[doc = "< No lowered names before compilation"]
    HIPRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = 9,
    #[doc = "< Invalid name expression"]
    HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10,
    #[doc = "< Internal error"]
    HIPRTC_ERROR_INTERNAL_ERROR = 11,
    #[doc = "< Error in linking"]
    HIPRTC_ERROR_LINKING = 100,
}
#[repr(C)]
#[derive(Debug)]
pub struct ihiprtcLinkState {
    _unused: [u8; 0],
}
#[doc = "  hiprtc link state\n"]
pub type hiprtcLinkState = *mut ihiprtcLinkState;
#[repr(C)]
#[derive(Debug)]
pub struct _hiprtcProgram {
    _unused: [u8; 0],
}
#[doc = "  hiprtc program\n"]
pub type hiprtcProgram = *mut _hiprtcProgram;
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
pub const HIP_SUCCESS: _bindgen_ty_1 = _bindgen_ty_1::HIP_SUCCESS;
pub const HIP_ERROR_INVALID_VALUE: _bindgen_ty_1 = _bindgen_ty_1::HIP_ERROR_INVALID_VALUE;
pub const HIP_ERROR_NOT_INITIALIZED: _bindgen_ty_1 = _bindgen_ty_1::HIP_ERROR_NOT_INITIALIZED;
pub const HIP_ERROR_LAUNCH_OUT_OF_RESOURCES: _bindgen_ty_1 =
    _bindgen_ty_1::HIP_ERROR_LAUNCH_OUT_OF_RESOURCES;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_1 {
    HIP_SUCCESS = 0,
    HIP_ERROR_INVALID_VALUE = 1,
    HIP_ERROR_NOT_INITIALIZED = 2,
    HIP_ERROR_LAUNCH_OUT_OF_RESOURCES = 3,
}
#[doc = " @defgroup GlobalDefs Global enum and defines\n @{\n\n/\n/**\n hipDeviceArch_t\n"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipDeviceArch_t {
    pub _bindgen_align: [u32; 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 {
        self._bitfield_1.get_const::<0usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasGlobalInt32Atomics(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<0usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasGlobalInt32Atomics_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<0usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasGlobalInt32Atomics_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<0usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasGlobalFloatAtomicExch(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<1usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasGlobalFloatAtomicExch(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<1usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasGlobalFloatAtomicExch_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<1usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasGlobalFloatAtomicExch_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<1usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasSharedInt32Atomics(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<2usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasSharedInt32Atomics(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<2usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasSharedInt32Atomics_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<2usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasSharedInt32Atomics_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<2usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasSharedFloatAtomicExch(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<3usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasSharedFloatAtomicExch(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<3usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasSharedFloatAtomicExch_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<3usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasSharedFloatAtomicExch_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<3usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasFloatAtomicAdd(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<4usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasFloatAtomicAdd(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<4usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasFloatAtomicAdd_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<4usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasFloatAtomicAdd_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<4usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasGlobalInt64Atomics(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<5usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasGlobalInt64Atomics(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<5usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasGlobalInt64Atomics_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<5usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasGlobalInt64Atomics_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<5usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasSharedInt64Atomics(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<6usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasSharedInt64Atomics(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<6usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasSharedInt64Atomics_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<6usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasSharedInt64Atomics_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<6usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasDoubles(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<7usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasDoubles(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<7usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasDoubles_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<7usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasDoubles_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<7usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasWarpVote(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<8usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasWarpVote(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<8usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasWarpVote_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<8usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasWarpVote_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<8usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasWarpBallot(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<9usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasWarpBallot(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<9usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasWarpBallot_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<9usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasWarpBallot_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<9usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasWarpShuffle(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<10usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasWarpShuffle(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<10usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasWarpShuffle_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<10usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasWarpShuffle_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<10usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasFunnelShift(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<11usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasFunnelShift(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<11usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasFunnelShift_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<11usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasFunnelShift_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<11usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasThreadFenceSystem(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<12usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasThreadFenceSystem(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<12usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasThreadFenceSystem_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<12usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasThreadFenceSystem_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<12usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasSyncThreadsExt(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<13usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasSyncThreadsExt(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<13usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasSyncThreadsExt_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<13usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasSyncThreadsExt_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<13usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasSurfaceFuncs(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<14usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasSurfaceFuncs(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<14usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasSurfaceFuncs_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<14usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasSurfaceFuncs_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<14usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn has3dGrid(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<15usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_has3dGrid(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<15usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn has3dGrid_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<15usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_has3dGrid_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<15usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                val as u64,
            )
        }
    }
    #[inline]
    pub fn hasDynamicParallelism(&self) -> ::std::os::raw::c_uint {
        self._bitfield_1.get_const::<16usize, 1u8>() as u32 as _
    }
    #[inline]
    pub fn set_hasDynamicParallelism(&mut self, val: ::std::os::raw::c_uint) {
        let val: u32 = val as _;
        self._bitfield_1.set_const::<16usize, 1u8>(val as u64)
    }
    #[inline]
    pub unsafe fn hasDynamicParallelism_raw(this: *const Self) -> ::std::os::raw::c_uint {
        unsafe {
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get_const::<16usize, 1u8>(
                ::std::ptr::addr_of!((*this)._bitfield_1),
            ) as u32 as _
        }
    }
    #[inline]
    pub unsafe fn set_hasDynamicParallelism_raw(this: *mut Self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = val as _;
            <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set_const::<16usize, 1u8>(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                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_const::<0usize, 1u8>({
            let hasGlobalInt32Atomics: u32 = hasGlobalInt32Atomics as _;
            hasGlobalInt32Atomics as u64
        });
        __bindgen_bitfield_unit.set_const::<1usize, 1u8>({
            let hasGlobalFloatAtomicExch: u32 = hasGlobalFloatAtomicExch as _;
            hasGlobalFloatAtomicExch as u64
        });
        __bindgen_bitfield_unit.set_const::<2usize, 1u8>({
            let hasSharedInt32Atomics: u32 = hasSharedInt32Atomics as _;
            hasSharedInt32Atomics as u64
        });
        __bindgen_bitfield_unit.set_const::<3usize, 1u8>({
            let hasSharedFloatAtomicExch: u32 = hasSharedFloatAtomicExch as _;
            hasSharedFloatAtomicExch as u64
        });
        __bindgen_bitfield_unit.set_const::<4usize, 1u8>({
            let hasFloatAtomicAdd: u32 = hasFloatAtomicAdd as _;
            hasFloatAtomicAdd as u64
        });
        __bindgen_bitfield_unit.set_const::<5usize, 1u8>({
            let hasGlobalInt64Atomics: u32 = hasGlobalInt64Atomics as _;
            hasGlobalInt64Atomics as u64
        });
        __bindgen_bitfield_unit.set_const::<6usize, 1u8>({
            let hasSharedInt64Atomics: u32 = hasSharedInt64Atomics as _;
            hasSharedInt64Atomics as u64
        });
        __bindgen_bitfield_unit.set_const::<7usize, 1u8>({
            let hasDoubles: u32 = hasDoubles as _;
            hasDoubles as u64
        });
        __bindgen_bitfield_unit.set_const::<8usize, 1u8>({
            let hasWarpVote: u32 = hasWarpVote as _;
            hasWarpVote as u64
        });
        __bindgen_bitfield_unit.set_const::<9usize, 1u8>({
            let hasWarpBallot: u32 = hasWarpBallot as _;
            hasWarpBallot as u64
        });
        __bindgen_bitfield_unit.set_const::<10usize, 1u8>({
            let hasWarpShuffle: u32 = hasWarpShuffle as _;
            hasWarpShuffle as u64
        });
        __bindgen_bitfield_unit.set_const::<11usize, 1u8>({
            let hasFunnelShift: u32 = hasFunnelShift as _;
            hasFunnelShift as u64
        });
        __bindgen_bitfield_unit.set_const::<12usize, 1u8>({
            let hasThreadFenceSystem: u32 = hasThreadFenceSystem as _;
            hasThreadFenceSystem as u64
        });
        __bindgen_bitfield_unit.set_const::<13usize, 1u8>({
            let hasSyncThreadsExt: u32 = hasSyncThreadsExt as _;
            hasSyncThreadsExt as u64
        });
        __bindgen_bitfield_unit.set_const::<14usize, 1u8>({
            let hasSurfaceFuncs: u32 = hasSurfaceFuncs as _;
            hasSurfaceFuncs as u64
        });
        __bindgen_bitfield_unit.set_const::<15usize, 1u8>({
            let has3dGrid: u32 = has3dGrid as _;
            has3dGrid as u64
        });
        __bindgen_bitfield_unit.set_const::<16usize, 1u8>({
            let hasDynamicParallelism: u32 = hasDynamicParallelism as _;
            hasDynamicParallelism as u64
        });
        __bindgen_bitfield_unit
    }
}
#[repr(C)]
#[derive(Debug, 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(Debug, Copy, Clone)]
pub struct hipDeviceProp_tR0600 {
    #[doc = "< Device name."]
    pub name: [::std::os::raw::c_char; 256usize],
    #[doc = "< UUID of a device"]
    pub uuid: hipUUID,
    #[doc = "< 8-byte unique identifier. Only valid on windows"]
    pub luid: [::std::os::raw::c_char; 8usize],
    #[doc = "< LUID node mask"]
    pub luidDeviceNodeMask: ::std::os::raw::c_uint,
    #[doc = "< Size of global memory region (in bytes)."]
    pub totalGlobalMem: usize,
    #[doc = "< Size of shared memory per block (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 = "< Maximum pitch in bytes allowed by memory copies\n< pitched memory"]
    pub memPitch: usize,
    #[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 = "< Size of shared constant memory region on the device\n< (in bytes)."]
    pub totalConstMem: usize,
    #[doc = "< Major compute capability version.  This indicates the core instruction set\n< of the GPU architecture.  For example, a value of 11 would correspond to\n< Navi III (RDNA3).  See the arch feature flags for portable ways to query\n< feature caps."]
    pub major: ::std::os::raw::c_int,
    #[doc = "< Minor compute capability version.  This indicates a particular configuration,\n< feature set, or variation within the group represented by the major compute\n< capability version.  For example, different models within the same major version\n< might have varying levels of support for certain features or optimizations.\n< See the arch feature flags for portable ways to query feature caps."]
    pub minor: ::std::os::raw::c_int,
    #[doc = "< Alignment requirement for textures"]
    pub textureAlignment: usize,
    #[doc = "< Pitch alignment requirement for texture references bound to"]
    pub texturePitchAlignment: usize,
    #[doc = "< Deprecated. Use asyncEngineCount instead"]
    pub deviceOverlap: ::std::os::raw::c_int,
    #[doc = "< Number of multi-processors. When the GPU works in Compute\n< Unit (CU) mode, this value equals the number of CUs;\n< when in Workgroup Processor (WGP) mode, this value equels\n< half of CUs, because a single WGP contains two CUs."]
    pub multiProcessorCount: ::std::os::raw::c_int,
    #[doc = "< Run time limit for kernels executed on the device"]
    pub kernelExecTimeoutEnabled: ::std::os::raw::c_int,
    #[doc = "< APU vs dGPU"]
    pub integrated: ::std::os::raw::c_int,
    #[doc = "< Check whether HIP can map host memory"]
    pub canMapHostMemory: ::std::os::raw::c_int,
    #[doc = "< Compute mode."]
    pub computeMode: ::std::os::raw::c_int,
    #[doc = "< Maximum number of elements in 1D images"]
    pub maxTexture1D: ::std::os::raw::c_int,
    #[doc = "< Maximum 1D mipmap texture size"]
    pub maxTexture1DMipmap: ::std::os::raw::c_int,
    #[doc = "< Maximum size for 1D textures bound to linear memory"]
    pub maxTexture1DLinear: ::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 number of elements in 2D array mipmap of images"]
    pub maxTexture2DMipmap: [::std::os::raw::c_int; 2usize],
    #[doc = "< Maximum 2D tex dimensions if tex are bound to pitched memory"]
    pub maxTexture2DLinear: [::std::os::raw::c_int; 3usize],
    #[doc = "< Maximum 2D tex dimensions if gather has to be performed"]
    pub maxTexture2DGather: [::std::os::raw::c_int; 2usize],
    #[doc = "< Maximum dimensions (width, height, depth) of 3D images, in image\n< elements"]
    pub maxTexture3D: [::std::os::raw::c_int; 3usize],
    #[doc = "< Maximum alternate 3D texture dims"]
    pub maxTexture3DAlt: [::std::os::raw::c_int; 3usize],
    #[doc = "< Maximum cubemap texture dims"]
    pub maxTextureCubemap: ::std::os::raw::c_int,
    #[doc = "< Maximum number of elements in 1D array images"]
    pub maxTexture1DLayered: [::std::os::raw::c_int; 2usize],
    #[doc = "< Maximum number of elements in 2D array images"]
    pub maxTexture2DLayered: [::std::os::raw::c_int; 3usize],
    #[doc = "< Maximum cubemaps layered texture dims"]
    pub maxTextureCubemapLayered: [::std::os::raw::c_int; 2usize],
    #[doc = "< Maximum 1D surface size"]
    pub maxSurface1D: ::std::os::raw::c_int,
    #[doc = "< Maximum 2D surface size"]
    pub maxSurface2D: [::std::os::raw::c_int; 2usize],
    #[doc = "< Maximum 3D surface size"]
    pub maxSurface3D: [::std::os::raw::c_int; 3usize],
    #[doc = "< Maximum 1D layered surface size"]
    pub maxSurface1DLayered: [::std::os::raw::c_int; 2usize],
    #[doc = "< Maximum 2D layared surface size"]
    pub maxSurface2DLayered: [::std::os::raw::c_int; 3usize],
    #[doc = "< Maximum cubemap surface size"]
    pub maxSurfaceCubemap: ::std::os::raw::c_int,
    #[doc = "< Maximum cubemap layered surface size"]
    pub maxSurfaceCubemapLayered: [::std::os::raw::c_int; 2usize],
    #[doc = "< Alignment requirement for surface"]
    pub surfaceAlignment: usize,
    #[doc = "< Device can possibly execute multiple kernels concurrently."]
    pub concurrentKernels: ::std::os::raw::c_int,
    #[doc = "< Device has ECC support enabled"]
    pub ECCEnabled: ::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 = "< PCI Domain ID"]
    pub pciDomainID: ::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 = "< Number of async engines"]
    pub asyncEngineCount: ::std::os::raw::c_int,
    #[doc = "< Does device and host share unified address space"]
    pub unifiedAddressing: ::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 = "< L2 cache size."]
    pub l2CacheSize: ::std::os::raw::c_int,
    #[doc = "< Device's max L2 persisting lines in bytes"]
    pub persistingL2CacheMaxSize: ::std::os::raw::c_int,
    #[doc = "< Maximum resident threads per multi-processor."]
    pub maxThreadsPerMultiProcessor: ::std::os::raw::c_int,
    #[doc = "< Device supports stream priority"]
    pub streamPrioritiesSupported: ::std::os::raw::c_int,
    #[doc = "< Indicates globals are cached in L1"]
    pub globalL1CacheSupported: ::std::os::raw::c_int,
    #[doc = "< Locals are cahced in L1"]
    pub localL1CacheSupported: ::std::os::raw::c_int,
    #[doc = "< Amount of shared memory available per multiprocessor."]
    pub sharedMemPerMultiprocessor: usize,
    #[doc = "< registers available per multiprocessor"]
    pub regsPerMultiprocessor: ::std::os::raw::c_int,
    #[doc = "< Device supports allocating managed memory on this system"]
    pub managedMemory: ::std::os::raw::c_int,
    #[doc = "< 1 if device is on a multi-GPU board, 0 if not."]
    pub isMultiGpuBoard: ::std::os::raw::c_int,
    #[doc = "< Unique identifier for a group of devices on same multiboard GPU"]
    pub multiGpuBoardGroupID: ::std::os::raw::c_int,
    #[doc = "< Link between host and device supports native atomics"]
    pub hostNativeAtomicSupported: ::std::os::raw::c_int,
    #[doc = "< Deprecated. CUDA only."]
    pub singleToDoublePrecisionPerfRatio: ::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 can coherently access managed memory concurrently with\n< the CPU"]
    pub concurrentManagedAccess: ::std::os::raw::c_int,
    #[doc = "< Is compute preemption supported on the device"]
    pub computePreemptionSupported: ::std::os::raw::c_int,
    #[doc = "< Device can access host registered memory with same\n< address as the host"]
    pub canUseHostPointerForRegisteredMem: ::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\n< devices"]
    pub cooperativeMultiDeviceLaunch: ::std::os::raw::c_int,
    #[doc = "< Per device m ax shared mem per block usable by special opt in"]
    pub sharedMemPerBlockOptin: usize,
    #[doc = "< Device accesses pageable memory via the host's\n< page tables"]
    pub pageableMemoryAccessUsesHostPageTables: ::std::os::raw::c_int,
    #[doc = "< Host can directly access managed memory on the device\n< without migration"]
    pub directManagedMemAccessFromHost: ::std::os::raw::c_int,
    #[doc = "< Max number of blocks on CU"]
    pub maxBlocksPerMultiProcessor: ::std::os::raw::c_int,
    #[doc = "< Max value of access policy window"]
    pub accessPolicyMaxWindowSize: ::std::os::raw::c_int,
    #[doc = "< Shared memory reserved by driver per block"]
    pub reservedSharedMemPerBlock: usize,
    #[doc = "< Device supports hipHostRegister"]
    pub hostRegisterSupported: ::std::os::raw::c_int,
    #[doc = "< Indicates if device supports sparse hip arrays"]
    pub sparseHipArraySupported: ::std::os::raw::c_int,
    #[doc = "< Device supports using the hipHostRegisterReadOnly flag\n< with hipHostRegistger"]
    pub hostRegisterReadOnlySupported: ::std::os::raw::c_int,
    #[doc = "< Indicates external timeline semaphore support"]
    pub timelineSemaphoreInteropSupported: ::std::os::raw::c_int,
    #[doc = "< Indicates if device supports hipMallocAsync and hipMemPool APIs"]
    pub memoryPoolsSupported: ::std::os::raw::c_int,
    #[doc = "< Indicates device support of RDMA APIs"]
    pub gpuDirectRDMASupported: ::std::os::raw::c_int,
    #[doc = "< Bitmask to be interpreted according to\n< hipFlushGPUDirectRDMAWritesOptions"]
    pub gpuDirectRDMAFlushWritesOptions: ::std::os::raw::c_uint,
    #[doc = "< value of hipGPUDirectRDMAWritesOrdering"]
    pub gpuDirectRDMAWritesOrdering: ::std::os::raw::c_int,
    #[doc = "< Bitmask of handle types support with mempool based IPC"]
    pub memoryPoolSupportedHandleTypes: ::std::os::raw::c_uint,
    #[doc = "< Device supports deferred mapping HIP arrays and HIP\n< mipmapped arrays"]
    pub deferredMappingHipArraySupported: ::std::os::raw::c_int,
    #[doc = "< Device supports IPC events"]
    pub ipcEventSupported: ::std::os::raw::c_int,
    #[doc = "< Device supports cluster launch"]
    pub clusterLaunch: ::std::os::raw::c_int,
    #[doc = "< Indicates device supports unified function pointers"]
    pub unifiedFunctionPointers: ::std::os::raw::c_int,
    #[doc = "< CUDA Reserved."]
    pub reserved: [::std::os::raw::c_int; 63usize],
    #[doc = "< Reserved for adding new entries for HIP/CUDA."]
    pub hipReserved: [::std::os::raw::c_int; 32usize],
    #[doc = "< AMD GCN Arch Name. HIP Only."]
    pub gcnArchName: [::std::os::raw::c_char; 256usize],
    #[doc = "< Maximum Shared Memory Per CU. HIP Only."]
    pub maxSharedMemoryPerMultiProcessor: usize,
    #[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 = "< 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 = "< HIP device supports cooperative launch on\n< multiple"]
    pub cooperativeMultiDeviceUnmatchedFunc: ::std::os::raw::c_int,
    #[doc = "< HIP device supports cooperative launch on\n< multiple"]
    pub cooperativeMultiDeviceUnmatchedGridDim: ::std::os::raw::c_int,
    #[doc = "< HIP device supports cooperative launch on\n< multiple"]
    pub cooperativeMultiDeviceUnmatchedBlockDim: ::std::os::raw::c_int,
    #[doc = "< HIP device supports cooperative launch on\n< 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 = " Pointer attributes"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipPointerAttribute_t {
    pub type_: hipMemoryType,
    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,
}
impl hipError_t {
    pub const hipErrorMemoryAllocation: hipError_t = hipError_t::hipErrorOutOfMemory;
}
impl hipError_t {
    pub const hipErrorInitializationError: hipError_t = hipError_t::hipErrorNotInitialized;
}
impl hipError_t {
    pub const hipErrorMapBufferObjectFailed: hipError_t = hipError_t::hipErrorMapFailed;
}
impl hipError_t {
    pub const hipErrorInvalidResourceHandle: hipError_t = hipError_t::hipErrorInvalidHandle;
}
#[repr(u32)]
#[doc = " HIP error type\n"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipError_t {
    #[doc = "< Successful completion."]
    hipSuccess = 0,
    #[doc = "< One or more of the parameters passed to the API call is NULL\n< or not in an acceptable range."]
    hipErrorInvalidValue = 1,
    #[doc = "< out of memory range."]
    hipErrorOutOfMemory = 2,
    #[doc = "< Invalid not initialized"]
    hipErrorNotInitialized = 3,
    #[doc = "< Deinitialized"]
    hipErrorDeinitialized = 4,
    hipErrorProfilerDisabled = 5,
    hipErrorProfilerNotInitialized = 6,
    hipErrorProfilerAlreadyStarted = 7,
    hipErrorProfilerAlreadyStopped = 8,
    #[doc = "< Invalide configuration"]
    hipErrorInvalidConfiguration = 9,
    #[doc = "< Invalid pitch value"]
    hipErrorInvalidPitchValue = 12,
    #[doc = "< Invalid symbol"]
    hipErrorInvalidSymbol = 13,
    #[doc = "< Invalid Device Pointer"]
    hipErrorInvalidDevicePointer = 17,
    #[doc = "< Invalid memory copy direction"]
    hipErrorInvalidMemcpyDirection = 21,
    hipErrorInsufficientDriver = 35,
    hipErrorMissingConfiguration = 52,
    hipErrorPriorLaunchFailure = 53,
    #[doc = "< Invalid device function"]
    hipErrorInvalidDeviceFunction = 98,
    #[doc = "< Call to hipGetDeviceCount returned 0 devices"]
    hipErrorNoDevice = 100,
    #[doc = "< DeviceID must be in range from 0 to compute-devices."]
    hipErrorInvalidDevice = 101,
    #[doc = "< Invalid image"]
    hipErrorInvalidImage = 200,
    #[doc = "< Produced when input context is invalid."]
    hipErrorInvalidContext = 201,
    hipErrorContextAlreadyCurrent = 202,
    hipErrorMapFailed = 205,
    hipErrorUnmapFailed = 206,
    hipErrorArrayIsMapped = 207,
    hipErrorAlreadyMapped = 208,
    hipErrorNoBinaryForGpu = 209,
    hipErrorAlreadyAcquired = 210,
    hipErrorNotMapped = 211,
    hipErrorNotMappedAsArray = 212,
    hipErrorNotMappedAsPointer = 213,
    hipErrorECCNotCorrectable = 214,
    #[doc = "< Unsupported limit"]
    hipErrorUnsupportedLimit = 215,
    #[doc = "< The context is already in use"]
    hipErrorContextAlreadyInUse = 216,
    hipErrorPeerAccessUnsupported = 217,
    #[doc = "< In CUDA DRV, it is CUDA_ERROR_INVALID_PTX"]
    hipErrorInvalidKernelFile = 218,
    hipErrorInvalidGraphicsContext = 219,
    #[doc = "< Invalid source."]
    hipErrorInvalidSource = 300,
    #[doc = "< the file is not found."]
    hipErrorFileNotFound = 301,
    hipErrorSharedObjectSymbolNotFound = 302,
    #[doc = "< Failed to initialize shared object."]
    hipErrorSharedObjectInitFailed = 303,
    #[doc = "< Not the correct operating system"]
    hipErrorOperatingSystem = 304,
    #[doc = "< Invalide handle"]
    hipErrorInvalidHandle = 400,
    #[doc = "< Resource required is not in a valid state to perform operation."]
    hipErrorIllegalState = 401,
    #[doc = "< Not found"]
    hipErrorNotFound = 500,
    #[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."]
    hipErrorNotReady = 600,
    hipErrorIllegalAddress = 700,
    #[doc = "< Out of resources error."]
    hipErrorLaunchOutOfResources = 701,
    #[doc = "< Timeout for the launch."]
    hipErrorLaunchTimeOut = 702,
    #[doc = "< Peer access was already enabled from the current\n< device."]
    hipErrorPeerAccessAlreadyEnabled = 704,
    #[doc = "< Peer access was never enabled from the current device."]
    hipErrorPeerAccessNotEnabled = 705,
    #[doc = "< The process is active."]
    hipErrorSetOnActiveProcess = 708,
    #[doc = "< The context is already destroyed"]
    hipErrorContextIsDestroyed = 709,
    #[doc = "< Produced when the kernel calls assert."]
    hipErrorAssert = 710,
    #[doc = "< Produced when trying to lock a page-locked\n< memory."]
    hipErrorHostMemoryAlreadyRegistered = 712,
    #[doc = "< Produced when trying to unlock a non-page-locked\n< memory."]
    hipErrorHostMemoryNotRegistered = 713,
    #[doc = "< An exception occurred on the device while executing a kernel."]
    hipErrorLaunchFailure = 719,
    #[doc = "< This error indicates that the number of blocks\n< launched per grid for a kernel that was launched\n< via cooperative launch APIs exceeds the maximum\n< number of allowed blocks for the current device."]
    hipErrorCooperativeLaunchTooLarge = 720,
    #[doc = "< Produced when the hip API is not supported/implemented"]
    hipErrorNotSupported = 801,
    #[doc = "< The operation is not permitted when the stream\n< is capturing."]
    hipErrorStreamCaptureUnsupported = 900,
    #[doc = "< The current capture sequence on the stream\n< has been invalidated due to a previous error."]
    hipErrorStreamCaptureInvalidated = 901,
    #[doc = "< The operation would have resulted in a merge of\n< two independent capture sequences."]
    hipErrorStreamCaptureMerge = 902,
    #[doc = "< The capture was not initiated in this stream."]
    hipErrorStreamCaptureUnmatched = 903,
    #[doc = "< The capture sequence contains a fork that was not\n< joined to the primary stream."]
    hipErrorStreamCaptureUnjoined = 904,
    #[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"]
    hipErrorStreamCaptureIsolation = 905,
    #[doc = "< The operation would have resulted in a disallowed\n< implicit dependency on a current capture sequence\n< from hipStreamLegacy."]
    hipErrorStreamCaptureImplicit = 906,
    #[doc = "< The operation is not permitted on an event which was last\n< recorded in a capturing stream."]
    hipErrorCapturedEvent = 907,
    #[doc = "< A stream capture sequence not initiated with\n< the hipStreamCaptureModeRelaxed argument to\n< hipStreamBeginCapture was passed to\n< hipStreamEndCapture in a different thread."]
    hipErrorStreamCaptureWrongThread = 908,
    #[doc = "< This error indicates that the graph update\n< not performed because it included changes which\n< violated constraintsspecific to instantiated graph\n< update."]
    hipErrorGraphExecUpdateFailure = 910,
    #[doc = "< Invalid channel descriptor."]
    hipErrorInvalidChannelDescriptor = 911,
    #[doc = "< Invalid texture."]
    hipErrorInvalidTexture = 912,
    #[doc = "< Unknown error."]
    hipErrorUnknown = 999,
    #[doc = "< HSA runtime memory call returned error.  Typically not seen\n< in production systems."]
    hipErrorRuntimeMemory = 1052,
    #[doc = "< HSA runtime call other than memory returned error.  Typically\n< not seen in production systems."]
    hipErrorRuntimeOther = 1053,
    #[doc = "< Marker that more error codes are needed."]
    hipErrorTbd = 1054,
}
impl hipDeviceAttribute_t {
    pub const hipDeviceAttributeEccEnabled: hipDeviceAttribute_t =
        hipDeviceAttribute_t::hipDeviceAttributeCudaCompatibleBegin;
}
impl hipDeviceAttribute_t {
    pub const hipDeviceAttributePciDomainID: hipDeviceAttribute_t =
        hipDeviceAttribute_t::hipDeviceAttributePciDomainId;
}
impl hipDeviceAttribute_t {
    pub const hipDeviceAttributeClockInstructionRate: hipDeviceAttribute_t =
        hipDeviceAttribute_t::hipDeviceAttributeAmdSpecificBegin;
}
#[repr(u32)]
#[doc = " hipDeviceAttribute_t\n hipDeviceAttributeUnused number: 5"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipDeviceAttribute_t {
    hipDeviceAttributeCudaCompatibleBegin = 0,
    #[doc = "< Cuda only. The maximum size of the window\n< policy in bytes."]
    hipDeviceAttributeAccessPolicyMaxWindowSize = 1,
    #[doc = "< Asynchronous engines number."]
    hipDeviceAttributeAsyncEngineCount = 2,
    #[doc = "< Whether host memory can be mapped into device address\n< space"]
    hipDeviceAttributeCanMapHostMemory = 3,
    #[doc = "< Device can access host registered\n< memory at the same virtual address as\n< the CPU"]
    hipDeviceAttributeCanUseHostPointerForRegisteredMem = 4,
    #[doc = "< Peak clock frequency in kilohertz."]
    hipDeviceAttributeClockRate = 5,
    #[doc = "< Compute mode that device is currently in."]
    hipDeviceAttributeComputeMode = 6,
    #[doc = "< Device supports Compute Preemption."]
    hipDeviceAttributeComputePreemptionSupported = 7,
    #[doc = "< Device can possibly execute multiple kernels\n< concurrently."]
    hipDeviceAttributeConcurrentKernels = 8,
    #[doc = "< Device can coherently access managed memory\n< concurrently with the CPU"]
    hipDeviceAttributeConcurrentManagedAccess = 9,
    #[doc = "< Support cooperative launch"]
    hipDeviceAttributeCooperativeLaunch = 10,
    #[doc = "< Support cooperative launch on multiple\n< devices"]
    hipDeviceAttributeCooperativeMultiDeviceLaunch = 11,
    #[doc = "< Device can concurrently copy memory and execute a kernel.\n< Deprecated. Use instead asyncEngineCount."]
    hipDeviceAttributeDeviceOverlap = 12,
    #[doc = "< Host can directly access managed memory on\n< the device without migration"]
    hipDeviceAttributeDirectManagedMemAccessFromHost = 13,
    #[doc = "< Device supports caching globals in L1"]
    hipDeviceAttributeGlobalL1CacheSupported = 14,
    #[doc = "< Link between the device and the host supports\n< native atomic operations"]
    hipDeviceAttributeHostNativeAtomicSupported = 15,
    #[doc = "< Device is integrated GPU"]
    hipDeviceAttributeIntegrated = 16,
    #[doc = "< Multiple GPU devices."]
    hipDeviceAttributeIsMultiGpuBoard = 17,
    #[doc = "< Run time limit for kernels executed on the device"]
    hipDeviceAttributeKernelExecTimeout = 18,
    #[doc = "< Size of L2 cache in bytes. 0 if the device doesn't have L2\n< cache."]
    hipDeviceAttributeL2CacheSize = 19,
    #[doc = "< caching locals in L1 is supported"]
    hipDeviceAttributeLocalL1CacheSupported = 20,
    #[doc = "< 8-byte locally unique identifier in 8 bytes. Undefined on TCC and\n< non-Windows platforms"]
    hipDeviceAttributeLuid = 21,
    #[doc = "< Luid device node mask. Undefined on TCC and\n< non-Windows platforms"]
    hipDeviceAttributeLuidDeviceNodeMask = 22,
    #[doc = "< Major compute capability version number."]
    hipDeviceAttributeComputeCapabilityMajor = 23,
    #[doc = "< Device supports allocating managed memory on this system"]
    hipDeviceAttributeManagedMemory = 24,
    #[doc = "< Max block size per multiprocessor"]
    hipDeviceAttributeMaxBlocksPerMultiProcessor = 25,
    #[doc = "< Max block size in width."]
    hipDeviceAttributeMaxBlockDimX = 26,
    #[doc = "< Max block size in height."]
    hipDeviceAttributeMaxBlockDimY = 27,
    #[doc = "< Max block size in depth."]
    hipDeviceAttributeMaxBlockDimZ = 28,
    #[doc = "< Max grid size  in width."]
    hipDeviceAttributeMaxGridDimX = 29,
    #[doc = "< Max grid size  in height."]
    hipDeviceAttributeMaxGridDimY = 30,
    #[doc = "< Max grid size  in depth."]
    hipDeviceAttributeMaxGridDimZ = 31,
    #[doc = "< Maximum size of 1D surface."]
    hipDeviceAttributeMaxSurface1D = 32,
    #[doc = "< Cuda only. Maximum dimensions of 1D layered surface."]
    hipDeviceAttributeMaxSurface1DLayered = 33,
    #[doc = "< Maximum dimension (width, height) of 2D surface."]
    hipDeviceAttributeMaxSurface2D = 34,
    #[doc = "< Cuda only. Maximum dimensions of 2D layered surface."]
    hipDeviceAttributeMaxSurface2DLayered = 35,
    #[doc = "< Maximum dimension (width, height, depth) of 3D surface."]
    hipDeviceAttributeMaxSurface3D = 36,
    #[doc = "< Cuda only. Maximum dimensions of Cubemap surface."]
    hipDeviceAttributeMaxSurfaceCubemap = 37,
    #[doc = "< Cuda only. Maximum dimension of Cubemap layered\n< surface."]
    hipDeviceAttributeMaxSurfaceCubemapLayered = 38,
    #[doc = "< Maximum size of 1D texture."]
    hipDeviceAttributeMaxTexture1DWidth = 39,
    #[doc = "< Maximum dimensions of 1D layered texture."]
    hipDeviceAttributeMaxTexture1DLayered = 40,
    #[doc = "< Maximum number of elements allocatable in a 1D linear\n< texture. Use cudaDeviceGetTexture1DLinearMaxWidth()\n< instead on Cuda."]
    hipDeviceAttributeMaxTexture1DLinear = 41,
    #[doc = "< Maximum size of 1D mipmapped texture."]
    hipDeviceAttributeMaxTexture1DMipmap = 42,
    #[doc = "< Maximum dimension width of 2D texture."]
    hipDeviceAttributeMaxTexture2DWidth = 43,
    #[doc = "< Maximum dimension hight of 2D texture."]
    hipDeviceAttributeMaxTexture2DHeight = 44,
    #[doc = "< Maximum dimensions of 2D texture if gather operations\n< performed."]
    hipDeviceAttributeMaxTexture2DGather = 45,
    #[doc = "< Maximum dimensions of 2D layered texture."]
    hipDeviceAttributeMaxTexture2DLayered = 46,
    #[doc = "< Maximum dimensions (width, height, pitch) of 2D\n< textures bound to pitched memory."]
    hipDeviceAttributeMaxTexture2DLinear = 47,
    #[doc = "< Maximum dimensions of 2D mipmapped texture."]
    hipDeviceAttributeMaxTexture2DMipmap = 48,
    #[doc = "< Maximum dimension width of 3D texture."]
    hipDeviceAttributeMaxTexture3DWidth = 49,
    #[doc = "< Maximum dimension height of 3D texture."]
    hipDeviceAttributeMaxTexture3DHeight = 50,
    #[doc = "< Maximum dimension depth of 3D texture."]
    hipDeviceAttributeMaxTexture3DDepth = 51,
    #[doc = "< Maximum dimensions of alternate 3D texture."]
    hipDeviceAttributeMaxTexture3DAlt = 52,
    #[doc = "< Maximum dimensions of Cubemap texture"]
    hipDeviceAttributeMaxTextureCubemap = 53,
    #[doc = "< Maximum dimensions of Cubemap layered texture."]
    hipDeviceAttributeMaxTextureCubemapLayered = 54,
    #[doc = "< Maximum dimension of a block"]
    hipDeviceAttributeMaxThreadsDim = 55,
    #[doc = "< Maximum number of threads per block."]
    hipDeviceAttributeMaxThreadsPerBlock = 56,
    #[doc = "< Maximum resident threads per multiprocessor."]
    hipDeviceAttributeMaxThreadsPerMultiProcessor = 57,
    #[doc = "< Maximum pitch in bytes allowed by memory copies"]
    hipDeviceAttributeMaxPitch = 58,
    #[doc = "< Global memory bus width in bits."]
    hipDeviceAttributeMemoryBusWidth = 59,
    #[doc = "< Peak memory clock frequency in kilohertz."]
    hipDeviceAttributeMemoryClockRate = 60,
    #[doc = "< Minor compute capability version number."]
    hipDeviceAttributeComputeCapabilityMinor = 61,
    #[doc = "< Unique ID of device group on the same multi-GPU\n< board"]
    hipDeviceAttributeMultiGpuBoardGroupID = 62,
    #[doc = "< Number of multi-processors. When the GPU works in Compute\n< Unit (CU) mode, this value equals the number of CUs;\n< when in Workgroup Processor (WGP) mode, this value equels\n< half of CUs, because a single WGP contains two CUs."]
    hipDeviceAttributeMultiprocessorCount = 63,
    #[doc = "< Previously hipDeviceAttributeName"]
    hipDeviceAttributeUnused1 = 64,
    #[doc = "< Device supports coherently accessing pageable memory\n< without calling hipHostRegister on it"]
    hipDeviceAttributePageableMemoryAccess = 65,
    #[doc = "< Device accesses pageable memory\n< via the host's page tables"]
    hipDeviceAttributePageableMemoryAccessUsesHostPageTables = 66,
    #[doc = "< PCI Bus ID."]
    hipDeviceAttributePciBusId = 67,
    #[doc = "< PCI Device ID. Returns pcie slot id"]
    hipDeviceAttributePciDeviceId = 68,
    #[doc = "< PCI Domain Id."]
    hipDeviceAttributePciDomainId = 69,
    #[doc = "< Maximum l2 persisting lines capacity in bytes"]
    hipDeviceAttributePersistingL2CacheMaxSize = 70,
    #[doc = "< 32-bit registers available to a thread block. This\n< number is shared by all thread blocks simultaneously\n< resident on a multiprocessor."]
    hipDeviceAttributeMaxRegistersPerBlock = 71,
    #[doc = "< 32-bit registers available per block."]
    hipDeviceAttributeMaxRegistersPerMultiprocessor = 72,
    #[doc = "< Shared memory reserved by CUDA driver per\n< block."]
    hipDeviceAttributeReservedSharedMemPerBlock = 73,
    #[doc = "< Maximum shared memory available per block in\n< bytes."]
    hipDeviceAttributeMaxSharedMemoryPerBlock = 74,
    #[doc = "< Maximum shared memory per block usable by special\n< opt in."]
    hipDeviceAttributeSharedMemPerBlockOptin = 75,
    #[doc = "< Shared memory available per multiprocessor."]
    hipDeviceAttributeSharedMemPerMultiprocessor = 76,
    #[doc = "< Cuda only. Performance ratio of single\n< precision to double precision."]
    hipDeviceAttributeSingleToDoublePrecisionPerfRatio = 77,
    #[doc = "< Whether to support stream priorities."]
    hipDeviceAttributeStreamPrioritiesSupported = 78,
    #[doc = "< Alignment requirement for surfaces"]
    hipDeviceAttributeSurfaceAlignment = 79,
    #[doc = "< Cuda only. Whether device is a Tesla device using TCC driver"]
    hipDeviceAttributeTccDriver = 80,
    #[doc = "< Alignment requirement for textures"]
    hipDeviceAttributeTextureAlignment = 81,
    #[doc = "< Pitch alignment requirement for 2D texture\n< references bound to pitched memory;"]
    hipDeviceAttributeTexturePitchAlignment = 82,
    #[doc = "< Constant memory size in bytes."]
    hipDeviceAttributeTotalConstantMemory = 83,
    #[doc = "< Global memory available on devicice."]
    hipDeviceAttributeTotalGlobalMem = 84,
    #[doc = "< Cuda only. An unified address space shared with the\n< host."]
    hipDeviceAttributeUnifiedAddressing = 85,
    #[doc = "< Previously hipDeviceAttributeUuid"]
    hipDeviceAttributeUnused2 = 86,
    #[doc = "< Warp size in threads."]
    hipDeviceAttributeWarpSize = 87,
    #[doc = "< Device supports HIP Stream Ordered Memory Allocator"]
    hipDeviceAttributeMemoryPoolsSupported = 88,
    #[doc = "< Device supports HIP virtual memory\n< management"]
    hipDeviceAttributeVirtualMemoryManagementSupported = 89,
    #[doc = "< Can device support host memory registration via\n< hipHostRegister"]
    hipDeviceAttributeHostRegisterSupported = 90,
    #[doc = "< Supported handle mask for HIP Stream\n< Ordered Memory Allocator"]
    hipDeviceAttributeMemoryPoolSupportedHandleTypes = 91,
    #[doc = "< NUMA ID of the cpu node closest to the device,\n< or -1 when NUMA isn't supported"]
    hipDeviceAttributeHostNumaId = 92,
    #[doc = "< Device supports DMABuf buffer sharing"]
    hipDeviceAttributeDmaBufSupported = 93,
    #[doc = "< GPU Direct RDMA with HIP VMM is supported\n< (requires DMA-Buf and HIP virtual memory\n< management)"]
    hipDeviceAttributeGPUDirectRDMAWithHipVMMSupported = 94,
    #[doc = "< Device supports exporting memory to a fabric handle"]
    hipDeviceAttributeHandleTypeFabricSupported = 95,
    hipDeviceAttributeCudaCompatibleEnd = 9999,
    hipDeviceAttributeAmdSpecificBegin = 10000,
    #[doc = "< Previously hipDeviceAttributeArch"]
    hipDeviceAttributeUnused3 = 10001,
    #[doc = "< Maximum Shared Memory PerMultiprocessor."]
    hipDeviceAttributeMaxSharedMemoryPerMultiprocessor = 10002,
    #[doc = "< Previously hipDeviceAttributeGcnArch"]
    hipDeviceAttributeUnused4 = 10003,
    #[doc = "< Previously hipDeviceAttributeGcnArchName"]
    hipDeviceAttributeUnused5 = 10004,
    #[doc = "< Address of the HDP_MEM_COHERENCY_FLUSH_CNTL register"]
    hipDeviceAttributeHdpMemFlushCntl = 10005,
    #[doc = "< Address of the HDP_REG_COHERENCY_FLUSH_CNTL register"]
    hipDeviceAttributeHdpRegFlushCntl = 10006,
    #[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< functions"]
    hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc = 10007,
    #[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< grid dimensions"]
    hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim = 10008,
    #[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< block dimensions"]
    hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim = 10009,
    #[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< shared memories"]
    hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem = 10010,
    #[doc = "< Whether it is LargeBar"]
    hipDeviceAttributeIsLargeBar = 10011,
    #[doc = "< Revision of the GPU in this device"]
    hipDeviceAttributeAsicRevision = 10012,
    #[doc = "< '1' if Device supports hipStreamWaitValue32() and\n< hipStreamWaitValue64(), '0' otherwise."]
    hipDeviceAttributeCanUseStreamWaitValue = 10013,
    #[doc = "< '1' if Device supports image, '0' otherwise."]
    hipDeviceAttributeImageSupport = 10014,
    #[doc = "< All available physical compute\n< units for the device"]
    hipDeviceAttributePhysicalMultiProcessorCount = 10015,
    #[doc = "< '1' if Device supports fine grain, '0' otherwise"]
    hipDeviceAttributeFineGrainSupport = 10016,
    #[doc = "< Constant frequency of wall clock in kilohertz."]
    hipDeviceAttributeWallClockRate = 10017,
    #[doc = "< Number of XCC(s) in the device’s current\n< compute partition(XCP).\n< An XCC is AMD’s fundamental GPU compute tile.\n< Devices like MI300X include multiple XCCs\n< per package. Value varies by boot‑time\n< partition mode(compute or memory).\n< Partition modes can be set using amd‑smi."]
    hipDeviceAttributeNumberOfXccs = 10018,
    #[doc = "< Max number of available (directly or\n< indirectly addressable) VGPRs per thread in\n< DWORDs."]
    hipDeviceAttributeMaxAvailableVgprsPerThread = 10019,
    #[doc = "< GPU Manufacturer device id"]
    hipDeviceAttributePciChipId = 10020,
    #[doc = "< '1' if Device supports expert scheduling mode,\n< '0' otherwise."]
    hipDeviceAttributeExpertSchedMode = 10021,
    hipDeviceAttributeAmdSpecificEnd = 19999,
    hipDeviceAttributeVendorSpecificBegin = 20000,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipDriverProcAddressQueryResult {
    HIP_GET_PROC_ADDRESS_SUCCESS = 0,
    HIP_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND = 1,
    HIP_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipComputeMode {
    hipComputeModeDefault = 0,
    hipComputeModeExclusive = 1,
    hipComputeModeProhibited = 2,
    hipComputeModeExclusiveProcess = 3,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipFlushGPUDirectRDMAWritesOptions {
    hipFlushGPUDirectRDMAWritesOptionHost = 1,
    hipFlushGPUDirectRDMAWritesOptionMemOps = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipGPUDirectRDMAWritesOrdering {
    hipGPUDirectRDMAWritesOrderingNone = 0,
    hipGPUDirectRDMAWritesOrderingOwner = 100,
    hipGPUDirectRDMAWritesOrderingAllDevices = 200,
}
#[doc = " An opaque value that represents a hip texture object"]
#[repr(C)]
#[derive(Debug)]
pub struct __hip_texture {
    _unused: [u8; 0],
}
pub type hipTextureObject_t = *mut __hip_texture;
#[repr(u32)]
#[doc = " hip texture address modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipTextureAddressMode {
    hipAddressModeWrap = 0,
    hipAddressModeClamp = 1,
    hipAddressModeMirror = 2,
    hipAddressModeBorder = 3,
}
#[repr(u32)]
#[doc = " hip texture filter modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipTextureFilterMode {
    hipFilterModePoint = 0,
    hipFilterModeLinear = 1,
}
#[repr(u32)]
#[doc = " hip texture read modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipTextureReadMode {
    hipReadModeElementType = 0,
    hipReadModeNormalizedFloat = 1,
}
#[doc = " hip texture reference"]
#[repr(C)]
#[derive(Debug, 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(Debug, 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(Debug)]
pub struct __hip_surface {
    _unused: [u8; 0],
}
pub type hipSurfaceObject_t = *mut __hip_surface;
#[doc = " hip surface reference"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct surfaceReference {
    pub surfaceObject: hipSurfaceObject_t,
}
#[repr(u32)]
#[doc = " hip surface boundary modes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipSurfaceBoundaryMode {
    hipBoundaryModeZero = 0,
    hipBoundaryModeTrap = 1,
    hipBoundaryModeClamp = 2,
}
#[repr(C)]
#[derive(Debug)]
pub struct ihipCtx_t {
    _unused: [u8; 0],
}
pub type hipCtx_t = *mut ihipCtx_t;
pub type hipDevice_t = ::std::os::raw::c_int;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipDeviceP2PAttr {
    hipDevP2PAttrPerformanceRank = 0,
    hipDevP2PAttrAccessSupported = 1,
    hipDevP2PAttrNativeAtomicSupported = 2,
    hipDevP2PAttrHipArrayAccessSupported = 3,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipDriverEntryPointQueryResult {
    hipDriverEntryPointSuccess = 0,
    hipDriverEntryPointSymbolNotFound = 1,
    hipDriverEntryPointVersionNotSufficent = 2,
}
#[repr(C)]
#[derive(Debug)]
pub struct ihipStream_t {
    _unused: [u8; 0],
}
pub type hipStream_t = *mut ihipStream_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipIpcMemHandle_st {
    pub reserved: [::std::os::raw::c_char; 64usize],
}
pub type hipIpcMemHandle_t = hipIpcMemHandle_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipIpcEventHandle_st {
    pub reserved: [::std::os::raw::c_char; 64usize],
}
pub type hipIpcEventHandle_t = hipIpcEventHandle_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipMemFabricHandle_st {
    pub data: [::std::os::raw::c_uchar; 64usize],
}
pub type hipMemFabricHandle_t = hipMemFabricHandle_st;
#[repr(C)]
#[derive(Debug)]
pub struct ihipModule_t {
    _unused: [u8; 0],
}
pub type hipModule_t = *mut ihipModule_t;
#[repr(C)]
#[derive(Debug)]
pub struct ihipModuleSymbol_t {
    _unused: [u8; 0],
}
pub type hipFunction_t = *mut ihipModuleSymbol_t;
#[repr(C)]
#[derive(Debug)]
pub struct ihipLinkState_t {
    _unused: [u8; 0],
}
pub type hipLinkState_t = *mut ihipLinkState_t;
#[repr(C)]
#[derive(Debug)]
pub struct ihipLibrary_t {
    _unused: [u8; 0],
}
pub type hipLibrary_t = *mut ihipLibrary_t;
#[repr(C)]
#[derive(Debug)]
pub struct ihipKernel_t {
    _unused: [u8; 0],
}
pub type hipKernel_t = *mut ihipKernel_t;
#[repr(C)]
#[derive(Debug)]
pub struct ihipMemPoolHandle_t {
    _unused: [u8; 0],
}
#[doc = " HIP memory pool"]
pub type hipMemPool_t = *mut ihipMemPoolHandle_t;
#[repr(C)]
#[derive(Debug, 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(Debug)]
pub struct ihipEvent_t {
    _unused: [u8; 0],
}
pub type hipEvent_t = *mut ihipEvent_t;
#[repr(u32)]
#[doc = " hipLimit\n\n @note In HIP device limit-related APIs, any input limit value other than those defined in the\n enum is treated as \"UnsupportedLimit\" by default."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipLimit_t {
    #[doc = "< Limit of stack size in bytes on the current device, per\n< thread. The size is in units of 256 dwords, up to the\n< limit of (128K - 16)"]
    hipLimitStackSize = 0,
    #[doc = "< Size limit in bytes of fifo used by printf call on the\n< device. Currently not supported"]
    hipLimitPrintfFifoSize = 1,
    #[doc = "< Limit of heap size in bytes on the current device, should\n< be less than the global memory size on the device"]
    hipLimitMallocHeapSize = 2,
    #[doc = "< Minimum allowed value in bytes for scratch limit on this\n< device. Valid only on Rocm device. This is read only."]
    hipExtLimitScratchMin = 4096,
    #[doc = "< Maximum allowed value in bytes for scratch limit on this\n< device. Valid only on Rocm device. This is read only."]
    hipExtLimitScratchMax = 4097,
    #[doc = "< Current scratch limit threshold in bytes on this\n< device. Must be between hipExtLimitScratchMin and\n< hipExtLimitScratchMaxValid values. Valid only on Rocm\n< device. This can be modified."]
    hipExtLimitScratchCurrent = 4098,
    #[doc = "< Supported limit range"]
    hipLimitRange = 4099,
}
#[repr(u32)]
#[doc = " Operations for hipStreamBatchMemOp"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipStreamBatchMemOpType {
    hipStreamMemOpWaitValue32 = 1,
    hipStreamMemOpWriteValue32 = 2,
    hipStreamMemOpWaitValue64 = 4,
    hipStreamMemOpWriteValue64 = 5,
    #[doc = "< Currently not supported"]
    hipStreamMemOpBarrier = 6,
    #[doc = "< Currently not supported"]
    hipStreamMemOpFlushRemoteWrites = 3,
}
#[doc = " @brief Union representing batch memory operation parameters for HIP streams.\n\n hipStreamBatchMemOpParams is used to specify the parameters for batch memory\n operations in a HIP stream. This union supports various operations including\n waiting for a specific value, writing a value, and different flags for wait conditions.\n\n @details\n The union includes fields for different types of operations defined in the\n enum hipStreamBatchMemOpType:\n - hipStreamMemOpWaitValue32:  Wait for a 32-bit value.\n - hipStreamMemOpWriteValue32: Write a 32-bit value.\n - hipStreamMemOpWaitValue64:  Wait for a 64-bit value.\n - hipStreamMemOpWriteValue64: Write a 64-bit value.\n\n Each operation type includes an address, the value to wait for or write, flags, and an\n optional alias that is not relevant on AMD GPUs. Flags can be used to specify different\n wait conditions such as equality, bitwise AND, greater than or equal, and bitwise NOR.\n\n Example usage:\n @code\n hipStreamBatchMemOpParams myArray[2];\n myArray[0].operation = hipStreamMemOpWaitValue32;\n myArray[0].waitValue.address = waitAddr1;\n myArray[0].waitValue.value = 0x1;\n myArray[0].waitValue.flags = CU_STREAM_WAIT_VALUE_EQ;\n\n myArray[1].operation = hipStreamMemOpWriteValue32;\n myArray[1].writeValue.address = writeAddr1;\n myArray[1].writeValue.value = 0x1;\n myArray[1].writeValue.flags = 0x0;\n\n result = hipStreamBatchMemOp(stream, 2, myArray, 0);\n @endcode"]
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipStreamBatchMemOpParams_union {
    pub operation: hipStreamBatchMemOpType,
    pub waitValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t,
    pub writeValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t,
    #[doc = "< Currently not supported on AMD"]
    pub flushRemoteWrites: hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t,
    #[doc = "< Currently not supported on AMD"]
    pub memoryBarrier: hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t,
    pub pad: [u64; 6usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t {
    pub operation: hipStreamBatchMemOpType,
    pub address: hipDeviceptr_t,
    pub __bindgen_anon_1:
        hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t__bindgen_ty_1,
    pub flags: ::std::os::raw::c_uint,
    #[doc = "< Not valid for AMD backend. Initial value is unimportant"]
    pub alias: hipDeviceptr_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t__bindgen_ty_1 {
    pub value: u32,
    pub value64: u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t {
    pub operation: hipStreamBatchMemOpType,
    pub address: hipDeviceptr_t,
    pub __bindgen_anon_1:
        hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t__bindgen_ty_1,
    pub flags: ::std::os::raw::c_uint,
    #[doc = "< Not valid for AMD backend. Initial value is unimportant"]
    pub alias: hipDeviceptr_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t__bindgen_ty_1 {
    pub value: u32,
    pub value64: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t {
    pub operation: hipStreamBatchMemOpType,
    pub flags: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t {
    pub operation: hipStreamBatchMemOpType,
    pub flags: ::std::os::raw::c_uint,
}
#[doc = " @brief Union representing batch memory operation parameters for HIP streams.\n\n hipStreamBatchMemOpParams is used to specify the parameters for batch memory\n operations in a HIP stream. This union supports various operations including\n waiting for a specific value, writing a value, and different flags for wait conditions.\n\n @details\n The union includes fields for different types of operations defined in the\n enum hipStreamBatchMemOpType:\n - hipStreamMemOpWaitValue32:  Wait for a 32-bit value.\n - hipStreamMemOpWriteValue32: Write a 32-bit value.\n - hipStreamMemOpWaitValue64:  Wait for a 64-bit value.\n - hipStreamMemOpWriteValue64: Write a 64-bit value.\n\n Each operation type includes an address, the value to wait for or write, flags, and an\n optional alias that is not relevant on AMD GPUs. Flags can be used to specify different\n wait conditions such as equality, bitwise AND, greater than or equal, and bitwise NOR.\n\n Example usage:\n @code\n hipStreamBatchMemOpParams myArray[2];\n myArray[0].operation = hipStreamMemOpWaitValue32;\n myArray[0].waitValue.address = waitAddr1;\n myArray[0].waitValue.value = 0x1;\n myArray[0].waitValue.flags = CU_STREAM_WAIT_VALUE_EQ;\n\n myArray[1].operation = hipStreamMemOpWriteValue32;\n myArray[1].writeValue.address = writeAddr1;\n myArray[1].writeValue.value = 0x1;\n myArray[1].writeValue.flags = 0x0;\n\n result = hipStreamBatchMemOp(stream, 2, myArray, 0);\n @endcode"]
pub type hipStreamBatchMemOpParams = hipStreamBatchMemOpParams_union;
#[doc = " @brief Structure representing node parameters for batch memory operations in HIP graphs.\n\n hipBatchMemOpNodeParams is used to specify the parameters for batch memory\n operations in HIP graphs. This struct includes the context to use for the operations, the\n number of operations, and an array of hipStreamBatchMemOpParams that describe the operations.\n\n @details\n The structure includes the following fields:\n - ctx: The HIP context to use for the operations.\n - count: The number of operations in the paramArray.\n - paramArray: A pointer to an array of hipStreamBatchMemOpParams.\n - flags: Flags to control the node.\n\n Example usage:\n @code\n hipBatchMemOpNodeParams nodeParams;\n nodeParams.ctx = context;\n nodeParams.count = ARRAY_SIZE;\n nodeParams.paramArray = myArray;\n nodeParams.flags = 0;\n\n Pass nodeParams to a HIP graph APIs hipGraphAddBatchMemOpNode, hipGraphBatchMemOpNodeGetParams,\n hipGraphBatchMemOpNodeSetParams, hipGraphExecBatchMemOpNodeSetParams\n @endcode"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipBatchMemOpNodeParams {
    pub ctx: hipCtx_t,
    pub count: ::std::os::raw::c_uint,
    pub paramArray: *mut hipStreamBatchMemOpParams,
    pub flags: ::std::os::raw::c_uint,
}
#[repr(u32)]
#[doc = " HIP Memory Advise values\n\n @note This memory advise enumeration is used on Linux, not Windows."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemoryAdvise {
    #[doc = "< Data will mostly be read and only occassionally\n< be written to"]
    hipMemAdviseSetReadMostly = 1,
    #[doc = "< Undo the effect of hipMemAdviseSetReadMostly"]
    hipMemAdviseUnsetReadMostly = 2,
    #[doc = "< Set the preferred location for the data as\n< the specified device"]
    hipMemAdviseSetPreferredLocation = 3,
    #[doc = "< Clear the preferred location for the data"]
    hipMemAdviseUnsetPreferredLocation = 4,
    #[doc = "< Data will be accessed by the specified device\n< so prevent page faults as much as possible"]
    hipMemAdviseSetAccessedBy = 5,
    #[doc = "< Let HIP to decide on the page faulting policy\n< for the specified device"]
    hipMemAdviseUnsetAccessedBy = 6,
    #[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"]
    hipMemAdviseSetCoarseGrain = 100,
    #[doc = "< Restores cache coherency policy back to fine-grain"]
    hipMemAdviseUnsetCoarseGrain = 101,
}
#[repr(u32)]
#[doc = " HIP Coherency Mode"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemRangeCoherencyMode {
    #[doc = "< Updates to memory with this attribute can be\n< done coherently from all devices"]
    hipMemRangeCoherencyModeFineGrain = 0,
    #[doc = "< Writes to memory with this attribute can be\n< performed by a single device at a time"]
    hipMemRangeCoherencyModeCoarseGrain = 1,
    #[doc = "< Memory region queried contains subregions with\n< both hipMemRangeCoherencyModeFineGrain and\n< hipMemRangeCoherencyModeCoarseGrain attributes"]
    hipMemRangeCoherencyModeIndeterminate = 2,
}
#[repr(u32)]
#[doc = " HIP range attributes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemRangeAttribute {
    #[doc = "< Whether the range will mostly be read and\n< only occassionally be written to"]
    hipMemRangeAttributeReadMostly = 1,
    #[doc = "< The preferred location of the range"]
    hipMemRangeAttributePreferredLocation = 2,
    #[doc = "< Memory range has hipMemAdviseSetAccessedBy\n< set for the specified device"]
    hipMemRangeAttributeAccessedBy = 3,
    #[doc = "< The last location to where the range was\n< prefetched"]
    hipMemRangeAttributeLastPrefetchLocation = 4,
    #[doc = "< Returns coherency mode\n< @ref hipMemRangeCoherencyMode for the range"]
    hipMemRangeAttributeCoherencyMode = 100,
}
#[repr(u32)]
#[doc = " HIP memory pool attributes"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum 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)"]
    hipMemPoolReuseFollowEventDependencies = 1,
    #[doc = " (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)"]
    hipMemPoolReuseAllowOpportunistic = 2,
    #[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)."]
    hipMemPoolReuseAllowInternalDependencies = 3,
    #[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)"]
    hipMemPoolAttrReleaseThreshold = 4,
    #[doc = " (value type = uint64_t)\n Amount of backing memory currently allocated for the mempool."]
    hipMemPoolAttrReservedMemCurrent = 5,
    #[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."]
    hipMemPoolAttrReservedMemHigh = 6,
    #[doc = " (value type = uint64_t)\n Amount of memory from the pool that is currently in use by the application."]
    hipMemPoolAttrUsedMemCurrent = 7,
    #[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."]
    hipMemPoolAttrUsedMemHigh = 8,
}
#[repr(u32)]
#[doc = " Specifies the memory protection flags for mapping\n"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemAccessFlags {
    #[doc = "< Default, make the address range not accessible"]
    hipMemAccessFlagsProtNone = 0,
    #[doc = "< Set the address range read accessible"]
    hipMemAccessFlagsProtRead = 1,
    #[doc = "< Set the address range read-write accessible"]
    hipMemAccessFlagsProtReadWrite = 3,
}
#[doc = " Memory access descriptor structure is used to specify memory access\n permissions for a virtual memory region in Virtual Memory Management API.\n This structure changes read, and write permissions for\n specific memory regions."]
#[repr(C)]
#[derive(Debug, 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,
}
#[repr(u32)]
#[doc = " Defines the allocation types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemAllocationType {
    hipMemAllocationTypeInvalid = 0,
    #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
    hipMemAllocationTypePinned = 1,
    #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
    hipMemAllocationTypeManaged = 2,
    #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
    hipMemAllocationTypeUncached = 1073741824,
    #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
    hipMemAllocationTypeMax = 2147483647,
}
#[repr(u32)]
#[doc = " Flags for specifying handle types for memory pool allocations\n"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemAllocationHandleType {
    #[doc = "< Does not allow any export mechanism"]
    hipMemHandleTypeNone = 0,
    hipMemHandleTypePosixFileDescriptor = 1,
    #[doc = "< Allows a Win32 NT handle for exporting. (HANDLE)"]
    hipMemHandleTypeWin32 = 2,
    #[doc = "< Allows a Win32 KMT handle for exporting. (D3DKMT_HANDLE)"]
    hipMemHandleTypeWin32Kmt = 4,
    #[doc = "< Allows a fabric handle to be used for exporting."]
    hipMemHandleTypeFabric = 8,
}
#[doc = " Specifies the properties of allocations made from the pool."]
#[repr(C)]
#[derive(Debug, 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 = "< Maximum pool size. When set to 0, defaults to a system dependent value"]
    pub maxSize: usize,
    #[doc = "< Reserved for future use, must be 0"]
    pub reserved: [::std::os::raw::c_uchar; 56usize],
}
#[doc = " Opaque data structure for exporting a pool allocation"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipMemPoolPtrExportData {
    pub reserved: [::std::os::raw::c_uchar; 64usize],
}
#[repr(u32)]
#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipFuncAttribute {
    hipFuncAttributeMaxDynamicSharedMemorySize = 8,
    hipFuncAttributePreferredSharedMemoryCarveout = 9,
    hipFuncAttributeMax = 10,
}
#[repr(u32)]
#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipFuncCache_t {
    #[doc = "< no preference for shared memory or L1 (default)"]
    hipFuncCachePreferNone = 0,
    #[doc = "< prefer larger shared memory and smaller L1 cache"]
    hipFuncCachePreferShared = 1,
    #[doc = "< prefer larger L1 cache and smaller shared memory"]
    hipFuncCachePreferL1 = 2,
    #[doc = "< prefer equal size L1 cache and shared memory"]
    hipFuncCachePreferEqual = 3,
}
#[repr(u32)]
#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipSharedMemConfig {
    #[doc = "< The compiler selects a device-specific value for the banking."]
    hipSharedMemBankSizeDefault = 0,
    #[doc = "< Shared mem is banked at 4-bytes intervals and performs best\n< when adjacent threads access data 4 bytes apart."]
    hipSharedMemBankSizeFourByte = 1,
    #[doc = "< Shared mem is banked at 8-byte intervals and performs best\n< when adjacent threads access data 4 bytes apart."]
    hipSharedMemBankSizeEightByte = 2,
}
#[doc = " Struct for data in 3D"]
#[repr(C)]
#[derive(Debug, 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(Debug, Copy, Clone)]
pub struct hipLaunchParams_t {
    #[doc = "< Device function symbol"]
    pub func: *mut ::std::os::raw::c_void,
    #[doc = "< Grid dimensions"]
    pub gridDim: dim3,
    #[doc = "< Block dimensions"]
    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(Debug, 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;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipExternalMemoryHandleType_enum {
    hipExternalMemoryHandleTypeOpaqueFd = 1,
    hipExternalMemoryHandleTypeOpaqueWin32 = 2,
    hipExternalMemoryHandleTypeOpaqueWin32Kmt = 3,
    hipExternalMemoryHandleTypeD3D12Heap = 4,
    hipExternalMemoryHandleTypeD3D12Resource = 5,
    hipExternalMemoryHandleTypeD3D11Resource = 6,
    hipExternalMemoryHandleTypeD3D11ResourceKmt = 7,
    hipExternalMemoryHandleTypeNvSciBuf = 8,
}
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,
    pub reserved: [::std::os::raw::c_uint; 16usize],
}
#[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,
    pub nvSciBufObject: *const ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Debug, 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(Debug, 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 reserved: [::std::os::raw::c_uint; 16usize],
}
pub type hipExternalMemoryBufferDesc = hipExternalMemoryBufferDesc_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipExternalMemoryMipmappedArrayDesc_st {
    pub offset: ::std::os::raw::c_ulonglong,
    pub formatDesc: hipChannelFormatDesc,
    pub extent: hipExtent,
    pub flags: ::std::os::raw::c_uint,
    pub numLevels: ::std::os::raw::c_uint,
}
pub type hipExternalMemoryMipmappedArrayDesc = hipExternalMemoryMipmappedArrayDesc_st;
pub type hipExternalMemory_t = *mut ::std::os::raw::c_void;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipExternalSemaphoreHandleType_enum {
    hipExternalSemaphoreHandleTypeOpaqueFd = 1,
    hipExternalSemaphoreHandleTypeOpaqueWin32 = 2,
    hipExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3,
    hipExternalSemaphoreHandleTypeD3D12Fence = 4,
    hipExternalSemaphoreHandleTypeD3D11Fence = 5,
    hipExternalSemaphoreHandleTypeNvSciSync = 6,
    hipExternalSemaphoreHandleTypeKeyedMutex = 7,
    hipExternalSemaphoreHandleTypeKeyedMutexKmt = 8,
    hipExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9,
    hipExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10,
}
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,
    pub reserved: [::std::os::raw::c_uint; 16usize],
}
#[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,
    pub NvSciSyncObj: *const ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Debug, 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 nvSciSync: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2,
    pub keyedMutex: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_3,
    pub reserved: [::std::os::raw::c_uint; 12usize],
}
#[repr(C)]
#[derive(Debug, 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 union hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2 {
    pub fence: *mut ::std::os::raw::c_void,
    pub reserved: ::std::os::raw::c_ulonglong,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_3 {
    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 nvSciSync: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2,
    pub keyedMutex: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_3,
    pub reserved: [::std::os::raw::c_uint; 10usize],
}
#[repr(C)]
#[derive(Debug, 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 union hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2 {
    pub fence: *mut ::std::os::raw::c_void,
    pub reserved: ::std::os::raw::c_ulonglong,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_3 {
    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;
#[repr(u32)]
#[doc = " HIP Access falgs for Interop resources."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipGraphicsRegisterFlags {
    hipGraphicsRegisterFlagsNone = 0,
    #[doc = "< HIP will not write to this registered resource, read only"]
    hipGraphicsRegisterFlagsReadOnly = 1,
    hipGraphicsRegisterFlagsWriteDiscard = 2,
    #[doc = "< HIP will bind this resource to a surface, read and write"]
    hipGraphicsRegisterFlagsSurfaceLoadStore = 4,
    hipGraphicsRegisterFlagsTextureGather = 8,
}
#[repr(C)]
#[derive(Debug)]
pub struct _hipGraphicsResource {
    _unused: [u8; 0],
}
pub type hipGraphicsResource = _hipGraphicsResource;
pub type hipGraphicsResource_t = *mut hipGraphicsResource;
#[repr(C)]
#[derive(Debug)]
pub struct ihipGraph {
    _unused: [u8; 0],
}
#[doc = " An opaque value that represents a hip graph"]
pub type hipGraph_t = *mut ihipGraph;
#[repr(C)]
#[derive(Debug)]
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(Debug)]
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(Debug)]
pub struct hipUserObject {
    _unused: [u8; 0],
}
#[doc = " An opaque value that represents a user obj"]
pub type hipUserObject_t = *mut hipUserObject;
#[repr(u32)]
#[doc = " hipGraphNodeType"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipGraphNodeType {
    #[doc = "< GPU kernel node"]
    hipGraphNodeTypeKernel = 0,
    #[doc = "< Memcpy node"]
    hipGraphNodeTypeMemcpy = 1,
    #[doc = "< Memset node"]
    hipGraphNodeTypeMemset = 2,
    #[doc = "< Host (executable) node"]
    hipGraphNodeTypeHost = 3,
    #[doc = "< Node which executes an embedded graph"]
    hipGraphNodeTypeGraph = 4,
    #[doc = "< Empty (no-op) node"]
    hipGraphNodeTypeEmpty = 5,
    #[doc = "< External event wait node"]
    hipGraphNodeTypeWaitEvent = 6,
    #[doc = "< External event record node"]
    hipGraphNodeTypeEventRecord = 7,
    #[doc = "< External Semaphore signal node"]
    hipGraphNodeTypeExtSemaphoreSignal = 8,
    #[doc = "< External Semaphore wait node"]
    hipGraphNodeTypeExtSemaphoreWait = 9,
    #[doc = "< Memory alloc node"]
    hipGraphNodeTypeMemAlloc = 10,
    #[doc = "< Memory free node"]
    hipGraphNodeTypeMemFree = 11,
    #[doc = "< MemcpyFromSymbol node"]
    hipGraphNodeTypeMemcpyFromSymbol = 12,
    #[doc = "< MemcpyToSymbol node"]
    hipGraphNodeTypeMemcpyToSymbol = 13,
    #[doc = "< BatchMemOp node"]
    hipGraphNodeTypeBatchMemOp = 14,
    hipGraphNodeTypeCount = 15,
}
pub type hipHostFn_t =
    ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipHostNodeParams {
    pub fn_: hipHostFn_t,
    pub userData: *mut ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Debug, 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(Debug, 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(Debug, 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."]
    pub accessDescs: *const hipMemAccessDesc,
    #[doc = "< The number of access descriptors.\n< Must not be bigger than the number of GPUs"]
    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,
}
#[repr(u32)]
#[doc = " Specifies performance hint with hipAccessPolicyWindow"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipAccessProperty {
    #[doc = "< Normal cache persistence."]
    hipAccessPropertyNormal = 0,
    #[doc = "< Streaming access is less likely to persist from cache"]
    hipAccessPropertyStreaming = 1,
    #[doc = "< Persisting access is more likely to persist in cache"]
    hipAccessPropertyPersisting = 2,
}
#[doc = " Specifies access policy for a window, a contiguous extent of memory\n beginning at base_ptr and ending at base_ptr + num_bytes."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipAccessPolicyWindow {
    #[doc = "< Starting address of the access policy window"]
    pub base_ptr: *mut ::std::os::raw::c_void,
    #[doc = "< hipAccessProperty set for hit"]
    pub hitProp: hipAccessProperty,
    #[doc = "< hitRatio specifies percentage of lines assigned hitProp"]
    pub hitRatio: f32,
    #[doc = "< hipAccessProperty set for miss"]
    pub missProp: hipAccessProperty,
    #[doc = "< Size in bytes of the window policy."]
    pub num_bytes: usize,
}
#[doc = " Memory Synchronization Domain map"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipLaunchMemSyncDomainMap {
    #[doc = "< The default domain ID to use for designated kernels"]
    pub default_: ::std::os::raw::c_uchar,
    #[doc = "< The remote domain ID to use for designated kernels"]
    pub remote: ::std::os::raw::c_uchar,
}
#[repr(u32)]
#[doc = " Memory Synchronization Domain"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipLaunchMemSyncDomain {
    #[doc = "< Launch kernels in the default domain"]
    hipLaunchMemSyncDomainDefault = 0,
    #[doc = "< Launch kernels in the remote domain"]
    hipLaunchMemSyncDomainRemote = 1,
}
#[repr(u32)]
#[doc = " Stream Synchronization Policy.\n Can be set with hipStreamSetAttribute"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipSynchronizationPolicy {
    #[doc = "< Default Synchronization Policy. Host thread waits actively"]
    hipSyncPolicyAuto = 1,
    #[doc = "< Host thread spins in tight loop waiting for completition"]
    hipSyncPolicySpin = 2,
    #[doc = "< Host spins but yields to other threads, reducing CPU usage"]
    hipSyncPolicyYield = 3,
    #[doc = "< Host thread blocks (sleeps) until the stream completes"]
    hipSyncPolicyBlockingSync = 4,
}
#[repr(u32)]
#[doc = "  Launch Attribute ID"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipLaunchAttributeID {
    #[doc = "< Valid for Streams, graph nodes, launches"]
    hipLaunchAttributeAccessPolicyWindow = 1,
    #[doc = "< Valid for graph nodes, launches"]
    hipLaunchAttributeCooperative = 2,
    #[doc = "< Valid for streams"]
    hipLaunchAttributeSynchronizationPolicy = 3,
    #[doc = "< Valid for graph node, streams, launches"]
    hipLaunchAttributePriority = 8,
    #[doc = "< Valid for streams, graph nodes, launches"]
    hipLaunchAttributeMemSyncDomainMap = 9,
    #[doc = "< Valid for streams, graph nodes, launches"]
    hipLaunchAttributeMemSyncDomain = 10,
    hipLaunchAttributeMax = 11,
}
#[doc = "  Launch Attribute Value"]
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipLaunchAttributeValue {
    #[doc = "< 64 byte padding"]
    pub pad: [::std::os::raw::c_char; 64usize],
    #[doc = "< Value of launch attribute ::hipLaunchAttributeAccessPolicyWindow."]
    pub accessPolicyWindow: hipAccessPolicyWindow,
    #[doc = "< Value of launch attribute ::hipLaunchAttributeCooperative. Indicates\n< whether the kernel is cooperative."]
    pub cooperative: ::std::os::raw::c_int,
    #[doc = "< Value of launch attribute :: hipLaunchAttributePriority. Execution priority of\n< kernel"]
    pub priority: ::std::os::raw::c_int,
    #[doc = "< Value of launch attribute :: hipLaunchAttributeSynchronizationPolicy. Used\n< to work queued up in stream"]
    pub syncPolicy: hipSynchronizationPolicy,
    #[doc = "< Value of launch attribute hipLaunchAttributeMemSyncDomainMap"]
    pub memSyncDomainMap: hipLaunchMemSyncDomainMap,
    #[doc = "< Value of launch attribute hipLaunchAttributeMemSyncDomain"]
    pub memSyncDomain: hipLaunchMemSyncDomain,
}
#[repr(u32)]
#[doc = " Graph execution update result"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipGraphExecUpdateResult {
    #[doc = "< The update succeeded"]
    hipGraphExecUpdateSuccess = 0,
    #[doc = "< The update failed for an unexpected reason which is described\n< in the return value of the function"]
    hipGraphExecUpdateError = 1,
    #[doc = "< The update failed because the topology changed"]
    hipGraphExecUpdateErrorTopologyChanged = 2,
    #[doc = "< The update failed because a node type changed"]
    hipGraphExecUpdateErrorNodeTypeChanged = 3,
    hipGraphExecUpdateErrorFunctionChanged = 4,
    hipGraphExecUpdateErrorParametersChanged = 5,
    hipGraphExecUpdateErrorNotSupported = 6,
    hipGraphExecUpdateErrorUnsupportedFunctionChange = 7,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipStreamCaptureMode {
    hipStreamCaptureModeGlobal = 0,
    hipStreamCaptureModeThreadLocal = 1,
    hipStreamCaptureModeRelaxed = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipStreamCaptureStatus {
    #[doc = "< Stream is not capturing"]
    hipStreamCaptureStatusNone = 0,
    #[doc = "< Stream is actively capturing"]
    hipStreamCaptureStatusActive = 1,
    #[doc = "< Stream is part of a capture sequence that has been\n< invalidated, but not terminated"]
    hipStreamCaptureStatusInvalidated = 2,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipStreamUpdateCaptureDependenciesFlags {
    #[doc = "< Add new nodes to the dependency set"]
    hipStreamAddCaptureDependencies = 0,
    #[doc = "< Replace the dependency set with the new nodes"]
    hipStreamSetCaptureDependencies = 1,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipGraphMemAttributeType {
    hipGraphMemAttrUsedMemCurrent = 0,
    #[doc = "< High watermark of memory, in bytes, associated with graphs since\n< the last time."]
    hipGraphMemAttrUsedMemHigh = 1,
    #[doc = "< Amount of memory, in bytes, currently allocated for\n< graphs."]
    hipGraphMemAttrReservedMemCurrent = 2,
    #[doc = "< High watermark of memory, in bytes, currently allocated for\n< graphs"]
    hipGraphMemAttrReservedMemHigh = 3,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipUserObjectFlags {
    #[doc = "< Destructor execution is not synchronized."]
    hipUserObjectNoDestructorSync = 1,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipUserObjectRetainFlags {
    #[doc = "< Add new reference or retain."]
    hipGraphUserObjectMove = 1,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipGraphInstantiateFlags {
    hipGraphInstantiateFlagAutoFreeOnLaunch = 1,
    #[doc = "< Automatically upload the graph after instantiation."]
    hipGraphInstantiateFlagUpload = 2,
    hipGraphInstantiateFlagDeviceLaunch = 4,
    hipGraphInstantiateFlagUseNodePriority = 8,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipGraphDebugDotFlags {
    hipGraphDebugDotFlagsVerbose = 1,
    #[doc = "< Adds hipKernelNodeParams to output"]
    hipGraphDebugDotFlagsKernelNodeParams = 4,
    #[doc = "< Adds hipMemcpy3DParms to output"]
    hipGraphDebugDotFlagsMemcpyNodeParams = 8,
    #[doc = "< Adds hipMemsetParams to output"]
    hipGraphDebugDotFlagsMemsetNodeParams = 16,
    #[doc = "< Adds hipHostNodeParams to output"]
    hipGraphDebugDotFlagsHostNodeParams = 32,
    hipGraphDebugDotFlagsEventNodeParams = 64,
    hipGraphDebugDotFlagsExtSemasSignalNodeParams = 128,
    hipGraphDebugDotFlagsExtSemasWaitNodeParams = 256,
    hipGraphDebugDotFlagsKernelNodeAttributes = 512,
    hipGraphDebugDotFlagsHandles = 1024,
}
#[repr(u32)]
#[doc = " hipGraphInstantiateWithParams results"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipGraphInstantiateResult {
    #[doc = "< Instantiation Success"]
    hipGraphInstantiateSuccess = 0,
    #[doc = "< Instantiation failed for an\nunexpected reason which is described in the return value of the function"]
    hipGraphInstantiateError = 1,
    #[doc = "< Instantiation failed due\nto invalid structure, such as cycles"]
    hipGraphInstantiateInvalidStructure = 2,
    #[doc = "< Instantiation for device launch failed\nbecause the graph contained an unsupported operation"]
    hipGraphInstantiateNodeOperationNotSupported = 3,
    #[doc = "< Instantiation for device launch failed\ndue to the nodes belonging to different contexts"]
    hipGraphInstantiateMultipleDevicesNotSupported = 4,
}
#[doc = " Graph Instantiation parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipGraphInstantiateParams {
    #[doc = "< The node which caused instantiation to fail, if any"]
    pub errNode_out: hipGraphNode_t,
    #[doc = "< Instantiation flags"]
    pub flags: ::std::os::raw::c_ulonglong,
    #[doc = "< Whether instantiation was successful.\nIf it failed, the reason why"]
    pub result_out: hipGraphInstantiateResult,
    #[doc = "< Upload stream"]
    pub uploadStream: hipStream_t,
}
#[doc = " Memory allocation properties"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipMemAllocationProp {
    #[doc = "< Memory allocation type"]
    pub type_: hipMemAllocationType,
    pub __bindgen_anon_1: hipMemAllocationProp__bindgen_ty_1,
    #[doc = "< Memory location"]
    pub location: hipMemLocation,
    #[doc = "< Metadata for Win32 handles"]
    pub win32HandleMetaData: *mut ::std::os::raw::c_void,
    pub allocFlags: hipMemAllocationProp__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipMemAllocationProp__bindgen_ty_1 {
    #[doc = "< Requested handle type"]
    pub requestedHandleType: hipMemAllocationHandleType,
    #[doc = "< Requested handle types"]
    pub requestedHandleTypes: hipMemAllocationHandleType,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipMemAllocationProp__bindgen_ty_2 {
    #[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(Debug, 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(Debug, Copy, Clone)]
pub struct hipExternalSemaphoreWaitNodeParams {
    pub extSemArray: *mut hipExternalSemaphore_t,
    pub paramsArray: *const hipExternalSemaphoreWaitParams,
    pub numExtSems: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug)]
pub struct ihipMemGenericAllocationHandle {
    _unused: [u8; 0],
}
#[doc = " Generic handle for memory allocation"]
pub type hipMemGenericAllocationHandle_t = *mut ihipMemGenericAllocationHandle;
#[repr(u32)]
#[doc = " Flags for granularity"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemAllocationGranularity_flags {
    #[doc = "< Minimum granularity"]
    hipMemAllocationGranularityMinimum = 0,
    #[doc = "< Recommended granularity for performance"]
    hipMemAllocationGranularityRecommended = 1,
}
#[repr(u32)]
#[doc = " Memory handle type"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemHandleType {
    #[doc = "< Generic handle type"]
    hipMemHandleTypeGeneric = 0,
}
#[repr(u32)]
#[doc = " Memory operation types"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemOperationType {
    #[doc = "< Map operation"]
    hipMemOperationTypeMap = 1,
    #[doc = "< Unmap operation"]
    hipMemOperationTypeUnmap = 2,
}
#[repr(u32)]
#[doc = " Subresource types for sparse arrays"]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipArraySparseSubresourceType {
    #[doc = "< Sparse level"]
    hipArraySparseSubresourceTypeSparseLevel = 0,
    #[doc = "< Miptail"]
    hipArraySparseSubresourceTypeMiptail = 1,
}
#[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(Debug, 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(Debug, 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,
}
#[doc = " Memcpy node params"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipMemcpyNodeParams {
    #[doc = "< Must be zero."]
    pub flags: ::std::os::raw::c_int,
    #[doc = "< Must be zero."]
    pub reserved: [::std::os::raw::c_int; 3usize],
    #[doc = "< Params set for the memory copy."]
    pub copyParams: hipMemcpy3DParms,
}
#[doc = " Child graph node params"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipChildGraphNodeParams {
    #[doc = "< Either the child graph to clone into the node, or\n< a handle to the graph possesed by the node used during query"]
    pub graph: hipGraph_t,
}
#[doc = " Event record node params"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipEventWaitNodeParams {
    #[doc = "< Event to wait on"]
    pub event: hipEvent_t,
}
#[doc = " Event record node params"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipEventRecordNodeParams {
    #[doc = "< The event to be recorded when node executes"]
    pub event: hipEvent_t,
}
#[doc = " Memory free node params"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipMemFreeNodeParams {
    #[doc = "< the pointer to be freed"]
    pub dptr: *mut ::std::os::raw::c_void,
}
#[doc = " Params for different graph nodes"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipGraphNodeParams {
    pub type_: hipGraphNodeType,
    pub reserved0: [::std::os::raw::c_int; 3usize],
    pub __bindgen_anon_1: hipGraphNodeParams__bindgen_ty_1,
    pub reserved2: ::std::os::raw::c_longlong,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipGraphNodeParams__bindgen_ty_1 {
    pub reserved1: [::std::os::raw::c_longlong; 29usize],
    pub kernel: hipKernelNodeParams,
    pub memcpy: hipMemcpyNodeParams,
    pub memset: hipMemsetParams,
    pub host: hipHostNodeParams,
    pub graph: hipChildGraphNodeParams,
    pub eventWait: hipEventWaitNodeParams,
    pub eventRecord: hipEventRecordNodeParams,
    pub extSemSignal: hipExternalSemaphoreSignalNodeParams,
    pub extSemWait: hipExternalSemaphoreWaitNodeParams,
    pub alloc: hipMemAllocNodeParams,
    pub free: hipMemFreeNodeParams,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipGraphDependencyType {
    hipGraphDependencyTypeDefault = 0,
    hipGraphDependencyTypeProgrammatic = 1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipGraphEdgeData {
    #[doc = "< This indicates when the dependency is triggered from the upstream node on the\n< edge. The meaning is specfic to the node type. A value of 0 in all cases\n< means full completion of the upstream node, with memory visibility to the\n< downstream node or portion thereof (indicated by to_port). Only kernel nodes\n< define non-zero ports. A kernel node can use the following output port types:\n< hipGraphKernelNodePortDefault, hipGraphKernelNodePortProgrammatic, or\n< hipGraphKernelNodePortLaunchCompletion."]
    pub from_port: ::std::os::raw::c_uchar,
    #[doc = "< These bytes are unused and must be zeroed"]
    pub reserved: [::std::os::raw::c_uchar; 5usize],
    #[doc = "< Currently no node types define non-zero ports. This field must be set to zero."]
    pub to_port: ::std::os::raw::c_uchar,
    #[doc = "< This should be populated with a value from hipGraphDependencyType"]
    pub type_: ::std::os::raw::c_uchar,
}
#[doc = " Used to specify custom attributes for launching kernels"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct hipLaunchAttribute_st {
    #[doc = "< Identifier of the launch attribute"]
    pub id: hipLaunchAttributeID,
    #[doc = "< Padding to align the structure to 8 bytes"]
    pub pad: [::std::os::raw::c_char; 4usize],
    pub __bindgen_anon_1: hipLaunchAttribute_st__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hipLaunchAttribute_st__bindgen_ty_1 {
    #[doc = "< Value associated with the launch attribute"]
    pub val: hipLaunchAttributeValue,
    #[doc = "< Value associated with the launch attribute"]
    pub value: hipLaunchAttributeValue,
}
#[doc = " Used to specify custom attributes for launching kernels"]
pub type hipLaunchAttribute = hipLaunchAttribute_st;
#[doc = " HIP extensible launch configuration"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipLaunchConfig_st {
    #[doc = "< Grid dimensions"]
    pub gridDim: dim3,
    #[doc = "< Block dimensions"]
    pub blockDim: dim3,
    #[doc = "< Dynamic shared-memory size per thread block"]
    pub dynamicSmemBytes: usize,
    #[doc = "< Stream identifier"]
    pub stream: hipStream_t,
    #[doc = "< Attributes list"]
    pub attrs: *mut hipLaunchAttribute,
    #[doc = "< Number of attributes"]
    pub numAttrs: ::std::os::raw::c_uint,
}
#[doc = " HIP extensible launch configuration"]
pub type hipLaunchConfig_t = hipLaunchConfig_st;
#[doc = " HIP driver extensible launch configuration"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HIP_LAUNCH_CONFIG_st {
    #[doc = "< Grid width in blocks"]
    pub gridDimX: ::std::os::raw::c_uint,
    #[doc = "< Grid height in blocks"]
    pub gridDimY: ::std::os::raw::c_uint,
    #[doc = "< Grid depth in blocks"]
    pub gridDimZ: ::std::os::raw::c_uint,
    #[doc = "< Thread block dimension in X"]
    pub blockDimX: ::std::os::raw::c_uint,
    #[doc = "< Thread block dimension in Y"]
    pub blockDimY: ::std::os::raw::c_uint,
    #[doc = "< Thread block dimension in Z"]
    pub blockDimZ: ::std::os::raw::c_uint,
    #[doc = "< Dynamic shared-memory size in bytes per block"]
    pub sharedMemBytes: ::std::os::raw::c_uint,
    #[doc = "< HIP stream identifier"]
    pub hStream: hipStream_t,
    #[doc = "< Attribute list"]
    pub attrs: *mut hipLaunchAttribute,
    #[doc = "< Number of attributes"]
    pub numAttrs: ::std::os::raw::c_uint,
}
#[doc = " HIP driver extensible launch configuration"]
pub type HIP_LAUNCH_CONFIG = HIP_LAUNCH_CONFIG_st;
#[doc = " Struct representing array memory requirements."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hipArrayMemoryRequirements {
    pub alignment: usize,
    pub size: usize,
}
#[repr(u32)]
#[doc = " Requested handle type for address range."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemRangeHandleType {
    hipMemRangeHandleTypeDmaBufFd = 1,
    hipMemRangeHandleTypeMax = 2147483647,
}
#[repr(u32)]
#[doc = " Mem Range Flags used in hipMemGetHandleForAddressRange."]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipMemRangeFlags {
    hipMemRangeFlagDmaBufMappingTypePcie = 1,
    hipMemRangeFlagsMax = 2147483647,
}
#[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,
    ),
>;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipDataType {
    HIP_R_32F = 0,
    HIP_R_64F = 1,
    HIP_R_16F = 2,
    HIP_R_8I = 3,
    HIP_C_32F = 4,
    HIP_C_64F = 5,
    HIP_C_16F = 6,
    HIP_C_8I = 7,
    HIP_R_8U = 8,
    HIP_C_8U = 9,
    HIP_R_32I = 10,
    HIP_C_32I = 11,
    HIP_R_32U = 12,
    HIP_C_32U = 13,
    HIP_R_16BF = 14,
    HIP_C_16BF = 15,
    HIP_R_4I = 16,
    HIP_C_4I = 17,
    HIP_R_4U = 18,
    HIP_C_4U = 19,
    HIP_R_16I = 20,
    HIP_C_16I = 21,
    HIP_R_16U = 22,
    HIP_C_16U = 23,
    HIP_R_64I = 24,
    HIP_C_64I = 25,
    HIP_R_64U = 26,
    HIP_C_64U = 27,
    HIP_R_8F_E4M3 = 28,
    HIP_R_8F_E5M2 = 29,
    HIP_R_8F_UE8M0 = 30,
    HIP_R_6F_E2M3 = 31,
    HIP_R_6F_E3M2 = 32,
    HIP_R_4F_E2M1 = 33,
    HIP_R_8F_E4M3_FNUZ = 1000,
    HIP_R_8F_E5M2_FNUZ = 1001,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum hipLibraryPropertyType {
    HIP_LIBRARY_MAJOR_VERSION = 0,
    HIP_LIBRARY_MINOR_VERSION = 1,
    HIP_LIBRARY_PATCH_LEVEL = 2,
}