hrx-rs 0.8.4

Owned native AMD GPU and NPU execution with Loom compilation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
/* automatically generated by rust-bindgen 0.73.2 */

pub const AMDF_ENABLE_ASSERTS: u32 = 1;
pub const AMDF_QUERY_API_SYMBOL: &[u8; 15] = b"amdf_query_api\0";
pub const AMDF_ENDPOINT_NAME_CAPACITY: u32 = 128;
pub const AMDF_EXTERNAL_MEMORY_TYPE_COUNT: u32 = 5;
pub const AMDF_MEMORY_PROFILE_EXTERNAL_SUPPORT_CAPACITY: u32 = 5;
pub const AMDF_MEMORY_PROFILE_ORDINAL_UNKNOWN: u32 = 4294967295;
pub const AMDF_ADDRESS_DOMAIN_ORDINAL_NONE: u32 = 4294967295;
pub const AMDF_GPU_EXTENSION_VERSION_1: u32 = 1;
pub const AMDF_GPU_EXTENSION_VERSION_LATEST: u32 = 1;
pub const AMDF_GPU_PM4_QUEUE_FORMAT_VERSION_1: u32 = 1;
pub const AMDF_GPU_SDMA_QUEUE_FORMAT_VERSION_1: u32 = 1;
pub const AMDF_GPU_KERNEL_QUEUE_DEFAULT_PENDING_SUBMISSION_COUNT: u32 = 4096;
pub const AMDF_XDNA_EXTENSION_VERSION_1: u32 = 1;
pub const AMDF_XDNA_EXTENSION_VERSION_LATEST: u32 = 1;
pub const AMDF_XDNA_PHYSICAL_COLUMN_ORIGIN_ANY: u32 = 4294967295;
pub const AMDF_XDNA_TARGET_ID_CAPACITY: u32 = 64;
pub const AMDF_XDNA_TRANSACTION_FORMAT_VERSION_0_1: u32 = 1;
pub const AMDF_XDNA_QUEUE_FORMAT_VERSION_1: u32 = 1;
pub const AMDF_XDNA_KERNEL_QUEUE_DEFAULT_PENDING_SUBMISSION_COUNT: u32 = 128;
#[doc = " Version number identifying a compatible public API layout and contract."]
pub type amdf_abi_version_t = u32;
#[doc = " An encoded status domain and domain-specific 32-bit code."]
pub type amdf_status_t = u64;
#[doc = " Status-code domain identifier."]
pub type amdf_status_domain_t = u32;
#[doc = " Portable status codes declared by this header."]
pub const AMDF_STATUS_DOMAIN_API: amdf_status_domain_e = 0;
#[doc = " Windows NTSTATUS values."]
pub const AMDF_STATUS_DOMAIN_NTSTATUS: amdf_status_domain_e = 1;
#[doc = " Device-firmware status values."]
pub const AMDF_STATUS_DOMAIN_FIRMWARE: amdf_status_domain_e = 2;
#[doc = " POSIX errno values."]
pub const AMDF_STATUS_DOMAIN_ERRNO: amdf_status_domain_e = 3;
#[doc = " Windows Win32 error values returned by `GetLastError`."]
pub const AMDF_STATUS_DOMAIN_WIN32: amdf_status_domain_e = 4;
#[doc = " Failed Windows COM/DXGI/D3D HRESULT values."]
pub const AMDF_STATUS_DOMAIN_HRESULT: amdf_status_domain_e = 5;
pub type amdf_status_domain_e = ::std::os::raw::c_uint;
#[doc = " Portable status code used with `AMDF_STATUS_DOMAIN_API`."]
pub type amdf_status_code_t = u32;
#[doc = " The operation completed successfully."]
pub const AMDF_STATUS_CODE_OK: amdf_status_code_e = 0;
#[doc = " An argument was malformed or violated a precondition of its type."]
pub const AMDF_STATUS_CODE_INVALID_ARGUMENT: amdf_status_code_e = 1;
#[doc = " A numeric argument was outside the accepted range."]
pub const AMDF_STATUS_CODE_OUT_OF_RANGE: amdf_status_code_e = 2;
#[doc = " The requested operation or capability is not implemented."]
pub const AMDF_STATUS_CODE_UNSUPPORTED: amdf_status_code_e = 3;
#[doc = " The requested object or capability was not found."]
pub const AMDF_STATUS_CODE_NOT_FOUND: amdf_status_code_e = 4;
#[doc = " A finite resource required by the operation was exhausted."]
pub const AMDF_STATUS_CODE_RESOURCE_EXHAUSTED: amdf_status_code_e = 5;
#[doc = " A resource is temporarily owned by another operation."]
pub const AMDF_STATUS_CODE_BUSY: amdf_status_code_e = 6;
#[doc = " The operation did not complete before its caller-provided deadline."]
pub const AMDF_STATUS_CODE_DEADLINE_EXCEEDED: amdf_status_code_e = 7;
#[doc = " The process lacks permission for the requested operation."]
pub const AMDF_STATUS_CODE_PERMISSION_DENIED: amdf_status_code_e = 8;
#[doc = " The device or its owning driver can no longer execute work."]
pub const AMDF_STATUS_CODE_DEVICE_LOST: amdf_status_code_e = 9;
#[doc = " The caller and library have no mutually supported ABI version."]
pub const AMDF_STATUS_CODE_VERSION_MISMATCH: amdf_status_code_e = 10;
#[doc = " Caller-provided storage is too small for the requested result."]
pub const AMDF_STATUS_CODE_BUFFER_TOO_SMALL: amdf_status_code_e = 11;
#[doc = " Valid arguments describe an operation that cannot begin in this state."]
pub const AMDF_STATUS_CODE_FAILED_PRECONDITION: amdf_status_code_e = 12;
#[doc = " An invariant failed inside the implementation."]
pub const AMDF_STATUS_CODE_INTERNAL: amdf_status_code_e = 13;
pub type amdf_status_code_e = ::std::os::raw::c_uint;
#[doc = " Type identifier carried by every extensible API structure."]
pub type amdf_structure_type_t = u32;
#[doc = " No structure type. This value is never accepted by an API operation."]
pub const AMDF_STRUCTURE_TYPE_NONE: amdf_structure_type_e = 0;
#[doc = " An `amdf_instance_create_info_t` input structure."]
pub const AMDF_STRUCTURE_TYPE_INSTANCE_CREATE_INFO: amdf_structure_type_e = 1;
#[doc = " An `amdf_endpoint_info_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_ENDPOINT_INFO: amdf_structure_type_e = 2;
#[doc = " An `amdf_queue_family_info_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_QUEUE_FAMILY_INFO: amdf_structure_type_e = 3;
#[doc = " An `amdf_memory_create_info_t` input structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_CREATE_INFO: amdf_structure_type_e = 4;
#[doc = " An `amdf_memory_info_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_INFO: amdf_structure_type_e = 5;
#[doc = " An `amdf_memory_map_info_t` input structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_MAP_INFO: amdf_structure_type_e = 6;
#[doc = " An `amdf_host_mapping_info_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_HOST_MAPPING_INFO: amdf_structure_type_e = 7;
#[doc = " An `amdf_kernel_queue_info_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_KERNEL_QUEUE_INFO: amdf_structure_type_e = 8;
#[doc = " An `amdf_kernel_queue_status_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_KERNEL_QUEUE_STATUS: amdf_structure_type_e = 9;
#[doc = " An `amdf_memory_profile_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_PROFILE: amdf_structure_type_e = 10;
#[doc = " An `amdf_memory_import_info_t` input structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_IMPORT_INFO: amdf_structure_type_e = 11;
#[doc = " An `amdf_memory_export_info_t` input structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_EXPORT_INFO: amdf_structure_type_e = 12;
#[doc = " An `amdf_memory_site_t` input structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_SITE: amdf_structure_type_e = 13;
#[doc = " An `amdf_memory_pair_info_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_PAIR_INFO: amdf_structure_type_e = 14;
#[doc = " An `amdf_user_queue_info_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_USER_QUEUE_INFO: amdf_structure_type_e = 15;
#[doc = " An `amdf_user_queue_mapping_info_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_USER_QUEUE_MAPPING_INFO: amdf_structure_type_e = 16;
#[doc = " An `amdf_user_queue_status_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_USER_QUEUE_STATUS: amdf_structure_type_e = 17;
#[doc = " An `amdf_memory_access_info_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_ACCESS_INFO: amdf_structure_type_e = 18;
#[doc = " An `amdf_memory_scope_info_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_SCOPE_INFO: amdf_structure_type_e = 19;
#[doc = " An `amdf_memory_access_capabilities_t` output structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_ACCESS_CAPABILITIES: amdf_structure_type_e = 20;
#[doc = " An `amdf_memory_profile_pair_query_t` input structure."]
pub const AMDF_STRUCTURE_TYPE_MEMORY_PROFILE_PAIR_QUERY: amdf_structure_type_e = 21;
pub type amdf_structure_type_e = ::std::os::raw::c_uint;
#[doc = " Identifier of an optional API table compiled into the providing library."]
pub type amdf_extension_id_t = u32;
#[doc = " XDNA endpoint qualification and execution services."]
pub const AMDF_EXTENSION_XDNA: amdf_extension_id_e = 1;
#[doc = " GPU endpoint qualification and execution services."]
pub const AMDF_EXTENSION_GPU: amdf_extension_id_e = 2;
pub type amdf_extension_id_e = ::std::os::raw::c_uint;
#[doc = " Common prefix of every extensible input structure."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_input_structure_t {
    #[doc = " Type identifying the complete structure."]
    pub type_: amdf_structure_type_t,
    #[doc = " Size in bytes of the complete structure supplied by the caller."]
    pub structure_size: u32,
    #[doc = " Optional pointer to the next extensible input structure."]
    pub next: *const ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_input_structure_t"][::std::mem::size_of::<amdf_input_structure_t>() - 16usize];
    ["Alignment of amdf_input_structure_t"]
        [::std::mem::align_of::<amdf_input_structure_t>() - 8usize];
    ["Offset of field: amdf_input_structure_t::type_"]
        [::std::mem::offset_of!(amdf_input_structure_t, type_) - 0usize];
    ["Offset of field: amdf_input_structure_t::structure_size"]
        [::std::mem::offset_of!(amdf_input_structure_t, structure_size) - 4usize];
    ["Offset of field: amdf_input_structure_t::next"]
        [::std::mem::offset_of!(amdf_input_structure_t, next) - 8usize];
};
impl Default for amdf_input_structure_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Common prefix of every extensible output structure."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_output_structure_t {
    #[doc = " Type identifying the complete structure."]
    pub type_: amdf_structure_type_t,
    #[doc = " Size in bytes of the complete structure supplied by the caller."]
    pub structure_size: u32,
    #[doc = " Optional pointer to the next extensible output structure."]
    pub next: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_output_structure_t"][::std::mem::size_of::<amdf_output_structure_t>() - 16usize];
    ["Alignment of amdf_output_structure_t"]
        [::std::mem::align_of::<amdf_output_structure_t>() - 8usize];
    ["Offset of field: amdf_output_structure_t::type_"]
        [::std::mem::offset_of!(amdf_output_structure_t, type_) - 0usize];
    ["Offset of field: amdf_output_structure_t::structure_size"]
        [::std::mem::offset_of!(amdf_output_structure_t, structure_size) - 4usize];
    ["Offset of field: amdf_output_structure_t::next"]
        [::std::mem::offset_of!(amdf_output_structure_t, next) - 8usize];
};
impl Default for amdf_output_structure_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Explicit provider instance owning loaded modules and native API state."]
#[repr(C)]
#[derive(Debug)]
pub struct amdf_instance_t {
    _unused: [u8; 0],
}
#[doc = " Query-only handle to one independently selectable execution endpoint."]
#[repr(C)]
#[derive(Debug)]
pub struct amdf_endpoint_t {
    _unused: [u8; 0],
}
#[doc = " Live engine context and address domain materialized from an endpoint."]
#[repr(C)]
#[derive(Debug)]
pub struct amdf_device_t {
    _unused: [u8; 0],
}
#[doc = " Borrowed storage contract embedded in an instance, endpoint or native owner."]
#[repr(C)]
#[derive(Debug)]
pub struct amdf_memory_scope_t {
    _unused: [u8; 0],
}
#[doc = " Physical backing and its established device accesses."]
#[repr(C)]
#[derive(Debug)]
pub struct amdf_memory_t {
    _unused: [u8; 0],
}
#[doc = " Explicit host access to one range of host-visible memory."]
#[repr(C)]
#[derive(Debug)]
pub struct amdf_host_mapping_t {
    _unused: [u8; 0],
}
#[doc = " Directly published native queue owned by one materialized device."]
#[repr(C)]
#[derive(Debug)]
pub struct amdf_user_queue_t {
    _unused: [u8; 0],
}
#[doc = " Producer-local mapping of one directly published native queue."]
#[repr(C)]
#[derive(Debug)]
pub struct amdf_user_queue_mapping_t {
    _unused: [u8; 0],
}
#[doc = " Kernel-mediated publication and retirement of native commands."]
#[repr(C)]
#[derive(Debug)]
pub struct amdf_kernel_queue_t {
    _unused: [u8; 0],
}
#[doc = " Allocates one uninitialized host-memory range.\n\n `byte_length` is nonzero. `minimum_alignment` is a power of two and at\n least the platform's natural maximum alignment. Returns a suitably aligned\n allocation or `NULL` when storage is unavailable. The callback must be\n thread-safe and must not throw or unwind across the C ABI."]
pub type amdf_allocator_allocate_fn_t = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        byte_length: u64,
        minimum_alignment: u64,
    ) -> *mut ::std::os::raw::c_void,
>;
#[doc = " Resizes one host-memory allocation without changing it on failure.\n\n `allocation` was returned by the same allocator. Success preserves the\n lesser of `old_byte_length` and `new_byte_length` bytes and returns a\n suitably aligned allocation. Returning `NULL` leaves `allocation` live and\n unchanged. The callback must be thread-safe and must not throw or unwind\n across the C ABI."]
pub type amdf_allocator_resize_fn_t = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        allocation: *mut ::std::os::raw::c_void,
        old_byte_length: u64,
        new_byte_length: u64,
        minimum_alignment: u64,
    ) -> *mut ::std::os::raw::c_void,
>;
#[doc = " Frees one host-memory allocation returned by the same allocator.\n\n `allocation` may be `NULL`. The callback is infallible, must be thread-safe,\n and must not throw or unwind across the C ABI."]
pub type amdf_allocator_free_fn_t = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        allocation: *mut ::std::os::raw::c_void,
    ),
>;
#[doc = " Instance-scoped host-memory allocator used by libamdf-owned metadata.\n\n An all-zero value selects the built-in system allocator. Otherwise\n `allocate` and `free` are required. `resize` may be `NULL`, in which case\n libamdf implements resize with allocate-copy-free. The value is copied when\n the instance is created; `user_data` and callback code must remain valid\n until instance destruction succeeds. Native device backing and operating\n system allocations do not use this allocator."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_allocator_t {
    #[doc = " Opaque value passed to every callback."]
    pub user_data: *mut ::std::os::raw::c_void,
    #[doc = " Required uninitialized allocation callback."]
    pub allocate: amdf_allocator_allocate_fn_t,
    #[doc = " Optional allocation-resize callback."]
    pub resize: amdf_allocator_resize_fn_t,
    #[doc = " Required infallible release callback."]
    pub free: amdf_allocator_free_fn_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_allocator_t"][::std::mem::size_of::<amdf_allocator_t>() - 32usize];
    ["Alignment of amdf_allocator_t"][::std::mem::align_of::<amdf_allocator_t>() - 8usize];
    ["Offset of field: amdf_allocator_t::user_data"]
        [::std::mem::offset_of!(amdf_allocator_t, user_data) - 0usize];
    ["Offset of field: amdf_allocator_t::allocate"]
        [::std::mem::offset_of!(amdf_allocator_t, allocate) - 8usize];
    ["Offset of field: amdf_allocator_t::resize"]
        [::std::mem::offset_of!(amdf_allocator_t, resize) - 16usize];
    ["Offset of field: amdf_allocator_t::free"]
        [::std::mem::offset_of!(amdf_allocator_t, free) - 24usize];
};
impl Default for amdf_allocator_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Maximum lifetime permitted for native state acquired by an instance.\n\n Resources may be released earlier. This policy neither changes public\n handle ownership nor promises a separate virtual address space, exclusive\n hardware access, or automatic interoperability with another native client."]
pub type amdf_native_lifetime_t = u32;
#[doc = " Permits native process-owned state to survive instance destruction until\n process exit. This is the default and enables Linux KFD host registration.\n KFD's primary VM binding requires coordination with other KFD clients;\n after instance destruction a fresh acquisition can fail with native EBUSY."]
pub const AMDF_NATIVE_LIFETIME_PROCESS: amdf_native_lifetime_e = 0;
#[doc = " Requires acquired native state to be releasable by instance destruction.\n A provider that cannot meet this bound reports UNSUPPORTED when its\n services are queried or constructed; it never falls back to PROCESS.\n Linux KFD secondary contexts currently lack host registration. Windows\n can reclaim native objects under either policy without isolating GPUVA."]
pub const AMDF_NATIVE_LIFETIME_INSTANCE: amdf_native_lifetime_e = 1;
pub type amdf_native_lifetime_e = ::std::os::raw::c_uint;
#[doc = " Parameters used to create a provider instance without activating devices."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_instance_create_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_INSTANCE_CREATE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_instance_create_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are defined in ABI v1."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Native lifetime policy copied by the instance; zero selects PROCESS."]
    pub native_lifetime: amdf_native_lifetime_t,
    #[doc = " Reserved for compatible growth and must be zero."]
    pub reserved: u32,
    #[doc = " Host allocator copied and used by this instance and all of its children."]
    pub host_allocator: amdf_allocator_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_instance_create_info_t"]
        [::std::mem::size_of::<amdf_instance_create_info_t>() - 56usize];
    ["Alignment of amdf_instance_create_info_t"]
        [::std::mem::align_of::<amdf_instance_create_info_t>() - 8usize];
    ["Offset of field: amdf_instance_create_info_t::type_"]
        [::std::mem::offset_of!(amdf_instance_create_info_t, type_) - 0usize];
    ["Offset of field: amdf_instance_create_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_instance_create_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_instance_create_info_t::next"]
        [::std::mem::offset_of!(amdf_instance_create_info_t, next) - 8usize];
    ["Offset of field: amdf_instance_create_info_t::native_lifetime"]
        [::std::mem::offset_of!(amdf_instance_create_info_t, native_lifetime) - 16usize];
    ["Offset of field: amdf_instance_create_info_t::reserved"]
        [::std::mem::offset_of!(amdf_instance_create_info_t, reserved) - 20usize];
    ["Offset of field: amdf_instance_create_info_t::host_allocator"]
        [::std::mem::offset_of!(amdf_instance_create_info_t, host_allocator) - 24usize];
};
impl Default for amdf_instance_create_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Opaque provider identity used to reopen one enumerated endpoint.\n\n The value is meaningful only on the machine and provider implementation\n that produced it. It is not a persistent machine identifier and may become\n stale after device removal, reset, disable/enable, or driver replacement."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_endpoint_id_t {
    #[doc = " Provider-defined identity words."]
    pub words: [u64; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_endpoint_id_t"][::std::mem::size_of::<amdf_endpoint_id_t>() - 16usize];
    ["Alignment of amdf_endpoint_id_t"][::std::mem::align_of::<amdf_endpoint_id_t>() - 8usize];
    ["Offset of field: amdf_endpoint_id_t::words"]
        [::std::mem::offset_of!(amdf_endpoint_id_t, words) - 0usize];
};
#[doc = " Opaque identity of one live materialized device.\n\n The value is meaningful only while the device and its provider instance\n remain live. It is intended for correlation and compatibility checks, not\n persistence or native-handle recovery."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_device_id_t {
    #[doc = " Provider-defined identity words."]
    pub words: [u64; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_device_id_t"][::std::mem::size_of::<amdf_device_id_t>() - 16usize];
    ["Alignment of amdf_device_id_t"][::std::mem::align_of::<amdf_device_id_t>() - 8usize];
    ["Offset of field: amdf_device_id_t::words"]
        [::std::mem::offset_of!(amdf_device_id_t, words) - 0usize];
};
#[doc = " Opaque identity of one live native queue.\n\n The value remains meaningful through the lifetime of the queue and is used\n only for correlation and failure attribution. It is never a native handle."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_queue_id_t {
    #[doc = " Provider-defined identity words."]
    pub words: [u64; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_queue_id_t"][::std::mem::size_of::<amdf_queue_id_t>() - 16usize];
    ["Alignment of amdf_queue_id_t"][::std::mem::align_of::<amdf_queue_id_t>() - 8usize];
    ["Offset of field: amdf_queue_id_t::words"]
        [::std::mem::offset_of!(amdf_queue_id_t, words) - 0usize];
};
#[doc = " Opaque identity of live physical backing within one provider instance.\n\n Equal nonzero identities prove that two attachments name the same physical\n backing. An all-zero identity means that the provider cannot establish\n physical identity. The value is not persistent and is never a native\n handle."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_physical_memory_id_t {
    #[doc = " Provider-defined identity words."]
    pub words: [u64; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_physical_memory_id_t"]
        [::std::mem::size_of::<amdf_physical_memory_id_t>() - 16usize];
    ["Alignment of amdf_physical_memory_id_t"]
        [::std::mem::align_of::<amdf_physical_memory_id_t>() - 8usize];
    ["Offset of field: amdf_physical_memory_id_t::words"]
        [::std::mem::offset_of!(amdf_physical_memory_id_t, words) - 0usize];
};
#[doc = " Broad execution-engine class of an endpoint."]
pub type amdf_engine_kind_t = u32;
#[doc = " The provider cannot classify the endpoint without engine qualification."]
pub const AMDF_ENGINE_KIND_UNKNOWN: amdf_engine_kind_e = 0;
#[doc = " An AMD GPU endpoint, including RDNA and CDNA targets."]
pub const AMDF_ENGINE_KIND_GPU: amdf_engine_kind_e = 1;
#[doc = " An AMD XDNA/AIE endpoint."]
pub const AMDF_ENGINE_KIND_XDNA: amdf_engine_kind_e = 2;
pub type amdf_engine_kind_e = ::std::os::raw::c_uint;
#[doc = " Standard operating-system properties of an endpoint."]
pub type amdf_endpoint_type_flags_t = u32;
#[doc = " The endpoint can drive a display."]
pub const AMDF_ENDPOINT_TYPE_FLAG_DISPLAY_SUPPORTED: amdf_endpoint_type_flag_bits_e = 1;
#[doc = " The endpoint supports graphics rendering."]
pub const AMDF_ENDPOINT_TYPE_FLAG_RENDER_SUPPORTED: amdf_endpoint_type_flag_bits_e = 2;
#[doc = " The operating system reports a compute-only adapter."]
pub const AMDF_ENDPOINT_TYPE_FLAG_COMPUTE_ONLY: amdf_endpoint_type_flag_bits_e = 4;
#[doc = " The endpoint is implemented entirely in software."]
pub const AMDF_ENDPOINT_TYPE_FLAG_SOFTWARE_DEVICE: amdf_endpoint_type_flag_bits_e = 8;
pub type amdf_endpoint_type_flag_bits_e = ::std::os::raw::c_uint;
#[doc = " Immutable PCI identity of an endpoint, when reported by the platform."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_pci_info_t {
    #[doc = " PCI vendor identifier, or zero when unavailable."]
    pub vendor_id: u32,
    #[doc = " PCI device identifier, or zero when unavailable."]
    pub device_id: u32,
    #[doc = " PCI subsystem vendor identifier, or zero when unavailable."]
    pub subsystem_vendor_id: u32,
    #[doc = " PCI subsystem device identifier, or zero when unavailable."]
    pub subsystem_device_id: u32,
    #[doc = " PCI revision identifier, or zero when unavailable."]
    pub revision_id: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_pci_info_t"][::std::mem::size_of::<amdf_pci_info_t>() - 20usize];
    ["Alignment of amdf_pci_info_t"][::std::mem::align_of::<amdf_pci_info_t>() - 4usize];
    ["Offset of field: amdf_pci_info_t::vendor_id"]
        [::std::mem::offset_of!(amdf_pci_info_t, vendor_id) - 0usize];
    ["Offset of field: amdf_pci_info_t::device_id"]
        [::std::mem::offset_of!(amdf_pci_info_t, device_id) - 4usize];
    ["Offset of field: amdf_pci_info_t::subsystem_vendor_id"]
        [::std::mem::offset_of!(amdf_pci_info_t, subsystem_vendor_id) - 8usize];
    ["Offset of field: amdf_pci_info_t::subsystem_device_id"]
        [::std::mem::offset_of!(amdf_pci_info_t, subsystem_device_id) - 12usize];
    ["Offset of field: amdf_pci_info_t::revision_id"]
        [::std::mem::offset_of!(amdf_pci_info_t, revision_id) - 16usize];
};
#[doc = " Native namespace used to correlate an endpoint with another API provider."]
pub type amdf_endpoint_native_identity_type_t = u32;
#[doc = " No native correlation identity is available."]
pub const AMDF_ENDPOINT_NATIVE_IDENTITY_TYPE_NONE: amdf_endpoint_native_identity_type_e = 0;
#[doc = " Linux character-device major/minor numbers."]
pub const AMDF_ENDPOINT_NATIVE_IDENTITY_TYPE_LINUX_DEVICE: amdf_endpoint_native_identity_type_e = 1;
#[doc = " Windows adapter LUID and physical-adapter index."]
pub const AMDF_ENDPOINT_NATIVE_IDENTITY_TYPE_WINDOWS_ADAPTER: amdf_endpoint_native_identity_type_e =
    2;
pub type amdf_endpoint_native_identity_type_e = ::std::os::raw::c_uint;
#[doc = " Passive identity for matching contemporaneous native API providers.\n\n This value conveys neither a native handle nor ownership. It is not stable\n across device removal or reboot. Matching identifies the native device;\n foreign-driver, memory-transport and access compatibility still require\n their own qualification. The opaque endpoint id remains the value used to\n open libamdf endpoints."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct amdf_endpoint_native_identity_t {
    #[doc = " Native namespace selecting the active member of `value`."]
    pub type_: amdf_endpoint_native_identity_type_t,
    pub value: amdf_endpoint_native_identity_t__bindgen_ty_1,
}
#[doc = " Native identity in the namespace selected by `type`."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union amdf_endpoint_native_identity_t__bindgen_ty_1 {
    pub linux_device: amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_1,
    pub windows_adapter: amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_2,
}
#[doc = " Linux DRM render node for GPU endpoints, accelerator node for XDNA."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_1 {
    #[doc = " Character-device major number, as returned by `major(st_rdev)`."]
    pub major: u32,
    #[doc = " Character-device minor number, as returned by `minor(st_rdev)`."]
    pub minor: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::<
        amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_1,
    >() - 8usize];
    ["Alignment of amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_1"]
        [::std::mem::align_of::<amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_1>()
            - 4usize];
    ["Offset of field: amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_1::major"][::std::mem::offset_of!(
        amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_1,
        major
    )
        - 0usize];
    ["Offset of field: amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_1::minor"][::std::mem::offset_of!(
        amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_1,
        minor
    )
        - 4usize];
};
#[doc = " Windows logical adapter and the endpoint's physical adapter within it."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_2 {
    #[doc = " LUID bits: `(uint64_t)(uint32_t)HighPart << 32 | LowPart`."]
    pub luid: u64,
    #[doc = " KMT physical-adapter index within the logical adapter."]
    pub physical_adapter_index: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_2"][::std::mem::size_of::<
        amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_2,
    >() - 16usize];
    ["Alignment of amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_2"]
        [::std::mem::align_of::<amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_2>()
            - 8usize];
    ["Offset of field: amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_2::luid"][::std::mem::offset_of!(
        amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_2,
        luid
    )
        - 0usize];
    [
        "Offset of field: amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_2::physical_adapter_index",
    ][::std::mem::offset_of!(
        amdf_endpoint_native_identity_t__bindgen_ty_1__bindgen_ty_2,
        physical_adapter_index
    ) - 8usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_endpoint_native_identity_t__bindgen_ty_1"]
        [::std::mem::size_of::<amdf_endpoint_native_identity_t__bindgen_ty_1>() - 16usize];
    ["Alignment of amdf_endpoint_native_identity_t__bindgen_ty_1"]
        [::std::mem::align_of::<amdf_endpoint_native_identity_t__bindgen_ty_1>() - 8usize];
    ["Offset of field: amdf_endpoint_native_identity_t__bindgen_ty_1::linux_device"][::std::mem::offset_of!(
        amdf_endpoint_native_identity_t__bindgen_ty_1,
        linux_device
    ) - 0usize];
    ["Offset of field: amdf_endpoint_native_identity_t__bindgen_ty_1::windows_adapter"][::std::mem::offset_of!(
        amdf_endpoint_native_identity_t__bindgen_ty_1,
        windows_adapter
    ) - 0usize];
};
impl Default for amdf_endpoint_native_identity_t__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_endpoint_native_identity_t"]
        [::std::mem::size_of::<amdf_endpoint_native_identity_t>() - 24usize];
    ["Alignment of amdf_endpoint_native_identity_t"]
        [::std::mem::align_of::<amdf_endpoint_native_identity_t>() - 8usize];
    ["Offset of field: amdf_endpoint_native_identity_t::type_"]
        [::std::mem::offset_of!(amdf_endpoint_native_identity_t, type_) - 0usize];
    ["Offset of field: amdf_endpoint_native_identity_t::value"]
        [::std::mem::offset_of!(amdf_endpoint_native_identity_t, value) - 8usize];
};
impl Default for amdf_endpoint_native_identity_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Fixed-stride endpoint identity returned by `endpoint_enumerate`.\n\n This structure is immutable for ABI v1. It contains no pointers, extension\n chain, or provider-owned storage so arrays always have one stable stride."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_endpoint_summary_t {
    #[doc = " Opaque identity accepted by `endpoint_open`."]
    pub id: amdf_endpoint_id_t,
    #[doc = " Broad engine class, or `AMDF_ENGINE_KIND_UNKNOWN` when not yet qualified."]
    pub engine_kind: amdf_engine_kind_t,
    #[doc = " Standard endpoint properties."]
    pub type_flags: amdf_endpoint_type_flags_t,
    #[doc = " NUL-terminated UTF-8 diagnostic name. Never use this for classification."]
    pub name: [::std::os::raw::c_char; 128usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_endpoint_summary_t"]
        [::std::mem::size_of::<amdf_endpoint_summary_t>() - 152usize];
    ["Alignment of amdf_endpoint_summary_t"]
        [::std::mem::align_of::<amdf_endpoint_summary_t>() - 8usize];
    ["Offset of field: amdf_endpoint_summary_t::id"]
        [::std::mem::offset_of!(amdf_endpoint_summary_t, id) - 0usize];
    ["Offset of field: amdf_endpoint_summary_t::engine_kind"]
        [::std::mem::offset_of!(amdf_endpoint_summary_t, engine_kind) - 16usize];
    ["Offset of field: amdf_endpoint_summary_t::type_flags"]
        [::std::mem::offset_of!(amdf_endpoint_summary_t, type_flags) - 20usize];
    ["Offset of field: amdf_endpoint_summary_t::name"]
        [::std::mem::offset_of!(amdf_endpoint_summary_t, name) - 24usize];
};
impl Default for amdf_endpoint_summary_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Immutable properties of one opened endpoint."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct amdf_endpoint_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_ENDPOINT_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_endpoint_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are defined in ABI v1."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Opaque identity used to open this endpoint."]
    pub id: amdf_endpoint_id_t,
    #[doc = " Broad engine class, or `AMDF_ENGINE_KIND_UNKNOWN` when not yet qualified."]
    pub engine_kind: amdf_engine_kind_t,
    #[doc = " Standard endpoint properties."]
    pub type_flags: amdf_endpoint_type_flags_t,
    #[doc = " Immutable PCI identity reported by the platform."]
    pub pci: amdf_pci_info_t,
    #[doc = " NUL-terminated UTF-8 diagnostic name. Never use this for classification."]
    pub name: [::std::os::raw::c_char; 128usize],
    #[doc = " Number of immutable endpoint-local native queue families."]
    pub queue_family_count: u32,
    #[doc = " Cached native identity for matching other API providers before activation."]
    pub native_identity: amdf_endpoint_native_identity_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_endpoint_info_t"][::std::mem::size_of::<amdf_endpoint_info_t>() - 216usize];
    ["Alignment of amdf_endpoint_info_t"][::std::mem::align_of::<amdf_endpoint_info_t>() - 8usize];
    ["Offset of field: amdf_endpoint_info_t::type_"]
        [::std::mem::offset_of!(amdf_endpoint_info_t, type_) - 0usize];
    ["Offset of field: amdf_endpoint_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_endpoint_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_endpoint_info_t::next"]
        [::std::mem::offset_of!(amdf_endpoint_info_t, next) - 8usize];
    ["Offset of field: amdf_endpoint_info_t::id"]
        [::std::mem::offset_of!(amdf_endpoint_info_t, id) - 16usize];
    ["Offset of field: amdf_endpoint_info_t::engine_kind"]
        [::std::mem::offset_of!(amdf_endpoint_info_t, engine_kind) - 32usize];
    ["Offset of field: amdf_endpoint_info_t::type_flags"]
        [::std::mem::offset_of!(amdf_endpoint_info_t, type_flags) - 36usize];
    ["Offset of field: amdf_endpoint_info_t::pci"]
        [::std::mem::offset_of!(amdf_endpoint_info_t, pci) - 40usize];
    ["Offset of field: amdf_endpoint_info_t::name"]
        [::std::mem::offset_of!(amdf_endpoint_info_t, name) - 60usize];
    ["Offset of field: amdf_endpoint_info_t::queue_family_count"]
        [::std::mem::offset_of!(amdf_endpoint_info_t, queue_family_count) - 188usize];
    ["Offset of field: amdf_endpoint_info_t::native_identity"]
        [::std::mem::offset_of!(amdf_endpoint_info_t, native_identity) - 192usize];
};
impl Default for amdf_endpoint_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Physical placement class of a memory profile or live attachment."]
pub type amdf_memory_class_t = u32;
#[doc = " No placement class. This value is never accepted by memory creation."]
pub const AMDF_MEMORY_CLASS_UNKNOWN: amdf_memory_class_e = 0;
#[doc = " System memory accessible through a host mapping, including borrowed pages."]
pub const AMDF_MEMORY_CLASS_SYSTEM: amdf_memory_class_e = 1;
#[doc = " Device-local physical memory that may not be host visible."]
pub const AMDF_MEMORY_CLASS_LOCAL: amdf_memory_class_e = 2;
#[doc = " Native-private storage qualified by its live scope owner."]
pub const AMDF_MEMORY_CLASS_PRIVATE: amdf_memory_class_e = 3;
pub type amdf_memory_class_e = ::std::os::raw::c_uint;
#[doc = " Required or achieved properties of a memory attachment."]
pub type amdf_memory_flags_t = u64;
#[doc = " The allocation can be explicitly mapped for host access."]
pub const AMDF_MEMORY_FLAG_HOST_VISIBLE: amdf_memory_flag_bits_e = 1;
#[doc = " The physical placement is local to the attached device."]
pub const AMDF_MEMORY_FLAG_DEVICE_LOCAL: amdf_memory_flag_bits_e = 2;
#[doc = " The physical backing can be exported and attached to another device."]
pub const AMDF_MEMORY_FLAG_SHAREABLE: amdf_memory_flag_bits_e = 4;
#[doc = " The allocation can hold directly published user-mode queue state."]
pub const AMDF_MEMORY_FLAG_QUEUE_STORAGE: amdf_memory_flag_bits_e = 8;
#[doc = " Host and device access requires no explicit host cache transition."]
pub const AMDF_MEMORY_FLAG_HOST_COHERENT: amdf_memory_flag_bits_e = 16;
#[doc = " A stable device address is established before creation returns."]
pub const AMDF_MEMORY_FLAG_DEVICE_ADDRESS: amdf_memory_flag_bits_e = 32;
pub type amdf_memory_flag_bits_e = ::std::os::raw::c_uint;
#[doc = " Exact device page-table access granted to one memory attachment."]
pub type amdf_memory_access_t = u32;
#[doc = " Device loads are permitted from the attachment."]
pub const AMDF_MEMORY_ACCESS_READ: amdf_memory_access_bit_e = 1;
#[doc = " Device stores are permitted to the attachment."]
pub const AMDF_MEMORY_ACCESS_WRITE: amdf_memory_access_bit_e = 2;
#[doc = " Device instruction fetches are permitted from the attachment."]
pub const AMDF_MEMORY_ACCESS_EXECUTE: amdf_memory_access_bit_e = 4;
pub type amdf_memory_access_bit_e = ::std::os::raw::c_uint;
#[doc = " Interface consuming a numeric memory address, not an address-space owner."]
pub type amdf_memory_address_kind_t = u32;
#[doc = " Ordinary GPU loads, stores, instruction fetches, and command addresses."]
pub const AMDF_MEMORY_ADDRESS_GPU: amdf_memory_address_kind_e = 0;
#[doc = " XDNA shim DMA descriptors, with the native DRAM translation applied."]
pub const AMDF_MEMORY_ADDRESS_XDNA_DMA: amdf_memory_address_kind_e = 1;
#[doc = " XDNA firmware buffer arguments or scoped instruction-storage addresses.\n This is not an address to place directly in a shim DMA descriptor."]
pub const AMDF_MEMORY_ADDRESS_XDNA_FIRMWARE: amdf_memory_address_kind_e = 2;
pub type amdf_memory_address_kind_e = ::std::os::raw::c_uint;
#[doc = " Set of address kinds, with bit `1 << amdf_memory_address_kind_t` set for\n each supported kind. Support describes usable addresses, not ownership."]
pub type amdf_memory_address_kinds_t = u64;
#[doc = " Host access requested for one explicit mapping."]
pub type amdf_memory_map_flags_t = u32;
#[doc = " Host loads are permitted from the mapped range."]
pub const AMDF_MEMORY_MAP_FLAG_READ: amdf_memory_map_flag_bits_e = 1;
#[doc = " Host stores are permitted to the mapped range."]
pub const AMDF_MEMORY_MAP_FLAG_WRITE: amdf_memory_map_flag_bits_e = 2;
pub type amdf_memory_map_flag_bits_e = ::std::os::raw::c_uint;
#[doc = " Atomic operations supported by queues and target memory."]
pub type amdf_atomic_operations_t = u64;
#[doc = " Waits until an atomic value satisfies a supported condition."]
pub const AMDF_ATOMIC_OPERATION_WAIT: amdf_atomic_operation_bits_e = 1;
#[doc = " Atomic store."]
pub const AMDF_ATOMIC_OPERATION_STORE: amdf_atomic_operation_bits_e = 2;
#[doc = " No-result atomic addition."]
pub const AMDF_ATOMIC_OPERATION_ADD: amdf_atomic_operation_bits_e = 4;
#[doc = " No-result atomic subtraction."]
pub const AMDF_ATOMIC_OPERATION_SUBTRACT: amdf_atomic_operation_bits_e = 8;
#[doc = " Atomic bitwise AND."]
pub const AMDF_ATOMIC_OPERATION_AND: amdf_atomic_operation_bits_e = 16;
#[doc = " Atomic bitwise OR."]
pub const AMDF_ATOMIC_OPERATION_OR: amdf_atomic_operation_bits_e = 32;
#[doc = " Atomic bitwise XOR."]
pub const AMDF_ATOMIC_OPERATION_XOR: amdf_atomic_operation_bits_e = 64;
pub type amdf_atomic_operation_bits_e = ::std::os::raw::c_uint;
#[doc = " Atomic wait conditions supported by one queue command representation."]
pub type amdf_atomic_wait_conditions_t = u32;
#[doc = " Wait while the masked value is not equal to the requested value."]
pub const AMDF_ATOMIC_WAIT_CONDITION_EQUAL: amdf_atomic_wait_condition_bits_e = 1;
#[doc = " Wait while the masked value is equal to the requested value."]
pub const AMDF_ATOMIC_WAIT_CONDITION_NOT_EQUAL: amdf_atomic_wait_condition_bits_e = 2;
#[doc = " Wait while the masked value is less than the requested unsigned value."]
pub const AMDF_ATOMIC_WAIT_CONDITION_UNSIGNED_GREATER_EQUAL: amdf_atomic_wait_condition_bits_e = 4;
pub type amdf_atomic_wait_condition_bits_e = ::std::os::raw::c_uint;
#[doc = " Atomic commands encoded by one queue family.\n\n These capabilities describe command encoding only. Callers intersect them\n with target-memory operation support and concrete pair reach before use."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_atomic_capabilities_t {
    #[doc = " Operations accepted on naturally aligned 32-bit words."]
    pub operations_32: amdf_atomic_operations_t,
    #[doc = " Operations accepted on naturally aligned 64-bit words."]
    pub operations_64: amdf_atomic_operations_t,
    #[doc = " Wait conditions accepted on 32-bit words."]
    pub wait_conditions_32: amdf_atomic_wait_conditions_t,
    #[doc = " Wait conditions accepted on 64-bit words."]
    pub wait_conditions_64: amdf_atomic_wait_conditions_t,
    #[doc = " 32-bit operations which consume no dispatch resources."]
    pub operations_without_dispatch_32: amdf_atomic_operations_t,
    #[doc = " 64-bit operations which consume no dispatch resources."]
    pub operations_without_dispatch_64: amdf_atomic_operations_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_atomic_capabilities_t"]
        [::std::mem::size_of::<amdf_atomic_capabilities_t>() - 40usize];
    ["Alignment of amdf_atomic_capabilities_t"]
        [::std::mem::align_of::<amdf_atomic_capabilities_t>() - 8usize];
    ["Offset of field: amdf_atomic_capabilities_t::operations_32"]
        [::std::mem::offset_of!(amdf_atomic_capabilities_t, operations_32) - 0usize];
    ["Offset of field: amdf_atomic_capabilities_t::operations_64"]
        [::std::mem::offset_of!(amdf_atomic_capabilities_t, operations_64) - 8usize];
    ["Offset of field: amdf_atomic_capabilities_t::wait_conditions_32"]
        [::std::mem::offset_of!(amdf_atomic_capabilities_t, wait_conditions_32) - 16usize];
    ["Offset of field: amdf_atomic_capabilities_t::wait_conditions_64"]
        [::std::mem::offset_of!(amdf_atomic_capabilities_t, wait_conditions_64) - 20usize];
    ["Offset of field: amdf_atomic_capabilities_t::operations_without_dispatch_32"][::std::mem::offset_of!(
        amdf_atomic_capabilities_t,
        operations_without_dispatch_32
    ) - 24usize];
    ["Offset of field: amdf_atomic_capabilities_t::operations_without_dispatch_64"][::std::mem::offset_of!(
        amdf_atomic_capabilities_t,
        operations_without_dispatch_64
    ) - 32usize];
};
#[doc = " Largest domain over which an atomic access is mutually atomic."]
pub type amdf_atomic_scope_t = u32;
#[doc = " No qualified atomic scope."]
pub const AMDF_ATOMIC_SCOPE_NONE: amdf_atomic_scope_e = 0;
#[doc = " One device address domain."]
pub const AMDF_ATOMIC_SCOPE_DEVICE: amdf_atomic_scope_e = 1;
#[doc = " One correlated device fabric."]
pub const AMDF_ATOMIC_SCOPE_FABRIC: amdf_atomic_scope_e = 2;
#[doc = " Host and every reported device participant."]
pub const AMDF_ATOMIC_SCOPE_SYSTEM: amdf_atomic_scope_e = 3;
pub type amdf_atomic_scope_e = ::std::os::raw::c_uint;
#[doc = " Atomic-cell reach shared by two exact execution sites."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_atomic_reach_t {
    #[doc = " Largest mutually atomic scope for naturally aligned 32-bit accesses."]
    pub scope_32: amdf_atomic_scope_t,
    #[doc = " Largest mutually atomic scope for naturally aligned 64-bit accesses."]
    pub scope_64: amdf_atomic_scope_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_atomic_reach_t"][::std::mem::size_of::<amdf_atomic_reach_t>() - 8usize];
    ["Alignment of amdf_atomic_reach_t"][::std::mem::align_of::<amdf_atomic_reach_t>() - 4usize];
    ["Offset of field: amdf_atomic_reach_t::scope_32"]
        [::std::mem::offset_of!(amdf_atomic_reach_t, scope_32) - 0usize];
    ["Offset of field: amdf_atomic_reach_t::scope_64"]
        [::std::mem::offset_of!(amdf_atomic_reach_t, scope_64) - 4usize];
};
#[doc = " Native representation carried by one external-memory value."]
pub type amdf_external_memory_type_t = u32;
#[doc = " No payload. The all-zero external-memory value has this type."]
pub const AMDF_EXTERNAL_MEMORY_TYPE_NONE: amdf_external_memory_type_e = 0;
#[doc = " Linux DMA-BUF file descriptor."]
pub const AMDF_EXTERNAL_MEMORY_TYPE_DMA_BUF_FD: amdf_external_memory_type_e = 1;
#[doc = " File descriptor accepted only by a provider with matching provenance."]
pub const AMDF_EXTERNAL_MEMORY_TYPE_OPAQUE_FD: amdf_external_memory_type_e = 2;
#[doc = " Owning NT handle to a committed D3D12 buffer and its implicit heap.\n The Windows GPU import profile accepts a same-adapter DEFAULT heap with\n SHARED, one uncompressed linear native allocation, and no cross-adapter\n flag. Logical offsets refer to buffer bytes, not allocation padding.\n Import establishes independent native references; export returns this\n same resource format. Heap handles, images, fences, legacy KMT handles\n and Vulkan opaque memory have different interpretations and are rejected.\n The caller returns the resource to COMMON and completes foreign work\n before native use, then completes native work and its cache release before\n foreign use. Import/export neither wait nor change D3D12 resource state."]
pub const AMDF_EXTERNAL_MEMORY_TYPE_D3D12_RESOURCE: amdf_external_memory_type_e = 3;
#[doc = " Host virtual address with a caller-defined lifetime lease."]
pub const AMDF_EXTERNAL_MEMORY_TYPE_HOST_POINTER: amdf_external_memory_type_e = 4;
#[doc = " Device virtual address with a caller-defined lifetime lease."]
pub const AMDF_EXTERNAL_MEMORY_TYPE_DEVICE_ADDRESS: amdf_external_memory_type_e = 5;
pub type amdf_external_memory_type_e = ::std::os::raw::c_uint;
#[doc = " Opaque identity of the exact native interpretation of a transport payload.\n\n Portable self-describing transports use an all-zero identity. Opaque file\n descriptors and raw device addresses require a matching nonzero identity in\n the importing memory profile. The value is meaningful only while its\n provider instance remains live and is never a native handle."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_external_memory_provenance_t {
    #[doc = " Provider-defined identity words."]
    pub words: [u64; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_external_memory_provenance_t"]
        [::std::mem::size_of::<amdf_external_memory_provenance_t>() - 16usize];
    ["Alignment of amdf_external_memory_provenance_t"]
        [::std::mem::align_of::<amdf_external_memory_provenance_t>() - 8usize];
    ["Offset of field: amdf_external_memory_provenance_t::words"]
        [::std::mem::offset_of!(amdf_external_memory_provenance_t, words) - 0usize];
};
#[doc = " Payload of one typed external-memory value."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union amdf_external_memory_payload_t {
    #[doc = " Nonnegative DMA-BUF or opaque file descriptor."]
    pub file_descriptor: i64,
    #[doc = " Windows NT handle."]
    pub native_handle: *mut ::std::os::raw::c_void,
    #[doc = " First host byte of the exported backing."]
    pub host_pointer: *mut ::std::os::raw::c_void,
    #[doc = " First device byte of the exported backing."]
    pub device_address: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_external_memory_payload_t"]
        [::std::mem::size_of::<amdf_external_memory_payload_t>() - 8usize];
    ["Alignment of amdf_external_memory_payload_t"]
        [::std::mem::align_of::<amdf_external_memory_payload_t>() - 8usize];
    ["Offset of field: amdf_external_memory_payload_t::file_descriptor"]
        [::std::mem::offset_of!(amdf_external_memory_payload_t, file_descriptor) - 0usize];
    ["Offset of field: amdf_external_memory_payload_t::native_handle"]
        [::std::mem::offset_of!(amdf_external_memory_payload_t, native_handle) - 0usize];
    ["Offset of field: amdf_external_memory_payload_t::host_pointer"]
        [::std::mem::offset_of!(amdf_external_memory_payload_t, host_pointer) - 0usize];
    ["Offset of field: amdf_external_memory_payload_t::device_address"]
        [::std::mem::offset_of!(amdf_external_memory_payload_t, device_address) - 0usize];
};
impl Default for amdf_external_memory_payload_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Infallibly releases one external-memory payload.\n\n The callback must be thread-safe and must not throw or unwind across the C\n ABI. It receives the exact type and payload copied into the external value."]
pub type amdf_external_memory_release_fn_t = ::std::option::Option<
    unsafe extern "C" fn(
        user_data: *mut ::std::os::raw::c_void,
        type_: amdf_external_memory_type_t,
        payload: amdf_external_memory_payload_t,
    ),
>;
#[doc = " Move-owned transport for one logical range of physical memory.\n\n The all-zero value is empty. A nonempty value with a null `release` callback\n borrows its payload; the caller keeps the native owner live through import\n or explicit release. Copying a nonempty value does not duplicate ownership."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct amdf_external_memory_t {
    #[doc = " Native payload representation."]
    pub type_: amdf_external_memory_type_t,
    #[doc = " Reserved for future use and always zero."]
    pub reserved: u32,
    #[doc = " Typed native payload."]
    pub payload: amdf_external_memory_payload_t,
    #[doc = " Exact payload interpretation, or all-zero for portable transports."]
    pub provenance: amdf_external_memory_provenance_t,
    #[doc = " Byte offset of logical byte zero in the exported physical backing."]
    pub source_byte_offset: u64,
    #[doc = " Nonzero logical byte length represented by this value."]
    pub byte_length: u64,
    #[doc = " Physical identity established by the exporter, when available."]
    pub physical_backing_id: amdf_physical_memory_id_t,
    #[doc = " Optional infallible payload release callback."]
    pub release: amdf_external_memory_release_fn_t,
    #[doc = " Opaque value passed to `release`."]
    pub release_user_data: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_external_memory_t"][::std::mem::size_of::<amdf_external_memory_t>() - 80usize];
    ["Alignment of amdf_external_memory_t"]
        [::std::mem::align_of::<amdf_external_memory_t>() - 8usize];
    ["Offset of field: amdf_external_memory_t::type_"]
        [::std::mem::offset_of!(amdf_external_memory_t, type_) - 0usize];
    ["Offset of field: amdf_external_memory_t::reserved"]
        [::std::mem::offset_of!(amdf_external_memory_t, reserved) - 4usize];
    ["Offset of field: amdf_external_memory_t::payload"]
        [::std::mem::offset_of!(amdf_external_memory_t, payload) - 8usize];
    ["Offset of field: amdf_external_memory_t::provenance"]
        [::std::mem::offset_of!(amdf_external_memory_t, provenance) - 16usize];
    ["Offset of field: amdf_external_memory_t::source_byte_offset"]
        [::std::mem::offset_of!(amdf_external_memory_t, source_byte_offset) - 32usize];
    ["Offset of field: amdf_external_memory_t::byte_length"]
        [::std::mem::offset_of!(amdf_external_memory_t, byte_length) - 40usize];
    ["Offset of field: amdf_external_memory_t::physical_backing_id"]
        [::std::mem::offset_of!(amdf_external_memory_t, physical_backing_id) - 48usize];
    ["Offset of field: amdf_external_memory_t::release"]
        [::std::mem::offset_of!(amdf_external_memory_t, release) - 64usize];
    ["Offset of field: amdf_external_memory_t::release_user_data"]
        [::std::mem::offset_of!(amdf_external_memory_t, release_user_data) - 72usize];
};
impl Default for amdf_external_memory_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Operations supported by one memory profile."]
pub type amdf_memory_profile_roles_t = u64;
#[doc = " Creates provider-owned physical backing."]
pub const AMDF_MEMORY_PROFILE_ROLE_CREATE: amdf_memory_profile_role_bits_e = 1;
#[doc = " Registers caller-owned host pages."]
pub const AMDF_MEMORY_PROFILE_ROLE_REGISTER: amdf_memory_profile_role_bits_e = 2;
#[doc = " Imports typed external memory."]
pub const AMDF_MEMORY_PROFILE_ROLE_IMPORT: amdf_memory_profile_role_bits_e = 4;
#[doc = " Exports typed external memory."]
pub const AMDF_MEMORY_PROFILE_ROLE_EXPORT: amdf_memory_profile_role_bits_e = 8;
#[doc = " Creates explicit host mappings."]
pub const AMDF_MEMORY_PROFILE_ROLE_HOST_MAP: amdf_memory_profile_role_bits_e = 16;
#[doc = " Supplies physical backing to a virtual-memory mapping operation."]
pub const AMDF_MEMORY_PROFILE_ROLE_MAPPING_SOURCE: amdf_memory_profile_role_bits_e = 32;
#[doc = " Owns virtual-address reservations and mapping operations."]
pub const AMDF_MEMORY_PROFILE_ROLE_MAPPING_TARGET: amdf_memory_profile_role_bits_e = 64;
pub type amdf_memory_profile_role_bits_e = ::std::os::raw::c_uint;
#[doc = " Capabilities of one external-memory type in a memory profile."]
pub type amdf_external_memory_support_flags_t = u32;
#[doc = " Values of this type can be imported through this profile."]
pub const AMDF_EXTERNAL_MEMORY_SUPPORT_FLAG_IMPORT: amdf_external_memory_support_flag_bits_e = 1;
#[doc = " Attachments using this profile can export values of this type."]
pub const AMDF_EXTERNAL_MEMORY_SUPPORT_FLAG_EXPORT: amdf_external_memory_support_flag_bits_e = 2;
#[doc = " Nonzero logical source offsets are supported."]
pub const AMDF_EXTERNAL_MEMORY_SUPPORT_FLAG_SOURCE_OFFSET:
    amdf_external_memory_support_flag_bits_e = 4;
#[doc = " Values of this type may cross a process boundary."]
pub const AMDF_EXTERNAL_MEMORY_SUPPORT_FLAG_CROSS_PROCESS:
    amdf_external_memory_support_flag_bits_e = 8;
#[doc = " Values created by a foreign API provider may be imported."]
pub const AMDF_EXTERNAL_MEMORY_SUPPORT_FLAG_FOREIGN_API: amdf_external_memory_support_flag_bits_e =
    16;
pub type amdf_external_memory_support_flag_bits_e = ::std::os::raw::c_uint;
#[doc = " Type-specific import and export limits within one memory profile."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_external_memory_support_t {
    #[doc = " External-memory representation described by this entry."]
    pub type_: amdf_external_memory_type_t,
    #[doc = " Supported import, export, offset, and provenance capabilities."]
    pub flags: amdf_external_memory_support_flags_t,
    #[doc = " Required payload provenance, or all-zero for portable transports."]
    pub provenance: amdf_external_memory_provenance_t,
    #[doc = " Required source-offset alignment, or zero when offsets must be zero."]
    pub source_offset_alignment: u64,
    #[doc = " Required logical byte-length alignment."]
    pub byte_length_alignment: u64,
    #[doc = " Maximum logical byte length, or zero for no type-specific limit."]
    pub maximum_byte_length: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_external_memory_support_t"]
        [::std::mem::size_of::<amdf_external_memory_support_t>() - 48usize];
    ["Alignment of amdf_external_memory_support_t"]
        [::std::mem::align_of::<amdf_external_memory_support_t>() - 8usize];
    ["Offset of field: amdf_external_memory_support_t::type_"]
        [::std::mem::offset_of!(amdf_external_memory_support_t, type_) - 0usize];
    ["Offset of field: amdf_external_memory_support_t::flags"]
        [::std::mem::offset_of!(amdf_external_memory_support_t, flags) - 4usize];
    ["Offset of field: amdf_external_memory_support_t::provenance"]
        [::std::mem::offset_of!(amdf_external_memory_support_t, provenance) - 8usize];
    ["Offset of field: amdf_external_memory_support_t::source_offset_alignment"]
        [::std::mem::offset_of!(amdf_external_memory_support_t, source_offset_alignment) - 24usize];
    ["Offset of field: amdf_external_memory_support_t::byte_length_alignment"]
        [::std::mem::offset_of!(amdf_external_memory_support_t, byte_length_alignment) - 32usize];
    ["Offset of field: amdf_external_memory_support_t::maximum_byte_length"]
        [::std::mem::offset_of!(amdf_external_memory_support_t, maximum_byte_length) - 40usize];
};
#[doc = " Host cache behavior of a mapped allocation."]
pub type amdf_host_cacheability_t = u32;
#[doc = " The provider cannot describe the mapping's cache behavior."]
pub const AMDF_HOST_CACHEABILITY_UNKNOWN: amdf_host_cacheability_e = 0;
#[doc = " Ordinary host write-back caching. Device coherence is a separate property\n of the device's access, not of this CPU mapping."]
pub const AMDF_HOST_CACHEABILITY_WRITE_BACK: amdf_host_cacheability_e = 2;
#[doc = " Host write-combined caching intended for sequential stores."]
pub const AMDF_HOST_CACHEABILITY_WRITE_COMBINED: amdf_host_cacheability_e = 3;
#[doc = " Uncached host access."]
pub const AMDF_HOST_CACHEABILITY_UNCACHED: amdf_host_cacheability_e = 4;
pub type amdf_host_cacheability_e = ::std::os::raw::c_uint;
#[doc = " Limits for one way of constructing a memory attachment.\n\n For CREATE, the exact owned native payload extent is\n `align_up(byte_length + native_byte_length_prefix,\n           native_byte_length_granularity)` for every admitted request.\n Maximum logical length leaves enough uint64_t headroom for both additions.\n Any admitted minimum alignment preserves this extent. It excludes virtual\n address reservation slack, driver/library metadata and residency charges.\n REGISTER and IMPORT instead describe an extent established from the source."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_memory_construction_capabilities_t {
    #[doc = " Maximum logical attachment length accepted by this operation."]
    pub maximum_byte_length: u64,
    #[doc = " Required logical byte-length granularity."]
    pub byte_length_granularity: u64,
    #[doc = " Required caller-owned host-pointer alignment for registration, or zero\n when the operation consumes no host pointer."]
    pub registered_host_pointer_alignment: u64,
    #[doc = " Required cache class of caller-owned pages for REGISTER, or UNKNOWN\n when this operation consumes no caller pages. This is a caller-established\n property of the source mapping, not inferred from its pointer value."]
    pub registered_host_cacheability: amdf_host_cacheability_t,
    #[doc = " Reserved for compatible growth and always zero."]
    pub reserved: u32,
    #[doc = " Power-of-two base alignment guaranteed when callers request no stronger\n alignment."]
    pub minimum_alignment: u64,
    #[doc = " Strongest power-of-two minimum alignment callers may request."]
    pub maximum_alignment: u64,
    #[doc = " Granularity of the native physical allocation or page cover in bytes."]
    pub native_byte_length_granularity: u64,
    #[doc = " Fixed native payload bytes preceding logical byte zero for CREATE.\n Successful CREATE reports this as source_byte_offset. Zero for REGISTER\n and IMPORT, whose source offset is determined by the supplied storage."]
    pub native_byte_length_prefix: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_construction_capabilities_t"]
        [::std::mem::size_of::<amdf_memory_construction_capabilities_t>() - 64usize];
    ["Alignment of amdf_memory_construction_capabilities_t"]
        [::std::mem::align_of::<amdf_memory_construction_capabilities_t>() - 8usize];
    ["Offset of field: amdf_memory_construction_capabilities_t::maximum_byte_length"][::std::mem::offset_of!(
        amdf_memory_construction_capabilities_t,
        maximum_byte_length
    ) - 0usize];
    ["Offset of field: amdf_memory_construction_capabilities_t::byte_length_granularity"][::std::mem::offset_of!(
        amdf_memory_construction_capabilities_t,
        byte_length_granularity
    )
        - 8usize];
    ["Offset of field: amdf_memory_construction_capabilities_t::registered_host_pointer_alignment"]
        [::std::mem::offset_of!(
            amdf_memory_construction_capabilities_t,
            registered_host_pointer_alignment
        ) - 16usize];
    ["Offset of field: amdf_memory_construction_capabilities_t::registered_host_cacheability"][::std::mem::offset_of!(
        amdf_memory_construction_capabilities_t,
        registered_host_cacheability
    )
        - 24usize];
    ["Offset of field: amdf_memory_construction_capabilities_t::reserved"]
        [::std::mem::offset_of!(amdf_memory_construction_capabilities_t, reserved) - 28usize];
    ["Offset of field: amdf_memory_construction_capabilities_t::minimum_alignment"][::std::mem::offset_of!(
        amdf_memory_construction_capabilities_t,
        minimum_alignment
    ) - 32usize];
    ["Offset of field: amdf_memory_construction_capabilities_t::maximum_alignment"][::std::mem::offset_of!(
        amdf_memory_construction_capabilities_t,
        maximum_alignment
    ) - 40usize];
    ["Offset of field: amdf_memory_construction_capabilities_t::native_byte_length_granularity"][::std::mem::offset_of!(
        amdf_memory_construction_capabilities_t,
        native_byte_length_granularity
    )
        - 48usize];
    ["Offset of field: amdf_memory_construction_capabilities_t::native_byte_length_prefix"][::std::mem::offset_of!(
        amdf_memory_construction_capabilities_t,
        native_byte_length_prefix
    )
        - 56usize];
};
#[doc = " Numeric envelope shared by every address kind produced by one profile.\n Bounds cover complete logical ranges, including any consumer translation;\n they do not promise that every address inside the envelope is allocatable."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_memory_address_capabilities_t {
    #[doc = " Device-local ordinary address-domain ordinal."]
    pub address_domain_ordinal: u32,
    #[doc = " Maximum significant width across produced address kinds. Nonzero for\n addressable profiles; zero when the profile produces no device address."]
    pub address_bit_count: u32,
    #[doc = " Inclusive lower bound, or zero for profiles without device addresses."]
    pub minimum_address: u64,
    #[doc = " Inclusive upper bound, or zero for profiles without device addresses."]
    pub maximum_address: u64,
    #[doc = " Minimum power-of-two alignment common to all produced address kinds."]
    pub minimum_alignment: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_address_capabilities_t"]
        [::std::mem::size_of::<amdf_memory_address_capabilities_t>() - 32usize];
    ["Alignment of amdf_memory_address_capabilities_t"]
        [::std::mem::align_of::<amdf_memory_address_capabilities_t>() - 8usize];
    ["Offset of field: amdf_memory_address_capabilities_t::address_domain_ordinal"][::std::mem::offset_of!(
        amdf_memory_address_capabilities_t,
        address_domain_ordinal
    ) - 0usize];
    ["Offset of field: amdf_memory_address_capabilities_t::address_bit_count"]
        [::std::mem::offset_of!(amdf_memory_address_capabilities_t, address_bit_count) - 4usize];
    ["Offset of field: amdf_memory_address_capabilities_t::minimum_address"]
        [::std::mem::offset_of!(amdf_memory_address_capabilities_t, minimum_address) - 8usize];
    ["Offset of field: amdf_memory_address_capabilities_t::maximum_address"]
        [::std::mem::offset_of!(amdf_memory_address_capabilities_t, maximum_address) - 16usize];
    ["Offset of field: amdf_memory_address_capabilities_t::minimum_alignment"]
        [::std::mem::offset_of!(amdf_memory_address_capabilities_t, minimum_alignment) - 24usize];
};
#[doc = " Exact access requirements shared by live-device queries and construction."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_memory_access_requirements_t {
    #[doc = " Exact device permissions; construction never silently widens them."]
    pub access: amdf_memory_access_t,
    #[doc = " Reserved for compatible growth; must be zero."]
    pub reserved: u32,
    #[doc = " Required access properties: QUEUE_STORAGE, HOST_COHERENT, DEVICE_ADDRESS."]
    pub flags: amdf_memory_flags_t,
    #[doc = " Interfaces whose complete logical-range addresses must be established."]
    pub address_kinds: amdf_memory_address_kinds_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_access_requirements_t"]
        [::std::mem::size_of::<amdf_memory_access_requirements_t>() - 24usize];
    ["Alignment of amdf_memory_access_requirements_t"]
        [::std::mem::align_of::<amdf_memory_access_requirements_t>() - 8usize];
    ["Offset of field: amdf_memory_access_requirements_t::access"]
        [::std::mem::offset_of!(amdf_memory_access_requirements_t, access) - 0usize];
    ["Offset of field: amdf_memory_access_requirements_t::reserved"]
        [::std::mem::offset_of!(amdf_memory_access_requirements_t, reserved) - 4usize];
    ["Offset of field: amdf_memory_access_requirements_t::flags"]
        [::std::mem::offset_of!(amdf_memory_access_requirements_t, flags) - 8usize];
    ["Offset of field: amdf_memory_access_requirements_t::address_kinds"]
        [::std::mem::offset_of!(amdf_memory_access_requirements_t, address_kinds) - 16usize];
};
#[doc = " One explicitly initialized consumer of a memory resource."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_device_access_t {
    #[doc = " Borrowed live device. The caller keeps it live through memory release."]
    pub device: *mut amdf_device_t,
    #[doc = " Access established completely before successful construction returns."]
    pub requirements: amdf_memory_access_requirements_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_device_access_t"]
        [::std::mem::size_of::<amdf_memory_device_access_t>() - 32usize];
    ["Alignment of amdf_memory_device_access_t"]
        [::std::mem::align_of::<amdf_memory_device_access_t>() - 8usize];
    ["Offset of field: amdf_memory_device_access_t::device"]
        [::std::mem::offset_of!(amdf_memory_device_access_t, device) - 0usize];
    ["Offset of field: amdf_memory_device_access_t::requirements"]
        [::std::mem::offset_of!(amdf_memory_device_access_t, requirements) - 8usize];
};
impl Default for amdf_memory_device_access_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Complete access capabilities for one live device in a selected scope\n contract."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_access_capabilities_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_MEMORY_ACCESS_CAPABILITIES`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_memory_access_capabilities_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Permissions present for every construction of this contract."]
    pub guaranteed_access: amdf_memory_access_t,
    #[doc = " Permissions the contract can establish."]
    pub supported_access: amdf_memory_access_t,
    #[doc = " Access properties present for every construction."]
    pub guaranteed_flags: amdf_memory_flags_t,
    #[doc = " Access properties which may be required."]
    pub supported_flags: amdf_memory_flags_t,
    #[doc = " Atomic operations on naturally aligned 32-bit words."]
    pub atomic_operations_32: amdf_atomic_operations_t,
    #[doc = " Atomic operations on naturally aligned 64-bit words."]
    pub atomic_operations_64: amdf_atomic_operations_t,
    #[doc = " Complete numeric envelope covering the reported address kinds."]
    pub device_address: amdf_memory_address_capabilities_t,
    #[doc = " Interfaces whose complete logical-range addresses can be established."]
    pub address_kinds: amdf_memory_address_kinds_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_access_capabilities_t"]
        [::std::mem::size_of::<amdf_memory_access_capabilities_t>() - 96usize];
    ["Alignment of amdf_memory_access_capabilities_t"]
        [::std::mem::align_of::<amdf_memory_access_capabilities_t>() - 8usize];
    ["Offset of field: amdf_memory_access_capabilities_t::type_"]
        [::std::mem::offset_of!(amdf_memory_access_capabilities_t, type_) - 0usize];
    ["Offset of field: amdf_memory_access_capabilities_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_access_capabilities_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_access_capabilities_t::next"]
        [::std::mem::offset_of!(amdf_memory_access_capabilities_t, next) - 8usize];
    ["Offset of field: amdf_memory_access_capabilities_t::guaranteed_access"]
        [::std::mem::offset_of!(amdf_memory_access_capabilities_t, guaranteed_access) - 16usize];
    ["Offset of field: amdf_memory_access_capabilities_t::supported_access"]
        [::std::mem::offset_of!(amdf_memory_access_capabilities_t, supported_access) - 20usize];
    ["Offset of field: amdf_memory_access_capabilities_t::guaranteed_flags"]
        [::std::mem::offset_of!(amdf_memory_access_capabilities_t, guaranteed_flags) - 24usize];
    ["Offset of field: amdf_memory_access_capabilities_t::supported_flags"]
        [::std::mem::offset_of!(amdf_memory_access_capabilities_t, supported_flags) - 32usize];
    ["Offset of field: amdf_memory_access_capabilities_t::atomic_operations_32"]
        [::std::mem::offset_of!(amdf_memory_access_capabilities_t, atomic_operations_32) - 40usize];
    ["Offset of field: amdf_memory_access_capabilities_t::atomic_operations_64"]
        [::std::mem::offset_of!(amdf_memory_access_capabilities_t, atomic_operations_64) - 48usize];
    ["Offset of field: amdf_memory_access_capabilities_t::device_address"]
        [::std::mem::offset_of!(amdf_memory_access_capabilities_t, device_address) - 56usize];
    ["Offset of field: amdf_memory_access_capabilities_t::address_kinds"]
        [::std::mem::offset_of!(amdf_memory_access_capabilities_t, address_kinds) - 88usize];
};
impl Default for amdf_memory_access_capabilities_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Range and access capabilities of explicit host mappings."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_host_mapping_capabilities_t {
    #[doc = " Maximum logical mapping length in bytes."]
    pub maximum_byte_length: u64,
    #[doc = " Required mapping byte-offset granularity."]
    pub byte_offset_granularity: u64,
    #[doc = " Required mapping byte-length granularity."]
    pub byte_length_granularity: u64,
    #[doc = " Host read and write requests accepted by the profile."]
    pub supported_access: amdf_memory_map_flags_t,
    #[doc = " Reserved for future use and always zero."]
    pub reserved: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_host_mapping_capabilities_t"]
        [::std::mem::size_of::<amdf_host_mapping_capabilities_t>() - 32usize];
    ["Alignment of amdf_host_mapping_capabilities_t"]
        [::std::mem::align_of::<amdf_host_mapping_capabilities_t>() - 8usize];
    ["Offset of field: amdf_host_mapping_capabilities_t::maximum_byte_length"]
        [::std::mem::offset_of!(amdf_host_mapping_capabilities_t, maximum_byte_length) - 0usize];
    ["Offset of field: amdf_host_mapping_capabilities_t::byte_offset_granularity"][::std::mem::offset_of!(
        amdf_host_mapping_capabilities_t,
        byte_offset_granularity
    ) - 8usize];
    ["Offset of field: amdf_host_mapping_capabilities_t::byte_length_granularity"][::std::mem::offset_of!(
        amdf_host_mapping_capabilities_t,
        byte_length_granularity
    ) - 16usize];
    ["Offset of field: amdf_host_mapping_capabilities_t::supported_access"]
        [::std::mem::offset_of!(amdf_host_mapping_capabilities_t, supported_access) - 24usize];
    ["Offset of field: amdf_host_mapping_capabilities_t::reserved"]
        [::std::mem::offset_of!(amdf_host_mapping_capabilities_t, reserved) - 28usize];
};
#[doc = " Immutable construction and transport capabilities of one memory profile.\n\n A profile is one valid physical placement and operation combination, not a\n set of independently composable feature bits. A profile exposes at most one\n of CREATE and REGISTER; IMPORT and transport roles may describe additional\n ways to attach the same placement. Callers derive each request from one\n profile and require only flags and access included in its supported sets."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_profile_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_MEMORY_PROFILE`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_memory_profile_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Dense query ordinal reported by attachments and selected for construction\n or import."]
    pub ordinal: u32,
    #[doc = " Physical placement class produced by this profile."]
    pub memory_class: amdf_memory_class_t,
    #[doc = " Creation, registration, transport, mapping, and address roles."]
    pub roles: amdf_memory_profile_roles_t,
    #[doc = " Properties present on every attachment created with this profile."]
    pub guaranteed_flags: amdf_memory_flags_t,
    #[doc = " Properties which callers may require from this profile."]
    pub supported_flags: amdf_memory_flags_t,
    #[doc = " Provider-owned physical allocation limits, or all-zero without CREATE."]
    pub allocation: amdf_memory_construction_capabilities_t,
    #[doc = " Caller-owned host registration limits, or all-zero without REGISTER."]
    pub registration: amdf_memory_construction_capabilities_t,
    #[doc = " External-memory attachment limits, or all-zero without IMPORT."]
    pub import: amdf_memory_construction_capabilities_t,
    #[doc = " Explicit host-mapping limits, or all-zero without HOST_MAP."]
    pub host_mapping: amdf_host_mapping_capabilities_t,
    #[doc = " Number of valid entries in `external_memory_support`."]
    pub external_memory_support_count: u32,
    #[doc = " Reserved for future use and always zero."]
    pub reserved: u32,
    #[doc = " Type-specific external-memory support records."]
    pub external_memory_support: [amdf_external_memory_support_t; 5usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_profile_t"][::std::mem::size_of::<amdf_memory_profile_t>() - 520usize];
    ["Alignment of amdf_memory_profile_t"]
        [::std::mem::align_of::<amdf_memory_profile_t>() - 8usize];
    ["Offset of field: amdf_memory_profile_t::type_"]
        [::std::mem::offset_of!(amdf_memory_profile_t, type_) - 0usize];
    ["Offset of field: amdf_memory_profile_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_profile_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_profile_t::next"]
        [::std::mem::offset_of!(amdf_memory_profile_t, next) - 8usize];
    ["Offset of field: amdf_memory_profile_t::ordinal"]
        [::std::mem::offset_of!(amdf_memory_profile_t, ordinal) - 16usize];
    ["Offset of field: amdf_memory_profile_t::memory_class"]
        [::std::mem::offset_of!(amdf_memory_profile_t, memory_class) - 20usize];
    ["Offset of field: amdf_memory_profile_t::roles"]
        [::std::mem::offset_of!(amdf_memory_profile_t, roles) - 24usize];
    ["Offset of field: amdf_memory_profile_t::guaranteed_flags"]
        [::std::mem::offset_of!(amdf_memory_profile_t, guaranteed_flags) - 32usize];
    ["Offset of field: amdf_memory_profile_t::supported_flags"]
        [::std::mem::offset_of!(amdf_memory_profile_t, supported_flags) - 40usize];
    ["Offset of field: amdf_memory_profile_t::allocation"]
        [::std::mem::offset_of!(amdf_memory_profile_t, allocation) - 48usize];
    ["Offset of field: amdf_memory_profile_t::registration"]
        [::std::mem::offset_of!(amdf_memory_profile_t, registration) - 112usize];
    ["Offset of field: amdf_memory_profile_t::import"]
        [::std::mem::offset_of!(amdf_memory_profile_t, import) - 176usize];
    ["Offset of field: amdf_memory_profile_t::host_mapping"]
        [::std::mem::offset_of!(amdf_memory_profile_t, host_mapping) - 240usize];
    ["Offset of field: amdf_memory_profile_t::external_memory_support_count"]
        [::std::mem::offset_of!(amdf_memory_profile_t, external_memory_support_count) - 272usize];
    ["Offset of field: amdf_memory_profile_t::reserved"]
        [::std::mem::offset_of!(amdf_memory_profile_t, reserved) - 276usize];
    ["Offset of field: amdf_memory_profile_t::external_memory_support"]
        [::std::mem::offset_of!(amdf_memory_profile_t, external_memory_support) - 280usize];
};
impl Default for amdf_memory_profile_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Storage locality and lifetime owner of a borrowed scope."]
pub type amdf_memory_scope_kind_t = u32;
#[doc = " System storage for a supported set of consumers, owned by the instance."]
pub const AMDF_MEMORY_SCOPE_KIND_SYSTEM: amdf_memory_scope_kind_e = 0;
#[doc = " Storage local to one physical endpoint, owned by that passive endpoint."]
pub const AMDF_MEMORY_SCOPE_KIND_LOCAL: amdf_memory_scope_kind_e = 1;
#[doc = " Storage qualified by a particular live native device or context owner."]
pub const AMDF_MEMORY_SCOPE_KIND_PRIVATE: amdf_memory_scope_kind_e = 2;
pub type amdf_memory_scope_kind_e = ::std::os::raw::c_uint;
#[doc = " Complete immutable facts of one borrowed storage scope."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_scope_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_MEMORY_SCOPE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_memory_scope_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Storage and owner class."]
    pub kind: amdf_memory_scope_kind_t,
    #[doc = " Number of stable scope-local profile ordinals."]
    pub memory_profile_count: u32,
    #[doc = " Physical storage endpoint for LOCAL; all zero otherwise."]
    pub physical_endpoint_id: amdf_endpoint_id_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_scope_info_t"]
        [::std::mem::size_of::<amdf_memory_scope_info_t>() - 40usize];
    ["Alignment of amdf_memory_scope_info_t"]
        [::std::mem::align_of::<amdf_memory_scope_info_t>() - 8usize];
    ["Offset of field: amdf_memory_scope_info_t::type_"]
        [::std::mem::offset_of!(amdf_memory_scope_info_t, type_) - 0usize];
    ["Offset of field: amdf_memory_scope_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_scope_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_scope_info_t::next"]
        [::std::mem::offset_of!(amdf_memory_scope_info_t, next) - 8usize];
    ["Offset of field: amdf_memory_scope_info_t::kind"]
        [::std::mem::offset_of!(amdf_memory_scope_info_t, kind) - 16usize];
    ["Offset of field: amdf_memory_scope_info_t::memory_profile_count"]
        [::std::mem::offset_of!(amdf_memory_scope_info_t, memory_profile_count) - 20usize];
    ["Offset of field: amdf_memory_scope_info_t::physical_endpoint_id"]
        [::std::mem::offset_of!(amdf_memory_scope_info_t, physical_endpoint_id) - 24usize];
};
impl Default for amdf_memory_scope_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Parameters obtaining one backing and all requested live-device accesses."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_create_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_MEMORY_CREATE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_memory_create_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Scope-local memory-profile ordinal selected for construction. A CREATE\n profile requires `registered_host_pointer` to be `NULL`; a REGISTER\n profile requires it to be non-`NULL`."]
    pub memory_profile_ordinal: u32,
    #[doc = " Number of entries in accesses; zero requests CPU-only system memory."]
    pub access_count: u32,
    #[doc = " Required backing properties: HOST_VISIBLE, DEVICE_LOCAL and SHAREABLE."]
    pub required_flags: amdf_memory_flags_t,
    #[doc = " Logical byte length established for every requested consumer. Native\n allocation rounding is reported separately and grants no additional\n access."]
    pub byte_length: u64,
    #[doc = " Minimum power-of-two allocation-base alignment in every supported address\n space, or zero for provider policy."]
    pub minimum_alignment: u64,
    #[doc = " Borrowed host base for a REGISTER profile, otherwise `NULL`. The caller\n keeps this address range backed by the same live pages through\n `memory_destroy`. A failed native detach can leave registrations live;\n that error does not authorize recycling the source. Registration does\n not take ownership."]
    pub registered_host_pointer: *mut ::std::os::raw::c_void,
    #[doc = " Caller-ordered consumers, consumed during the call and not retained.\n Devices must be unique and belong to the scope's instance. NULL at zero\n count. Each device remains a caller-enforced lifetime dependency."]
    pub accesses: *const amdf_memory_device_access_t,
    #[doc = " Cache class of registered_host_pointer, or UNKNOWN for CREATE. The caller\n establishes this property from the source allocation/mapping contract and\n keeps it unchanged while registered. A pointer alone does not establish a\n cache class. UNKNOWN and unsupported classes are rejected for REGISTER."]
    pub registered_host_cacheability: amdf_host_cacheability_t,
    #[doc = " Reserved for compatible growth; must be zero."]
    pub reserved: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_create_info_t"]
        [::std::mem::size_of::<amdf_memory_create_info_t>() - 72usize];
    ["Alignment of amdf_memory_create_info_t"]
        [::std::mem::align_of::<amdf_memory_create_info_t>() - 8usize];
    ["Offset of field: amdf_memory_create_info_t::type_"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, type_) - 0usize];
    ["Offset of field: amdf_memory_create_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_create_info_t::next"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, next) - 8usize];
    ["Offset of field: amdf_memory_create_info_t::memory_profile_ordinal"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, memory_profile_ordinal) - 16usize];
    ["Offset of field: amdf_memory_create_info_t::access_count"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, access_count) - 20usize];
    ["Offset of field: amdf_memory_create_info_t::required_flags"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, required_flags) - 24usize];
    ["Offset of field: amdf_memory_create_info_t::byte_length"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, byte_length) - 32usize];
    ["Offset of field: amdf_memory_create_info_t::minimum_alignment"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, minimum_alignment) - 40usize];
    ["Offset of field: amdf_memory_create_info_t::registered_host_pointer"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, registered_host_pointer) - 48usize];
    ["Offset of field: amdf_memory_create_info_t::accesses"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, accesses) - 56usize];
    ["Offset of field: amdf_memory_create_info_t::registered_host_cacheability"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, registered_host_cacheability) - 64usize];
    ["Offset of field: amdf_memory_create_info_t::reserved"]
        [::std::mem::offset_of!(amdf_memory_create_info_t, reserved) - 68usize];
};
impl Default for amdf_memory_create_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Immutable backing properties of one live memory resource."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_MEMORY_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_memory_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Achieved profile ordinal, or `AMDF_MEMORY_PROFILE_ORDINAL_UNKNOWN` when\n the provider exposes no profile for this attachment path."]
    pub memory_profile_ordinal: u32,
    #[doc = " Achieved physical placement class."]
    pub memory_class: amdf_memory_class_t,
    #[doc = " Number of immutable device accesses, indexed by resource-local ordinal."]
    pub access_count: u32,
    #[doc = " Reserved for compatible growth; always zero."]
    pub reserved: u32,
    #[doc = " Achieved backing properties: HOST_VISIBLE, DEVICE_LOCAL and SHAREABLE."]
    pub flags: amdf_memory_flags_t,
    #[doc = " Byte offset of logical byte zero in the physical backing."]
    pub source_byte_offset: u64,
    #[doc = " Logical attachment length in bytes."]
    pub byte_length: u64,
    #[doc = " Guaranteed power-of-two logical-base alignment in every supported address\n space."]
    pub alignment: u64,
    #[doc = " Complete native payload allocation or registered source extent in bytes,\n including native rounding. Excludes driver and library metadata. Multiple\n attachments can report the same backing extent independently."]
    pub native_allocation_byte_length: u64,
    #[doc = " Granularity of `native_allocation_byte_length` in bytes."]
    pub native_allocation_granularity: u64,
    #[doc = " Identity shared by attachments to the same physical backing, when known."]
    pub physical_backing_id: amdf_physical_memory_id_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_info_t"][::std::mem::size_of::<amdf_memory_info_t>() - 96usize];
    ["Alignment of amdf_memory_info_t"][::std::mem::align_of::<amdf_memory_info_t>() - 8usize];
    ["Offset of field: amdf_memory_info_t::type_"]
        [::std::mem::offset_of!(amdf_memory_info_t, type_) - 0usize];
    ["Offset of field: amdf_memory_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_info_t::next"]
        [::std::mem::offset_of!(amdf_memory_info_t, next) - 8usize];
    ["Offset of field: amdf_memory_info_t::memory_profile_ordinal"]
        [::std::mem::offset_of!(amdf_memory_info_t, memory_profile_ordinal) - 16usize];
    ["Offset of field: amdf_memory_info_t::memory_class"]
        [::std::mem::offset_of!(amdf_memory_info_t, memory_class) - 20usize];
    ["Offset of field: amdf_memory_info_t::access_count"]
        [::std::mem::offset_of!(amdf_memory_info_t, access_count) - 24usize];
    ["Offset of field: amdf_memory_info_t::reserved"]
        [::std::mem::offset_of!(amdf_memory_info_t, reserved) - 28usize];
    ["Offset of field: amdf_memory_info_t::flags"]
        [::std::mem::offset_of!(amdf_memory_info_t, flags) - 32usize];
    ["Offset of field: amdf_memory_info_t::source_byte_offset"]
        [::std::mem::offset_of!(amdf_memory_info_t, source_byte_offset) - 40usize];
    ["Offset of field: amdf_memory_info_t::byte_length"]
        [::std::mem::offset_of!(amdf_memory_info_t, byte_length) - 48usize];
    ["Offset of field: amdf_memory_info_t::alignment"]
        [::std::mem::offset_of!(amdf_memory_info_t, alignment) - 56usize];
    ["Offset of field: amdf_memory_info_t::native_allocation_byte_length"]
        [::std::mem::offset_of!(amdf_memory_info_t, native_allocation_byte_length) - 64usize];
    ["Offset of field: amdf_memory_info_t::native_allocation_granularity"]
        [::std::mem::offset_of!(amdf_memory_info_t, native_allocation_granularity) - 72usize];
    ["Offset of field: amdf_memory_info_t::physical_backing_id"]
        [::std::mem::offset_of!(amdf_memory_info_t, physical_backing_id) - 80usize];
};
impl Default for amdf_memory_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Immutable facts of one established device access to a memory resource."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_access_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_MEMORY_ACCESS_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_memory_access_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Resource-local ordinal identifying this access."]
    pub ordinal: u32,
    #[doc = " Exact established device permissions."]
    pub access: amdf_memory_access_t,
    #[doc = " Identity of the required live consumer, not an allocation owner."]
    pub device_id: amdf_device_id_t,
    #[doc = " Established access properties: QUEUE_STORAGE, HOST_COHERENT and\n DEVICE_ADDRESS. Backing properties belong to amdf_memory_info_t."]
    pub flags: amdf_memory_flags_t,
    #[doc = " Supported atomic operations on naturally aligned 32-bit words."]
    pub atomic_operations_32: amdf_atomic_operations_t,
    #[doc = " Supported atomic operations on naturally aligned 64-bit words."]
    pub atomic_operations_64: amdf_atomic_operations_t,
    #[doc = " Consumer-local address domain, or NONE without an address."]
    pub address_domain_ordinal: u32,
    #[doc = " Reserved for compatible growth; always zero."]
    pub reserved: u32,
    #[doc = " Address kinds established for the complete logical range. Each set bit\n guarantees that memory_query_address succeeds for that kind. Zero means\n no device address was established; unsupported kinds have no address."]
    pub address_kinds: amdf_memory_address_kinds_t,
    #[doc = " Device reset epoch in which this access and its addresses remain valid."]
    pub reset_epoch: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_access_info_t"]
        [::std::mem::size_of::<amdf_memory_access_info_t>() - 88usize];
    ["Alignment of amdf_memory_access_info_t"]
        [::std::mem::align_of::<amdf_memory_access_info_t>() - 8usize];
    ["Offset of field: amdf_memory_access_info_t::type_"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, type_) - 0usize];
    ["Offset of field: amdf_memory_access_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_access_info_t::next"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, next) - 8usize];
    ["Offset of field: amdf_memory_access_info_t::ordinal"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, ordinal) - 16usize];
    ["Offset of field: amdf_memory_access_info_t::access"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, access) - 20usize];
    ["Offset of field: amdf_memory_access_info_t::device_id"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, device_id) - 24usize];
    ["Offset of field: amdf_memory_access_info_t::flags"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, flags) - 40usize];
    ["Offset of field: amdf_memory_access_info_t::atomic_operations_32"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, atomic_operations_32) - 48usize];
    ["Offset of field: amdf_memory_access_info_t::atomic_operations_64"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, atomic_operations_64) - 56usize];
    ["Offset of field: amdf_memory_access_info_t::address_domain_ordinal"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, address_domain_ordinal) - 64usize];
    ["Offset of field: amdf_memory_access_info_t::reserved"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, reserved) - 68usize];
    ["Offset of field: amdf_memory_access_info_t::address_kinds"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, address_kinds) - 72usize];
    ["Offset of field: amdf_memory_access_info_t::reset_epoch"]
        [::std::mem::offset_of!(amdf_memory_access_info_t, reset_epoch) - 80usize];
};
impl Default for amdf_memory_access_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Parameters obtaining external backing and all requested live-device access."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_import_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_MEMORY_IMPORT_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_memory_import_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Scope-local profile with the IMPORT role."]
    pub memory_profile_ordinal: u32,
    #[doc = " Number of entries in accesses."]
    pub access_count: u32,
    #[doc = " Required backing properties: HOST_VISIBLE, DEVICE_LOCAL and SHAREABLE."]
    pub required_flags: amdf_memory_flags_t,
    #[doc = " Minimum power-of-two destination device-address alignment, or zero for\n profile policy. A nonzero external source offset must be divisible by\n this value."]
    pub minimum_alignment: u64,
    #[doc = " Caller-ordered unique consumers, consumed during the call and not\n retained. Each device belongs to the scope's instance and outlives the\n memory."]
    pub accesses: *const amdf_memory_device_access_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_import_info_t"]
        [::std::mem::size_of::<amdf_memory_import_info_t>() - 48usize];
    ["Alignment of amdf_memory_import_info_t"]
        [::std::mem::align_of::<amdf_memory_import_info_t>() - 8usize];
    ["Offset of field: amdf_memory_import_info_t::type_"]
        [::std::mem::offset_of!(amdf_memory_import_info_t, type_) - 0usize];
    ["Offset of field: amdf_memory_import_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_import_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_import_info_t::next"]
        [::std::mem::offset_of!(amdf_memory_import_info_t, next) - 8usize];
    ["Offset of field: amdf_memory_import_info_t::memory_profile_ordinal"]
        [::std::mem::offset_of!(amdf_memory_import_info_t, memory_profile_ordinal) - 16usize];
    ["Offset of field: amdf_memory_import_info_t::access_count"]
        [::std::mem::offset_of!(amdf_memory_import_info_t, access_count) - 20usize];
    ["Offset of field: amdf_memory_import_info_t::required_flags"]
        [::std::mem::offset_of!(amdf_memory_import_info_t, required_flags) - 24usize];
    ["Offset of field: amdf_memory_import_info_t::minimum_alignment"]
        [::std::mem::offset_of!(amdf_memory_import_info_t, minimum_alignment) - 32usize];
    ["Offset of field: amdf_memory_import_info_t::accesses"]
        [::std::mem::offset_of!(amdf_memory_import_info_t, accesses) - 40usize];
};
impl Default for amdf_memory_import_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Parameters used to export one logical memory range."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_export_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_MEMORY_EXPORT_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_memory_export_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Required external-memory representation."]
    pub external_memory_type: amdf_external_memory_type_t,
    #[doc = " Reserved for future use and always zero."]
    pub reserved: u32,
    #[doc = " Byte offset within the logical attachment."]
    pub byte_offset: u64,
    #[doc = " Nonzero logical byte length to export."]
    pub byte_length: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_export_info_t"]
        [::std::mem::size_of::<amdf_memory_export_info_t>() - 40usize];
    ["Alignment of amdf_memory_export_info_t"]
        [::std::mem::align_of::<amdf_memory_export_info_t>() - 8usize];
    ["Offset of field: amdf_memory_export_info_t::type_"]
        [::std::mem::offset_of!(amdf_memory_export_info_t, type_) - 0usize];
    ["Offset of field: amdf_memory_export_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_export_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_export_info_t::next"]
        [::std::mem::offset_of!(amdf_memory_export_info_t, next) - 8usize];
    ["Offset of field: amdf_memory_export_info_t::external_memory_type"]
        [::std::mem::offset_of!(amdf_memory_export_info_t, external_memory_type) - 16usize];
    ["Offset of field: amdf_memory_export_info_t::reserved"]
        [::std::mem::offset_of!(amdf_memory_export_info_t, reserved) - 20usize];
    ["Offset of field: amdf_memory_export_info_t::byte_offset"]
        [::std::mem::offset_of!(amdf_memory_export_info_t, byte_offset) - 24usize];
    ["Offset of field: amdf_memory_export_info_t::byte_length"]
        [::std::mem::offset_of!(amdf_memory_export_info_t, byte_length) - 32usize];
};
impl Default for amdf_memory_export_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Parameters used to map a range of host-visible memory."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_map_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_MEMORY_MAP_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_memory_map_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Byte offset within the logical attachment."]
    pub byte_offset: u64,
    #[doc = " Nonzero byte length of the mapped range."]
    pub byte_length: u64,
    #[doc = " Required host read and write access."]
    pub flags: amdf_memory_map_flags_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_map_info_t"][::std::mem::size_of::<amdf_memory_map_info_t>() - 40usize];
    ["Alignment of amdf_memory_map_info_t"]
        [::std::mem::align_of::<amdf_memory_map_info_t>() - 8usize];
    ["Offset of field: amdf_memory_map_info_t::type_"]
        [::std::mem::offset_of!(amdf_memory_map_info_t, type_) - 0usize];
    ["Offset of field: amdf_memory_map_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_map_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_map_info_t::next"]
        [::std::mem::offset_of!(amdf_memory_map_info_t, next) - 8usize];
    ["Offset of field: amdf_memory_map_info_t::byte_offset"]
        [::std::mem::offset_of!(amdf_memory_map_info_t, byte_offset) - 16usize];
    ["Offset of field: amdf_memory_map_info_t::byte_length"]
        [::std::mem::offset_of!(amdf_memory_map_info_t, byte_length) - 24usize];
    ["Offset of field: amdf_memory_map_info_t::flags"]
        [::std::mem::offset_of!(amdf_memory_map_info_t, flags) - 32usize];
};
impl Default for amdf_memory_map_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Direction of one explicit host cache ownership transition."]
pub type amdf_host_cache_operation_t = u32;
#[doc = " No host cache operation."]
pub const AMDF_HOST_CACHE_OPERATION_NONE: amdf_host_cache_operation_e = 0;
#[doc = " Releases prior host writes for subsequent device reads."]
pub const AMDF_HOST_CACHE_OPERATION_FLUSH: amdf_host_cache_operation_e = 1;
#[doc = " Acquires prior device writes for subsequent host reads."]
pub const AMDF_HOST_CACHE_OPERATION_INVALIDATE: amdf_host_cache_operation_e = 2;
pub type amdf_host_cache_operation_e = ::std::os::raw::c_uint;
#[doc = " Semantic cache operation encoded by an exact engine queue family."]
pub type amdf_cache_operation_t = u32;
#[doc = " No engine cache operation."]
pub const AMDF_CACHE_OPERATION_NONE: amdf_cache_operation_e = 0;
#[doc = " Releases prior engine writes to the system visibility domain."]
pub const AMDF_CACHE_OPERATION_RELEASE_TO_SYSTEM: amdf_cache_operation_e = 1;
#[doc = " Acquires prior system-visible writes for subsequent engine reads."]
pub const AMDF_CACHE_OPERATION_ACQUIRE_FROM_SYSTEM: amdf_cache_operation_e = 2;
pub type amdf_cache_operation_e = ::std::os::raw::c_uint;
#[doc = " Set of semantic engine cache operations."]
pub type amdf_cache_operations_t = u64;
#[doc = " System release operations are supported."]
pub const AMDF_CACHE_OPERATIONS_RELEASE_TO_SYSTEM: amdf_cache_operation_bits_e = 2;
#[doc = " System acquire operations are supported."]
pub const AMDF_CACHE_OPERATIONS_ACQUIRE_FROM_SYSTEM: amdf_cache_operation_bits_e = 4;
pub type amdf_cache_operation_bits_e = ::std::os::raw::c_uint;
#[doc = " Granularity of one directional cache transition."]
pub type amdf_cache_transition_kind_t = u32;
#[doc = " No qualified transition is available."]
pub const AMDF_CACHE_TRANSITION_KIND_UNKNOWN: amdf_cache_transition_kind_e = 0;
#[doc = " The local access requires no cache-maintenance operation."]
pub const AMDF_CACHE_TRANSITION_KIND_NONE: amdf_cache_transition_kind_e = 1;
#[doc = " The transition applies to an explicit byte range."]
pub const AMDF_CACHE_TRANSITION_KIND_RANGE: amdf_cache_transition_kind_e = 2;
#[doc = " The transition applies to the complete native cache domain."]
pub const AMDF_CACHE_TRANSITION_KIND_GLOBAL: amdf_cache_transition_kind_e = 3;
pub type amdf_cache_transition_kind_e = ::std::os::raw::c_uint;
#[doc = " Set of cache-transition granularities implemented by a queue family."]
pub type amdf_cache_transition_kinds_t = u32;
#[doc = " Range cache transitions are supported."]
pub const AMDF_CACHE_TRANSITION_KINDS_RANGE: amdf_cache_transition_kind_bits_e = 4;
#[doc = " Global cache transitions are supported."]
pub const AMDF_CACHE_TRANSITION_KINDS_GLOBAL: amdf_cache_transition_kind_bits_e = 8;
pub type amdf_cache_transition_kind_bits_e = ::std::os::raw::c_uint;
#[doc = " Execution site responsible for one cache transition."]
pub type amdf_cache_transition_executor_t = u32;
#[doc = " No executor is available or required."]
pub const AMDF_CACHE_TRANSITION_EXECUTOR_NONE: amdf_cache_transition_executor_e = 0;
#[doc = " The transition is encoded for an exact queue family."]
pub const AMDF_CACHE_TRANSITION_EXECUTOR_QUEUE: amdf_cache_transition_executor_e = 1;
#[doc = " The transition is encoded in an engine program."]
pub const AMDF_CACHE_TRANSITION_EXECUTOR_PROGRAM: amdf_cache_transition_executor_e = 2;
#[doc = " The host executes the reported instruction and fence directly."]
pub const AMDF_CACHE_TRANSITION_EXECUTOR_HOST_DIRECT: amdf_cache_transition_executor_e = 3;
#[doc = " A provider host API performs the complete transition."]
pub const AMDF_CACHE_TRANSITION_EXECUTOR_HOST_API: amdf_cache_transition_executor_e = 4;
pub type amdf_cache_transition_executor_e = ::std::os::raw::c_uint;
#[doc = " Public host instruction used by a direct cache transition."]
pub type amdf_host_cache_instruction_t = u32;
#[doc = " No host cache instruction."]
pub const AMDF_HOST_CACHE_INSTRUCTION_NONE: amdf_host_cache_instruction_e = 0;
#[doc = " The x86 CLFLUSH instruction."]
pub const AMDF_HOST_CACHE_INSTRUCTION_X86_CLFLUSH: amdf_host_cache_instruction_e = 1;
#[doc = " The x86 CLFLUSHOPT instruction."]
pub const AMDF_HOST_CACHE_INSTRUCTION_X86_CLFLUSHOPT: amdf_host_cache_instruction_e = 2;
#[doc = " The x86 CLWB instruction."]
pub const AMDF_HOST_CACHE_INSTRUCTION_X86_CLWB: amdf_host_cache_instruction_e = 3;
pub type amdf_host_cache_instruction_e = ::std::os::raw::c_uint;
#[doc = " Public host fence completing a direct cache transition."]
pub type amdf_host_cache_fence_t = u32;
#[doc = " No host fence."]
pub const AMDF_HOST_CACHE_FENCE_NONE: amdf_host_cache_fence_e = 0;
#[doc = " The x86 SFENCE instruction."]
pub const AMDF_HOST_CACHE_FENCE_X86_SFENCE: amdf_host_cache_fence_e = 1;
#[doc = " The x86 MFENCE instruction."]
pub const AMDF_HOST_CACHE_FENCE_X86_MFENCE: amdf_host_cache_fence_e = 2;
pub type amdf_host_cache_fence_e = ::std::os::raw::c_uint;
#[doc = " Exact operation required for one directional visibility transition."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_cache_transition_t {
    #[doc = " Qualified no-op, ranged, global, or unavailable transition kind."]
    pub kind: amdf_cache_transition_kind_t,
    #[doc = " Queue, program, direct-host, host-API, or no-op executor."]
    pub executor: amdf_cache_transition_executor_t,
    #[doc = " Semantic queue operation, or `AMDF_CACHE_OPERATION_NONE`."]
    pub operation: amdf_cache_operation_t,
    #[doc = " Host flush or invalidate operation for a host executor."]
    pub host_operation: amdf_host_cache_operation_t,
    #[doc = " Direct host instruction, or `AMDF_HOST_CACHE_INSTRUCTION_NONE`."]
    pub host_instruction: amdf_host_cache_instruction_t,
    #[doc = " Host fence required before the first direct instruction."]
    pub host_fence_before: amdf_host_cache_fence_t,
    #[doc = " Host fence required after the final direct instruction."]
    pub host_fence_after: amdf_host_cache_fence_t,
    #[doc = " Smallest independently transitionable range, or zero when not ranged.\n Host operations cover absolute cache-line boundaries, not logical buffer\n offsets. Unaligned ranges can affect neighboring bytes; the caller must\n own those boundary lines for the duration of the transition."]
    pub range_granularity: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_cache_transition_t"][::std::mem::size_of::<amdf_cache_transition_t>() - 40usize];
    ["Alignment of amdf_cache_transition_t"]
        [::std::mem::align_of::<amdf_cache_transition_t>() - 8usize];
    ["Offset of field: amdf_cache_transition_t::kind"]
        [::std::mem::offset_of!(amdf_cache_transition_t, kind) - 0usize];
    ["Offset of field: amdf_cache_transition_t::executor"]
        [::std::mem::offset_of!(amdf_cache_transition_t, executor) - 4usize];
    ["Offset of field: amdf_cache_transition_t::operation"]
        [::std::mem::offset_of!(amdf_cache_transition_t, operation) - 8usize];
    ["Offset of field: amdf_cache_transition_t::host_operation"]
        [::std::mem::offset_of!(amdf_cache_transition_t, host_operation) - 12usize];
    ["Offset of field: amdf_cache_transition_t::host_instruction"]
        [::std::mem::offset_of!(amdf_cache_transition_t, host_instruction) - 16usize];
    ["Offset of field: amdf_cache_transition_t::host_fence_before"]
        [::std::mem::offset_of!(amdf_cache_transition_t, host_fence_before) - 20usize];
    ["Offset of field: amdf_cache_transition_t::host_fence_after"]
        [::std::mem::offset_of!(amdf_cache_transition_t, host_fence_after) - 24usize];
    ["Offset of field: amdf_cache_transition_t::range_granularity"]
        [::std::mem::offset_of!(amdf_cache_transition_t, range_granularity) - 32usize];
};
#[doc = " Immutable properties of one live host mapping."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_host_mapping_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_HOST_MAPPING_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_host_mapping_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Achieved host read and write access."]
    pub flags: amdf_memory_map_flags_t,
    #[doc = " Host cache behavior of the mapped pages."]
    pub cacheability: amdf_host_cacheability_t,
    #[doc = " First mapped byte borrowed until `host_mapping_destroy` is called."]
    pub pointer: *mut ::std::os::raw::c_void,
    #[doc = " Byte offset of `pointer` within the logical memory attachment."]
    pub memory_byte_offset: u64,
    #[doc = " Mapped byte length."]
    pub byte_length: u64,
    #[doc = " Native byte-offset granularity of mapping requests."]
    pub byte_offset_granularity: u64,
    #[doc = " Native byte-length granularity of mapping requests."]
    pub byte_length_granularity: u64,
    #[doc = " Host cache-line length in bytes, or zero when not applicable."]
    pub cache_line_size: u32,
    #[doc = " Reserved for future use and always zero."]
    pub reserved: u32,
    #[doc = " Available host flush operation, independent of any consumer's coherence.\n UNKNOWN means unsupported; NONE means no cache operation is necessary."]
    pub flush: amdf_cache_transition_t,
    #[doc = " Available host invalidate operation, independent of consumer coherence.\n UNKNOWN means unsupported; NONE means no cache operation is necessary."]
    pub invalidate: amdf_cache_transition_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_host_mapping_info_t"]
        [::std::mem::size_of::<amdf_host_mapping_info_t>() - 152usize];
    ["Alignment of amdf_host_mapping_info_t"]
        [::std::mem::align_of::<amdf_host_mapping_info_t>() - 8usize];
    ["Offset of field: amdf_host_mapping_info_t::type_"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, type_) - 0usize];
    ["Offset of field: amdf_host_mapping_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_host_mapping_info_t::next"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, next) - 8usize];
    ["Offset of field: amdf_host_mapping_info_t::flags"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, flags) - 16usize];
    ["Offset of field: amdf_host_mapping_info_t::cacheability"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, cacheability) - 20usize];
    ["Offset of field: amdf_host_mapping_info_t::pointer"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, pointer) - 24usize];
    ["Offset of field: amdf_host_mapping_info_t::memory_byte_offset"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, memory_byte_offset) - 32usize];
    ["Offset of field: amdf_host_mapping_info_t::byte_length"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, byte_length) - 40usize];
    ["Offset of field: amdf_host_mapping_info_t::byte_offset_granularity"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, byte_offset_granularity) - 48usize];
    ["Offset of field: amdf_host_mapping_info_t::byte_length_granularity"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, byte_length_granularity) - 56usize];
    ["Offset of field: amdf_host_mapping_info_t::cache_line_size"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, cache_line_size) - 64usize];
    ["Offset of field: amdf_host_mapping_info_t::reserved"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, reserved) - 68usize];
    ["Offset of field: amdf_host_mapping_info_t::flush"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, flush) - 72usize];
    ["Offset of field: amdf_host_mapping_info_t::invalidate"]
        [::std::mem::offset_of!(amdf_host_mapping_info_t, invalidate) - 112usize];
};
impl Default for amdf_host_mapping_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Kind of concrete access participating in a directional pair query."]
pub type amdf_memory_site_kind_t = u32;
#[doc = " An initialized device access and its exact queue family."]
pub const AMDF_MEMORY_SITE_KIND_DEVICE: amdf_memory_site_kind_e = 0;
#[doc = " A live host mapping, including its range and CPU cache behavior."]
pub const AMDF_MEMORY_SITE_KIND_HOST: amdf_memory_site_kind_e = 1;
pub type amdf_memory_site_kind_e = ::std::os::raw::c_uint;
#[doc = " One concrete device access or host mapping in a pair query."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct amdf_memory_site_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_MEMORY_SITE`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_memory_site_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Selects the active member of `value`."]
    pub kind: amdf_memory_site_kind_t,
    #[doc = " Reserved for future use and must be zero."]
    pub reserved: u32,
    pub value: amdf_memory_site_t__bindgen_ty_1,
}
#[doc = " Borrowed access selected by `kind`; its owner must outlive the query."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union amdf_memory_site_t__bindgen_ty_1 {
    pub device: amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1,
    #[doc = " Host mapping supplying memory identity, range and cache behavior."]
    pub host_mapping: *mut amdf_host_mapping_t,
}
#[doc = " Exact initialized device access and execution family."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1 {
    #[doc = " Memory containing the immutable device access."]
    pub memory: *mut amdf_memory_t,
    #[doc = " Resource-local access ordinal identifying the consuming device."]
    pub access_ordinal: u32,
    #[doc = " Exact queue family used for access and cache transitions."]
    pub queue_family_ordinal: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1"]
        [::std::mem::size_of::<amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1>() - 16usize];
    ["Alignment of amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1"]
        [::std::mem::align_of::<amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1>() - 8usize];
    ["Offset of field: amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1::memory"]
        [::std::mem::offset_of!(amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1, memory) - 0usize];
    ["Offset of field: amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1::access_ordinal"][::std::mem::offset_of!(
        amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1,
        access_ordinal
    ) - 8usize];
    ["Offset of field: amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1::queue_family_ordinal"][::std::mem::offset_of!(
        amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1,
        queue_family_ordinal
    )
        - 12usize];
};
impl Default for amdf_memory_site_t__bindgen_ty_1__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_site_t__bindgen_ty_1"]
        [::std::mem::size_of::<amdf_memory_site_t__bindgen_ty_1>() - 16usize];
    ["Alignment of amdf_memory_site_t__bindgen_ty_1"]
        [::std::mem::align_of::<amdf_memory_site_t__bindgen_ty_1>() - 8usize];
    ["Offset of field: amdf_memory_site_t__bindgen_ty_1::device"]
        [::std::mem::offset_of!(amdf_memory_site_t__bindgen_ty_1, device) - 0usize];
    ["Offset of field: amdf_memory_site_t__bindgen_ty_1::host_mapping"]
        [::std::mem::offset_of!(amdf_memory_site_t__bindgen_ty_1, host_mapping) - 0usize];
};
impl Default for amdf_memory_site_t__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_site_t"][::std::mem::size_of::<amdf_memory_site_t>() - 40usize];
    ["Alignment of amdf_memory_site_t"][::std::mem::align_of::<amdf_memory_site_t>() - 8usize];
    ["Offset of field: amdf_memory_site_t::type_"]
        [::std::mem::offset_of!(amdf_memory_site_t, type_) - 0usize];
    ["Offset of field: amdf_memory_site_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_site_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_site_t::next"]
        [::std::mem::offset_of!(amdf_memory_site_t, next) - 8usize];
    ["Offset of field: amdf_memory_site_t::kind"]
        [::std::mem::offset_of!(amdf_memory_site_t, kind) - 16usize];
    ["Offset of field: amdf_memory_site_t::reserved"]
        [::std::mem::offset_of!(amdf_memory_site_t, reserved) - 20usize];
    ["Offset of field: amdf_memory_site_t::value"]
        [::std::mem::offset_of!(amdf_memory_site_t, value) - 24usize];
};
impl Default for amdf_memory_site_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " One prospective access within a scope/profile construction contract.\n DEVICE names an exact queue family; it does not qualify shader/program-side\n cache operations. HOST names a view created through memory_map on that\n backing."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct amdf_memory_profile_site_t {
    #[doc = " Selects the active member of value."]
    pub kind: amdf_memory_site_kind_t,
    #[doc = " Reserved for compatible growth; must be zero."]
    pub reserved: u32,
    pub value: amdf_memory_profile_site_t__bindgen_ty_1,
}
#[doc = " Local execution site or intended host-view permissions."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union amdf_memory_profile_site_t__bindgen_ty_1 {
    pub device: amdf_memory_profile_site_t__bindgen_ty_1__bindgen_ty_1,
    #[doc = " Required host read and write permissions."]
    pub host_access: amdf_memory_map_flags_t,
}
#[doc = " Device access in the query's caller-ordered live consumer array."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_memory_profile_site_t__bindgen_ty_1__bindgen_ty_1 {
    #[doc = " Index into the query's accesses array."]
    pub access_ordinal: u32,
    #[doc = " Exact queue family of that device's endpoint."]
    pub queue_family_ordinal: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_profile_site_t__bindgen_ty_1__bindgen_ty_1"]
        [::std::mem::size_of::<amdf_memory_profile_site_t__bindgen_ty_1__bindgen_ty_1>() - 8usize];
    ["Alignment of amdf_memory_profile_site_t__bindgen_ty_1__bindgen_ty_1"]
        [::std::mem::align_of::<amdf_memory_profile_site_t__bindgen_ty_1__bindgen_ty_1>() - 4usize];
    ["Offset of field: amdf_memory_profile_site_t__bindgen_ty_1__bindgen_ty_1::access_ordinal"][::std::mem::offset_of!(
        amdf_memory_profile_site_t__bindgen_ty_1__bindgen_ty_1,
        access_ordinal
    )
        - 0usize];
    [
        "Offset of field: amdf_memory_profile_site_t__bindgen_ty_1__bindgen_ty_1::queue_family_ordinal",
    ][::std::mem::offset_of!(
        amdf_memory_profile_site_t__bindgen_ty_1__bindgen_ty_1,
        queue_family_ordinal
    ) - 4usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_profile_site_t__bindgen_ty_1"]
        [::std::mem::size_of::<amdf_memory_profile_site_t__bindgen_ty_1>() - 8usize];
    ["Alignment of amdf_memory_profile_site_t__bindgen_ty_1"]
        [::std::mem::align_of::<amdf_memory_profile_site_t__bindgen_ty_1>() - 4usize];
    ["Offset of field: amdf_memory_profile_site_t__bindgen_ty_1::device"]
        [::std::mem::offset_of!(amdf_memory_profile_site_t__bindgen_ty_1, device) - 0usize];
    ["Offset of field: amdf_memory_profile_site_t__bindgen_ty_1::host_access"]
        [::std::mem::offset_of!(amdf_memory_profile_site_t__bindgen_ty_1, host_access) - 0usize];
};
impl Default for amdf_memory_profile_site_t__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_profile_site_t"]
        [::std::mem::size_of::<amdf_memory_profile_site_t>() - 16usize];
    ["Alignment of amdf_memory_profile_site_t"]
        [::std::mem::align_of::<amdf_memory_profile_site_t>() - 4usize];
    ["Offset of field: amdf_memory_profile_site_t::kind"]
        [::std::mem::offset_of!(amdf_memory_profile_site_t, kind) - 0usize];
    ["Offset of field: amdf_memory_profile_site_t::reserved"]
        [::std::mem::offset_of!(amdf_memory_profile_site_t, reserved) - 4usize];
    ["Offset of field: amdf_memory_profile_site_t::value"]
        [::std::mem::offset_of!(amdf_memory_profile_site_t, value) - 8usize];
};
impl Default for amdf_memory_profile_site_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Construction facts and exact sites for a pre-allocation visibility query.\n This borrows its inputs only for the call and creates no retained plan\n owner."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct amdf_memory_profile_pair_query_t {
    #[doc = " Must be AMDF_STRUCTURE_TYPE_MEMORY_PROFILE_PAIR_QUERY."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least sizeof(amdf_memory_profile_pair_query_t)."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Scope-local profile ordinal, as used by memory_create or memory_import."]
    pub memory_profile_ordinal: u32,
    #[doc = " Complete number of live consumers; zero selects CPU-only system memory."]
    pub access_count: u32,
    #[doc = " Required backing properties, identical to the construction request."]
    pub required_flags: amdf_memory_flags_t,
    #[doc = " Caller-ordered live consumers, as used by construction; NULL at zero\n count."]
    pub accesses: *const amdf_memory_device_access_t,
    #[doc = " Source mapping cache class for REGISTER; UNKNOWN for other operations."]
    pub registered_host_cacheability: amdf_host_cacheability_t,
    #[doc = " Reserved for compatible growth; must be zero."]
    pub reserved: u32,
    #[doc = " Exact import transport, or zero for CREATE and REGISTER profiles."]
    pub external_memory_type: amdf_external_memory_type_t,
    #[doc = " Reserved for compatible growth; must be zero."]
    pub external_memory_reserved: u32,
    #[doc = " Import protocol identity; all zero for portable transports and\n non-imports."]
    pub external_memory_provenance: amdf_external_memory_provenance_t,
    #[doc = " Site performing writes before the caller's ordering edge."]
    pub producer: amdf_memory_profile_site_t,
    #[doc = " Site performing reads after the caller's ordering edge."]
    pub consumer: amdf_memory_profile_site_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_profile_pair_query_t"]
        [::std::mem::size_of::<amdf_memory_profile_pair_query_t>() - 104usize];
    ["Alignment of amdf_memory_profile_pair_query_t"]
        [::std::mem::align_of::<amdf_memory_profile_pair_query_t>() - 8usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::type_"]
        [::std::mem::offset_of!(amdf_memory_profile_pair_query_t, type_) - 0usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_profile_pair_query_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::next"]
        [::std::mem::offset_of!(amdf_memory_profile_pair_query_t, next) - 8usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::memory_profile_ordinal"][::std::mem::offset_of!(
        amdf_memory_profile_pair_query_t,
        memory_profile_ordinal
    ) - 16usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::access_count"]
        [::std::mem::offset_of!(amdf_memory_profile_pair_query_t, access_count) - 20usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::required_flags"]
        [::std::mem::offset_of!(amdf_memory_profile_pair_query_t, required_flags) - 24usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::accesses"]
        [::std::mem::offset_of!(amdf_memory_profile_pair_query_t, accesses) - 32usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::registered_host_cacheability"][::std::mem::offset_of!(
        amdf_memory_profile_pair_query_t,
        registered_host_cacheability
    )
        - 40usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::reserved"]
        [::std::mem::offset_of!(amdf_memory_profile_pair_query_t, reserved) - 44usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::external_memory_type"]
        [::std::mem::offset_of!(amdf_memory_profile_pair_query_t, external_memory_type) - 48usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::external_memory_reserved"][::std::mem::offset_of!(
        amdf_memory_profile_pair_query_t,
        external_memory_reserved
    ) - 52usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::external_memory_provenance"][::std::mem::offset_of!(
        amdf_memory_profile_pair_query_t,
        external_memory_provenance
    ) - 56usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::producer"]
        [::std::mem::offset_of!(amdf_memory_profile_pair_query_t, producer) - 72usize];
    ["Offset of field: amdf_memory_profile_pair_query_t::consumer"]
        [::std::mem::offset_of!(amdf_memory_profile_pair_query_t, consumer) - 88usize];
};
impl Default for amdf_memory_profile_pair_query_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Directional capabilities of one concrete shared-backing memory pair."]
pub type amdf_memory_pair_flags_t = u64;
#[doc = " The consumer execution site can directly reach the shared backing."]
pub const AMDF_MEMORY_PAIR_FLAG_SHARED_BACKING_REACHABLE: amdf_memory_pair_flag_bits_e = 1;
#[doc = " The producer attachment can source consumer virtual-memory mappings."]
pub const AMDF_MEMORY_PAIR_FLAG_MAPPING_SOURCE: amdf_memory_pair_flag_bits_e = 2;
#[doc = " `estimated_fixed_cost_nanoseconds` is a qualified value, including zero."]
pub const AMDF_MEMORY_PAIR_FLAG_FIXED_COST_KNOWN: amdf_memory_pair_flag_bits_e = 4;
pub type amdf_memory_pair_flag_bits_e = ::std::os::raw::c_uint;
#[doc = " Exact directional relation from one producer attachment to one consumer."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_memory_pair_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_MEMORY_PAIR_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_memory_pair_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Direct reach and mapping-source capabilities."]
    pub flags: amdf_memory_pair_flags_t,
    #[doc = " Visibility operation performed after producer writes."]
    pub release: amdf_cache_transition_t,
    #[doc = " Visibility operation performed before consumer reads."]
    pub acquire: amdf_cache_transition_t,
    #[doc = " Width-specific mutually atomic reach shared by both execution sites. This\n does not imply operation support; callers also intersect both the queue\n family and target-memory operation masks."]
    pub atomic_reach: amdf_atomic_reach_t,
    #[doc = " Informational fixed transition cost in nanoseconds. The value is valid\n only when `AMDF_MEMORY_PAIR_FLAG_FIXED_COST_KNOWN` is set."]
    pub estimated_fixed_cost_nanoseconds: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_memory_pair_info_t"]
        [::std::mem::size_of::<amdf_memory_pair_info_t>() - 120usize];
    ["Alignment of amdf_memory_pair_info_t"]
        [::std::mem::align_of::<amdf_memory_pair_info_t>() - 8usize];
    ["Offset of field: amdf_memory_pair_info_t::type_"]
        [::std::mem::offset_of!(amdf_memory_pair_info_t, type_) - 0usize];
    ["Offset of field: amdf_memory_pair_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_memory_pair_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_memory_pair_info_t::next"]
        [::std::mem::offset_of!(amdf_memory_pair_info_t, next) - 8usize];
    ["Offset of field: amdf_memory_pair_info_t::flags"]
        [::std::mem::offset_of!(amdf_memory_pair_info_t, flags) - 16usize];
    ["Offset of field: amdf_memory_pair_info_t::release"]
        [::std::mem::offset_of!(amdf_memory_pair_info_t, release) - 24usize];
    ["Offset of field: amdf_memory_pair_info_t::acquire"]
        [::std::mem::offset_of!(amdf_memory_pair_info_t, acquire) - 64usize];
    ["Offset of field: amdf_memory_pair_info_t::atomic_reach"]
        [::std::mem::offset_of!(amdf_memory_pair_info_t, atomic_reach) - 104usize];
    ["Offset of field: amdf_memory_pair_info_t::estimated_fixed_cost_nanoseconds"][::std::mem::offset_of!(
        amdf_memory_pair_info_t,
        estimated_fixed_cost_nanoseconds
    ) - 112usize];
};
impl Default for amdf_memory_pair_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Native wake destination supplied by the caller."]
pub type amdf_native_event_type_t = u32;
#[doc = " No destination; not accepted by notification requests."]
pub const AMDF_NATIVE_EVENT_TYPE_NONE: amdf_native_event_type_e = 0;
#[doc = " Linux eventfd opened with EFD_NONBLOCK. A notification adds a counter\n credit; the caller drains readiness through its native event loop."]
pub const AMDF_NATIVE_EVENT_TYPE_EVENTFD: amdf_native_event_type_e = 1;
#[doc = " Windows event HANDLE with EVENT_MODIFY_STATE access. The caller chooses\n auto-reset or manual-reset semantics and owns wait/reset handling."]
pub const AMDF_NATIVE_EVENT_TYPE_WIN32_EVENT: amdf_native_event_type_e = 2;
pub type amdf_native_event_type_e = ::std::os::raw::c_uint;
#[doc = " Native event representations supported by an activated resource."]
pub type amdf_native_event_types_t = u64;
#[doc = " Supports a nonblocking Linux eventfd."]
pub const AMDF_NATIVE_EVENT_TYPE_BIT_EVENTFD: amdf_native_event_type_bits_e = 2;
#[doc = " Supports a Windows event HANDLE."]
pub const AMDF_NATIVE_EVENT_TYPE_BIT_WIN32_EVENT: amdf_native_event_type_bits_e = 4;
pub type amdf_native_event_type_bits_e = ::std::os::raw::c_uint;
#[doc = " Borrowed native payload; no library-owned event is constructed or retained."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union amdf_native_event_payload_t {
    #[doc = " Nonnegative eventfd descriptor representable by a native int."]
    pub file_descriptor: i64,
    #[doc = " Non-null Windows event HANDLE, not a fence or an IOCP handle."]
    pub native_handle: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_native_event_payload_t"]
        [::std::mem::size_of::<amdf_native_event_payload_t>() - 8usize];
    ["Alignment of amdf_native_event_payload_t"]
        [::std::mem::align_of::<amdf_native_event_payload_t>() - 8usize];
    ["Offset of field: amdf_native_event_payload_t::file_descriptor"]
        [::std::mem::offset_of!(amdf_native_event_payload_t, file_descriptor) - 0usize];
    ["Offset of field: amdf_native_event_payload_t::native_handle"]
        [::std::mem::offset_of!(amdf_native_event_payload_t, native_handle) - 0usize];
};
impl Default for amdf_native_event_payload_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Caller-owned wake destination, independent of completion storage.\n\n The payload must name a live object of the declared native type. Copying\n this value does not duplicate ownership. A requesting call borrows the\n descriptor only for the call, but the caller keeps the native event live\n until the outstanding native notifications have been consumed. Native\n registration may retain an OS reference; libamdf retains neither this\n descriptor nor a subscription object. Event-loop callback cancellation\n does not cancel those native requests or accepted device work."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct amdf_native_event_t {
    #[doc = " Native representation of the borrowed payload."]
    pub type_: amdf_native_event_type_t,
    #[doc = " Reserved for future use and must be zero."]
    pub reserved: u32,
    #[doc = " Caller-owned native wake destination."]
    pub payload: amdf_native_event_payload_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_native_event_t"][::std::mem::size_of::<amdf_native_event_t>() - 16usize];
    ["Alignment of amdf_native_event_t"][::std::mem::align_of::<amdf_native_event_t>() - 8usize];
    ["Offset of field: amdf_native_event_t::type_"]
        [::std::mem::offset_of!(amdf_native_event_t, type_) - 0usize];
    ["Offset of field: amdf_native_event_t::reserved"]
        [::std::mem::offset_of!(amdf_native_event_t, reserved) - 4usize];
    ["Offset of field: amdf_native_event_t::payload"]
        [::std::mem::offset_of!(amdf_native_event_t, payload) - 8usize];
};
impl Default for amdf_native_event_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Native command representation accepted by a queue family."]
pub type amdf_queue_command_type_t = u32;
#[doc = " No command representation. Advertised families never use this value."]
pub const AMDF_QUEUE_COMMAND_TYPE_UNKNOWN: amdf_queue_command_type_e = 0;
#[doc = " Native AMD GPU PM4 command streams."]
pub const AMDF_QUEUE_COMMAND_TYPE_GPU_PM4: amdf_queue_command_type_e = 1;
#[doc = " Native AMD GPU SDMA command streams."]
pub const AMDF_QUEUE_COMMAND_TYPE_GPU_SDMA: amdf_queue_command_type_e = 2;
#[doc = " Native AMD GPU AQL packets reaching hardware without CPU translation."]
pub const AMDF_QUEUE_COMMAND_TYPE_GPU_AQL: amdf_queue_command_type_e = 3;
#[doc = " Native AMD XDNA execution commands."]
pub const AMDF_QUEUE_COMMAND_TYPE_XDNA: amdf_queue_command_type_e = 4;
#[doc = " Gfx1250 AQL metadata dispatch and barrier packets."]
pub const AMDF_QUEUE_COMMAND_TYPE_GPU_AQL_METADATA: amdf_queue_command_type_e = 5;
pub type amdf_queue_command_type_e = ::std::os::raw::c_uint;
#[doc = " Encoding features within a command format and version.\n\n Bit meanings belong to the command type and are documented by its extension.\n These describe native packet layouts, not additional publication services.\n A zero value reports the baseline encoding; it never means unqueried state."]
pub type amdf_queue_format_features_t = u64;
#[doc = " Queue publication mechanisms implemented by a provider."]
pub type amdf_queue_publication_modes_t = u32;
#[doc = " Commands are published directly through caller-mapped queue state."]
pub const AMDF_QUEUE_PUBLICATION_MODE_USER: amdf_queue_publication_mode_bits_e = 1;
#[doc = " Commands are accepted through a bounded provider call."]
pub const AMDF_QUEUE_PUBLICATION_MODE_KERNEL: amdf_queue_publication_mode_bits_e = 2;
pub type amdf_queue_publication_mode_bits_e = ::std::os::raw::c_uint;
#[doc = " Semantic operations accepted by one queue family."]
pub type amdf_queue_roles_t = u64;
#[doc = " Executes compute dispatches."]
pub const AMDF_QUEUE_ROLE_COMPUTE: amdf_queue_role_bits_e = 1;
#[doc = " Executes memory transfer operations."]
pub const AMDF_QUEUE_ROLE_TRANSFER: amdf_queue_role_bits_e = 2;
#[doc = " Executes device atomic operations."]
pub const AMDF_QUEUE_ROLE_ATOMIC: amdf_queue_role_bits_e = 4;
#[doc = " Executes engine cache ownership transitions."]
pub const AMDF_QUEUE_ROLE_CACHE_CONTROL: amdf_queue_role_bits_e = 8;
#[doc = " Executes virtual-address mapping operations."]
pub const AMDF_QUEUE_ROLE_VIRTUAL_MEMORY: amdf_queue_role_bits_e = 16;
pub type amdf_queue_role_bits_e = ::std::os::raw::c_uint;
#[doc = " Reservation protocol used by a directly published queue."]
pub type amdf_queue_producer_mode_t = u32;
#[doc = " Exactly one producer reserves and publishes commands."]
pub const AMDF_QUEUE_PRODUCER_MODE_SINGLE: amdf_queue_producer_mode_e = 1;
#[doc = " Multiple producers atomically reserve and independently publish commands."]
pub const AMDF_QUEUE_PRODUCER_MODE_MULTI: amdf_queue_producer_mode_e = 2;
pub type amdf_queue_producer_mode_e = ::std::os::raw::c_uint;
#[doc = " Supported directly published queue producer modes."]
pub type amdf_queue_producer_modes_t = u32;
#[doc = " Single-producer reservation is supported."]
pub const AMDF_QUEUE_PRODUCER_MODE_BIT_SINGLE: amdf_queue_producer_mode_bits_e = 2;
#[doc = " Multi-producer reservation is supported."]
pub const AMDF_QUEUE_PRODUCER_MODE_BIT_MULTI: amdf_queue_producer_mode_bits_e = 4;
pub type amdf_queue_producer_mode_bits_e = ::std::os::raw::c_uint;
#[doc = " Scheduling priority requested at queue creation."]
pub type amdf_queue_priority_t = u32;
#[doc = " Lower than normal scheduling priority."]
pub const AMDF_QUEUE_PRIORITY_LOW: amdf_queue_priority_e = 1;
#[doc = " Normal scheduling priority."]
pub const AMDF_QUEUE_PRIORITY_NORMAL: amdf_queue_priority_e = 2;
#[doc = " Higher than normal scheduling priority."]
pub const AMDF_QUEUE_PRIORITY_HIGH: amdf_queue_priority_e = 3;
pub type amdf_queue_priority_e = ::std::os::raw::c_uint;
#[doc = " Supported scheduling priorities."]
pub type amdf_queue_priority_capabilities_t = u32;
#[doc = " Low scheduling priority is supported."]
pub const AMDF_QUEUE_PRIORITY_CAPABILITY_LOW: amdf_queue_priority_capability_bits_e = 2;
#[doc = " Normal scheduling priority is supported."]
pub const AMDF_QUEUE_PRIORITY_CAPABILITY_NORMAL: amdf_queue_priority_capability_bits_e = 4;
#[doc = " High scheduling priority is supported."]
pub const AMDF_QUEUE_PRIORITY_CAPABILITY_HIGH: amdf_queue_priority_capability_bits_e = 8;
pub type amdf_queue_priority_capability_bits_e = ::std::os::raw::c_uint;
#[doc = " Direct producer operations implemented by one user queue."]
pub type amdf_user_queue_capabilities_t = u64;
#[doc = " The queue can be mapped into the host process."]
pub const AMDF_USER_QUEUE_CAPABILITY_HOST_PRODUCER: amdf_user_queue_capability_bits_e = 1;
#[doc = " The queue can be mapped into a device producer."]
pub const AMDF_USER_QUEUE_CAPABILITY_DEVICE_PRODUCER: amdf_user_queue_capability_bits_e = 2;
pub type amdf_user_queue_capability_bits_e = ::std::os::raw::c_uint;
#[doc = " Optional kernel-mediated queue operations."]
pub type amdf_kernel_queue_capabilities_t = u64;
#[doc = " One call can submit several native batches atomically."]
pub const AMDF_KERNEL_QUEUE_CAPABILITY_VECTOR_SUBMIT: amdf_kernel_queue_capability_bits_e = 1;
#[doc = " The queue can apply virtual-address mapping operations."]
pub const AMDF_KERNEL_QUEUE_CAPABILITY_VIRTUAL_MEMORY: amdf_kernel_queue_capability_bits_e = 2;
#[doc = " Native external wait and signal primitives can be attached."]
pub const AMDF_KERNEL_QUEUE_CAPABILITY_EXTERNAL_SYNCHRONIZATION:
    amdf_kernel_queue_capability_bits_e = 4;
pub type amdf_kernel_queue_capability_bits_e = ::std::os::raw::c_uint;
#[doc = " Format identity of an optional queue metadata sidecar."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_queue_metadata_format_t {
    #[doc = " Sidecar command representation, or UNKNOWN when absent."]
    pub command_type: amdf_queue_command_type_t,
    #[doc = " Version defining metadata dispatch packets."]
    pub dispatch_version: u32,
    #[doc = " Version defining metadata barrier packets."]
    pub barrier_version: u32,
    #[doc = " Reserved for compatible growth and always zero."]
    pub reserved: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_queue_metadata_format_t"]
        [::std::mem::size_of::<amdf_queue_metadata_format_t>() - 16usize];
    ["Alignment of amdf_queue_metadata_format_t"]
        [::std::mem::align_of::<amdf_queue_metadata_format_t>() - 4usize];
    ["Offset of field: amdf_queue_metadata_format_t::command_type"]
        [::std::mem::offset_of!(amdf_queue_metadata_format_t, command_type) - 0usize];
    ["Offset of field: amdf_queue_metadata_format_t::dispatch_version"]
        [::std::mem::offset_of!(amdf_queue_metadata_format_t, dispatch_version) - 4usize];
    ["Offset of field: amdf_queue_metadata_format_t::barrier_version"]
        [::std::mem::offset_of!(amdf_queue_metadata_format_t, barrier_version) - 8usize];
    ["Offset of field: amdf_queue_metadata_format_t::reserved"]
        [::std::mem::offset_of!(amdf_queue_metadata_format_t, reserved) - 12usize];
};
#[doc = " Immutable properties of one endpoint-local native queue family.\n\n A family identifies a command representation and every mechanism its later\n constructors can actually create. Command types, versions, and encoding\n features define command encoding, index units, atomic access, ring wrap,\n and direct publication ordering. User- and kernel-specific fields are zero\n when their corresponding publication mode is absent."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_queue_family_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_QUEUE_FAMILY_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_queue_family_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are defined in ABI v1."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Dense ordinal accepted by later queue creation operations."]
    pub ordinal: u32,
    #[doc = " Native command representation accepted by queues in this family."]
    pub command_type: amdf_queue_command_type_t,
    #[doc = " User- and kernel-mode publication paths implemented by the provider."]
    pub publication_modes: amdf_queue_publication_modes_t,
    #[doc = " Version defining commands and their queue publication protocol."]
    pub format_version: u32,
    #[doc = " Native encoding features defined by the command type and version."]
    pub format_features: amdf_queue_format_features_t,
    #[doc = " Semantic operations accepted by queues in this family."]
    pub roles: amdf_queue_roles_t,
    #[doc = " Semantic cache operations encoded by this command representation."]
    pub cache_operations: amdf_cache_operations_t,
    #[doc = " Range and global forms available for the reported cache operations."]
    pub cache_transition_kinds: amdf_cache_transition_kinds_t,
    #[doc = " Reserved for compatible growth and always zero."]
    pub reserved: u32,
    #[doc = " Atomic operations encoded by this command representation."]
    pub atomic_capabilities: amdf_atomic_capabilities_t,
    #[doc = " Direct producer operations supported by user queues."]
    pub user_queue_capabilities: amdf_user_queue_capabilities_t,
    #[doc = " Optional operations supported by kernel-mediated queues."]
    pub kernel_queue_capabilities: amdf_kernel_queue_capabilities_t,
    #[doc = " Supported direct-publication producer modes."]
    pub producer_modes: amdf_queue_producer_modes_t,
    #[doc = " Supported scheduling priorities."]
    pub priority_capabilities: amdf_queue_priority_capabilities_t,
    #[doc = " Optional sidecar metadata format."]
    pub metadata: amdf_queue_metadata_format_t,
    #[doc = " Minimum supported power-of-two primary user ring length in bytes."]
    pub minimum_ring_byte_length: u64,
    #[doc = " Maximum supported power-of-two primary user ring length in bytes."]
    pub maximum_ring_byte_length: u64,
    #[doc = " Required primary user ring length alignment in bytes."]
    pub ring_byte_length_alignment: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_queue_family_info_t"]
        [::std::mem::size_of::<amdf_queue_family_info_t>() - 168usize];
    ["Alignment of amdf_queue_family_info_t"]
        [::std::mem::align_of::<amdf_queue_family_info_t>() - 8usize];
    ["Offset of field: amdf_queue_family_info_t::type_"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, type_) - 0usize];
    ["Offset of field: amdf_queue_family_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_queue_family_info_t::next"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, next) - 8usize];
    ["Offset of field: amdf_queue_family_info_t::ordinal"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, ordinal) - 16usize];
    ["Offset of field: amdf_queue_family_info_t::command_type"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, command_type) - 20usize];
    ["Offset of field: amdf_queue_family_info_t::publication_modes"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, publication_modes) - 24usize];
    ["Offset of field: amdf_queue_family_info_t::format_version"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, format_version) - 28usize];
    ["Offset of field: amdf_queue_family_info_t::format_features"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, format_features) - 32usize];
    ["Offset of field: amdf_queue_family_info_t::roles"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, roles) - 40usize];
    ["Offset of field: amdf_queue_family_info_t::cache_operations"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, cache_operations) - 48usize];
    ["Offset of field: amdf_queue_family_info_t::cache_transition_kinds"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, cache_transition_kinds) - 56usize];
    ["Offset of field: amdf_queue_family_info_t::reserved"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, reserved) - 60usize];
    ["Offset of field: amdf_queue_family_info_t::atomic_capabilities"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, atomic_capabilities) - 64usize];
    ["Offset of field: amdf_queue_family_info_t::user_queue_capabilities"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, user_queue_capabilities) - 104usize];
    ["Offset of field: amdf_queue_family_info_t::kernel_queue_capabilities"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, kernel_queue_capabilities) - 112usize];
    ["Offset of field: amdf_queue_family_info_t::producer_modes"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, producer_modes) - 120usize];
    ["Offset of field: amdf_queue_family_info_t::priority_capabilities"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, priority_capabilities) - 124usize];
    ["Offset of field: amdf_queue_family_info_t::metadata"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, metadata) - 128usize];
    ["Offset of field: amdf_queue_family_info_t::minimum_ring_byte_length"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, minimum_ring_byte_length) - 144usize];
    ["Offset of field: amdf_queue_family_info_t::maximum_ring_byte_length"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, maximum_ring_byte_length) - 152usize];
    ["Offset of field: amdf_queue_family_info_t::ring_byte_length_alignment"]
        [::std::mem::offset_of!(amdf_queue_family_info_t, ring_byte_length_alignment) - 160usize];
};
impl Default for amdf_queue_family_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Lifecycle state shared by native user and kernel queues."]
pub type amdf_queue_state_t = u32;
#[doc = " The queue accepts new work subject to its reported capacity."]
pub const AMDF_QUEUE_STATE_ACTIVE: amdf_queue_state_e = 1;
#[doc = " The queue encountered a terminal provider or firmware failure."]
pub const AMDF_QUEUE_STATE_FAILED: amdf_queue_state_e = 2;
#[doc = " The queue's device can no longer execute or retire work."]
pub const AMDF_QUEUE_STATE_DEVICE_LOST: amdf_queue_state_e = 3;
pub type amdf_queue_state_e = ::std::os::raw::c_uint;
#[doc = " Immutable properties of one directly published native queue."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_user_queue_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_USER_QUEUE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_user_queue_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Identity of the materialized device owning this queue."]
    pub device_id: amdf_device_id_t,
    #[doc = " Stable queue identity for telemetry and failure attribution."]
    pub queue_id: amdf_queue_id_t,
    #[doc = " Device reset epoch in which this queue remains valid."]
    pub reset_epoch: u64,
    #[doc = " Endpoint-local family selected when the queue was created."]
    pub queue_family_ordinal: u32,
    #[doc = " Native command representation accepted by the queue."]
    pub command_type: amdf_queue_command_type_t,
    #[doc = " Version defining command, index, and publication semantics."]
    pub format_version: u32,
    #[doc = " Encoding features inherited from the selected queue family."]
    pub format_features: amdf_queue_format_features_t,
    #[doc = " Reservation protocol selected for this queue."]
    pub producer_mode: amdf_queue_producer_mode_t,
    #[doc = " Scheduling priority selected for this queue."]
    pub priority: amdf_queue_priority_t,
    #[doc = " Direct producer operations achieved by this queue."]
    pub capabilities: amdf_user_queue_capabilities_t,
    #[doc = " Semantic operations achieved by this queue."]
    pub roles: amdf_queue_roles_t,
    #[doc = " Optional sidecar metadata format."]
    pub metadata: amdf_queue_metadata_format_t,
    #[doc = " Writable primary ring capacity in bytes."]
    pub ring_byte_length: u64,
    #[doc = " Writable sidecar ring capacity in bytes, or zero when absent."]
    pub metadata_ring_byte_length: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_user_queue_info_t"][::std::mem::size_of::<amdf_user_queue_info_t>() - 136usize];
    ["Alignment of amdf_user_queue_info_t"]
        [::std::mem::align_of::<amdf_user_queue_info_t>() - 8usize];
    ["Offset of field: amdf_user_queue_info_t::type_"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, type_) - 0usize];
    ["Offset of field: amdf_user_queue_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_user_queue_info_t::next"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, next) - 8usize];
    ["Offset of field: amdf_user_queue_info_t::device_id"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, device_id) - 16usize];
    ["Offset of field: amdf_user_queue_info_t::queue_id"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, queue_id) - 32usize];
    ["Offset of field: amdf_user_queue_info_t::reset_epoch"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, reset_epoch) - 48usize];
    ["Offset of field: amdf_user_queue_info_t::queue_family_ordinal"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, queue_family_ordinal) - 56usize];
    ["Offset of field: amdf_user_queue_info_t::command_type"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, command_type) - 60usize];
    ["Offset of field: amdf_user_queue_info_t::format_version"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, format_version) - 64usize];
    ["Offset of field: amdf_user_queue_info_t::format_features"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, format_features) - 72usize];
    ["Offset of field: amdf_user_queue_info_t::producer_mode"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, producer_mode) - 80usize];
    ["Offset of field: amdf_user_queue_info_t::priority"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, priority) - 84usize];
    ["Offset of field: amdf_user_queue_info_t::capabilities"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, capabilities) - 88usize];
    ["Offset of field: amdf_user_queue_info_t::roles"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, roles) - 96usize];
    ["Offset of field: amdf_user_queue_info_t::metadata"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, metadata) - 104usize];
    ["Offset of field: amdf_user_queue_info_t::ring_byte_length"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, ring_byte_length) - 120usize];
    ["Offset of field: amdf_user_queue_info_t::metadata_ring_byte_length"]
        [::std::mem::offset_of!(amdf_user_queue_info_t, metadata_ring_byte_length) - 128usize];
};
impl Default for amdf_user_queue_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Producer-local addresses in one directly published queue mapping.\n\n An all-zero `producer_device_id` identifies a host mapping. Other addresses\n are meaningful only to the exact producer device. The queue's command type\n and format version define the required atomic loads, stores, fences, ring\n wrap, and doorbell publication protocol. Every mapping exposes a directly\n writable notification doorbell; there is no mediated notification path."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_user_queue_mapping_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_USER_QUEUE_MAPPING_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_user_queue_mapping_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Exact producer device identity, or all-zero for the host."]
    pub producer_device_id: amdf_device_id_t,
    #[doc = " Identity of the directly published queue."]
    pub queue_id: amdf_queue_id_t,
    #[doc = " Consumer queue reset epoch in which returned addresses remain valid."]
    pub queue_reset_epoch: u64,
    #[doc = " Producer reset epoch, or zero for a host mapping."]
    pub producer_reset_epoch: u64,
    #[doc = " Native command representation stored in the primary ring."]
    pub command_type: amdf_queue_command_type_t,
    #[doc = " Version defining command, index, and publication semantics."]
    pub format_version: u32,
    #[doc = " Encoding features inherited from the mapped queue."]
    pub format_features: amdf_queue_format_features_t,
    #[doc = " Producer-local base address of the writable primary ring."]
    pub ring_address: u64,
    #[doc = " Writable primary ring capacity in bytes."]
    pub ring_byte_length: u64,
    #[doc = " Producer-local address of the consumer-owned read index."]
    pub read_index_address: u64,
    #[doc = " Producer-local address of the producer-owned write index."]
    pub write_index_address: u64,
    #[doc = " Producer-local address of the write-only notification doorbell."]
    pub doorbell_address: u64,
    #[doc = " Storage width of the read and write indices."]
    pub index_bits: u32,
    #[doc = " Atomic write width of the doorbell aperture."]
    pub doorbell_bits: u32,
    #[doc = " Optional sidecar metadata format."]
    pub metadata: amdf_queue_metadata_format_t,
    #[doc = " Producer-local base address of the writable metadata ring."]
    pub metadata_ring_address: u64,
    #[doc = " Writable metadata ring capacity in bytes, or zero when absent."]
    pub metadata_ring_byte_length: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_user_queue_mapping_info_t"]
        [::std::mem::size_of::<amdf_user_queue_mapping_info_t>() - 160usize];
    ["Alignment of amdf_user_queue_mapping_info_t"]
        [::std::mem::align_of::<amdf_user_queue_mapping_info_t>() - 8usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::type_"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, type_) - 0usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::next"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, next) - 8usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::producer_device_id"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, producer_device_id) - 16usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::queue_id"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, queue_id) - 32usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::queue_reset_epoch"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, queue_reset_epoch) - 48usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::producer_reset_epoch"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, producer_reset_epoch) - 56usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::command_type"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, command_type) - 64usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::format_version"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, format_version) - 68usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::format_features"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, format_features) - 72usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::ring_address"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, ring_address) - 80usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::ring_byte_length"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, ring_byte_length) - 88usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::read_index_address"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, read_index_address) - 96usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::write_index_address"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, write_index_address) - 104usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::doorbell_address"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, doorbell_address) - 112usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::index_bits"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, index_bits) - 120usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::doorbell_bits"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, doorbell_bits) - 124usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::metadata"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, metadata) - 128usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::metadata_ring_address"]
        [::std::mem::offset_of!(amdf_user_queue_mapping_info_t, metadata_ring_address) - 144usize];
    ["Offset of field: amdf_user_queue_mapping_info_t::metadata_ring_byte_length"][::std::mem::offset_of!(
        amdf_user_queue_mapping_info_t,
        metadata_ring_byte_length
    ) - 152usize];
};
impl Default for amdf_user_queue_mapping_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Current progress and terminal state of one directly published queue."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_user_queue_status_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_USER_QUEUE_STATUS`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_user_queue_status_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Current queue lifecycle state."]
    pub state: amdf_queue_state_t,
    #[doc = " Reserved for compatible growth and always zero."]
    pub reserved: u32,
    #[doc = " Device reset epoch associated with state and progress."]
    pub reset_epoch: u64,
    #[doc = " Current producer-owned queue frontier.\n\n The queue format defines whether this frontier advances when storage is\n reserved or when commands are release-published. It is the value sampled\n from the mapping's write index and uses that format's index units."]
    pub producer_index: u64,
    #[doc = " Greatest index completely consumed by the native queue, expanded into\n the producer frontier's monotonic domain when native counters wrap."]
    pub consumed_index: u64,
    #[doc = " Sticky terminal failure, or `AMDF_STATUS_OK` while active."]
    pub terminal_status: amdf_status_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_user_queue_status_t"]
        [::std::mem::size_of::<amdf_user_queue_status_t>() - 56usize];
    ["Alignment of amdf_user_queue_status_t"]
        [::std::mem::align_of::<amdf_user_queue_status_t>() - 8usize];
    ["Offset of field: amdf_user_queue_status_t::type_"]
        [::std::mem::offset_of!(amdf_user_queue_status_t, type_) - 0usize];
    ["Offset of field: amdf_user_queue_status_t::structure_size"]
        [::std::mem::offset_of!(amdf_user_queue_status_t, structure_size) - 4usize];
    ["Offset of field: amdf_user_queue_status_t::next"]
        [::std::mem::offset_of!(amdf_user_queue_status_t, next) - 8usize];
    ["Offset of field: amdf_user_queue_status_t::state"]
        [::std::mem::offset_of!(amdf_user_queue_status_t, state) - 16usize];
    ["Offset of field: amdf_user_queue_status_t::reserved"]
        [::std::mem::offset_of!(amdf_user_queue_status_t, reserved) - 20usize];
    ["Offset of field: amdf_user_queue_status_t::reset_epoch"]
        [::std::mem::offset_of!(amdf_user_queue_status_t, reset_epoch) - 24usize];
    ["Offset of field: amdf_user_queue_status_t::producer_index"]
        [::std::mem::offset_of!(amdf_user_queue_status_t, producer_index) - 32usize];
    ["Offset of field: amdf_user_queue_status_t::consumed_index"]
        [::std::mem::offset_of!(amdf_user_queue_status_t, consumed_index) - 40usize];
    ["Offset of field: amdf_user_queue_status_t::terminal_status"]
        [::std::mem::offset_of!(amdf_user_queue_status_t, terminal_status) - 48usize];
};
impl Default for amdf_user_queue_status_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Immutable properties of one kernel-mediated queue."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_kernel_queue_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_KERNEL_QUEUE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_kernel_queue_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Identity of the materialized device owning this queue."]
    pub device_id: amdf_device_id_t,
    #[doc = " Device reset epoch in which this queue remains valid."]
    pub reset_epoch: u64,
    #[doc = " Endpoint-local family selected when the queue was created."]
    pub queue_family_ordinal: u32,
    #[doc = " Native command representation accepted by the queue."]
    pub command_type: amdf_queue_command_type_t,
    #[doc = " Nonzero maximum accepted submissions that may remain unretired.\n Native resource exhaustion may reject work before this bound is reached."]
    pub maximum_pending_submission_count: u32,
    #[doc = " Maximum commands accepted by one submission."]
    pub maximum_command_count: u32,
    #[doc = " Native wake destinations accepted by kernel_queue_request_notification.\n Zero means notification is unavailable; all bits are resolved at creation."]
    pub notification_types: amdf_native_event_types_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_kernel_queue_info_t"]
        [::std::mem::size_of::<amdf_kernel_queue_info_t>() - 64usize];
    ["Alignment of amdf_kernel_queue_info_t"]
        [::std::mem::align_of::<amdf_kernel_queue_info_t>() - 8usize];
    ["Offset of field: amdf_kernel_queue_info_t::type_"]
        [::std::mem::offset_of!(amdf_kernel_queue_info_t, type_) - 0usize];
    ["Offset of field: amdf_kernel_queue_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_kernel_queue_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_kernel_queue_info_t::next"]
        [::std::mem::offset_of!(amdf_kernel_queue_info_t, next) - 8usize];
    ["Offset of field: amdf_kernel_queue_info_t::device_id"]
        [::std::mem::offset_of!(amdf_kernel_queue_info_t, device_id) - 16usize];
    ["Offset of field: amdf_kernel_queue_info_t::reset_epoch"]
        [::std::mem::offset_of!(amdf_kernel_queue_info_t, reset_epoch) - 32usize];
    ["Offset of field: amdf_kernel_queue_info_t::queue_family_ordinal"]
        [::std::mem::offset_of!(amdf_kernel_queue_info_t, queue_family_ordinal) - 40usize];
    ["Offset of field: amdf_kernel_queue_info_t::command_type"]
        [::std::mem::offset_of!(amdf_kernel_queue_info_t, command_type) - 44usize];
    ["Offset of field: amdf_kernel_queue_info_t::maximum_pending_submission_count"][::std::mem::offset_of!(
        amdf_kernel_queue_info_t,
        maximum_pending_submission_count
    ) - 48usize];
    ["Offset of field: amdf_kernel_queue_info_t::maximum_command_count"]
        [::std::mem::offset_of!(amdf_kernel_queue_info_t, maximum_command_count) - 52usize];
    ["Offset of field: amdf_kernel_queue_info_t::notification_types"]
        [::std::mem::offset_of!(amdf_kernel_queue_info_t, notification_types) - 56usize];
};
impl Default for amdf_kernel_queue_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Current retirement and terminal state of one kernel-mediated queue."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_kernel_queue_status_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_KERNEL_QUEUE_STATUS`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_kernel_queue_status_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Greatest accepted submission whose checked retirement, including\n command-result inspection, is complete.\n Native fence completion alone does not advance this frontier."]
    pub retired_submission: u64,
    #[doc = " Current queue lifecycle state."]
    pub state: amdf_queue_state_t,
    #[doc = " Reserved for future use and always zero."]
    pub reserved: u32,
    #[doc = " Sticky terminal failure, or `AMDF_STATUS_OK` while active."]
    pub terminal_status: amdf_status_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_kernel_queue_status_t"]
        [::std::mem::size_of::<amdf_kernel_queue_status_t>() - 40usize];
    ["Alignment of amdf_kernel_queue_status_t"]
        [::std::mem::align_of::<amdf_kernel_queue_status_t>() - 8usize];
    ["Offset of field: amdf_kernel_queue_status_t::type_"]
        [::std::mem::offset_of!(amdf_kernel_queue_status_t, type_) - 0usize];
    ["Offset of field: amdf_kernel_queue_status_t::structure_size"]
        [::std::mem::offset_of!(amdf_kernel_queue_status_t, structure_size) - 4usize];
    ["Offset of field: amdf_kernel_queue_status_t::next"]
        [::std::mem::offset_of!(amdf_kernel_queue_status_t, next) - 8usize];
    ["Offset of field: amdf_kernel_queue_status_t::retired_submission"]
        [::std::mem::offset_of!(amdf_kernel_queue_status_t, retired_submission) - 16usize];
    ["Offset of field: amdf_kernel_queue_status_t::state"]
        [::std::mem::offset_of!(amdf_kernel_queue_status_t, state) - 24usize];
    ["Offset of field: amdf_kernel_queue_status_t::reserved"]
        [::std::mem::offset_of!(amdf_kernel_queue_status_t, reserved) - 28usize];
    ["Offset of field: amdf_kernel_queue_status_t::terminal_status"]
        [::std::mem::offset_of!(amdf_kernel_queue_status_t, terminal_status) - 32usize];
};
impl Default for amdf_kernel_queue_status_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Immutable entry-point table for one negotiated ABI version.\n\n Tables grow only by appending fields. The table and every function pointer\n reachable from it remain valid until the providing library is unloaded.\n\n Per-method cost guarantees apply to every call, including first use and\n failure paths. They constrain libamdf-owned work, not OS scheduling or the\n internals of a native driver call explicitly required by the operation.\n Thread safety does not authorize hidden locking, allocation or lazy setup\n on methods that exclude those costs. Resource creation owns preparation;\n metadata access, publication and waiting retain their separate contracts."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_api_t {
    #[doc = " Size in bytes of this table version."]
    pub structure_size: u32,
    #[doc = " ABI version implemented by this table."]
    pub abi_version: amdf_abi_version_t,
    #[doc = " Creates an independent provider instance.\n\n The instance owns every dependent library reference and resolved native\n procedure table used by its children. Creation is thread-safe and performs\n bounded constant work. It performs no endpoint enumeration, device or\n firmware initialization, worker creation, retry, sleep, or process-global\n initialization. Failure leaves `out_instance` unchanged."]
    pub instance_create: ::std::option::Option<
        unsafe extern "C" fn(
            create_info: *const amdf_instance_create_info_t,
            out_instance: *mut *mut amdf_instance_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Destroys an instance after all of its children have been closed.\n\n The caller must have exclusive access. Returns\n `AMDF_STATUS_CODE_BUSY` without mutation while a child remains open.\n Destruction performs no implicit device wait. A native teardown failure\n retains the instance only for another destruction attempt; some native\n connections may already have been released."]
    pub instance_destroy: ::std::option::Option<
        unsafe extern "C" fn(instance: *mut amdf_instance_t) -> amdf_status_t,
    >,
    #[doc = " Enumerates a bounded snapshot of independently selectable AMD endpoints.\n\n A zero `capacity` queries the total count and may pass `summaries` as\n `NULL`. A nonzero capacity requires `summaries` to reference that many\n elements. When capacity is insufficient, the available prefix is written,\n `out_count` receives the total, and `AMDF_STATUS_CODE_BUFFER_TOO_SMALL` is\n returned. Every other failure leaves both outputs unchanged. The call\n creates no device, paging queue, address space, context, allocation,\n executable, or hardware queue. Arrival or removal may change the result of\n a later call."]
    pub endpoint_enumerate: ::std::option::Option<
        unsafe extern "C" fn(
            instance: *mut amdf_instance_t,
            capacity: u32,
            summaries: *mut amdf_endpoint_summary_t,
            out_count: *mut u32,
        ) -> amdf_status_t,
    >,
    #[doc = " Opens one endpoint identity without enumerating the machine again.\n\n The returned query-only endpoint borrows `instance`; the instance must\n outlive it. Opening may acquire a native query handle and cache immutable\n identity, but creates no schedulable device state. A stale identity fails\n rather than selecting another endpoint. Failure leaves `out_endpoint`\n unchanged."]
    pub endpoint_open: ::std::option::Option<
        unsafe extern "C" fn(
            instance: *mut amdf_instance_t,
            id: *const amdf_endpoint_id_t,
            out_endpoint: *mut *mut amdf_endpoint_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Copies immutable cached properties without a system call or device wait.\n\n The operation is thread-safe and performs no allocation, locking or lazy\n initialization. It reads the snapshot established by endpoint_open, not\n live driver state. The caller initializes `out_info` and its\n complete extension chain before the call. No output is modified when\n validation fails."]
    pub endpoint_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            endpoint: *mut amdf_endpoint_t,
            out_info: *mut amdf_endpoint_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Closes a query-only endpoint after all future children are destroyed.\n\n The caller must have exclusive access. The operation performs no implicit\n device wait. Failure leaves the endpoint live so destruction can be\n retried."]
    pub endpoint_close: ::std::option::Option<
        unsafe extern "C" fn(endpoint: *mut amdf_endpoint_t) -> amdf_status_t,
    >,
    #[doc = " Acquires an immutable optional API table compiled into this library.\n\n Extension availability describes the library composition and never\n depends on endpoint enumeration or active hardware. Hardware support is\n reported by operations on the returned table. `minimum_version` and\n `maximum_version` form an inclusive range. An unknown or excluded\n extension returns `AMDF_STATUS_CODE_UNSUPPORTED`; a compiled extension\n with no version in range returns `AMDF_STATUS_CODE_VERSION_MISMATCH`.\n Failure leaves `out_extension_api` unchanged when it is non-NULL.\n\n This operation is thread-safe, bounded constant time, and inert. It\n performs no allocation, system call, device discovery, dependent-library\n load, or other observable initialization. The returned table remains\n valid until the providing library is unloaded. No lock or one-time\n initialization guard is acquired, including on the first call."]
    pub query_extension: ::std::option::Option<
        unsafe extern "C" fn(
            extension_id: amdf_extension_id_t,
            minimum_version: u32,
            maximum_version: u32,
            out_extension_api: *mut *const ::std::os::raw::c_void,
        ) -> amdf_status_t,
    >,
    #[doc = " Copies one immutable queue-family record cached while opening `endpoint`.\n\n Records describe expected implemented services. Explicit native device\n creation validates the installed driver before making them usable.\n `queue_family_ordinal` must be less than the endpoint's reported family\n count. The operation is thread-safe and performs no system call,\n allocation, device initialization, queue creation, retry, sleep, or\n device wait. It acquires no lock and initializes no cached state. The\n caller initializes `out_info` and its complete extension\n chain. No output is modified on failure."]
    pub endpoint_query_queue_family_info: ::std::option::Option<
        unsafe extern "C" fn(
            endpoint: *mut amdf_endpoint_t,
            queue_family_ordinal: u32,
            out_info: *mut amdf_queue_family_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Destroys a materialized device after its dependent resources are released.\n\n The caller must have exclusive access. Returns\n `AMDF_STATUS_CODE_BUSY` without native mutation while a queue or context\n remains live. Memory lifetimes are caller preconditions:\n dependent memory must already be destroyed, and libamdf neither retains\n the device through memory nor tracks memory to diagnose premature device\n destruction. Violating that precondition is undefined behavior.\n Caller-submitted work must already be retired before its owning resources\n are destroyed. A native teardown failure retains the device only for\n another destruction attempt; some native execution resources may already\n have been released."]
    pub device_destroy:
        ::std::option::Option<unsafe extern "C" fn(device: *mut amdf_device_t) -> amdf_status_t>,
    #[doc = " Enumerates borrowed system-storage scopes owned by the instance.\n\n This metadata-only operation activates no device. Capacity zero permits\n NULL storage. Success and BUFFER_TOO_SMALL publish the available prefix\n and full required count together; every other failure leaves outputs\n unchanged. A nonempty zero-capacity query returns BUFFER_TOO_SMALL.\n Returned scopes remain valid while the instance lives. Scope descriptors\n are prepared by the owner; enumeration allocates nothing and performs no\n locking, native query or lazy initialization."]
    pub instance_enumerate_memory_scopes: ::std::option::Option<
        unsafe extern "C" fn(
            instance: *mut amdf_instance_t,
            capacity: u32,
            scopes: *mut *mut amdf_memory_scope_t,
            out_count: *mut u32,
        ) -> amdf_status_t,
    >,
    #[doc = " Enumerates physical-local storage available through a live device.\n\n The count/prefix protocol matches instance_enumerate_memory_scopes.\n Returned physical scopes are owned by the device's endpoint and remain\n valid while that endpoint lives. Allocations require their storage device\n in the live access set. Context-private scopes come from their extension.\n This reads achieved profiles without allocation, native queries, locking\n or lazy setup; it creates no resources."]
    pub device_enumerate_memory_scopes: ::std::option::Option<
        unsafe extern "C" fn(
            device: *mut amdf_device_t,
            capacity: u32,
            scopes: *mut *mut amdf_memory_scope_t,
            out_count: *mut u32,
        ) -> amdf_status_t,
    >,
    #[doc = " Copies complete immutable facts of a borrowed scope.\n\n This thread-safe metadata query performs no native operation or\n allocation, locking or lazy initialization. The caller initializes the\n output header and extension chain. Failure leaves all output bytes\n unchanged."]
    pub memory_scope_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            scope: *mut amdf_memory_scope_t,
            out_info: *mut amdf_memory_scope_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Queries a scope contract for explicitly initialized device consumers.\n\n Devices are unique and belong to the scope's instance. The caller keeps\n them live during this call. Zero count permits NULL arrays and requests\n CPU-only storage without activating any accelerator. The caller\n initializes the profile and exactly access_count capability records.\n Success publishes complete backing facts and one capability record per\n input in caller order. Failure leaves all outputs unchanged. An ordinal\n outside the scope's profile count returns OUT_OF_RANGE; a valid profile\n unable to satisfy the complete access set returns UNSUPPORTED.\n\n This thread-safe cold planning query consumes native facts retained at\n activation. It performs no native operation, mapping or synchronization.\n Temporary host storage scales with the access set. The result is not a\n reservation: construction can fail from exhaustion or native errors and\n never weakens explicit requirements."]
    pub memory_scope_query_device_profile: ::std::option::Option<
        unsafe extern "C" fn(
            scope: *mut amdf_memory_scope_t,
            profile_ordinal: u32,
            access_count: u32,
            accesses: *const amdf_memory_device_access_t,
            out_profile: *mut amdf_memory_profile_t,
            out_access_capabilities: *mut amdf_memory_access_capabilities_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Creates one backing with every requested live-device access established.\n\n The selected profile exposes exactly one of CREATE and REGISTER, with\n registered_host_pointer present exactly for REGISTER. The resource\n borrows the scope and all requested devices, which the caller keeps live\n through memory release without hidden retention or lifetime tracking.\n Access ordinals preserve request order. Exact permissions, required\n properties, mapping and residency are established before publication.\n No device is implicitly activated and no access is deferred to first use.\n\n Registered pages remain caller-owned and backed by the same live pages\n through memory release. A native release failure can leave registrations\n live and does not permit recycling those pages. If they came from a host\n mapping, that mapping and its backing obey the same requirement.\n Construction performs no command inspection, queue submission or\n device-wide synchronization. Failure leaves out_memory unchanged and\n creates no public cleanup owner."]
    pub memory_create: ::std::option::Option<
        unsafe extern "C" fn(
            scope: *mut amdf_memory_scope_t,
            create_info: *const amdf_memory_create_info_t,
            out_memory: *mut *mut amdf_memory_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Acquires external backing and establishes the requested live access set.\n\n The selected scope profile exposes IMPORT and accepts the transport and\n all requirements. The same caller-enforced lifetime and readiness rules\n as memory_create apply. Complete success acquires the native backing\n references, consumes and zeros inout_external_memory, and publishes one\n memory handle. Every failure leaves both caller values byte-for-byte\n unchanged. This cold operation performs no queue submission or\n device-wide wait."]
    pub memory_import: ::std::option::Option<
        unsafe extern "C" fn(
            scope: *mut amdf_memory_scope_t,
            import_info: *const amdf_memory_import_info_t,
            inout_external_memory: *mut amdf_external_memory_t,
            out_memory: *mut *mut amdf_memory_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Copies immutable backing properties cached when `memory` was created.\n\n The operation is thread-safe and performs no system call, allocation,\n mapping mutation, retry, sleep, or device wait. The caller initializes\n `out_info` and its complete extension chain. No output is modified when\n validation fails. It reads immutable storage without locking, lazy\n initialization or ownership-counter updates."]
    pub memory_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            memory: *mut amdf_memory_t,
            out_info: *mut amdf_memory_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Copies immutable facts of one established device access.\n\n The ordinal is below memory info's `access_count` and preserves the\n construction request's consumer order. An out-of-range ordinal\n returns OUT_OF_RANGE. The caller initializes `out_info` and its extension\n chain; failure leaves it unchanged. This thread-safe metadata query\n performs no allocation, native query, mapping, locking, lazy\n initialization or ownership-counter update. The ordinal directly indexes\n retained facts; no search over the other consumers is required."]
    pub memory_query_access_info: ::std::option::Option<
        unsafe extern "C" fn(
            memory: *mut amdf_memory_t,
            access_ordinal: u32,
            out_info: *mut amdf_memory_access_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Exports one logical range as a move-owned external-memory value.\n\n Success publishes a complete value whose payload remains valid until it\n is imported or explicitly released. The caller obtains a separate export\n for every independent import transaction. Export performs no queue wait,\n cache transition, or implicit synchronization. Failure leaves `out_value`\n byte-for-byte unchanged."]
    pub memory_export: ::std::option::Option<
        unsafe extern "C" fn(
            memory: *mut amdf_memory_t,
            export_info: *const amdf_memory_export_info_t,
            out_value: *mut amdf_external_memory_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Releases one move-owned external-memory value and zeros it.\n\n An empty value and a null pointer are no-ops. A nonempty value invokes its\n release callback exactly once when one is present. The caller must have\n exclusive access to the value."]
    pub external_memory_release:
        ::std::option::Option<unsafe extern "C" fn(value: *mut amdf_external_memory_t)>,
    #[doc = " Copies the exact directional relation between two concrete access sites.\n\n Each site names either a device access and queue family or a host mapping.\n An out-of-range access ordinal returns OUT_OF_RANGE. Sites on one memory\n handle share backing directly, including CPU-only memory without a\n physical identity. Different memory handles must belong to one provider\n instance and have equal valid physical identities. A scope or identity\n mismatch returns\n `AMDF_STATUS_CODE_FAILED_PRECONDITION`; an unavailable identity returns\n `AMDF_STATUS_CODE_UNSUPPORTED`. Equal addresses or physical identities do\n not imply reach, visibility, or atomics. Common code composes\n independently reported local facts and gives neither implementation the\n other one's object. Host transitions account for the mapping's available\n operations and the selected peer's coherence, not other device accesses\n in the resource. The result describes visibility over corresponding bytes\n reachable by both sites; callers select those ranges and provide ordering.\n It does not establish synchronization or report host atomic capabilities.\n The operation performs no allocation, native query, import, mapping,\n cache transition, locking, lazy initialization or wait. It composes the\n two sites' retained facts without scanning other allocations or consumers.\n Failure leaves `out_info` byte-for-byte unchanged."]
    pub memory_query_pair_info: ::std::option::Option<
        unsafe extern "C" fn(
            producer_site: *const amdf_memory_site_t,
            consumer_site: *const amdf_memory_site_t,
            out_info: *mut amdf_memory_pair_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Creates an explicit host mapping of one memory range.\n\n Requested access is a minimum. The returned mapping reports the actual\n native access, which may include additional bits advertised by the\n attachment profile. The mapping borrows `memory`, which must outlive it.\n Mapping does not wait for device work or transfer cache ownership.\n Failure leaves `out_mapping` unchanged."]
    pub memory_map: ::std::option::Option<
        unsafe extern "C" fn(
            memory: *mut amdf_memory_t,
            map_info: *const amdf_memory_map_info_t,
            out_mapping: *mut *mut amdf_host_mapping_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Copies immutable properties of one live host mapping.\n\n The copied pointer is borrowed until `host_mapping_destroy` is called. Its\n flush and invalidate recipes describe available CPU cache operations,\n not requirements relative to one attached device. A device's\n HOST_COHERENT access can make those operations unnecessary for that\n consumer without making the CPU mapping universally coherent. Recipes\n state whether a caller can execute cache maintenance directly or must\n invoke `host_mapping_cache_control`. The operation is thread-safe and\n performs no system call, allocation, locking, lazy initialization, cache\n transition or ownership-counter update. No output is modified on\n validation failure."]
    pub host_mapping_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            mapping: *mut amdf_host_mapping_t,
            out_info: *mut amdf_host_mapping_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Performs one explicit host cache ownership transition over a mapped range.\n\n `byte_offset` is relative to the mapping. The implementation may touch\n every cache line intersecting the range; callers externally synchronize\n the complete intersected lines. A non-empty flush requires write access\n and a non-empty invalidate requires read access; otherwise the operation\n returns `AMDF_STATUS_CODE_FAILED_PRECONDITION`. An empty range is a no-op.\n A nonempty request executes the advertised operation even when the\n memory's attached device is host-coherent. It never waits for device\n execution or supplies an execution dependency.\n The mapping's cache recipe and native entry points are prepared before\n this call. No allocation, locking or lazy initialization occurs. Work\n scales with the affected cache lines or native allocation spans. A recipe\n requiring HOST_API execution may enter the driver; this is not a blanket\n syscall-free operation."]
    pub host_mapping_cache_control: ::std::option::Option<
        unsafe extern "C" fn(
            mapping: *mut amdf_host_mapping_t,
            operation: amdf_host_cache_operation_t,
            byte_offset: u64,
            byte_length: u64,
        ) -> amdf_status_t,
    >,
    #[doc = " Destroys one mapping after all host access to its pointer has stopped.\n\n The caller must have exclusive access. A valid mapping is consumed and\n returns OK; NULL returns INVALID_ARGUMENT. The view borrows the memory's\n persistent native mapping, whose unmapping occurs at memory destruction.\n No execution wait or cache transition is implied."]
    pub host_mapping_destroy: ::std::option::Option<
        unsafe extern "C" fn(mapping: *mut amdf_host_mapping_t) -> amdf_status_t,
    >,
    #[doc = " Destroys memory after all host mappings and future device uses are gone.\n\n The caller must have exclusive access and have completed every use,\n including host mappings, queue commands, scratch and opaque device work.\n These are caller preconditions: libamdf neither tracks memory users nor\n diagnoses premature destruction. Violating them is undefined behavior.\n Destruction performs no execution wait or cache transition, but may wait\n for native unmapping or paging cleanup.\n The memory object is consumed even when native release fails. The first\n native error is returned; neither this handle nor its addresses may be\n used again. Each independent consumer receives one release attempt, and\n backing is released only after every consumer succeeds. A failure can leak\n native resources and required backing, without a retained library object\n or later cleanup attempt. Borrowed scopes and devices must outlive this\n call; their destruction does not guarantee reclamation of native residue.\n Registered source storage remains caller-owned. Failed native detach does\n not authorize recycling it: the caller must leave that storage unreclaimed\n through the remaining native lifetime. Failure is observable resource\n loss, not a retryable memory handle or successful source release."]
    pub memory_destroy:
        ::std::option::Option<unsafe extern "C" fn(memory: *mut amdf_memory_t) -> amdf_status_t>,
    #[doc = " Copies immutable properties cached when `queue` was created.\n\n The operation is thread-safe and performs no system call, allocation,\n native progress query, retry, sleep, or device wait. No output is modified\n when validation fails. It acquires no lock, initializes no state and\n updates no ownership counters."]
    pub kernel_queue_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            queue: *mut amdf_kernel_queue_t,
            out_info: *mut amdf_kernel_queue_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Reads established retirement and cached terminal state without waiting.\n\n This is a read-only snapshot, not a native completion check. It does not\n consume command results or retire submissions, even when the native\n completion fence has advanced. Use `kernel_queue_refresh_status` or\n `kernel_queue_wait` to refresh native progress and perform checked\n retirement before reusing command storage. Submission may also reclaim\n completed capacity as specified by its engine; this query never does so.\n The operation is thread-safe with submission and waits. It performs no\n allocation, system call, sleep, active polling, locking, lazy\n initialization or ownership-counter updates. No output is modified when\n validation fails. ACTIVE means no terminal failure has been observed, not\n that a fresh native health check was performed. Rejection and timeout\n errors do not themselves mark a queue failed. A terminal failure remains\n sticky and is not itself retirement proof."]
    pub kernel_queue_query_status: ::std::option::Option<
        unsafe extern "C" fn(
            queue: *mut amdf_kernel_queue_t,
            out_status: *mut amdf_kernel_queue_status_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Waits until `submission` retires, a failure is observed, or time expires.\n `submission` must be a completion point returned by this exact queue.\n\n `timeout_nanoseconds` includes host contention, active polling, and native\n waiting under one deadline. A zero timeout attempts checked retirement\n without waiting, including one native poll when progress is not already\n known. It can time out while another caller owns retirement even if native\n execution is complete. `poll_duration_nanoseconds` is clipped to that\n timeout; zero disables active polling.\n `AMDF_TIMEOUT_INFINITE` requests no deadline. A timeout does not itself\n cancel accepted work or permit command storage reuse. The operation is\n thread-safe with submission, status queries and other waits.\n A native wait error is returned even if progress concurrently advances;\n callers use `kernel_queue_query_status` to determine retirement and\n whether a terminal failure was observed before deciding to retry.\n Confirmed native completion permits command-result inspection before\n retirement is published. This explicit synchronization path may query\n clocks, poll, yield, enter native waits and serialize access to a reusable\n wait event.\n Contention consumes the same deadline. Queue creation prepares wait\n resources; waiting performs no library allocation or lazy resource setup."]
    pub kernel_queue_wait: ::std::option::Option<
        unsafe extern "C" fn(
            queue: *mut amdf_kernel_queue_t,
            submission: u64,
            timeout_nanoseconds: u64,
            poll_duration_nanoseconds: u64,
        ) -> amdf_status_t,
    >,
    #[doc = " Destroys one queue after every accepted submission has retired.\n\n The caller must have exclusive access. The operation samples progress once\n and returns API-domain BUSY without waiting or native mutation while work\n remains; the queue stays live. Every other result for a valid queue\n consumes the handle, including a native cleanup error. Native errors\n retain their domains: a native busy error is not the API-domain\n precondition rejection. Failed cleanup preserves unreleased native\n resources and required backing as leaks, without a retained library owner\n or later cleanup attempt. It does not authorize reuse of caller-owned\n command or data storage without independent completion evidence. The\n device must outlive this call."]
    pub kernel_queue_destroy: ::std::option::Option<
        unsafe extern "C" fn(queue: *mut amdf_kernel_queue_t) -> amdf_status_t,
    >,
    #[doc = " Copies immutable properties cached when `queue` was created.\n\n The operation is thread-safe and performs no system call, allocation,\n native progress query, retry, sleep, or device wait. No output is modified\n when validation fails. It acquires no lock, initializes no state and\n updates no ownership counters."]
    pub user_queue_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            queue: *mut amdf_user_queue_t,
            out_info: *mut amdf_user_queue_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Maps a directly published queue into one producer.\n\n A null `producer_device` maps the queue for host publication. A non-null\n producer must be an exact device for which the queue advertises and can\n establish device publication. The returned mapping borrows the queue,\n which must outlive it. Failure leaves `out_mapping` unchanged."]
    pub user_queue_map: ::std::option::Option<
        unsafe extern "C" fn(
            queue: *mut amdf_user_queue_t,
            producer_device: *mut amdf_device_t,
            out_mapping: *mut *mut amdf_user_queue_mapping_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Copies producer-local addresses from one live queue mapping.\n\n The operation is thread-safe and performs no system call, allocation,\n native progress query, retry, sleep, or device wait. No output is modified\n when validation fails. The mapped addresses were established by\n user_queue_map; this query takes no lock, initializes no state and\n updates no ownership counters."]
    pub user_queue_mapping_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            mapping: *mut amdf_user_queue_mapping_t,
            out_info: *mut amdf_user_queue_mapping_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Releases one queue mapping after that producer has stopped using it.\n\n The caller must have exclusive access. Failure leaves the mapping live so\n destruction can be retried. Queue execution is not implicitly waited."]
    pub user_queue_mapping_destroy: ::std::option::Option<
        unsafe extern "C" fn(mapping: *mut amdf_user_queue_mapping_t) -> amdf_status_t,
    >,
    #[doc = " Samples directly published progress and observed terminal state.\n\n The operation is thread-safe with producer publication. It performs no\n allocation, retry, sleep, or active polling. ACTIVE means no terminal\n failure has been observed. A terminal failure is sticky and does not by\n itself prove that published commands retired. No output is modified when\n validation or the native observation fails.\n Unlike kernel_queue_query_status, this operation may query the native\n driver for queue or VM faults. It takes no library lock and performs no\n lazy initialization; terminal-state updates may use atomics."]
    pub user_queue_query_status: ::std::option::Option<
        unsafe extern "C" fn(
            queue: *mut amdf_user_queue_t,
            out_status: *mut amdf_user_queue_status_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Waits until `published_index` is consumed, failure is observed, or time\n expires.\n\n The index uses the units defined by the queue format. The target must have\n already been release-published by a producer. `timeout_nanoseconds`\n includes host contention, active polling, and native waiting under one\n deadline. `poll_duration_nanoseconds` is clipped to that timeout; zero\n disables active polling. `AMDF_TIMEOUT_INFINITE` requests no deadline. A\n timeout observes but never cancels work.\n This synchronization path may query clocks, poll, yield and enter the\n native driver. It performs no library allocation or lazy resource setup."]
    pub user_queue_wait_consumed: ::std::option::Option<
        unsafe extern "C" fn(
            queue: *mut amdf_user_queue_t,
            published_index: u64,
            timeout_nanoseconds: u64,
            poll_duration_nanoseconds: u64,
        ) -> amdf_status_t,
    >,
    #[doc = " Destroys one directly published queue after all mappings are gone and all\n published work has been consumed.\n\n The caller must have exclusive access. The operation returns BUSY without\n native mutation while a mapping or unconsumed publication remains. This\n API-domain rejection leaves the queue live. Every other result for a valid\n queue consumes the handle, including a native cleanup error. Native errors\n retain their domains: a native busy error is not a precondition rejection.\n Failed cleanup preserves unreleased native resources and required backing\n as leaks, without a retained library owner or later cleanup attempt.\n Packet consumption alone is not execution completion. Failed queue removal\n does not permit reuse of caller-owned scratch, commands or data without\n independent completion evidence. The device must outlive this call."]
    pub user_queue_destroy:
        ::std::option::Option<unsafe extern "C" fn(queue: *mut amdf_user_queue_t) -> amdf_status_t>,
    #[doc = " Returns the stable base address consumed by `kind` for `memory`.\n\n The address names logical byte zero; offsets below the memory's reported\n byte_length are valid. The caller retains the memory through every use.\n Kinds identify consuming interfaces, not independently selectable address\n spaces. The selected access info's address_kinds reports established\n kinds; zero is a valid address value, not an indication of availability.\n An unknown kind is INVALID_ARGUMENT; a known but unavailable kind is\n UNSUPPORTED. An out-of-range access ordinal returns OUT_OF_RANGE.\n Every failure leaves `out_address` unchanged.\n\n This thread-safe metadata query performs no allocation, native query,\n mapping, pinning, locking, lazy initialization or ownership-counter\n update. It directly indexes the access record and address kind,\n independent of allocation size or the number of other consumers and\n allocations. There is no address-to-handle lookup or first-use\n mapping/residency work."]
    pub memory_query_address: ::std::option::Option<
        unsafe extern "C" fn(
            memory: *mut amdf_memory_t,
            access_ordinal: u32,
            kind: amdf_memory_address_kind_t,
            out_address: *mut u64,
        ) -> amdf_status_t,
    >,
    #[doc = " Qualifies visibility before allocating backing or creating host views.\n\n Success supplies sufficient release/acquire recipes for every successful\n construction with the same scope, profile, backing requirements, complete\n live consumer set and registration cache class. Host sites require\n HOST_VISIBLE in required_flags. Views must provide the declared\n permissions. Allocation size, addresses and host-view ranges may vary\n within the profile; callers still satisfy each transition's range and\n execution requirements. This describes access to one shared backing, not\n transfers between distinct allocations. Ordering and completion remain\n separate caller obligations.\n\n Devices and the scope remain live while the result is used. No backing,\n mapping, handle or plan is retained. The exact queue family owns QUEUE\n operations; HOST_DIRECT uses each actual view's pointer and range, and\n HOST_API uses its actual host_mapping handle. A queue answer does not\n qualify PROGRAM execution. Unknown native/exporter protocols, unsupported\n permissions and unqualified sites return UNSUPPORTED, never a no-op.\n Foreign import host visibility may be unqualified even when device access\n and memory_map are available. Imports are not admitted to a host\n visibility contract by borrowing an allocation profile's answer.\n\n Import qualification additionally fixes the exact external transport type\n and provenance supplied at construction. Opaque payloads preserve their\n exporter-provided interpretation; changing the tag does not qualify a\n foreign payload.\n\n This thread-safe cold metadata query uses the same native selection and\n visibility policy as construction and concrete pair queries. It performs\n no native operation, mapping, synchronization or device activation.\n Temporary host storage scales with the live consumer set. Success is not a\n resource reservation. Failure leaves out_info unchanged."]
    pub memory_scope_query_pair_info: ::std::option::Option<
        unsafe extern "C" fn(
            scope: *mut amdf_memory_scope_t,
            query: *const amdf_memory_profile_pair_query_t,
            out_info: *mut amdf_memory_pair_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Refreshes native progress and checks available completed command results.\n\n Unlike the read-only status query, this synchronization operation advances\n checked retirement for the completed accepted prefix without waiting for\n a particular submission. Success returns a snapshot in `out_status`,\n including any sticky execution failure in `terminal_status`. Success does\n not mean that every accepted command has completed. Failure returns the\n observation error and leaves `out_status` unchanged; independently checked\n progress remains available through `kernel_queue_query_status`.\n\n The operation is thread-safe with submission, queries, refreshes and\n waits. If another caller owns result consumption, it returns the\n established frontier without waiting for that caller. It performs no host\n allocation, resource creation, lazy initialization, sleep or active\n polling. Native observation may require nonblocking system calls. Result\n inspection is proportional to newly completed commands, not configured\n queue capacity."]
    pub kernel_queue_refresh_status: ::std::option::Option<
        unsafe extern "C" fn(
            queue: *mut amdf_kernel_queue_t,
            out_status: *mut amdf_kernel_queue_status_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Requests one native-progress wake for an already-accepted queue point.\n\n `submission` must have been returned by this exact queue. `event` borrows\n a caller-owned destination of a type reported in notification_types.\n An unsupported type returns UNSUPPORTED. Invalid descriptor tags, payload\n shapes, reserved fields or point zero return INVALID_ARGUMENT; an\n unaccepted point returns OUT_OF_RANGE. Native registration errors retain\n their native status domain.\n\n This is one-shot, not a subscription. Repeating a request adds a fresh\n wake obligation; it does not replace or cancel an earlier request. An\n already-checked point signals immediately, even after packet-slot reuse.\n Delivery may precede return. Notifications may coalesce and contain no\n completion value. A wake is an opportunity to refresh checked status,\n not proof of successful execution or permission to reuse storage. A\n provider may emit an immediate recheck hint if a concurrent caller owns\n native fence capture; no checked progress is implied by that hint.\n\n The caller prepares event-loop ownership before requesting a wake and\n keeps the native event live through delivery. Cancelling an event-loop\n callback does not cancel native notifications or device execution. A\n request error never rejects, replays or retires the accepted submission.\n Existing checked progress and synchronous waits remain independently\n usable. Normal teardown reconciles outstanding native notifications\n before releasing the event and queue.\n\n The operation is thread-safe with submission, queries, refreshes and\n waits. It consumes no command results, stores no event descriptor, and\n creates no libamdf observer or subscription. It performs no library\n allocation, locking, lazy initialization, polling, sleep or execution\n wait. Native registration/signaling calls are explicit costs and may\n allocate native callback state. Library submission paths never arm\n notifications implicitly."]
    pub kernel_queue_request_notification: ::std::option::Option<
        unsafe extern "C" fn(
            queue: *mut amdf_kernel_queue_t,
            submission: u64,
            event: *const amdf_native_event_t,
        ) -> amdf_status_t,
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_api_t"][::std::mem::size_of::<amdf_api_t>() - 328usize];
    ["Alignment of amdf_api_t"][::std::mem::align_of::<amdf_api_t>() - 8usize];
    ["Offset of field: amdf_api_t::structure_size"]
        [::std::mem::offset_of!(amdf_api_t, structure_size) - 0usize];
    ["Offset of field: amdf_api_t::abi_version"]
        [::std::mem::offset_of!(amdf_api_t, abi_version) - 4usize];
    ["Offset of field: amdf_api_t::instance_create"]
        [::std::mem::offset_of!(amdf_api_t, instance_create) - 8usize];
    ["Offset of field: amdf_api_t::instance_destroy"]
        [::std::mem::offset_of!(amdf_api_t, instance_destroy) - 16usize];
    ["Offset of field: amdf_api_t::endpoint_enumerate"]
        [::std::mem::offset_of!(amdf_api_t, endpoint_enumerate) - 24usize];
    ["Offset of field: amdf_api_t::endpoint_open"]
        [::std::mem::offset_of!(amdf_api_t, endpoint_open) - 32usize];
    ["Offset of field: amdf_api_t::endpoint_query_info"]
        [::std::mem::offset_of!(amdf_api_t, endpoint_query_info) - 40usize];
    ["Offset of field: amdf_api_t::endpoint_close"]
        [::std::mem::offset_of!(amdf_api_t, endpoint_close) - 48usize];
    ["Offset of field: amdf_api_t::query_extension"]
        [::std::mem::offset_of!(amdf_api_t, query_extension) - 56usize];
    ["Offset of field: amdf_api_t::endpoint_query_queue_family_info"]
        [::std::mem::offset_of!(amdf_api_t, endpoint_query_queue_family_info) - 64usize];
    ["Offset of field: amdf_api_t::device_destroy"]
        [::std::mem::offset_of!(amdf_api_t, device_destroy) - 72usize];
    ["Offset of field: amdf_api_t::instance_enumerate_memory_scopes"]
        [::std::mem::offset_of!(amdf_api_t, instance_enumerate_memory_scopes) - 80usize];
    ["Offset of field: amdf_api_t::device_enumerate_memory_scopes"]
        [::std::mem::offset_of!(amdf_api_t, device_enumerate_memory_scopes) - 88usize];
    ["Offset of field: amdf_api_t::memory_scope_query_info"]
        [::std::mem::offset_of!(amdf_api_t, memory_scope_query_info) - 96usize];
    ["Offset of field: amdf_api_t::memory_scope_query_device_profile"]
        [::std::mem::offset_of!(amdf_api_t, memory_scope_query_device_profile) - 104usize];
    ["Offset of field: amdf_api_t::memory_create"]
        [::std::mem::offset_of!(amdf_api_t, memory_create) - 112usize];
    ["Offset of field: amdf_api_t::memory_import"]
        [::std::mem::offset_of!(amdf_api_t, memory_import) - 120usize];
    ["Offset of field: amdf_api_t::memory_query_info"]
        [::std::mem::offset_of!(amdf_api_t, memory_query_info) - 128usize];
    ["Offset of field: amdf_api_t::memory_query_access_info"]
        [::std::mem::offset_of!(amdf_api_t, memory_query_access_info) - 136usize];
    ["Offset of field: amdf_api_t::memory_export"]
        [::std::mem::offset_of!(amdf_api_t, memory_export) - 144usize];
    ["Offset of field: amdf_api_t::external_memory_release"]
        [::std::mem::offset_of!(amdf_api_t, external_memory_release) - 152usize];
    ["Offset of field: amdf_api_t::memory_query_pair_info"]
        [::std::mem::offset_of!(amdf_api_t, memory_query_pair_info) - 160usize];
    ["Offset of field: amdf_api_t::memory_map"]
        [::std::mem::offset_of!(amdf_api_t, memory_map) - 168usize];
    ["Offset of field: amdf_api_t::host_mapping_query_info"]
        [::std::mem::offset_of!(amdf_api_t, host_mapping_query_info) - 176usize];
    ["Offset of field: amdf_api_t::host_mapping_cache_control"]
        [::std::mem::offset_of!(amdf_api_t, host_mapping_cache_control) - 184usize];
    ["Offset of field: amdf_api_t::host_mapping_destroy"]
        [::std::mem::offset_of!(amdf_api_t, host_mapping_destroy) - 192usize];
    ["Offset of field: amdf_api_t::memory_destroy"]
        [::std::mem::offset_of!(amdf_api_t, memory_destroy) - 200usize];
    ["Offset of field: amdf_api_t::kernel_queue_query_info"]
        [::std::mem::offset_of!(amdf_api_t, kernel_queue_query_info) - 208usize];
    ["Offset of field: amdf_api_t::kernel_queue_query_status"]
        [::std::mem::offset_of!(amdf_api_t, kernel_queue_query_status) - 216usize];
    ["Offset of field: amdf_api_t::kernel_queue_wait"]
        [::std::mem::offset_of!(amdf_api_t, kernel_queue_wait) - 224usize];
    ["Offset of field: amdf_api_t::kernel_queue_destroy"]
        [::std::mem::offset_of!(amdf_api_t, kernel_queue_destroy) - 232usize];
    ["Offset of field: amdf_api_t::user_queue_query_info"]
        [::std::mem::offset_of!(amdf_api_t, user_queue_query_info) - 240usize];
    ["Offset of field: amdf_api_t::user_queue_map"]
        [::std::mem::offset_of!(amdf_api_t, user_queue_map) - 248usize];
    ["Offset of field: amdf_api_t::user_queue_mapping_query_info"]
        [::std::mem::offset_of!(amdf_api_t, user_queue_mapping_query_info) - 256usize];
    ["Offset of field: amdf_api_t::user_queue_mapping_destroy"]
        [::std::mem::offset_of!(amdf_api_t, user_queue_mapping_destroy) - 264usize];
    ["Offset of field: amdf_api_t::user_queue_query_status"]
        [::std::mem::offset_of!(amdf_api_t, user_queue_query_status) - 272usize];
    ["Offset of field: amdf_api_t::user_queue_wait_consumed"]
        [::std::mem::offset_of!(amdf_api_t, user_queue_wait_consumed) - 280usize];
    ["Offset of field: amdf_api_t::user_queue_destroy"]
        [::std::mem::offset_of!(amdf_api_t, user_queue_destroy) - 288usize];
    ["Offset of field: amdf_api_t::memory_query_address"]
        [::std::mem::offset_of!(amdf_api_t, memory_query_address) - 296usize];
    ["Offset of field: amdf_api_t::memory_scope_query_pair_info"]
        [::std::mem::offset_of!(amdf_api_t, memory_scope_query_pair_info) - 304usize];
    ["Offset of field: amdf_api_t::kernel_queue_refresh_status"]
        [::std::mem::offset_of!(amdf_api_t, kernel_queue_refresh_status) - 312usize];
    ["Offset of field: amdf_api_t::kernel_queue_request_notification"]
        [::std::mem::offset_of!(amdf_api_t, kernel_queue_request_notification) - 320usize];
};
#[doc = " Function type used to acquire the immutable API table."]
pub type amdf_query_api_fn_t = ::std::option::Option<
    unsafe extern "C" fn(
        minimum_version: amdf_abi_version_t,
        maximum_version: amdf_abi_version_t,
        out_api: *mut *const amdf_api_t,
    ) -> amdf_status_t,
>;
#[doc = " Features available on a live device under its instance's lifetime policy."]
pub type amdf_gpu_device_features_t = u64;
#[doc = " REGISTERED_HOST borrows caller pages without copying their contents."]
pub const AMDF_GPU_DEVICE_FEATURE_HOST_REGISTRATION: amdf_gpu_device_feature_bits_e = 1;
#[doc = " Destroying a device permits later creation within the same instance,\n without caller-retained native handles or process exit. This does not\n imply native process-context reclamation when the instance is destroyed."]
pub const AMDF_GPU_DEVICE_FEATURE_DEVICE_RECREATION: amdf_gpu_device_feature_bits_e = 2;
#[doc = " LOCAL allocations provide device-local physical placement."]
pub const AMDF_GPU_DEVICE_FEATURE_LOCAL_MEMORY: amdf_gpu_device_feature_bits_e = 4;
#[doc = " LOCAL allocations support HOST_VISIBLE together with DEVICE_LOCAL."]
pub const AMDF_GPU_DEVICE_FEATURE_HOST_VISIBLE_LOCAL_MEMORY: amdf_gpu_device_feature_bits_e = 8;
pub type amdf_gpu_device_feature_bits_e = ::std::os::raw::c_uint;
#[doc = " Immutable target identity and compute topology of one GPU endpoint.\n\n This record contains live provider-qualified hardware facts. It does not\n select an executable format, process-level target features, memory policy,\n or queue implementation."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_gpu_endpoint_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_GPU_ENDPOINT_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_gpu_endpoint_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    pub gfx_ip: amdf_gpu_endpoint_info_t__bindgen_ty_1,
    #[doc = " ASIC revision used for physical compiler-target selection.\n\n This is the HSA/KFD target revision and is distinct from the PCI\n config-space revision in `amdf_endpoint_info_t`. Gfx1250 uses values zero\n and one to distinguish A0 and B0 targets."]
    pub asic_revision: u32,
    pub compute: amdf_gpu_endpoint_info_t__bindgen_ty_2,
    pub topology: amdf_gpu_endpoint_info_t__bindgen_ty_3,
}
#[doc = " Exact Graphics IP identity."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_gpu_endpoint_info_t__bindgen_ty_1 {
    #[doc = " GFX IP major version."]
    pub major: u32,
    #[doc = " GFX IP minor version."]
    pub minor: u32,
    #[doc = " GFX IP stepping encoded in the canonical `gfxMmn` target name."]
    pub stepping: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_endpoint_info_t__bindgen_ty_1"]
        [::std::mem::size_of::<amdf_gpu_endpoint_info_t__bindgen_ty_1>() - 12usize];
    ["Alignment of amdf_gpu_endpoint_info_t__bindgen_ty_1"]
        [::std::mem::align_of::<amdf_gpu_endpoint_info_t__bindgen_ty_1>() - 4usize];
    ["Offset of field: amdf_gpu_endpoint_info_t__bindgen_ty_1::major"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t__bindgen_ty_1, major) - 0usize];
    ["Offset of field: amdf_gpu_endpoint_info_t__bindgen_ty_1::minor"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t__bindgen_ty_1, minor) - 4usize];
    ["Offset of field: amdf_gpu_endpoint_info_t__bindgen_ty_1::stepping"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t__bindgen_ty_1, stepping) - 8usize];
};
#[doc = " Active compute geometry and per-compute-unit limits."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_gpu_endpoint_info_t__bindgen_ty_2 {
    #[doc = " Number of lanes in one hardware wavefront."]
    pub wavefront_size: u32,
    #[doc = " Total active compute units across all XCCs after harvesting."]
    pub compute_unit_count: u32,
    #[doc = " Maximum resident hardware waves per compute unit."]
    pub maximum_wave_count_per_compute_unit: u32,
    #[doc = " Effective maximum scratch-backed waves per compute unit."]
    pub maximum_scratch_wave_count_per_compute_unit: u32,
    #[doc = " Local data share capacity per compute unit in bytes."]
    pub local_data_share_byte_length: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_endpoint_info_t__bindgen_ty_2"]
        [::std::mem::size_of::<amdf_gpu_endpoint_info_t__bindgen_ty_2>() - 24usize];
    ["Alignment of amdf_gpu_endpoint_info_t__bindgen_ty_2"]
        [::std::mem::align_of::<amdf_gpu_endpoint_info_t__bindgen_ty_2>() - 8usize];
    ["Offset of field: amdf_gpu_endpoint_info_t__bindgen_ty_2::wavefront_size"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t__bindgen_ty_2, wavefront_size) - 0usize];
    ["Offset of field: amdf_gpu_endpoint_info_t__bindgen_ty_2::compute_unit_count"][::std::mem::offset_of!(
        amdf_gpu_endpoint_info_t__bindgen_ty_2,
        compute_unit_count
    ) - 4usize];
    [
        "Offset of field: amdf_gpu_endpoint_info_t__bindgen_ty_2::maximum_wave_count_per_compute_unit",
    ][::std::mem::offset_of!(
        amdf_gpu_endpoint_info_t__bindgen_ty_2,
        maximum_wave_count_per_compute_unit
    ) - 8usize];
    [
        "Offset of field: amdf_gpu_endpoint_info_t__bindgen_ty_2::maximum_scratch_wave_count_per_compute_unit",
    ][::std::mem::offset_of!(
        amdf_gpu_endpoint_info_t__bindgen_ty_2,
        maximum_scratch_wave_count_per_compute_unit
    ) - 12usize];
    ["Offset of field: amdf_gpu_endpoint_info_t__bindgen_ty_2::local_data_share_byte_length"][::std::mem::offset_of!(
        amdf_gpu_endpoint_info_t__bindgen_ty_2,
        local_data_share_byte_length
    )
        - 16usize];
};
#[doc = " Multi-chiplet command-processor topology."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_gpu_endpoint_info_t__bindgen_ty_3 {
    #[doc = " Nonzero number of active XCCs represented by the endpoint."]
    pub xcc_count: u32,
    #[doc = " Uniform number of shader engines within each XCC."]
    pub shader_engine_count_per_xcc: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_endpoint_info_t__bindgen_ty_3"]
        [::std::mem::size_of::<amdf_gpu_endpoint_info_t__bindgen_ty_3>() - 8usize];
    ["Alignment of amdf_gpu_endpoint_info_t__bindgen_ty_3"]
        [::std::mem::align_of::<amdf_gpu_endpoint_info_t__bindgen_ty_3>() - 4usize];
    ["Offset of field: amdf_gpu_endpoint_info_t__bindgen_ty_3::xcc_count"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t__bindgen_ty_3, xcc_count) - 0usize];
    ["Offset of field: amdf_gpu_endpoint_info_t__bindgen_ty_3::shader_engine_count_per_xcc"][::std::mem::offset_of!(
        amdf_gpu_endpoint_info_t__bindgen_ty_3,
        shader_engine_count_per_xcc
    )
        - 4usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_endpoint_info_t"]
        [::std::mem::size_of::<amdf_gpu_endpoint_info_t>() - 64usize];
    ["Alignment of amdf_gpu_endpoint_info_t"]
        [::std::mem::align_of::<amdf_gpu_endpoint_info_t>() - 8usize];
    ["Offset of field: amdf_gpu_endpoint_info_t::type_"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t, type_) - 0usize];
    ["Offset of field: amdf_gpu_endpoint_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_gpu_endpoint_info_t::next"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t, next) - 8usize];
    ["Offset of field: amdf_gpu_endpoint_info_t::gfx_ip"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t, gfx_ip) - 16usize];
    ["Offset of field: amdf_gpu_endpoint_info_t::asic_revision"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t, asic_revision) - 28usize];
    ["Offset of field: amdf_gpu_endpoint_info_t::compute"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t, compute) - 32usize];
    ["Offset of field: amdf_gpu_endpoint_info_t::topology"]
        [::std::mem::offset_of!(amdf_gpu_endpoint_info_t, topology) - 56usize];
};
impl Default for amdf_gpu_endpoint_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Parameters used to materialize one program-independent GPU device.\n\n A device owns one native GPU execution and address domain. Queue,\n executable, and memory policy are selected by later operations. Native\n lifetime is inherited from the endpoint's instance, not selected per device."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_gpu_device_create_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_GPU_DEVICE_CREATE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_gpu_device_create_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Reserved for compatible growth and must be zero."]
    pub reserved: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_device_create_info_t"]
        [::std::mem::size_of::<amdf_gpu_device_create_info_t>() - 24usize];
    ["Alignment of amdf_gpu_device_create_info_t"]
        [::std::mem::align_of::<amdf_gpu_device_create_info_t>() - 8usize];
    ["Offset of field: amdf_gpu_device_create_info_t::type_"]
        [::std::mem::offset_of!(amdf_gpu_device_create_info_t, type_) - 0usize];
    ["Offset of field: amdf_gpu_device_create_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_gpu_device_create_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_gpu_device_create_info_t::next"]
        [::std::mem::offset_of!(amdf_gpu_device_create_info_t, next) - 8usize];
    ["Offset of field: amdf_gpu_device_create_info_t::reserved"]
        [::std::mem::offset_of!(amdf_gpu_device_create_info_t, reserved) - 16usize];
};
impl Default for amdf_gpu_device_create_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Immutable identity, reset state, and achieved features of one live GPU\n device."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_gpu_device_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_GPU_DEVICE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_gpu_device_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Opaque identity of this live materialized device."]
    pub id: amdf_device_id_t,
    #[doc = " Monotonic provider epoch invalidating state after a device reset."]
    pub reset_epoch: u64,
    #[doc = " Features supported by this materialized device and native lifetime policy.\n These may refine the expected endpoint capabilities without changing them."]
    pub features: amdf_gpu_device_features_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_device_info_t"][::std::mem::size_of::<amdf_gpu_device_info_t>() - 48usize];
    ["Alignment of amdf_gpu_device_info_t"]
        [::std::mem::align_of::<amdf_gpu_device_info_t>() - 8usize];
    ["Offset of field: amdf_gpu_device_info_t::type_"]
        [::std::mem::offset_of!(amdf_gpu_device_info_t, type_) - 0usize];
    ["Offset of field: amdf_gpu_device_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_gpu_device_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_gpu_device_info_t::next"]
        [::std::mem::offset_of!(amdf_gpu_device_info_t, next) - 8usize];
    ["Offset of field: amdf_gpu_device_info_t::id"]
        [::std::mem::offset_of!(amdf_gpu_device_info_t, id) - 16usize];
    ["Offset of field: amdf_gpu_device_info_t::reset_epoch"]
        [::std::mem::offset_of!(amdf_gpu_device_info_t, reset_epoch) - 32usize];
    ["Offset of field: amdf_gpu_device_info_t::features"]
        [::std::mem::offset_of!(amdf_gpu_device_info_t, features) - 40usize];
};
impl Default for amdf_gpu_device_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Eight-dword ACQUIRE_MEM with GCR_CNTL in dword 7. Global cache control\n uses zero bases and maximum sizes; EVENT_WRITE CS_PARTIAL_FLUSH supplies\n preceding compute completion. This does not select a cache policy for\n the caller: cache_operations and cache_transition_kinds remain required."]
pub const AMDF_GPU_PM4_FORMAT_FEATURE_ACQUIRE_MEM_GCR: amdf_gpu_pm4_format_feature_bits_e = 1;
#[doc = " Native PM4 encoding features reported in `format_features`."]
pub type amdf_gpu_pm4_format_feature_bits_e = ::std::os::raw::c_uint;
#[doc = " Five-dword GCR packet with the 19-bit control field beginning at bit 16\n of dword 2. This names that encoding, not other GCR packet layouts."]
pub const AMDF_GPU_SDMA_FORMAT_FEATURE_GCR: amdf_gpu_sdma_format_feature_bits_e = 1;
#[doc = " FENCE uses a two-bit memory type at header bit 16 and an explicit system\n bit at bit 20. A fence to system memory sets that bit. Without this\n feature FENCE uses the three-bit memory-type encoding at bit 16."]
pub const AMDF_GPU_SDMA_FORMAT_FEATURE_FENCE_SYSTEM: amdf_gpu_sdma_format_feature_bits_e = 2;
#[doc = " COPY_LINEAR source/destination scope fields occupy bits 26/18 of dword 2;\n FENCE scope occupies header bits 25:24. Scope 3 denotes the system.\n COPY_LINEAR's NPD bit at header bit 28 disables prefetch past that copy.\n Without this feature these scope and NPD bits remain zero."]
pub const AMDF_GPU_SDMA_FORMAT_FEATURE_MEMORY_SCOPE: amdf_gpu_sdma_format_feature_bits_e = 4;
#[doc = " Native SDMA encoding features reported in `format_features`."]
pub type amdf_gpu_sdma_format_feature_bits_e = ::std::os::raw::c_uint;
#[doc = " Scratch backing borrowed by one directly published compute queue.\n\n An all-zero value disables scratch and accepts only commands whose private\n segment is empty. Otherwise the selected access must belong to the queue's\n device and provide read/write permission and a stable GPU address. The queue\n borrows the memory without lifetime tracking. The caller keeps the scratch\n backing live until queue destruction succeeds."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_gpu_queue_scratch_t {
    #[doc = " Memory resource borrowed for the queue lifetime, or NULL when disabled."]
    pub memory: *mut amdf_memory_t,
    #[doc = " Resource-local access for the queue's device, or zero when disabled."]
    pub access_ordinal: u32,
    #[doc = " Reserved for compatible growth; always zero."]
    pub reserved: u32,
    #[doc = " Byte offset from the attachment's stable device base."]
    pub byte_offset: u64,
    #[doc = " Nonzero scratch backing length in bytes, or zero when disabled."]
    pub byte_length: u64,
    #[doc = " Maximum private-segment bytes per workitem accepted by the queue."]
    pub maximum_private_segment_byte_length: u32,
    #[doc = " Number of simultaneously scratch-backed waves."]
    pub maximum_wave_count: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_queue_scratch_t"]
        [::std::mem::size_of::<amdf_gpu_queue_scratch_t>() - 40usize];
    ["Alignment of amdf_gpu_queue_scratch_t"]
        [::std::mem::align_of::<amdf_gpu_queue_scratch_t>() - 8usize];
    ["Offset of field: amdf_gpu_queue_scratch_t::memory"]
        [::std::mem::offset_of!(amdf_gpu_queue_scratch_t, memory) - 0usize];
    ["Offset of field: amdf_gpu_queue_scratch_t::access_ordinal"]
        [::std::mem::offset_of!(amdf_gpu_queue_scratch_t, access_ordinal) - 8usize];
    ["Offset of field: amdf_gpu_queue_scratch_t::reserved"]
        [::std::mem::offset_of!(amdf_gpu_queue_scratch_t, reserved) - 12usize];
    ["Offset of field: amdf_gpu_queue_scratch_t::byte_offset"]
        [::std::mem::offset_of!(amdf_gpu_queue_scratch_t, byte_offset) - 16usize];
    ["Offset of field: amdf_gpu_queue_scratch_t::byte_length"]
        [::std::mem::offset_of!(amdf_gpu_queue_scratch_t, byte_length) - 24usize];
    ["Offset of field: amdf_gpu_queue_scratch_t::maximum_private_segment_byte_length"][::std::mem::offset_of!(
        amdf_gpu_queue_scratch_t,
        maximum_private_segment_byte_length
    ) - 32usize];
    ["Offset of field: amdf_gpu_queue_scratch_t::maximum_wave_count"]
        [::std::mem::offset_of!(amdf_gpu_queue_scratch_t, maximum_wave_count) - 36usize];
};
impl Default for amdf_gpu_queue_scratch_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Parameters used to acquire one directly published GPU queue."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_gpu_user_queue_create_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_GPU_USER_QUEUE_CREATE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_gpu_user_queue_create_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Endpoint-local PM4, SDMA, or AQL family supporting user publication."]
    pub queue_family_ordinal: u32,
    #[doc = " Requested scheduling priority."]
    pub priority: amdf_queue_priority_t,
    #[doc = " Required producer reservation protocol."]
    pub producer_mode: amdf_queue_producer_mode_t,
    #[doc = " Reserved for compatible growth and must be zero."]
    pub reserved: u32,
    #[doc = " Direct producer capabilities that creation must achieve."]
    pub required_capabilities: amdf_user_queue_capabilities_t,
    #[doc = " Requested power-of-two primary ring capacity, or zero for the default."]
    pub ring_byte_length: u64,
    #[doc = " Compute scratch borrowed for the queue lifetime, or all-zero when absent."]
    pub scratch: amdf_gpu_queue_scratch_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_user_queue_create_info_t"]
        [::std::mem::size_of::<amdf_gpu_user_queue_create_info_t>() - 88usize];
    ["Alignment of amdf_gpu_user_queue_create_info_t"]
        [::std::mem::align_of::<amdf_gpu_user_queue_create_info_t>() - 8usize];
    ["Offset of field: amdf_gpu_user_queue_create_info_t::type_"]
        [::std::mem::offset_of!(amdf_gpu_user_queue_create_info_t, type_) - 0usize];
    ["Offset of field: amdf_gpu_user_queue_create_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_gpu_user_queue_create_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_gpu_user_queue_create_info_t::next"]
        [::std::mem::offset_of!(amdf_gpu_user_queue_create_info_t, next) - 8usize];
    ["Offset of field: amdf_gpu_user_queue_create_info_t::queue_family_ordinal"]
        [::std::mem::offset_of!(amdf_gpu_user_queue_create_info_t, queue_family_ordinal) - 16usize];
    ["Offset of field: amdf_gpu_user_queue_create_info_t::priority"]
        [::std::mem::offset_of!(amdf_gpu_user_queue_create_info_t, priority) - 20usize];
    ["Offset of field: amdf_gpu_user_queue_create_info_t::producer_mode"]
        [::std::mem::offset_of!(amdf_gpu_user_queue_create_info_t, producer_mode) - 24usize];
    ["Offset of field: amdf_gpu_user_queue_create_info_t::reserved"]
        [::std::mem::offset_of!(amdf_gpu_user_queue_create_info_t, reserved) - 28usize];
    ["Offset of field: amdf_gpu_user_queue_create_info_t::required_capabilities"][::std::mem::offset_of!(
        amdf_gpu_user_queue_create_info_t,
        required_capabilities
    ) - 32usize];
    ["Offset of field: amdf_gpu_user_queue_create_info_t::ring_byte_length"]
        [::std::mem::offset_of!(amdf_gpu_user_queue_create_info_t, ring_byte_length) - 40usize];
    ["Offset of field: amdf_gpu_user_queue_create_info_t::scratch"]
        [::std::mem::offset_of!(amdf_gpu_user_queue_create_info_t, scratch) - 48usize];
};
impl Default for amdf_gpu_user_queue_create_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " One already-materialized native GPU command stream.\n\n The command bytes reside in executable memory with a stable device address\n and may be device-local or non-host-visible. Submission resolves only that\n address; it never reads, validates, copies, hashes, or transcribes the\n command bytes."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_gpu_kernel_command_t {
    #[doc = " Memory resource borrowed until the accepted submission retires."]
    pub memory: *mut amdf_memory_t,
    #[doc = " Resource-local access for the queue's device."]
    pub access_ordinal: u32,
    #[doc = " Reserved for compatible growth; always zero."]
    pub reserved: u32,
    #[doc = " Dword-aligned byte offset from the attachment's stable device base."]
    pub byte_offset: u64,
    #[doc = " Nonzero dword-aligned command length."]
    pub byte_length: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_kernel_command_t"]
        [::std::mem::size_of::<amdf_gpu_kernel_command_t>() - 32usize];
    ["Alignment of amdf_gpu_kernel_command_t"]
        [::std::mem::align_of::<amdf_gpu_kernel_command_t>() - 8usize];
    ["Offset of field: amdf_gpu_kernel_command_t::memory"]
        [::std::mem::offset_of!(amdf_gpu_kernel_command_t, memory) - 0usize];
    ["Offset of field: amdf_gpu_kernel_command_t::access_ordinal"]
        [::std::mem::offset_of!(amdf_gpu_kernel_command_t, access_ordinal) - 8usize];
    ["Offset of field: amdf_gpu_kernel_command_t::reserved"]
        [::std::mem::offset_of!(amdf_gpu_kernel_command_t, reserved) - 12usize];
    ["Offset of field: amdf_gpu_kernel_command_t::byte_offset"]
        [::std::mem::offset_of!(amdf_gpu_kernel_command_t, byte_offset) - 16usize];
    ["Offset of field: amdf_gpu_kernel_command_t::byte_length"]
        [::std::mem::offset_of!(amdf_gpu_kernel_command_t, byte_length) - 24usize];
};
impl Default for amdf_gpu_kernel_command_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Parameters used to acquire one kernel-mediated GPU queue."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_gpu_kernel_queue_create_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_GPU_KERNEL_QUEUE_CREATE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_gpu_kernel_queue_create_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Endpoint-local PM4 or SDMA family supporting kernel publication."]
    pub queue_family_ordinal: u32,
    #[doc = " Maximum accepted submissions that may remain unretired, or zero for\n AMDF_GPU_KERNEL_QUEUE_DEFAULT_PENDING_SUBMISSION_COUNT. This admission\n bound does not reserve native driver capacity or retain command memory."]
    pub maximum_pending_submission_count: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_kernel_queue_create_info_t"]
        [::std::mem::size_of::<amdf_gpu_kernel_queue_create_info_t>() - 24usize];
    ["Alignment of amdf_gpu_kernel_queue_create_info_t"]
        [::std::mem::align_of::<amdf_gpu_kernel_queue_create_info_t>() - 8usize];
    ["Offset of field: amdf_gpu_kernel_queue_create_info_t::type_"]
        [::std::mem::offset_of!(amdf_gpu_kernel_queue_create_info_t, type_) - 0usize];
    ["Offset of field: amdf_gpu_kernel_queue_create_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_gpu_kernel_queue_create_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_gpu_kernel_queue_create_info_t::next"]
        [::std::mem::offset_of!(amdf_gpu_kernel_queue_create_info_t, next) - 8usize];
    ["Offset of field: amdf_gpu_kernel_queue_create_info_t::queue_family_ordinal"][::std::mem::offset_of!(
        amdf_gpu_kernel_queue_create_info_t,
        queue_family_ordinal
    ) - 16usize];
    ["Offset of field: amdf_gpu_kernel_queue_create_info_t::maximum_pending_submission_count"][::std::mem::offset_of!(
        amdf_gpu_kernel_queue_create_info_t,
        maximum_pending_submission_count
    )
        - 20usize];
};
impl Default for amdf_gpu_kernel_queue_create_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " One bounded kernel-mediated GPU submission."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_gpu_kernel_queue_submission_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_GPU_KERNEL_QUEUE_SUBMISSION_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_gpu_kernel_queue_submission_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Number of immutable descriptors in `commands`."]
    pub command_count: u32,
    #[doc = " Reserved for compatible growth and must be zero."]
    pub reserved: u32,
    #[doc = " Borrowed descriptor array consumed before return. Each referenced memory\n attachment remains borrowed until the accepted submission retires."]
    pub commands: *const amdf_gpu_kernel_command_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_kernel_queue_submission_info_t"]
        [::std::mem::size_of::<amdf_gpu_kernel_queue_submission_info_t>() - 32usize];
    ["Alignment of amdf_gpu_kernel_queue_submission_info_t"]
        [::std::mem::align_of::<amdf_gpu_kernel_queue_submission_info_t>() - 8usize];
    ["Offset of field: amdf_gpu_kernel_queue_submission_info_t::type_"]
        [::std::mem::offset_of!(amdf_gpu_kernel_queue_submission_info_t, type_) - 0usize];
    ["Offset of field: amdf_gpu_kernel_queue_submission_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_gpu_kernel_queue_submission_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_gpu_kernel_queue_submission_info_t::next"]
        [::std::mem::offset_of!(amdf_gpu_kernel_queue_submission_info_t, next) - 8usize];
    ["Offset of field: amdf_gpu_kernel_queue_submission_info_t::command_count"]
        [::std::mem::offset_of!(amdf_gpu_kernel_queue_submission_info_t, command_count) - 16usize];
    ["Offset of field: amdf_gpu_kernel_queue_submission_info_t::reserved"]
        [::std::mem::offset_of!(amdf_gpu_kernel_queue_submission_info_t, reserved) - 20usize];
    ["Offset of field: amdf_gpu_kernel_queue_submission_info_t::commands"]
        [::std::mem::offset_of!(amdf_gpu_kernel_queue_submission_info_t, commands) - 24usize];
};
impl Default for amdf_gpu_kernel_queue_submission_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Immutable entry-point table for one negotiated GPU extension version.\n\n Tables grow only by appending fields. The table and every function pointer\n covered by `structure_size` remain valid until the providing library is\n unloaded."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_gpu_api_t {
    #[doc = " Size in bytes of this table version."]
    pub structure_size: u32,
    #[doc = " GPU extension version implemented by this table."]
    pub extension_version: u32,
    #[doc = " Copies immutable GPU properties cached while opening `endpoint`.\n\n The endpoint must have a provider-qualified GPU profile. Passing another\n engine or a GPU that the active provider could not qualify returns the\n cached qualification error without modifying the output. The operation is\n thread-safe and performs no system call, allocation, provider-library\n load, retry, sleep, or device wait. The caller initializes `out_info` and\n its complete extension chain.\n Cached facts are read without locking, lazy initialization or\n ownership-counter updates."]
    pub endpoint_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            endpoint: *mut amdf_endpoint_t,
            out_info: *mut amdf_gpu_endpoint_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Materializes one program-independent GPU execution and address domain.\n\n `endpoint` remains query-only. Its instance selects the native lifetime;\n an unsupported lifetime is rejected without fallback. The returned device\n borrows the endpoint, which must outlive it. No queue,\n executable, command stream, or public memory object is created. Failure\n leaves `out_device` unchanged.\n This cold boundary may allocate, load native dependencies, serialize\n shared connection setup and enter the driver. Address-domain preparation\n completes here instead of during a query or first submission."]
    pub device_create: ::std::option::Option<
        unsafe extern "C" fn(
            endpoint: *mut amdf_endpoint_t,
            create_info: *const amdf_gpu_device_create_info_t,
            out_device: *mut *mut amdf_device_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Copies the identity and current reset epoch of `device`.\n\n The operation is thread-safe and performs no system call, allocation,\n device initialization, retry, sleep, or device wait. The caller\n initializes `out_info` and its complete extension chain. No output is\n modified when validation or engine compatibility fails.\n Reset observation may use atomic loads; this query takes no lock,\n initializes no state and updates no ownership counters."]
    pub device_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            device: *mut amdf_device_t,
            out_info: *mut amdf_gpu_device_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Acquires one kernel-mediated native command queue from a GPU device.\n\n The returned queue borrows `device`, which must outlive it. Creation\n selects an advertised `GPU_PM4 + KERNEL` or `GPU_SDMA + KERNEL` family\n and allocates every bounded submission resource before publication.\n Failure leaves `out_queue` unchanged.\n Native command and completion resources are ready before success; neither\n submission nor waiting allocates them on first use."]
    pub kernel_queue_create: ::std::option::Option<
        unsafe extern "C" fn(
            device: *mut amdf_device_t,
            create_info: *const amdf_gpu_kernel_queue_create_info_t,
            out_queue: *mut *mut amdf_kernel_queue_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Publishes one bounded array of already-materialized native command\n streams in the representation selected when the queue was created.\n\n Every command range must belong to the queue's device and reset epoch and\n have execute device access and the `DEVICE_ADDRESS` memory flag. The call\n borrows command memory without retaining it or tracking its lifetime.\n The caller keeps it live until the returned submission retires. It\n performs no allocation, command-byte access, native-format parsing,\n lowering, transcription, native submission retry, sleep, or host wait.\n Native rejection leaves `out_submission` unchanged. Because command bytes\n are opaque, the caller keeps every indirectly referenced memory or native\n object live until the submission retires.\n Successful calls return increasing queue-local completion points. Callers\n use returned points without assuming a starting value or dense numbering.\n A successful wait for one point covers all earlier accepted submissions\n on this queue, not independently scheduled work on other queues.\n\n This hot path takes no library lock and performs no lazy initialization,\n mapping, pinning or indirect-buffer scan. It is thread-safe with other\n submissions and progress operations. Concurrent publication returns BUSY\n rather than waiting. The publication claim ends when the native call\n returns, not when execution completes. At the configured pending bound,\n one nonblocking native progress check reclaims completed capacity before\n returning BUSY if the queue remains full. No intermediate host wait is\n required. This is not a wait-free guarantee. Native publication may enter\n the driver; it does not initialize a host scheduler or translate commands."]
    pub kernel_queue_submit: ::std::option::Option<
        unsafe extern "C" fn(
            queue: *mut amdf_kernel_queue_t,
            submission_info: *const amdf_gpu_kernel_queue_submission_info_t,
            out_submission: *mut u64,
        ) -> amdf_status_t,
    >,
    #[doc = " Acquires one directly published native command queue from a GPU device.\n\n Creation selects an advertised `GPU_PM4 + USER`, `GPU_SDMA + USER`, or\n `GPU_AQL + USER` family and allocates every queue-owned ring and native\n sidecar before publication. The returned queue borrows `device` and any\n supplied scratch memory, which must outlive it. Commands are published\n through a mapping from the base API. Failure leaves `out_queue` unchanged.\n This is a cold allocation boundary. Once explicitly mapped, publication\n consists of caller-owned native ring and doorbell operations, without a\n libamdf submit call or first-publication setup."]
    pub user_queue_create: ::std::option::Option<
        unsafe extern "C" fn(
            device: *mut amdf_device_t,
            create_info: *const amdf_gpu_user_queue_create_info_t,
            out_queue: *mut *mut amdf_user_queue_t,
        ) -> amdf_status_t,
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_gpu_api_t"][::std::mem::size_of::<amdf_gpu_api_t>() - 56usize];
    ["Alignment of amdf_gpu_api_t"][::std::mem::align_of::<amdf_gpu_api_t>() - 8usize];
    ["Offset of field: amdf_gpu_api_t::structure_size"]
        [::std::mem::offset_of!(amdf_gpu_api_t, structure_size) - 0usize];
    ["Offset of field: amdf_gpu_api_t::extension_version"]
        [::std::mem::offset_of!(amdf_gpu_api_t, extension_version) - 4usize];
    ["Offset of field: amdf_gpu_api_t::endpoint_query_info"]
        [::std::mem::offset_of!(amdf_gpu_api_t, endpoint_query_info) - 8usize];
    ["Offset of field: amdf_gpu_api_t::device_create"]
        [::std::mem::offset_of!(amdf_gpu_api_t, device_create) - 16usize];
    ["Offset of field: amdf_gpu_api_t::device_query_info"]
        [::std::mem::offset_of!(amdf_gpu_api_t, device_query_info) - 24usize];
    ["Offset of field: amdf_gpu_api_t::kernel_queue_create"]
        [::std::mem::offset_of!(amdf_gpu_api_t, kernel_queue_create) - 32usize];
    ["Offset of field: amdf_gpu_api_t::kernel_queue_submit"]
        [::std::mem::offset_of!(amdf_gpu_api_t, kernel_queue_submit) - 40usize];
    ["Offset of field: amdf_gpu_api_t::user_queue_create"]
        [::std::mem::offset_of!(amdf_gpu_api_t, user_queue_create) - 48usize];
};
#[doc = " One program-independent schedulable XDNA context."]
#[repr(C)]
#[derive(Debug)]
pub struct amdf_xdna_context_t {
    _unused: [u8; 0],
}
#[doc = " Compiler-visible AIE instruction and array architecture."]
pub type amdf_xdna_architecture_t = u32;
#[doc = " The architecture is unavailable or not represented by this API version."]
pub const AMDF_XDNA_ARCHITECTURE_UNKNOWN: amdf_xdna_architecture_e = 0;
#[doc = " The AIE2 architecture implemented by NPU1-family XDNA devices."]
pub const AMDF_XDNA_ARCHITECTURE_AIE2: amdf_xdna_architecture_e = 1;
#[doc = " The AIE2P architecture implemented by Strix-family XDNA devices."]
pub const AMDF_XDNA_ARCHITECTURE_AIE2P: amdf_xdna_architecture_e = 2;
#[doc = " The AIE4 architecture implemented by newer XDNA devices."]
pub const AMDF_XDNA_ARCHITECTURE_AIE4: amdf_xdna_architecture_e = 3;
pub type amdf_xdna_architecture_e = ::std::os::raw::c_uint;
#[doc = " Context scheduling modes admitted by an XDNA endpoint."]
pub type amdf_xdna_scheduling_modes_t = u32;
#[doc = " A context can receive exclusive ownership of its physical placement."]
pub const AMDF_XDNA_SCHEDULING_MODE_EXCLUSIVE: amdf_xdna_scheduling_mode_bits_e = 1;
#[doc = " Contexts can execute concurrently on disjoint spatial placements."]
pub const AMDF_XDNA_SCHEDULING_MODE_SPATIAL: amdf_xdna_scheduling_mode_bits_e = 2;
#[doc = " Contexts can time-share one physical placement. Context lifetime does not\n reserve tile state between submissions: another context may use the array\n and native scheduling may reset its registers, locks, or local memories.\n Each independent submission establishes the application state it needs.\n Host instruction backing remains valid for its explicit memory lifetime."]
pub const AMDF_XDNA_SCHEDULING_MODE_TIME_SLICED: amdf_xdna_scheduling_mode_bits_e = 4;
pub type amdf_xdna_scheduling_mode_bits_e = ::std::os::raw::c_uint;
#[doc = " Binding physical placement contracts supported by the native provider.\n Zero means no fixed placement is available, not an unqueried value."]
pub type amdf_xdna_placement_modes_t = u32;
#[doc = " Every admitted context has fixed backing covering the endpoint's complete\n physical array, including when its logical column count is smaller. The\n only explicit origin accepted is `array.column_origin`. ANY is also\n accepted and provides the same fixed backing. Fixed geometry grants\n neither exclusive ownership nor uninterrupted residency. Reset may discard\n state."]
pub const AMDF_XDNA_PLACEMENT_MODE_FIXED_FULL_ARRAY: amdf_xdna_placement_mode_bits_e = 1;
pub type amdf_xdna_placement_mode_bits_e = ::std::os::raw::c_uint;
#[doc = " Public target-native byte encodings accepted by an XDNA endpoint."]
pub type amdf_xdna_binary_format_t = u32;
#[doc = " No public encoding is available for this role."]
pub const AMDF_XDNA_BINARY_FORMAT_UNKNOWN: amdf_xdna_binary_format_e = 0;
#[doc = " A device-generation-specific AIE transaction stream."]
pub const AMDF_XDNA_BINARY_FORMAT_TRANSACTION: amdf_xdna_binary_format_e = 2;
pub type amdf_xdna_binary_format_e = ::std::os::raw::c_uint;
#[doc = " One exact public target-native byte encoding."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_xdna_binary_format_info_t {
    #[doc = " Transaction stream or `AMDF_XDNA_BINARY_FORMAT_UNKNOWN`."]
    pub format: amdf_xdna_binary_format_t,
    #[doc = " Version defining the complete byte encoding."]
    pub version: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_binary_format_info_t"]
        [::std::mem::size_of::<amdf_xdna_binary_format_info_t>() - 8usize];
    ["Alignment of amdf_xdna_binary_format_info_t"]
        [::std::mem::align_of::<amdf_xdna_binary_format_info_t>() - 4usize];
    ["Offset of field: amdf_xdna_binary_format_info_t::format"]
        [::std::mem::offset_of!(amdf_xdna_binary_format_info_t, format) - 0usize];
    ["Offset of field: amdf_xdna_binary_format_info_t::version"]
        [::std::mem::offset_of!(amdf_xdna_binary_format_info_t, version) - 4usize];
};
#[doc = " Passive target identity available without activating the device.\n\n Geometry and execution capabilities belong to `amdf_xdna_device_info_t` and\n are obtained during explicit device creation."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_xdna_endpoint_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_XDNA_ENDPOINT_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_xdna_endpoint_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Compiler-visible AIE instruction and array architecture."]
    pub architecture: amdf_xdna_architecture_t,
    #[doc = " Exact NUL-terminated compiler target identifier."]
    pub target_id: [::std::os::raw::c_char; 64usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_endpoint_info_t"]
        [::std::mem::size_of::<amdf_xdna_endpoint_info_t>() - 88usize];
    ["Alignment of amdf_xdna_endpoint_info_t"]
        [::std::mem::align_of::<amdf_xdna_endpoint_info_t>() - 8usize];
    ["Offset of field: amdf_xdna_endpoint_info_t::type_"]
        [::std::mem::offset_of!(amdf_xdna_endpoint_info_t, type_) - 0usize];
    ["Offset of field: amdf_xdna_endpoint_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_xdna_endpoint_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_xdna_endpoint_info_t::next"]
        [::std::mem::offset_of!(amdf_xdna_endpoint_info_t, next) - 8usize];
    ["Offset of field: amdf_xdna_endpoint_info_t::architecture"]
        [::std::mem::offset_of!(amdf_xdna_endpoint_info_t, architecture) - 16usize];
    ["Offset of field: amdf_xdna_endpoint_info_t::target_id"]
        [::std::mem::offset_of!(amdf_xdna_endpoint_info_t, target_id) - 20usize];
};
impl Default for amdf_xdna_endpoint_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Opaque identity of one live XDNA context.\n\n The value is meaningful only while the context and its provider instance\n remain live. It is intended for correlation and compatibility checks, not\n persistence or native-handle recovery."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_xdna_context_id_t {
    #[doc = " Provider-defined identity words."]
    pub words: [u64; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_context_id_t"][::std::mem::size_of::<amdf_xdna_context_id_t>() - 16usize];
    ["Alignment of amdf_xdna_context_id_t"]
        [::std::mem::align_of::<amdf_xdna_context_id_t>() - 8usize];
    ["Offset of field: amdf_xdna_context_id_t::words"]
        [::std::mem::offset_of!(amdf_xdna_context_id_t, words) - 0usize];
};
#[doc = " Parameters used to materialize one XDNA ordinary-address-domain device.\n\n Version 1 has no device-specific fields. The structure retains its extension\n chain so later address-domain admission inputs do not require a new entry\n point. Context placement, scheduling, and program bytes are not device\n creation inputs."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_xdna_device_create_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_XDNA_DEVICE_CREATE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_xdna_device_create_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_device_create_info_t"]
        [::std::mem::size_of::<amdf_xdna_device_create_info_t>() - 16usize];
    ["Alignment of amdf_xdna_device_create_info_t"]
        [::std::mem::align_of::<amdf_xdna_device_create_info_t>() - 8usize];
    ["Offset of field: amdf_xdna_device_create_info_t::type_"]
        [::std::mem::offset_of!(amdf_xdna_device_create_info_t, type_) - 0usize];
    ["Offset of field: amdf_xdna_device_create_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_xdna_device_create_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_xdna_device_create_info_t::next"]
        [::std::mem::offset_of!(amdf_xdna_device_create_info_t, next) - 8usize];
};
impl Default for amdf_xdna_device_create_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Immutable identity and effective capabilities of one live XDNA device.\n Native array geometry is captured during activation; queries do no work in\n the driver. Capacity limits do not reserve resources or promise\n availability."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_xdna_device_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_XDNA_DEVICE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_xdna_device_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Opaque identity of this live materialized device."]
    pub id: amdf_device_id_t,
    #[doc = " Monotonic provider epoch invalidating state after a device reset."]
    pub reset_epoch: u64,
    #[doc = " Effective binding placement contracts for new contexts on this device.\n Zero means explicit origins and placement queries are unsupported.\n ANY-origin execution does not require fixed placement support."]
    pub placement_modes: amdf_xdna_placement_modes_t,
    pub array: amdf_xdna_device_info_t__bindgen_ty_1,
    pub context: amdf_xdna_device_info_t__bindgen_ty_2,
    pub instruction: amdf_xdna_device_info_t__bindgen_ty_3,
}
#[doc = " Physical array geometry and addressing."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_xdna_device_info_t__bindgen_ty_1 {
    #[doc = " Physical index of the first addressable array column."]
    pub column_origin: u32,
    #[doc = " Number of contiguous addressable physical array columns."]
    pub column_count: u32,
    #[doc = " Total physical rows, including shim, memory, and compute rows."]
    pub row_count: u32,
    #[doc = " Device-address distance in bytes between adjacent columns."]
    pub column_stride: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_device_info_t__bindgen_ty_1"]
        [::std::mem::size_of::<amdf_xdna_device_info_t__bindgen_ty_1>() - 24usize];
    ["Alignment of amdf_xdna_device_info_t__bindgen_ty_1"]
        [::std::mem::align_of::<amdf_xdna_device_info_t__bindgen_ty_1>() - 8usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_1::column_origin"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t__bindgen_ty_1, column_origin) - 0usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_1::column_count"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t__bindgen_ty_1, column_count) - 4usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_1::row_count"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t__bindgen_ty_1, row_count) - 8usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_1::column_stride"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t__bindgen_ty_1, column_stride) - 16usize];
};
#[doc = " Context admission through the activated native interface."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_xdna_device_info_t__bindgen_ty_2 {
    #[doc = " Exclusive, spatial, and time-sliced modes accepted by the device.\n Zero means context creation is unsupported."]
    pub scheduling_modes: amdf_xdna_scheduling_modes_t,
    #[doc = " Minimum logical column count requestable by one context."]
    pub minimum_column_count: u32,
    #[doc = " Maximum logical column count requestable by one context."]
    pub maximum_column_count: u32,
    #[doc = " Granularity of requestable logical column counts."]
    pub column_count_granularity: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_device_info_t__bindgen_ty_2"]
        [::std::mem::size_of::<amdf_xdna_device_info_t__bindgen_ty_2>() - 16usize];
    ["Alignment of amdf_xdna_device_info_t__bindgen_ty_2"]
        [::std::mem::align_of::<amdf_xdna_device_info_t__bindgen_ty_2>() - 4usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_2::scheduling_modes"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t__bindgen_ty_2, scheduling_modes) - 0usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_2::minimum_column_count"][::std::mem::offset_of!(
        amdf_xdna_device_info_t__bindgen_ty_2,
        minimum_column_count
    ) - 4usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_2::maximum_column_count"][::std::mem::offset_of!(
        amdf_xdna_device_info_t__bindgen_ty_2,
        maximum_column_count
    ) - 8usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_2::column_count_granularity"][::std::mem::offset_of!(
        amdf_xdna_device_info_t__bindgen_ty_2,
        column_count_granularity
    )
        - 12usize];
};
#[doc = " Opaque target-native instruction submission contract."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_xdna_device_info_t__bindgen_ty_3 {
    #[doc = " Maximum bytes in one instruction range; zero without execution."]
    pub maximum_byte_length: u64,
    #[doc = " Required power-of-two instruction address alignment in bytes."]
    pub address_alignment: u32,
    #[doc = " Required multiple of the instruction byte length."]
    pub byte_length_granularity: u32,
    #[doc = " Native encoding supplied by the caller, never parsed by libamdf."]
    pub format: amdf_xdna_binary_format_info_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_device_info_t__bindgen_ty_3"]
        [::std::mem::size_of::<amdf_xdna_device_info_t__bindgen_ty_3>() - 24usize];
    ["Alignment of amdf_xdna_device_info_t__bindgen_ty_3"]
        [::std::mem::align_of::<amdf_xdna_device_info_t__bindgen_ty_3>() - 8usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_3::maximum_byte_length"][::std::mem::offset_of!(
        amdf_xdna_device_info_t__bindgen_ty_3,
        maximum_byte_length
    ) - 0usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_3::address_alignment"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t__bindgen_ty_3, address_alignment) - 8usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_3::byte_length_granularity"][::std::mem::offset_of!(
        amdf_xdna_device_info_t__bindgen_ty_3,
        byte_length_granularity
    )
        - 12usize];
    ["Offset of field: amdf_xdna_device_info_t__bindgen_ty_3::format"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t__bindgen_ty_3, format) - 16usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_device_info_t"]
        [::std::mem::size_of::<amdf_xdna_device_info_t>() - 112usize];
    ["Alignment of amdf_xdna_device_info_t"]
        [::std::mem::align_of::<amdf_xdna_device_info_t>() - 8usize];
    ["Offset of field: amdf_xdna_device_info_t::type_"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t, type_) - 0usize];
    ["Offset of field: amdf_xdna_device_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_xdna_device_info_t::next"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t, next) - 8usize];
    ["Offset of field: amdf_xdna_device_info_t::id"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t, id) - 16usize];
    ["Offset of field: amdf_xdna_device_info_t::reset_epoch"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t, reset_epoch) - 32usize];
    ["Offset of field: amdf_xdna_device_info_t::placement_modes"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t, placement_modes) - 40usize];
    ["Offset of field: amdf_xdna_device_info_t::array"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t, array) - 48usize];
    ["Offset of field: amdf_xdna_device_info_t::context"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t, context) - 72usize];
    ["Offset of field: amdf_xdna_device_info_t::instruction"]
        [::std::mem::offset_of!(amdf_xdna_device_info_t, instruction) - 88usize];
};
impl Default for amdf_xdna_device_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Parameters used to admit one program-independent XDNA context."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_xdna_context_create_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_XDNA_CONTEXT_CREATE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_xdna_context_create_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Number of logical array columns requested for the context."]
    pub logical_column_count: u32,
    #[doc = " Exact physical backing origin, constrained by the device's placement\n modes, or `AMDF_XDNA_PHYSICAL_COLUMN_ORIGIN_ANY` to let the provider\n choose. An explicit origin requires a supported binding placement\n contract; it is never silently weakened into a preference. Unsupported\n requests fail with `AMDF_STATUS_CODE_UNSUPPORTED`."]
    pub physical_column_origin: u32,
    #[doc = " Nonempty set of scheduling modes acceptable to the caller."]
    pub acceptable_scheduling_modes: amdf_xdna_scheduling_modes_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_context_create_info_t"]
        [::std::mem::size_of::<amdf_xdna_context_create_info_t>() - 32usize];
    ["Alignment of amdf_xdna_context_create_info_t"]
        [::std::mem::align_of::<amdf_xdna_context_create_info_t>() - 8usize];
    ["Offset of field: amdf_xdna_context_create_info_t::type_"]
        [::std::mem::offset_of!(amdf_xdna_context_create_info_t, type_) - 0usize];
    ["Offset of field: amdf_xdna_context_create_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_xdna_context_create_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_xdna_context_create_info_t::next"]
        [::std::mem::offset_of!(amdf_xdna_context_create_info_t, next) - 8usize];
    ["Offset of field: amdf_xdna_context_create_info_t::logical_column_count"]
        [::std::mem::offset_of!(amdf_xdna_context_create_info_t, logical_column_count) - 16usize];
    ["Offset of field: amdf_xdna_context_create_info_t::physical_column_origin"]
        [::std::mem::offset_of!(amdf_xdna_context_create_info_t, physical_column_origin) - 20usize];
    ["Offset of field: amdf_xdna_context_create_info_t::acceptable_scheduling_modes"][::std::mem::offset_of!(
        amdf_xdna_context_create_info_t,
        acceptable_scheduling_modes
    ) - 24usize];
};
impl Default for amdf_xdna_context_create_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Identity and logical admission of one live XDNA context.\n Physical backing is a separate capability-gated placement query."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_xdna_context_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_XDNA_CONTEXT_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_xdna_context_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Opaque identity of this live schedulable context."]
    pub id: amdf_xdna_context_id_t,
    #[doc = " Identity of the ordinary-address-domain device borrowed by this context."]
    pub device_id: amdf_device_id_t,
    #[doc = " Device reset epoch in which this context remains valid."]
    pub reset_epoch: u64,
    #[doc = " Single scheduling mode selected from the acceptable input set."]
    pub scheduling_mode: amdf_xdna_scheduling_modes_t,
    #[doc = " Logical column count admitted for programs and commands."]
    pub logical_column_count: u32,
    #[doc = " Number of physical rows visible within each admitted column."]
    pub row_count: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_context_info_t"]
        [::std::mem::size_of::<amdf_xdna_context_info_t>() - 72usize];
    ["Alignment of amdf_xdna_context_info_t"]
        [::std::mem::align_of::<amdf_xdna_context_info_t>() - 8usize];
    ["Offset of field: amdf_xdna_context_info_t::type_"]
        [::std::mem::offset_of!(amdf_xdna_context_info_t, type_) - 0usize];
    ["Offset of field: amdf_xdna_context_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_xdna_context_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_xdna_context_info_t::next"]
        [::std::mem::offset_of!(amdf_xdna_context_info_t, next) - 8usize];
    ["Offset of field: amdf_xdna_context_info_t::id"]
        [::std::mem::offset_of!(amdf_xdna_context_info_t, id) - 16usize];
    ["Offset of field: amdf_xdna_context_info_t::device_id"]
        [::std::mem::offset_of!(amdf_xdna_context_info_t, device_id) - 32usize];
    ["Offset of field: amdf_xdna_context_info_t::reset_epoch"]
        [::std::mem::offset_of!(amdf_xdna_context_info_t, reset_epoch) - 48usize];
    ["Offset of field: amdf_xdna_context_info_t::scheduling_mode"]
        [::std::mem::offset_of!(amdf_xdna_context_info_t, scheduling_mode) - 56usize];
    ["Offset of field: amdf_xdna_context_info_t::logical_column_count"]
        [::std::mem::offset_of!(amdf_xdna_context_info_t, logical_column_count) - 60usize];
    ["Offset of field: amdf_xdna_context_info_t::row_count"]
        [::std::mem::offset_of!(amdf_xdna_context_info_t, row_count) - 64usize];
};
impl Default for amdf_xdna_context_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Complete fixed physical backing of one live XDNA context.\n Geometry is immutable for the context's valid lifetime and is not a snapshot\n of scheduler telemetry. Device reset invalidates the context's state; fixed\n placement does not imply exclusive or uninterrupted execution."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_xdna_context_placement_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_XDNA_CONTEXT_PLACEMENT_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_xdna_context_placement_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional output extension chain. No extensions are currently defined."]
    pub next: *mut ::std::os::raw::c_void,
    #[doc = " Physical origin of the backing array partition."]
    pub column_origin: u32,
    #[doc = " Physical width of the backing partition, including unused columns."]
    pub column_count: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_context_placement_info_t"]
        [::std::mem::size_of::<amdf_xdna_context_placement_info_t>() - 24usize];
    ["Alignment of amdf_xdna_context_placement_info_t"]
        [::std::mem::align_of::<amdf_xdna_context_placement_info_t>() - 8usize];
    ["Offset of field: amdf_xdna_context_placement_info_t::type_"]
        [::std::mem::offset_of!(amdf_xdna_context_placement_info_t, type_) - 0usize];
    ["Offset of field: amdf_xdna_context_placement_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_xdna_context_placement_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_xdna_context_placement_info_t::next"]
        [::std::mem::offset_of!(amdf_xdna_context_placement_info_t, next) - 8usize];
    ["Offset of field: amdf_xdna_context_placement_info_t::column_origin"]
        [::std::mem::offset_of!(amdf_xdna_context_placement_info_t, column_origin) - 16usize];
    ["Offset of field: amdf_xdna_context_placement_info_t::column_count"]
        [::std::mem::offset_of!(amdf_xdna_context_placement_info_t, column_count) - 20usize];
};
impl Default for amdf_xdna_context_placement_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Parameters used to acquire one kernel-mediated XDNA queue."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_xdna_kernel_queue_create_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_XDNA_KERNEL_QUEUE_CREATE_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_xdna_kernel_queue_create_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Endpoint-local XDNA family supporting kernel publication."]
    pub queue_family_ordinal: u32,
    #[doc = " Maximum accepted submissions that may remain unretired, or zero for\n AMDF_XDNA_KERNEL_QUEUE_DEFAULT_PENDING_SUBMISSION_COUNT. Native\n packet/result storage for this capacity is allocated before creation\n returns."]
    pub maximum_pending_submission_count: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_kernel_queue_create_info_t"]
        [::std::mem::size_of::<amdf_xdna_kernel_queue_create_info_t>() - 24usize];
    ["Alignment of amdf_xdna_kernel_queue_create_info_t"]
        [::std::mem::align_of::<amdf_xdna_kernel_queue_create_info_t>() - 8usize];
    ["Offset of field: amdf_xdna_kernel_queue_create_info_t::type_"]
        [::std::mem::offset_of!(amdf_xdna_kernel_queue_create_info_t, type_) - 0usize];
    ["Offset of field: amdf_xdna_kernel_queue_create_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_xdna_kernel_queue_create_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_xdna_kernel_queue_create_info_t::next"]
        [::std::mem::offset_of!(amdf_xdna_kernel_queue_create_info_t, next) - 8usize];
    ["Offset of field: amdf_xdna_kernel_queue_create_info_t::queue_family_ordinal"][::std::mem::offset_of!(
        amdf_xdna_kernel_queue_create_info_t,
        queue_family_ordinal
    ) - 16usize];
    ["Offset of field: amdf_xdna_kernel_queue_create_info_t::maximum_pending_submission_count"][::std::mem::offset_of!(
        amdf_xdna_kernel_queue_create_info_t,
        maximum_pending_submission_count
    )
        - 20usize];
};
impl Default for amdf_xdna_kernel_queue_create_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " One caller-owned target-native instruction range."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_xdna_kernel_command_t {
    #[doc = " Caller-owned private memory from the queue's exact context. The memory\n and its instruction bytes remain live and immutable through retirement."]
    pub memory: *mut amdf_memory_t,
    #[doc = " Consumer granting EXECUTE access and a firmware address."]
    pub access_ordinal: u32,
    #[doc = " Reserved for compatible growth and must be zero."]
    pub reserved: u32,
    #[doc = " Offset of opaque target-native instructions. The resulting firmware\n address satisfies the endpoint's instruction.address_alignment."]
    pub byte_offset: u64,
    #[doc = " Nonzero instruction length satisfying the endpoint's instruction limits."]
    pub byte_length: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_kernel_command_t"]
        [::std::mem::size_of::<amdf_xdna_kernel_command_t>() - 32usize];
    ["Alignment of amdf_xdna_kernel_command_t"]
        [::std::mem::align_of::<amdf_xdna_kernel_command_t>() - 8usize];
    ["Offset of field: amdf_xdna_kernel_command_t::memory"]
        [::std::mem::offset_of!(amdf_xdna_kernel_command_t, memory) - 0usize];
    ["Offset of field: amdf_xdna_kernel_command_t::access_ordinal"]
        [::std::mem::offset_of!(amdf_xdna_kernel_command_t, access_ordinal) - 8usize];
    ["Offset of field: amdf_xdna_kernel_command_t::reserved"]
        [::std::mem::offset_of!(amdf_xdna_kernel_command_t, reserved) - 12usize];
    ["Offset of field: amdf_xdna_kernel_command_t::byte_offset"]
        [::std::mem::offset_of!(amdf_xdna_kernel_command_t, byte_offset) - 16usize];
    ["Offset of field: amdf_xdna_kernel_command_t::byte_length"]
        [::std::mem::offset_of!(amdf_xdna_kernel_command_t, byte_length) - 24usize];
};
impl Default for amdf_xdna_kernel_command_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " One bounded kernel-mediated XDNA submission."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdf_xdna_kernel_queue_submission_info_t {
    #[doc = " Must be `AMDF_STRUCTURE_TYPE_XDNA_KERNEL_QUEUE_SUBMISSION_INFO`."]
    pub type_: amdf_structure_type_t,
    #[doc = " Must be at least `sizeof(amdf_xdna_kernel_queue_submission_info_t)`."]
    pub structure_size: u32,
    #[doc = " Optional input extension chain. No extensions are currently defined."]
    pub next: *const ::std::os::raw::c_void,
    #[doc = " Number of descriptors in `commands`, bounded by the queue's command limit."]
    pub command_count: u32,
    #[doc = " Reserved for compatible growth and must be zero."]
    pub reserved: u32,
    #[doc = " Borrowed descriptors consumed before return. Accepted instruction ranges\n remain borrowed through checked native retirement."]
    pub commands: *const amdf_xdna_kernel_command_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_kernel_queue_submission_info_t"]
        [::std::mem::size_of::<amdf_xdna_kernel_queue_submission_info_t>() - 32usize];
    ["Alignment of amdf_xdna_kernel_queue_submission_info_t"]
        [::std::mem::align_of::<amdf_xdna_kernel_queue_submission_info_t>() - 8usize];
    ["Offset of field: amdf_xdna_kernel_queue_submission_info_t::type_"]
        [::std::mem::offset_of!(amdf_xdna_kernel_queue_submission_info_t, type_) - 0usize];
    ["Offset of field: amdf_xdna_kernel_queue_submission_info_t::structure_size"]
        [::std::mem::offset_of!(amdf_xdna_kernel_queue_submission_info_t, structure_size) - 4usize];
    ["Offset of field: amdf_xdna_kernel_queue_submission_info_t::next"]
        [::std::mem::offset_of!(amdf_xdna_kernel_queue_submission_info_t, next) - 8usize];
    ["Offset of field: amdf_xdna_kernel_queue_submission_info_t::command_count"]
        [::std::mem::offset_of!(amdf_xdna_kernel_queue_submission_info_t, command_count) - 16usize];
    ["Offset of field: amdf_xdna_kernel_queue_submission_info_t::reserved"]
        [::std::mem::offset_of!(amdf_xdna_kernel_queue_submission_info_t, reserved) - 20usize];
    ["Offset of field: amdf_xdna_kernel_queue_submission_info_t::commands"]
        [::std::mem::offset_of!(amdf_xdna_kernel_queue_submission_info_t, commands) - 24usize];
};
impl Default for amdf_xdna_kernel_queue_submission_info_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Immutable entry-point table for one negotiated XDNA extension version.\n\n Tables grow only by appending fields. The table and every function pointer\n covered by `structure_size` remain valid until the providing library is\n unloaded. The per-method cost guarantees follow amdf_api_t and apply to\n first use as well as subsequent calls."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct amdf_xdna_api_t {
    #[doc = " Size in bytes of this table version."]
    pub structure_size: u32,
    #[doc = " XDNA extension version implemented by this table."]
    pub extension_version: u32,
    #[doc = " Copies passive XDNA target identity for `endpoint`.\n\n The endpoint must have a recognized XDNA architecture. Passing another\n engine or an unrecognized XDNA candidate returns\n `AMDF_STATUS_CODE_UNSUPPORTED`. The operation is thread-safe and performs\n no system call, firmware transaction, allocation, retry, sleep, or device\n wait. The caller initializes `out_info` and its complete extension chain;\n no output is modified when validation or qualification fails.\n Identity is read without locking, lazy initialization or\n ownership-counter updates."]
    pub endpoint_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            endpoint: *mut amdf_endpoint_t,
            out_info: *mut amdf_xdna_endpoint_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Materializes one XDNA ordinary-address domain and allocation namespace.\n\n `endpoint` remains query-only and may create independent devices. The\n returned device borrows the endpoint, which must outlive it. No context\n placement, scheduling, executable, PDI, xclbin, transaction, or control\n bytes are accepted or parsed. Failure leaves `out_device` unchanged.\n This cold boundary may allocate and enter the driver. It establishes\n ordinary address and native ABI state instead of deferring them to a\n memory query or first submission."]
    pub device_create: ::std::option::Option<
        unsafe extern "C" fn(
            endpoint: *mut amdf_endpoint_t,
            create_info: *const amdf_xdna_device_create_info_t,
            out_device: *mut *mut amdf_device_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Copies the identity, reset epoch and effective capabilities of `device`.\n\n The operation is thread-safe and performs no system call, allocation,\n device initialization, retry, sleep, or device wait. The caller\n initializes `out_info` and its complete extension chain. No output is\n modified when validation or engine compatibility fails.\n Reset observation may use atomic loads; this query takes no lock,\n initializes no state and updates no ownership counters."]
    pub device_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            device: *mut amdf_device_t,
            out_info: *mut amdf_xdna_device_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Acquires one kernel-mediated queue from an XDNA context.\n\n The returned queue borrows `context`, which must outlive it. Creation\n selects an advertised `XDNA + KERNEL` family and allocates all bounded\n submission bookkeeping before publication. It may configure and wait for\n provider-owned firmware bootstrap work. Failure leaves `out_queue`\n unchanged; any unfinished bootstrap ownership remains with the context.\n Native packet storage, completion resources and required bootstrap are\n ready before success. Their costs never move to first submission or wait."]
    pub kernel_queue_create: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut amdf_xdna_context_t,
            create_info: *const amdf_xdna_kernel_queue_create_info_t,
            out_queue: *mut *mut amdf_kernel_queue_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Publishes opaque instruction ranges from caller-owned private memory.\n\n Each memory resource must come from the queue's exact context scope and\n grant EXECUTE access. Caller writes must be published before submission;\n libamdf neither reads, copies nor modifies instruction bytes. The native\n provider fills its preallocated transport packet with address and length.\n The library performs no allocation, format parsing, lowering, relocation,\n binding resolution, native submission retry, sleep or host wait. Native\n retirement consumes the command result. The caller keeps instruction\n memory live until retirement; libamdf neither retains nor tracks it.\n Native rejection leaves `out_submission` unchanged.\n The caller also keeps memory reachable through opaque device addresses\n live; native command retirement does not prove that user-mode work\n scheduled by those commands has stopped accessing that memory.\n\n This hot path takes no library lock and performs no lazy initialization,\n mapping, pinning or indirect-buffer scan. It is thread-safe with other\n submissions and progress operations. Concurrent publication returns BUSY\n rather than waiting; its claim ends at native acceptance, not execution\n completion. At the configured pending bound, a nonblocking native refresh\n and checked result consumption reclaim completed packet slots before\n returning BUSY if capacity remains unavailable. No intermediate host wait\n is required. Native resource exhaustion can reject work earlier.\n Returned points increase within this queue, without a caller-visible\n starting value or dense-numbering guarantee. Waiting for one point covers\n earlier accepted commands, not independently scheduled descendants.\n This is not a wait-free guarantee. Native publication can block acquiring\n driver admission credits even when library packet capacity remains. It\n may publish queue-owned packet cache lines, not caller instruction/data\n bytes. Preserving the first native completion identity can require a\n one-time fence transfer after acceptance and before later publication;\n its native storage is already prepared at queue creation."]
    pub kernel_queue_submit: ::std::option::Option<
        unsafe extern "C" fn(
            queue: *mut amdf_kernel_queue_t,
            submission_info: *const amdf_xdna_kernel_queue_submission_info_t,
            out_submission: *mut u64,
        ) -> amdf_status_t,
    >,
    #[doc = " Admits one program-independent schedulable context beneath `device`.\n\n The returned context borrows the ordinary-address-domain device, which\n must outlive it. Creation selects one scheduling mode and establishes the\n logical admission and native completion state before publication. Explicit\n physical placement requires a supported device placement mode and is\n binding on success. It consumes no program or invocation bytes. Failure\n leaves `out_context` unchanged and creates no caller cleanup obligation.\n Construction releases its unpublished state locally; a native cleanup\n failure is reported without transferring that state to `device`.\n This cold operation may allocate and enter the native driver. Mandatory\n queue bootstrap can occur during kernel_queue_create, but never during\n a metadata query or first submission."]
    pub context_create: ::std::option::Option<
        unsafe extern "C" fn(
            device: *mut amdf_device_t,
            create_info: *const amdf_xdna_context_create_info_t,
            out_context: *mut *mut amdf_xdna_context_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Copies the immutable identity and logical admission of `context`.\n\n The operation is thread-safe and performs no system call, allocation,\n native initialization, retry, sleep, or device wait. The caller\n initializes `out_info` and its complete extension chain. No output is\n modified when validation fails.\n It takes no lock, performs no lazy initialization and updates no\n ownership counters."]
    pub context_query_info: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut amdf_xdna_context_t,
            out_info: *mut amdf_xdna_context_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Copies the complete fixed physical backing of `context`.\n\n Returns `AMDF_STATUS_CODE_UNSUPPORTED` if the device has no supported\n placement mode. This applies even when context creation used ANY origin.\n The operation is thread-safe and performs no system call, allocation,\n initialization, retry or wait. The caller initializes `out_info`; every\n failure leaves it unchanged.\n It reads the established placement without locking, lazy initialization\n or ownership-counter updates; it does not re-query firmware placement."]
    pub context_query_placement_info: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut amdf_xdna_context_t,
            out_info: *mut amdf_xdna_context_placement_info_t,
        ) -> amdf_status_t,
    >,
    #[doc = " Enumerates borrowed private memory scopes of this live context.\n\n A private scope accepts only the context's exact device as its consumer.\n Its addresses are qualified by this context, not interchangeable with\n addresses from another context on the same device. The caller destroys\n all memory obtained from this scope before destroying the context; the\n library neither retains the context nor tracks its private allocations.\n Querying performs no allocation or native operation. `out_count` receives\n the total count on success and BUFFER_TOO_SMALL. A zero-capacity call may\n pass NULL for `scopes`.\n The scope is established by context_create. Enumeration takes no lock,\n initializes no state and updates no ownership counters."]
    pub context_enumerate_memory_scopes: ::std::option::Option<
        unsafe extern "C" fn(
            context: *mut amdf_xdna_context_t,
            capacity: u32,
            scopes: *mut *mut amdf_memory_scope_t,
            out_count: *mut u32,
        ) -> amdf_status_t,
    >,
    #[doc = " Destroys one context after all context-local children are gone.\n\n Returns `AMDF_STATUS_CODE_BUSY` without native mutation while a queue\n remains live. Private-memory lifetime is a caller precondition. A native\n teardown failure leaves the context live so destruction can be retried.\n The caller must otherwise have exclusive access."]
    pub context_destroy: ::std::option::Option<
        unsafe extern "C" fn(context: *mut amdf_xdna_context_t) -> amdf_status_t,
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdf_xdna_api_t"][::std::mem::size_of::<amdf_xdna_api_t>() - 88usize];
    ["Alignment of amdf_xdna_api_t"][::std::mem::align_of::<amdf_xdna_api_t>() - 8usize];
    ["Offset of field: amdf_xdna_api_t::structure_size"]
        [::std::mem::offset_of!(amdf_xdna_api_t, structure_size) - 0usize];
    ["Offset of field: amdf_xdna_api_t::extension_version"]
        [::std::mem::offset_of!(amdf_xdna_api_t, extension_version) - 4usize];
    ["Offset of field: amdf_xdna_api_t::endpoint_query_info"]
        [::std::mem::offset_of!(amdf_xdna_api_t, endpoint_query_info) - 8usize];
    ["Offset of field: amdf_xdna_api_t::device_create"]
        [::std::mem::offset_of!(amdf_xdna_api_t, device_create) - 16usize];
    ["Offset of field: amdf_xdna_api_t::device_query_info"]
        [::std::mem::offset_of!(amdf_xdna_api_t, device_query_info) - 24usize];
    ["Offset of field: amdf_xdna_api_t::kernel_queue_create"]
        [::std::mem::offset_of!(amdf_xdna_api_t, kernel_queue_create) - 32usize];
    ["Offset of field: amdf_xdna_api_t::kernel_queue_submit"]
        [::std::mem::offset_of!(amdf_xdna_api_t, kernel_queue_submit) - 40usize];
    ["Offset of field: amdf_xdna_api_t::context_create"]
        [::std::mem::offset_of!(amdf_xdna_api_t, context_create) - 48usize];
    ["Offset of field: amdf_xdna_api_t::context_query_info"]
        [::std::mem::offset_of!(amdf_xdna_api_t, context_query_info) - 56usize];
    ["Offset of field: amdf_xdna_api_t::context_query_placement_info"]
        [::std::mem::offset_of!(amdf_xdna_api_t, context_query_placement_info) - 64usize];
    ["Offset of field: amdf_xdna_api_t::context_enumerate_memory_scopes"]
        [::std::mem::offset_of!(amdf_xdna_api_t, context_enumerate_memory_scopes) - 72usize];
    ["Offset of field: amdf_xdna_api_t::context_destroy"]
        [::std::mem::offset_of!(amdf_xdna_api_t, context_destroy) - 80usize];
};
pub const HRX_AMDF_ABI_VERSION: _bindgen_ty_1 = 5;
pub const HRX_AMDF_STRUCTURE_TYPE_GPU_ENDPOINT_INFO: _bindgen_ty_1 = 131073;
pub const HRX_AMDF_STRUCTURE_TYPE_GPU_DEVICE_CREATE_INFO: _bindgen_ty_1 = 131074;
pub const HRX_AMDF_STRUCTURE_TYPE_GPU_DEVICE_INFO: _bindgen_ty_1 = 131075;
pub const HRX_AMDF_STRUCTURE_TYPE_GPU_KERNEL_QUEUE_CREATE_INFO: _bindgen_ty_1 = 131076;
pub const HRX_AMDF_STRUCTURE_TYPE_GPU_KERNEL_QUEUE_SUBMISSION_INFO: _bindgen_ty_1 = 131077;
pub const HRX_AMDF_STRUCTURE_TYPE_GPU_USER_QUEUE_CREATE_INFO: _bindgen_ty_1 = 131079;
pub const HRX_AMDF_STRUCTURE_TYPE_XDNA_ENDPOINT_INFO: _bindgen_ty_1 = 65537;
pub const HRX_AMDF_STRUCTURE_TYPE_XDNA_DEVICE_CREATE_INFO: _bindgen_ty_1 = 65538;
pub const HRX_AMDF_STRUCTURE_TYPE_XDNA_DEVICE_INFO: _bindgen_ty_1 = 65539;
pub const HRX_AMDF_STRUCTURE_TYPE_XDNA_KERNEL_QUEUE_CREATE_INFO: _bindgen_ty_1 = 65544;
pub const HRX_AMDF_STRUCTURE_TYPE_XDNA_KERNEL_QUEUE_SUBMISSION_INFO: _bindgen_ty_1 = 65545;
pub const HRX_AMDF_STRUCTURE_TYPE_XDNA_CONTEXT_CREATE_INFO: _bindgen_ty_1 = 65546;
pub const HRX_AMDF_STRUCTURE_TYPE_XDNA_CONTEXT_INFO: _bindgen_ty_1 = 65547;
pub const HRX_AMDF_STRUCTURE_TYPE_XDNA_CONTEXT_PLACEMENT_INFO: _bindgen_ty_1 = 65549;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
pub struct Amdf {
    __library: ::libloading::Library,
    pub amdf_query_api: unsafe extern "C" fn(
        minimum_version: amdf_abi_version_t,
        maximum_version: amdf_abi_version_t,
        out_api: *mut *const amdf_api_t,
    ) -> amdf_status_t,
}
impl Amdf {
    pub unsafe fn new<P>(path: P) -> Result<Self, ::libloading::Error>
    where
        P: AsRef<::std::ffi::OsStr>,
    {
        let path = path.as_ref();
        let library = ::libloading::Library::new(path)?;
        Self::from_library(library)
    }
    pub unsafe fn from_library<L>(library: L) -> Result<Self, ::libloading::Error>
    where
        L: Into<::libloading::Library>,
    {
        let __library = library.into();
        let amdf_query_api = __library.get(b"amdf_query_api\0").map(|sym| *sym)?;
        Ok(Amdf {
            __library,
            amdf_query_api,
        })
    }
    #[doc = " Acquires the newest supported API table in the inclusive requested range.\n\n On success, `out_api` receives a borrowed immutable table that remains valid\n until the providing library is unloaded. Failure leaves `out_api` unchanged\n when it is non-NULL.\n\n This function is thread-safe, bounded constant time, and inert. It performs\n no allocation, system call, device discovery, dependent-library load, or\n other observable initialization. No lock or one-time initialization guard\n is acquired, including on the first call."]
    pub unsafe fn amdf_query_api(
        &self,
        minimum_version: amdf_abi_version_t,
        maximum_version: amdf_abi_version_t,
        out_api: *mut *const amdf_api_t,
    ) -> amdf_status_t {
        (self.amdf_query_api)(minimum_version, maximum_version, out_api)
    }
}