amd_smi_lib_sys 0.2.1

bindings for amd_smi
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
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
/* automatically generated by rust-bindgen 0.72.0 */

#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
    storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
    #[inline]
    pub const fn new(storage: Storage) -> Self {
        Self { storage }
    }
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
    Storage: AsRef<[u8]> + AsMut<[u8]>,
{
    #[inline]
    fn extract_bit(byte: u8, index: usize) -> bool {
        let bit_index = if cfg!(target_endian = "big") {
            7 - (index % 8)
        } else {
            index % 8
        };
        let mask = 1 << bit_index;
        byte & mask == mask
    }
    #[inline]
    pub fn get_bit(&self, index: usize) -> bool {
        debug_assert!(index / 8 < self.storage.as_ref().len());
        let byte_index = index / 8;
        let byte = self.storage.as_ref()[byte_index];
        Self::extract_bit(byte, index)
    }
    #[inline]
    pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
        debug_assert!(index / 8 < core::mem::size_of::<Storage>());
        let byte_index = index / 8;
        let byte = unsafe {
            *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize)
        };
        Self::extract_bit(byte, index)
    }
    #[inline]
    fn change_bit(byte: u8, index: usize, val: bool) -> u8 {
        let bit_index = if cfg!(target_endian = "big") {
            7 - (index % 8)
        } else {
            index % 8
        };
        let mask = 1 << bit_index;
        if val { byte | mask } else { byte & !mask }
    }
    #[inline]
    pub fn set_bit(&mut self, index: usize, val: bool) {
        debug_assert!(index / 8 < self.storage.as_ref().len());
        let byte_index = index / 8;
        let byte = &mut self.storage.as_mut()[byte_index];
        *byte = Self::change_bit(*byte, index, val);
    }
    #[inline]
    pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
        debug_assert!(index / 8 < core::mem::size_of::<Storage>());
        let byte_index = index / 8;
        let byte = unsafe {
            (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize)
        };
        unsafe { *byte = Self::change_bit(*byte, index, val) };
    }
    #[inline]
    pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
        let mut val = 0;
        for i in 0..(bit_width as usize) {
            if self.get_bit(i + bit_offset) {
                let index = if cfg!(target_endian = "big") {
                    bit_width as usize - 1 - i
                } else {
                    i
                };
                val |= 1 << index;
            }
        }
        val
    }
    #[inline]
    pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
        let mut val = 0;
        for i in 0..(bit_width as usize) {
            if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
                let index = if cfg!(target_endian = "big") {
                    bit_width as usize - 1 - i
                } else {
                    i
                };
                val |= 1 << index;
            }
        }
        val
    }
    #[inline]
    pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
        for i in 0..(bit_width as usize) {
            let mask = 1 << i;
            let val_bit_is_set = val & mask == mask;
            let index = if cfg!(target_endian = "big") {
                bit_width as usize - 1 - i
            } else {
                i
            };
            self.set_bit(index + bit_offset, val_bit_is_set);
        }
    }
    #[inline]
    pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
        for i in 0..(bit_width as usize) {
            let mask = 1 << i;
            let val_bit_is_set = val & mask == mask;
            let index = if cfg!(target_endian = "big") {
                bit_width as usize - 1 - i
            } else {
                i
            };
            unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
        }
    }
}
#[derive(PartialEq, Copy, Clone, Hash, Debug, Default)]
#[repr(C)]
pub struct __BindgenComplex<T> {
    pub re: T,
    pub im: T,
}
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2Y: u32 = 0;
pub const __GLIBC_USE_ISOC23: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __TIMESIZE: u32 = 64;
pub const __USE_TIME_BITS64: u32 = 1;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const __GLIBC_USE_C23_STRTOL: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_60559_BFP__: u32 = 201404;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 41;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C23: u32 = 0;
pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C23: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const _STDLIB_H: u32 = 1;
pub const WNOHANG: u32 = 1;
pub const WUNTRACED: u32 = 2;
pub const WSTOPPED: u32 = 2;
pub const WEXITED: u32 = 4;
pub const WCONTINUED: u32 = 8;
pub const WNOWAIT: u32 = 16777216;
pub const __WNOTHREAD: u32 = 536870912;
pub const __WALL: u32 = 1073741824;
pub const __WCLONE: u32 = 2147483648;
pub const __W_CONTINUED: u32 = 65535;
pub const __WCOREFLAG: u32 = 128;
pub const __HAVE_FLOAT128: u32 = 1;
pub const __HAVE_DISTINCT_FLOAT128: u32 = 1;
pub const __HAVE_FLOAT64X: u32 = 1;
pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
pub const __HAVE_FLOAT16: u32 = 0;
pub const __HAVE_FLOAT32: u32 = 1;
pub const __HAVE_FLOAT64: u32 = 1;
pub const __HAVE_FLOAT32X: u32 = 1;
pub const __HAVE_FLOAT128X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
pub const __ldiv_t_defined: u32 = 1;
pub const __lldiv_t_defined: u32 = 1;
pub const RAND_MAX: u32 = 2147483647;
pub const EXIT_FAILURE: u32 = 1;
pub const EXIT_SUCCESS: u32 = 0;
pub const _SYS_TYPES_H: u32 = 1;
pub const _BITS_TYPES_H: u32 = 1;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const __clock_t_defined: u32 = 1;
pub const __clockid_t_defined: u32 = 1;
pub const __time_t_defined: u32 = 1;
pub const __timer_t_defined: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const __BIT_TYPES_DEFINED__: u32 = 1;
pub const _ENDIAN_H: u32 = 1;
pub const _BITS_ENDIAN_H: u32 = 1;
pub const __LITTLE_ENDIAN: u32 = 1234;
pub const __BIG_ENDIAN: u32 = 4321;
pub const __PDP_ENDIAN: u32 = 3412;
pub const _BITS_ENDIANNESS_H: u32 = 1;
pub const __BYTE_ORDER: u32 = 1234;
pub const __FLOAT_WORD_ORDER: u32 = 1234;
pub const LITTLE_ENDIAN: u32 = 1234;
pub const BIG_ENDIAN: u32 = 4321;
pub const PDP_ENDIAN: u32 = 3412;
pub const BYTE_ORDER: u32 = 1234;
pub const _BITS_BYTESWAP_H: u32 = 1;
pub const _BITS_UINTN_IDENTITY_H: u32 = 1;
pub const _SYS_SELECT_H: u32 = 1;
pub const __sigset_t_defined: u32 = 1;
pub const __timeval_defined: u32 = 1;
pub const _STRUCT_TIMESPEC: u32 = 1;
pub const FD_SETSIZE: u32 = 1024;
pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
pub const _THREAD_SHARED_TYPES_H: u32 = 1;
pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40;
pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56;
pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56;
pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32;
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4;
pub const __SIZEOF_PTHREAD_COND_T: u32 = 48;
pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4;
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8;
pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4;
pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1;
pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1;
pub const __have_pthread_attr_t: u32 = 1;
pub const _ALLOCA_H: u32 = 1;
pub const __bool_true_false_are_defined: u32 = 1;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const _STDINT_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const _BITS_STDINT_LEAST_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: i32 = -1;
pub const UINT_FAST32_MAX: i32 = -1;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const UINTPTR_MAX: i32 = -1;
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: i32 = -1;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const AMDSMI_MAX_MM_IP_COUNT: u32 = 8;
pub const AMDSMI_MAX_DATE_LENGTH: u32 = 32;
pub const AMDSMI_MAX_STRING_LENGTH: u32 = 64;
pub const AMDSMI_NORMAL_STRING_LENGTH: u32 = 32;
pub const AMDSMI_MAX_DEVICES: u32 = 32;
pub const AMDSMI_MAX_NAME: u32 = 32;
pub const AMDSMI_MAX_DRIVER_VERSION_LENGTH: u32 = 80;
pub const AMDSMI_256_LENGTH: u32 = 256;
pub const AMDSMI_MAX_CONTAINER_TYPE: u32 = 2;
pub const AMDSMI_MAX_CACHE_TYPES: u32 = 10;
pub const AMDSMI_MAX_NUM_XGMI_PHYSICAL_LINK: u32 = 64;
pub const AMDSMI_MAX_ACCELERATOR_PROFILE: u32 = 32;
pub const AMDSMI_MAX_CP_PROFILE_RESOURCES: u32 = 32;
pub const AMDSMI_MAX_ACCELERATOR_PARTITIONS: u32 = 8;
pub const AMDSMI_GPU_UUID_SIZE: u32 = 38;
pub const CENTRIGRADE_TO_MILLI_CENTIGRADE: u32 = 1000;
pub const AMDSMI_NUM_HBM_INSTANCES: u32 = 4;
pub const AMDSMI_MAX_NUM_VCN: u32 = 4;
pub const AMDSMI_MAX_NUM_CLKS: u32 = 4;
pub const AMDSMI_MAX_NUM_XGMI_LINKS: u32 = 8;
pub const AMDSMI_MAX_NUM_GFX_CLKS: u32 = 8;
pub const AMDSMI_MAX_AID: u32 = 4;
pub const AMDSMI_MAX_ENGINES: u32 = 8;
pub const AMDSMI_MAX_NUM_JPEG: u32 = 32;
pub const AMDSMI_MAX_NUM_XCC: u32 = 8;
pub const AMDSMI_MAX_NUM_XCP: u32 = 8;
pub const AMDSMI_TIME_FORMAT: &[u8; 20] = b"%02d:%02d:%02d.%03d\0";
pub const AMDSMI_DATE_FORMAT: &[u8; 35] = b"%04d-%02d-%02d:%02d:%02d:%02d.%03d\0";
pub const AMDSMI_LIB_VERSION_YEAR: u32 = 24;
pub const AMDSMI_LIB_VERSION_MAJOR: u32 = 7;
pub const AMDSMI_LIB_VERSION_MINOR: u32 = 1;
pub const AMDSMI_LIB_VERSION_RELEASE: u32 = 0;
pub const AMDSMI_MAX_NUM_FREQUENCIES: u32 = 33;
pub const AMDSMI_MAX_FAN_SPEED: u32 = 255;
pub const AMDSMI_NUM_VOLTAGE_CURVE_POINTS: u32 = 3;
pub const MAX_EVENT_NOTIFICATION_MSG_SIZE: u32 = 96;
pub const AMDSMI_MAX_UTILIZATION_VALUES: u32 = 4;
pub const AMDSMI_MAX_NUM_PM_POLICIES: u32 = 32;
pub const MAX_AMDSMI_NAME_LENGTH: u32 = 64;
pub const AMDSMI_DEFAULT_VARIANT: i32 = -1;
pub const amd_smi_VERSION_MAJOR: u32 = 0;
pub const amd_smi_VERSION_MINOR: u32 = 0;
pub const amd_smi_VERSION_PATCH: u32 = 0;
pub const amd_smi_VERSION_BUILD: &[u8; 2] = b"0\0";
pub type wchar_t = ::std::os::raw::c_int;
pub type __cfloat128 = __BindgenComplex<u128>;
pub type _Float128 = u128;
pub type _Float32 = f32;
pub type _Float64 = f64;
pub type _Float32x = f64;
pub type _Float64x = u128;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct div_t {
    pub quot: ::std::os::raw::c_int,
    pub rem: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of div_t"][::std::mem::size_of::<div_t>() - 8usize];
    ["Alignment of div_t"][::std::mem::align_of::<div_t>() - 4usize];
    ["Offset of field: div_t::quot"][::std::mem::offset_of!(div_t, quot) - 0usize];
    ["Offset of field: div_t::rem"][::std::mem::offset_of!(div_t, rem) - 4usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ldiv_t {
    pub quot: ::std::os::raw::c_long,
    pub rem: ::std::os::raw::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ldiv_t"][::std::mem::size_of::<ldiv_t>() - 16usize];
    ["Alignment of ldiv_t"][::std::mem::align_of::<ldiv_t>() - 8usize];
    ["Offset of field: ldiv_t::quot"][::std::mem::offset_of!(ldiv_t, quot) - 0usize];
    ["Offset of field: ldiv_t::rem"][::std::mem::offset_of!(ldiv_t, rem) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lldiv_t {
    pub quot: ::std::os::raw::c_longlong,
    pub rem: ::std::os::raw::c_longlong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lldiv_t"][::std::mem::size_of::<lldiv_t>() - 16usize];
    ["Alignment of lldiv_t"][::std::mem::align_of::<lldiv_t>() - 8usize];
    ["Offset of field: lldiv_t::quot"][::std::mem::offset_of!(lldiv_t, quot) - 0usize];
    ["Offset of field: lldiv_t::rem"][::std::mem::offset_of!(lldiv_t, rem) - 8usize];
};
unsafe extern "C" {
    pub fn __ctype_get_mb_cur_max() -> usize;
}
unsafe extern "C" {
    pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64;
}
unsafe extern "C" {
    pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong;
}
unsafe extern "C" {
    pub fn strtod(
        __nptr: *const ::std::os::raw::c_char,
        __endptr: *mut *mut ::std::os::raw::c_char,
    ) -> f64;
}
unsafe extern "C" {
    pub fn strtof(
        __nptr: *const ::std::os::raw::c_char,
        __endptr: *mut *mut ::std::os::raw::c_char,
    ) -> f32;
}
unsafe extern "C" {
    pub fn strtold(
        __nptr: *const ::std::os::raw::c_char,
        __endptr: *mut *mut ::std::os::raw::c_char,
    ) -> u128;
}
unsafe extern "C" {
    pub fn strtol(
        __nptr: *const ::std::os::raw::c_char,
        __endptr: *mut *mut ::std::os::raw::c_char,
        __base: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub fn strtoul(
        __nptr: *const ::std::os::raw::c_char,
        __endptr: *mut *mut ::std::os::raw::c_char,
        __base: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_ulong;
}
unsafe extern "C" {
    pub fn strtoq(
        __nptr: *const ::std::os::raw::c_char,
        __endptr: *mut *mut ::std::os::raw::c_char,
        __base: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_longlong;
}
unsafe extern "C" {
    pub fn strtouq(
        __nptr: *const ::std::os::raw::c_char,
        __endptr: *mut *mut ::std::os::raw::c_char,
        __base: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_ulonglong;
}
unsafe extern "C" {
    pub fn strtoll(
        __nptr: *const ::std::os::raw::c_char,
        __endptr: *mut *mut ::std::os::raw::c_char,
        __base: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_longlong;
}
unsafe extern "C" {
    pub fn strtoull(
        __nptr: *const ::std::os::raw::c_char,
        __endptr: *mut *mut ::std::os::raw::c_char,
        __base: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_ulonglong;
}
unsafe extern "C" {
    pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
}
pub type __u_char = ::std::os::raw::c_uchar;
pub type __u_short = ::std::os::raw::c_ushort;
pub type __u_int = ::std::os::raw::c_uint;
pub type __u_long = ::std::os::raw::c_ulong;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::std::os::raw::c_long;
pub type __u_quad_t = ::std::os::raw::c_ulong;
pub type __intmax_t = ::std::os::raw::c_long;
pub type __uintmax_t = ::std::os::raw::c_ulong;
pub type __dev_t = ::std::os::raw::c_ulong;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __ino64_t = ::std::os::raw::c_ulong;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __nlink_t = ::std::os::raw::c_ulong;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __fsid_t {
    pub __val: [::std::os::raw::c_int; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __fsid_t"][::std::mem::size_of::<__fsid_t>() - 8usize];
    ["Alignment of __fsid_t"][::std::mem::align_of::<__fsid_t>() - 4usize];
    ["Offset of field: __fsid_t::__val"][::std::mem::offset_of!(__fsid_t, __val) - 0usize];
};
pub type __clock_t = ::std::os::raw::c_long;
pub type __rlim_t = ::std::os::raw::c_ulong;
pub type __rlim64_t = ::std::os::raw::c_ulong;
pub type __id_t = ::std::os::raw::c_uint;
pub type __time_t = ::std::os::raw::c_long;
pub type __useconds_t = ::std::os::raw::c_uint;
pub type __suseconds_t = ::std::os::raw::c_long;
pub type __suseconds64_t = ::std::os::raw::c_long;
pub type __daddr_t = ::std::os::raw::c_int;
pub type __key_t = ::std::os::raw::c_int;
pub type __clockid_t = ::std::os::raw::c_int;
pub type __timer_t = *mut ::std::os::raw::c_void;
pub type __blksize_t = ::std::os::raw::c_long;
pub type __blkcnt_t = ::std::os::raw::c_long;
pub type __blkcnt64_t = ::std::os::raw::c_long;
pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
pub type __fsword_t = ::std::os::raw::c_long;
pub type __ssize_t = ::std::os::raw::c_long;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::std::os::raw::c_char;
pub type __intptr_t = ::std::os::raw::c_long;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type __sig_atomic_t = ::std::os::raw::c_int;
pub type u_char = __u_char;
pub type u_short = __u_short;
pub type u_int = __u_int;
pub type u_long = __u_long;
pub type quad_t = __quad_t;
pub type u_quad_t = __u_quad_t;
pub type fsid_t = __fsid_t;
pub type loff_t = __loff_t;
pub type ino_t = __ino_t;
pub type dev_t = __dev_t;
pub type gid_t = __gid_t;
pub type mode_t = __mode_t;
pub type nlink_t = __nlink_t;
pub type uid_t = __uid_t;
pub type off_t = __off_t;
pub type pid_t = __pid_t;
pub type id_t = __id_t;
pub type daddr_t = __daddr_t;
pub type caddr_t = __caddr_t;
pub type key_t = __key_t;
pub type clock_t = __clock_t;
pub type clockid_t = __clockid_t;
pub type time_t = __time_t;
pub type timer_t = __timer_t;
pub type ulong = ::std::os::raw::c_ulong;
pub type ushort = ::std::os::raw::c_ushort;
pub type uint = ::std::os::raw::c_uint;
pub type u_int8_t = __uint8_t;
pub type u_int16_t = __uint16_t;
pub type u_int32_t = __uint32_t;
pub type u_int64_t = __uint64_t;
pub type register_t = ::std::os::raw::c_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sigset_t {
    pub __val: [::std::os::raw::c_ulong; 16usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __sigset_t"][::std::mem::size_of::<__sigset_t>() - 128usize];
    ["Alignment of __sigset_t"][::std::mem::align_of::<__sigset_t>() - 8usize];
    ["Offset of field: __sigset_t::__val"][::std::mem::offset_of!(__sigset_t, __val) - 0usize];
};
pub type sigset_t = __sigset_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timeval {
    pub tv_sec: __time_t,
    pub tv_usec: __suseconds_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of timeval"][::std::mem::size_of::<timeval>() - 16usize];
    ["Alignment of timeval"][::std::mem::align_of::<timeval>() - 8usize];
    ["Offset of field: timeval::tv_sec"][::std::mem::offset_of!(timeval, tv_sec) - 0usize];
    ["Offset of field: timeval::tv_usec"][::std::mem::offset_of!(timeval, tv_usec) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timespec {
    pub tv_sec: __time_t,
    pub tv_nsec: __syscall_slong_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of timespec"][::std::mem::size_of::<timespec>() - 16usize];
    ["Alignment of timespec"][::std::mem::align_of::<timespec>() - 8usize];
    ["Offset of field: timespec::tv_sec"][::std::mem::offset_of!(timespec, tv_sec) - 0usize];
    ["Offset of field: timespec::tv_nsec"][::std::mem::offset_of!(timespec, tv_nsec) - 8usize];
};
pub type suseconds_t = __suseconds_t;
pub type __fd_mask = ::std::os::raw::c_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fd_set {
    pub __fds_bits: [__fd_mask; 16usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of fd_set"][::std::mem::size_of::<fd_set>() - 128usize];
    ["Alignment of fd_set"][::std::mem::align_of::<fd_set>() - 8usize];
    ["Offset of field: fd_set::__fds_bits"][::std::mem::offset_of!(fd_set, __fds_bits) - 0usize];
};
pub type fd_mask = __fd_mask;
unsafe extern "C" {
    pub fn select(
        __nfds: ::std::os::raw::c_int,
        __readfds: *mut fd_set,
        __writefds: *mut fd_set,
        __exceptfds: *mut fd_set,
        __timeout: *mut timeval,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn pselect(
        __nfds: ::std::os::raw::c_int,
        __readfds: *mut fd_set,
        __writefds: *mut fd_set,
        __exceptfds: *mut fd_set,
        __timeout: *const timespec,
        __sigmask: *const __sigset_t,
    ) -> ::std::os::raw::c_int;
}
pub type blksize_t = __blksize_t;
pub type blkcnt_t = __blkcnt_t;
pub type fsblkcnt_t = __fsblkcnt_t;
pub type fsfilcnt_t = __fsfilcnt_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub union __atomic_wide_counter {
    pub __value64: ::std::os::raw::c_ulonglong,
    pub __value32: __atomic_wide_counter__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __atomic_wide_counter__bindgen_ty_1 {
    pub __low: ::std::os::raw::c_uint,
    pub __high: ::std::os::raw::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __atomic_wide_counter__bindgen_ty_1"]
        [::std::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>() - 8usize];
    ["Alignment of __atomic_wide_counter__bindgen_ty_1"]
        [::std::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>() - 4usize];
    ["Offset of field: __atomic_wide_counter__bindgen_ty_1::__low"]
        [::std::mem::offset_of!(__atomic_wide_counter__bindgen_ty_1, __low) - 0usize];
    ["Offset of field: __atomic_wide_counter__bindgen_ty_1::__high"]
        [::std::mem::offset_of!(__atomic_wide_counter__bindgen_ty_1, __high) - 4usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __atomic_wide_counter"][::std::mem::size_of::<__atomic_wide_counter>() - 8usize];
    ["Alignment of __atomic_wide_counter"]
        [::std::mem::align_of::<__atomic_wide_counter>() - 8usize];
    ["Offset of field: __atomic_wide_counter::__value64"]
        [::std::mem::offset_of!(__atomic_wide_counter, __value64) - 0usize];
    ["Offset of field: __atomic_wide_counter::__value32"]
        [::std::mem::offset_of!(__atomic_wide_counter, __value32) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_list {
    pub __prev: *mut __pthread_internal_list,
    pub __next: *mut __pthread_internal_list,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __pthread_internal_list"][::std::mem::size_of::<__pthread_internal_list>() - 16usize];
    ["Alignment of __pthread_internal_list"]
        [::std::mem::align_of::<__pthread_internal_list>() - 8usize];
    ["Offset of field: __pthread_internal_list::__prev"]
        [::std::mem::offset_of!(__pthread_internal_list, __prev) - 0usize];
    ["Offset of field: __pthread_internal_list::__next"]
        [::std::mem::offset_of!(__pthread_internal_list, __next) - 8usize];
};
pub type __pthread_list_t = __pthread_internal_list;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_slist {
    pub __next: *mut __pthread_internal_slist,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __pthread_internal_slist"]
        [::std::mem::size_of::<__pthread_internal_slist>() - 8usize];
    ["Alignment of __pthread_internal_slist"]
        [::std::mem::align_of::<__pthread_internal_slist>() - 8usize];
    ["Offset of field: __pthread_internal_slist::__next"]
        [::std::mem::offset_of!(__pthread_internal_slist, __next) - 0usize];
};
pub type __pthread_slist_t = __pthread_internal_slist;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_mutex_s {
    pub __lock: ::std::os::raw::c_int,
    pub __count: ::std::os::raw::c_uint,
    pub __owner: ::std::os::raw::c_int,
    pub __nusers: ::std::os::raw::c_uint,
    pub __kind: ::std::os::raw::c_int,
    pub __spins: ::std::os::raw::c_short,
    pub __elision: ::std::os::raw::c_short,
    pub __list: __pthread_list_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __pthread_mutex_s"][::std::mem::size_of::<__pthread_mutex_s>() - 40usize];
    ["Alignment of __pthread_mutex_s"][::std::mem::align_of::<__pthread_mutex_s>() - 8usize];
    ["Offset of field: __pthread_mutex_s::__lock"]
        [::std::mem::offset_of!(__pthread_mutex_s, __lock) - 0usize];
    ["Offset of field: __pthread_mutex_s::__count"]
        [::std::mem::offset_of!(__pthread_mutex_s, __count) - 4usize];
    ["Offset of field: __pthread_mutex_s::__owner"]
        [::std::mem::offset_of!(__pthread_mutex_s, __owner) - 8usize];
    ["Offset of field: __pthread_mutex_s::__nusers"]
        [::std::mem::offset_of!(__pthread_mutex_s, __nusers) - 12usize];
    ["Offset of field: __pthread_mutex_s::__kind"]
        [::std::mem::offset_of!(__pthread_mutex_s, __kind) - 16usize];
    ["Offset of field: __pthread_mutex_s::__spins"]
        [::std::mem::offset_of!(__pthread_mutex_s, __spins) - 20usize];
    ["Offset of field: __pthread_mutex_s::__elision"]
        [::std::mem::offset_of!(__pthread_mutex_s, __elision) - 22usize];
    ["Offset of field: __pthread_mutex_s::__list"]
        [::std::mem::offset_of!(__pthread_mutex_s, __list) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_rwlock_arch_t {
    pub __readers: ::std::os::raw::c_uint,
    pub __writers: ::std::os::raw::c_uint,
    pub __wrphase_futex: ::std::os::raw::c_uint,
    pub __writers_futex: ::std::os::raw::c_uint,
    pub __pad3: ::std::os::raw::c_uint,
    pub __pad4: ::std::os::raw::c_uint,
    pub __cur_writer: ::std::os::raw::c_int,
    pub __shared: ::std::os::raw::c_int,
    pub __rwelision: ::std::os::raw::c_schar,
    pub __pad1: [::std::os::raw::c_uchar; 7usize],
    pub __pad2: ::std::os::raw::c_ulong,
    pub __flags: ::std::os::raw::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __pthread_rwlock_arch_t"][::std::mem::size_of::<__pthread_rwlock_arch_t>() - 56usize];
    ["Alignment of __pthread_rwlock_arch_t"]
        [::std::mem::align_of::<__pthread_rwlock_arch_t>() - 8usize];
    ["Offset of field: __pthread_rwlock_arch_t::__readers"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __readers) - 0usize];
    ["Offset of field: __pthread_rwlock_arch_t::__writers"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __writers) - 4usize];
    ["Offset of field: __pthread_rwlock_arch_t::__wrphase_futex"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __wrphase_futex) - 8usize];
    ["Offset of field: __pthread_rwlock_arch_t::__writers_futex"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __writers_futex) - 12usize];
    ["Offset of field: __pthread_rwlock_arch_t::__pad3"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad3) - 16usize];
    ["Offset of field: __pthread_rwlock_arch_t::__pad4"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad4) - 20usize];
    ["Offset of field: __pthread_rwlock_arch_t::__cur_writer"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __cur_writer) - 24usize];
    ["Offset of field: __pthread_rwlock_arch_t::__shared"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __shared) - 28usize];
    ["Offset of field: __pthread_rwlock_arch_t::__rwelision"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __rwelision) - 32usize];
    ["Offset of field: __pthread_rwlock_arch_t::__pad1"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad1) - 33usize];
    ["Offset of field: __pthread_rwlock_arch_t::__pad2"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad2) - 40usize];
    ["Offset of field: __pthread_rwlock_arch_t::__flags"]
        [::std::mem::offset_of!(__pthread_rwlock_arch_t, __flags) - 48usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __pthread_cond_s {
    pub __wseq: __atomic_wide_counter,
    pub __g1_start: __atomic_wide_counter,
    pub __g_size: [::std::os::raw::c_uint; 2usize],
    pub __g1_orig_size: ::std::os::raw::c_uint,
    pub __wrefs: ::std::os::raw::c_uint,
    pub __g_signals: [::std::os::raw::c_uint; 2usize],
    pub __unused_initialized_1: ::std::os::raw::c_uint,
    pub __unused_initialized_2: ::std::os::raw::c_uint,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __pthread_cond_s"][::std::mem::size_of::<__pthread_cond_s>() - 48usize];
    ["Alignment of __pthread_cond_s"][::std::mem::align_of::<__pthread_cond_s>() - 8usize];
    ["Offset of field: __pthread_cond_s::__wseq"]
        [::std::mem::offset_of!(__pthread_cond_s, __wseq) - 0usize];
    ["Offset of field: __pthread_cond_s::__g1_start"]
        [::std::mem::offset_of!(__pthread_cond_s, __g1_start) - 8usize];
    ["Offset of field: __pthread_cond_s::__g_size"]
        [::std::mem::offset_of!(__pthread_cond_s, __g_size) - 16usize];
    ["Offset of field: __pthread_cond_s::__g1_orig_size"]
        [::std::mem::offset_of!(__pthread_cond_s, __g1_orig_size) - 24usize];
    ["Offset of field: __pthread_cond_s::__wrefs"]
        [::std::mem::offset_of!(__pthread_cond_s, __wrefs) - 28usize];
    ["Offset of field: __pthread_cond_s::__g_signals"]
        [::std::mem::offset_of!(__pthread_cond_s, __g_signals) - 32usize];
    ["Offset of field: __pthread_cond_s::__unused_initialized_1"]
        [::std::mem::offset_of!(__pthread_cond_s, __unused_initialized_1) - 40usize];
    ["Offset of field: __pthread_cond_s::__unused_initialized_2"]
        [::std::mem::offset_of!(__pthread_cond_s, __unused_initialized_2) - 44usize];
};
pub type __tss_t = ::std::os::raw::c_uint;
pub type __thrd_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __once_flag {
    pub __data: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __once_flag"][::std::mem::size_of::<__once_flag>() - 4usize];
    ["Alignment of __once_flag"][::std::mem::align_of::<__once_flag>() - 4usize];
    ["Offset of field: __once_flag::__data"][::std::mem::offset_of!(__once_flag, __data) - 0usize];
};
pub type pthread_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutexattr_t {
    pub __size: [::std::os::raw::c_char; 4usize],
    pub __align: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of pthread_mutexattr_t"][::std::mem::size_of::<pthread_mutexattr_t>() - 4usize];
    ["Alignment of pthread_mutexattr_t"][::std::mem::align_of::<pthread_mutexattr_t>() - 4usize];
    ["Offset of field: pthread_mutexattr_t::__size"]
        [::std::mem::offset_of!(pthread_mutexattr_t, __size) - 0usize];
    ["Offset of field: pthread_mutexattr_t::__align"]
        [::std::mem::offset_of!(pthread_mutexattr_t, __align) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_condattr_t {
    pub __size: [::std::os::raw::c_char; 4usize],
    pub __align: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of pthread_condattr_t"][::std::mem::size_of::<pthread_condattr_t>() - 4usize];
    ["Alignment of pthread_condattr_t"][::std::mem::align_of::<pthread_condattr_t>() - 4usize];
    ["Offset of field: pthread_condattr_t::__size"]
        [::std::mem::offset_of!(pthread_condattr_t, __size) - 0usize];
    ["Offset of field: pthread_condattr_t::__align"]
        [::std::mem::offset_of!(pthread_condattr_t, __align) - 0usize];
};
pub type pthread_key_t = ::std::os::raw::c_uint;
pub type pthread_once_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_attr_t {
    pub __size: [::std::os::raw::c_char; 56usize],
    pub __align: ::std::os::raw::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of pthread_attr_t"][::std::mem::size_of::<pthread_attr_t>() - 56usize];
    ["Alignment of pthread_attr_t"][::std::mem::align_of::<pthread_attr_t>() - 8usize];
    ["Offset of field: pthread_attr_t::__size"]
        [::std::mem::offset_of!(pthread_attr_t, __size) - 0usize];
    ["Offset of field: pthread_attr_t::__align"]
        [::std::mem::offset_of!(pthread_attr_t, __align) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutex_t {
    pub __data: __pthread_mutex_s,
    pub __size: [::std::os::raw::c_char; 40usize],
    pub __align: ::std::os::raw::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of pthread_mutex_t"][::std::mem::size_of::<pthread_mutex_t>() - 40usize];
    ["Alignment of pthread_mutex_t"][::std::mem::align_of::<pthread_mutex_t>() - 8usize];
    ["Offset of field: pthread_mutex_t::__data"]
        [::std::mem::offset_of!(pthread_mutex_t, __data) - 0usize];
    ["Offset of field: pthread_mutex_t::__size"]
        [::std::mem::offset_of!(pthread_mutex_t, __size) - 0usize];
    ["Offset of field: pthread_mutex_t::__align"]
        [::std::mem::offset_of!(pthread_mutex_t, __align) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_cond_t {
    pub __data: __pthread_cond_s,
    pub __size: [::std::os::raw::c_char; 48usize],
    pub __align: ::std::os::raw::c_longlong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of pthread_cond_t"][::std::mem::size_of::<pthread_cond_t>() - 48usize];
    ["Alignment of pthread_cond_t"][::std::mem::align_of::<pthread_cond_t>() - 8usize];
    ["Offset of field: pthread_cond_t::__data"]
        [::std::mem::offset_of!(pthread_cond_t, __data) - 0usize];
    ["Offset of field: pthread_cond_t::__size"]
        [::std::mem::offset_of!(pthread_cond_t, __size) - 0usize];
    ["Offset of field: pthread_cond_t::__align"]
        [::std::mem::offset_of!(pthread_cond_t, __align) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlock_t {
    pub __data: __pthread_rwlock_arch_t,
    pub __size: [::std::os::raw::c_char; 56usize],
    pub __align: ::std::os::raw::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of pthread_rwlock_t"][::std::mem::size_of::<pthread_rwlock_t>() - 56usize];
    ["Alignment of pthread_rwlock_t"][::std::mem::align_of::<pthread_rwlock_t>() - 8usize];
    ["Offset of field: pthread_rwlock_t::__data"]
        [::std::mem::offset_of!(pthread_rwlock_t, __data) - 0usize];
    ["Offset of field: pthread_rwlock_t::__size"]
        [::std::mem::offset_of!(pthread_rwlock_t, __size) - 0usize];
    ["Offset of field: pthread_rwlock_t::__align"]
        [::std::mem::offset_of!(pthread_rwlock_t, __align) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlockattr_t {
    pub __size: [::std::os::raw::c_char; 8usize],
    pub __align: ::std::os::raw::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of pthread_rwlockattr_t"][::std::mem::size_of::<pthread_rwlockattr_t>() - 8usize];
    ["Alignment of pthread_rwlockattr_t"][::std::mem::align_of::<pthread_rwlockattr_t>() - 8usize];
    ["Offset of field: pthread_rwlockattr_t::__size"]
        [::std::mem::offset_of!(pthread_rwlockattr_t, __size) - 0usize];
    ["Offset of field: pthread_rwlockattr_t::__align"]
        [::std::mem::offset_of!(pthread_rwlockattr_t, __align) - 0usize];
};
pub type pthread_spinlock_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrier_t {
    pub __size: [::std::os::raw::c_char; 32usize],
    pub __align: ::std::os::raw::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of pthread_barrier_t"][::std::mem::size_of::<pthread_barrier_t>() - 32usize];
    ["Alignment of pthread_barrier_t"][::std::mem::align_of::<pthread_barrier_t>() - 8usize];
    ["Offset of field: pthread_barrier_t::__size"]
        [::std::mem::offset_of!(pthread_barrier_t, __size) - 0usize];
    ["Offset of field: pthread_barrier_t::__align"]
        [::std::mem::offset_of!(pthread_barrier_t, __align) - 0usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrierattr_t {
    pub __size: [::std::os::raw::c_char; 4usize],
    pub __align: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of pthread_barrierattr_t"][::std::mem::size_of::<pthread_barrierattr_t>() - 4usize];
    ["Alignment of pthread_barrierattr_t"]
        [::std::mem::align_of::<pthread_barrierattr_t>() - 4usize];
    ["Offset of field: pthread_barrierattr_t::__size"]
        [::std::mem::offset_of!(pthread_barrierattr_t, __size) - 0usize];
    ["Offset of field: pthread_barrierattr_t::__align"]
        [::std::mem::offset_of!(pthread_barrierattr_t, __align) - 0usize];
};
unsafe extern "C" {
    pub fn random() -> ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub fn srandom(__seed: ::std::os::raw::c_uint);
}
unsafe extern "C" {
    pub fn initstate(
        __seed: ::std::os::raw::c_uint,
        __statebuf: *mut ::std::os::raw::c_char,
        __statelen: usize,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct random_data {
    pub fptr: *mut i32,
    pub rptr: *mut i32,
    pub state: *mut i32,
    pub rand_type: ::std::os::raw::c_int,
    pub rand_deg: ::std::os::raw::c_int,
    pub rand_sep: ::std::os::raw::c_int,
    pub end_ptr: *mut i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of random_data"][::std::mem::size_of::<random_data>() - 48usize];
    ["Alignment of random_data"][::std::mem::align_of::<random_data>() - 8usize];
    ["Offset of field: random_data::fptr"][::std::mem::offset_of!(random_data, fptr) - 0usize];
    ["Offset of field: random_data::rptr"][::std::mem::offset_of!(random_data, rptr) - 8usize];
    ["Offset of field: random_data::state"][::std::mem::offset_of!(random_data, state) - 16usize];
    ["Offset of field: random_data::rand_type"]
        [::std::mem::offset_of!(random_data, rand_type) - 24usize];
    ["Offset of field: random_data::rand_deg"]
        [::std::mem::offset_of!(random_data, rand_deg) - 28usize];
    ["Offset of field: random_data::rand_sep"]
        [::std::mem::offset_of!(random_data, rand_sep) - 32usize];
    ["Offset of field: random_data::end_ptr"]
        [::std::mem::offset_of!(random_data, end_ptr) - 40usize];
};
unsafe extern "C" {
    pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn srandom_r(
        __seed: ::std::os::raw::c_uint,
        __buf: *mut random_data,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn initstate_r(
        __seed: ::std::os::raw::c_uint,
        __statebuf: *mut ::std::os::raw::c_char,
        __statelen: usize,
        __buf: *mut random_data,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn setstate_r(
        __statebuf: *mut ::std::os::raw::c_char,
        __buf: *mut random_data,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn rand() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn srand(__seed: ::std::os::raw::c_uint);
}
unsafe extern "C" {
    pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn drand48() -> f64;
}
unsafe extern "C" {
    pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64;
}
unsafe extern "C" {
    pub fn lrand48() -> ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub fn mrand48() -> ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub fn srand48(__seedval: ::std::os::raw::c_long);
}
unsafe extern "C" {
    pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort;
}
unsafe extern "C" {
    pub fn lcong48(__param: *mut ::std::os::raw::c_ushort);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct drand48_data {
    pub __x: [::std::os::raw::c_ushort; 3usize],
    pub __old_x: [::std::os::raw::c_ushort; 3usize],
    pub __c: ::std::os::raw::c_ushort,
    pub __init: ::std::os::raw::c_ushort,
    pub __a: ::std::os::raw::c_ulonglong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of drand48_data"][::std::mem::size_of::<drand48_data>() - 24usize];
    ["Alignment of drand48_data"][::std::mem::align_of::<drand48_data>() - 8usize];
    ["Offset of field: drand48_data::__x"][::std::mem::offset_of!(drand48_data, __x) - 0usize];
    ["Offset of field: drand48_data::__old_x"]
        [::std::mem::offset_of!(drand48_data, __old_x) - 6usize];
    ["Offset of field: drand48_data::__c"][::std::mem::offset_of!(drand48_data, __c) - 12usize];
    ["Offset of field: drand48_data::__init"]
        [::std::mem::offset_of!(drand48_data, __init) - 14usize];
    ["Offset of field: drand48_data::__a"][::std::mem::offset_of!(drand48_data, __a) - 16usize];
};
unsafe extern "C" {
    pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn erand48_r(
        __xsubi: *mut ::std::os::raw::c_ushort,
        __buffer: *mut drand48_data,
        __result: *mut f64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lrand48_r(
        __buffer: *mut drand48_data,
        __result: *mut ::std::os::raw::c_long,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn nrand48_r(
        __xsubi: *mut ::std::os::raw::c_ushort,
        __buffer: *mut drand48_data,
        __result: *mut ::std::os::raw::c_long,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mrand48_r(
        __buffer: *mut drand48_data,
        __result: *mut ::std::os::raw::c_long,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn jrand48_r(
        __xsubi: *mut ::std::os::raw::c_ushort,
        __buffer: *mut drand48_data,
        __result: *mut ::std::os::raw::c_long,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn srand48_r(
        __seedval: ::std::os::raw::c_long,
        __buffer: *mut drand48_data,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn seed48_r(
        __seed16v: *mut ::std::os::raw::c_ushort,
        __buffer: *mut drand48_data,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lcong48_r(
        __param: *mut ::std::os::raw::c_ushort,
        __buffer: *mut drand48_data,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn arc4random() -> __uint32_t;
}
unsafe extern "C" {
    pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __size: usize);
}
unsafe extern "C" {
    pub fn arc4random_uniform(__upper_bound: __uint32_t) -> __uint32_t;
}
unsafe extern "C" {
    pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn calloc(
        __nmemb: ::std::os::raw::c_ulong,
        __size: ::std::os::raw::c_ulong,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn realloc(
        __ptr: *mut ::std::os::raw::c_void,
        __size: ::std::os::raw::c_ulong,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn free(__ptr: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
    pub fn reallocarray(
        __ptr: *mut ::std::os::raw::c_void,
        __nmemb: usize,
        __size: usize,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn posix_memalign(
        __memptr: *mut *mut ::std::os::raw::c_void,
        __alignment: usize,
        __size: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aligned_alloc(
        __alignment: ::std::os::raw::c_ulong,
        __size: ::std::os::raw::c_ulong,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn abort() -> !;
}
unsafe extern "C" {
    pub fn atexit(__func: ::std::option::Option<unsafe extern "C" fn()>) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn at_quick_exit(
        __func: ::std::option::Option<unsafe extern "C" fn()>,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn on_exit(
        __func: ::std::option::Option<
            unsafe extern "C" fn(
                __status: ::std::os::raw::c_int,
                __arg: *mut ::std::os::raw::c_void,
            ),
        >,
        __arg: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn exit(__status: ::std::os::raw::c_int) -> !;
}
unsafe extern "C" {
    pub fn quick_exit(__status: ::std::os::raw::c_int) -> !;
}
unsafe extern "C" {
    pub fn _Exit(__status: ::std::os::raw::c_int) -> !;
}
unsafe extern "C" {
    pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn setenv(
        __name: *const ::std::os::raw::c_char,
        __value: *const ::std::os::raw::c_char,
        __replace: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn clearenv() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mkstemps(
        __template: *mut ::std::os::raw::c_char,
        __suffixlen: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn realpath(
        __name: *const ::std::os::raw::c_char,
        __resolved: *mut ::std::os::raw::c_char,
    ) -> *mut ::std::os::raw::c_char;
}
pub type __compar_fn_t = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *const ::std::os::raw::c_void,
        arg2: *const ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
    pub fn bsearch(
        __key: *const ::std::os::raw::c_void,
        __base: *const ::std::os::raw::c_void,
        __nmemb: usize,
        __size: usize,
        __compar: __compar_fn_t,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn qsort(
        __base: *mut ::std::os::raw::c_void,
        __nmemb: usize,
        __size: usize,
        __compar: __compar_fn_t,
    );
}
unsafe extern "C" {
    pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long;
}
unsafe extern "C" {
    pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong;
}
unsafe extern "C" {
    pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t;
}
unsafe extern "C" {
    pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t;
}
unsafe extern "C" {
    pub fn lldiv(
        __numer: ::std::os::raw::c_longlong,
        __denom: ::std::os::raw::c_longlong,
    ) -> lldiv_t;
}
unsafe extern "C" {
    pub fn ecvt(
        __value: f64,
        __ndigit: ::std::os::raw::c_int,
        __decpt: *mut ::std::os::raw::c_int,
        __sign: *mut ::std::os::raw::c_int,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn fcvt(
        __value: f64,
        __ndigit: ::std::os::raw::c_int,
        __decpt: *mut ::std::os::raw::c_int,
        __sign: *mut ::std::os::raw::c_int,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn gcvt(
        __value: f64,
        __ndigit: ::std::os::raw::c_int,
        __buf: *mut ::std::os::raw::c_char,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn qecvt(
        __value: u128,
        __ndigit: ::std::os::raw::c_int,
        __decpt: *mut ::std::os::raw::c_int,
        __sign: *mut ::std::os::raw::c_int,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn qfcvt(
        __value: u128,
        __ndigit: ::std::os::raw::c_int,
        __decpt: *mut ::std::os::raw::c_int,
        __sign: *mut ::std::os::raw::c_int,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn qgcvt(
        __value: u128,
        __ndigit: ::std::os::raw::c_int,
        __buf: *mut ::std::os::raw::c_char,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ecvt_r(
        __value: f64,
        __ndigit: ::std::os::raw::c_int,
        __decpt: *mut ::std::os::raw::c_int,
        __sign: *mut ::std::os::raw::c_int,
        __buf: *mut ::std::os::raw::c_char,
        __len: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn fcvt_r(
        __value: f64,
        __ndigit: ::std::os::raw::c_int,
        __decpt: *mut ::std::os::raw::c_int,
        __sign: *mut ::std::os::raw::c_int,
        __buf: *mut ::std::os::raw::c_char,
        __len: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn qecvt_r(
        __value: u128,
        __ndigit: ::std::os::raw::c_int,
        __decpt: *mut ::std::os::raw::c_int,
        __sign: *mut ::std::os::raw::c_int,
        __buf: *mut ::std::os::raw::c_char,
        __len: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn qfcvt_r(
        __value: u128,
        __ndigit: ::std::os::raw::c_int,
        __decpt: *mut ::std::os::raw::c_int,
        __sign: *mut ::std::os::raw::c_int,
        __buf: *mut ::std::os::raw::c_char,
        __len: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mbtowc(
        __pwc: *mut wchar_t,
        __s: *const ::std::os::raw::c_char,
        __n: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: usize) -> usize;
}
unsafe extern "C" {
    pub fn wcstombs(__s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, __n: usize) -> usize;
}
unsafe extern "C" {
    pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn getsubopt(
        __optionp: *mut *mut ::std::os::raw::c_char,
        __tokens: *const *mut ::std::os::raw::c_char,
        __valuep: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int)
    -> ::std::os::raw::c_int;
}
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
#[doc = "!< Initialize all processors"]
pub const amdsmi_init_flags_t_AMDSMI_INIT_ALL_PROCESSORS: amdsmi_init_flags_t = 4294967295;
pub const amdsmi_init_flags_t_AMDSMI_INIT_AMD_CPUS: amdsmi_init_flags_t = 1;
pub const amdsmi_init_flags_t_AMDSMI_INIT_AMD_GPUS: amdsmi_init_flags_t = 2;
pub const amdsmi_init_flags_t_AMDSMI_INIT_NON_AMD_CPUS: amdsmi_init_flags_t = 4;
pub const amdsmi_init_flags_t_AMDSMI_INIT_NON_AMD_GPUS: amdsmi_init_flags_t = 8;
pub const amdsmi_init_flags_t_AMDSMI_INIT_AMD_APUS: amdsmi_init_flags_t = 3;
#[doc = " @brief Initialization flags\n\n Initialization flags may be OR'd together and passed to ::amdsmi_init()."]
pub type amdsmi_init_flags_t = ::std::os::raw::c_uint;
pub const amdsmi_mm_ip_t_AMDSMI_MM_UVD: amdsmi_mm_ip_t = 0;
pub const amdsmi_mm_ip_t_AMDSMI_MM_VCE: amdsmi_mm_ip_t = 1;
pub const amdsmi_mm_ip_t_AMDSMI_MM_VCN: amdsmi_mm_ip_t = 2;
pub const amdsmi_mm_ip_t_AMDSMI_MM__MAX: amdsmi_mm_ip_t = 3;
pub type amdsmi_mm_ip_t = ::std::os::raw::c_uint;
pub const amdsmi_container_types_t_AMDSMI_CONTAINER_LXC: amdsmi_container_types_t = 0;
pub const amdsmi_container_types_t_AMDSMI_CONTAINER_DOCKER: amdsmi_container_types_t = 1;
pub type amdsmi_container_types_t = ::std::os::raw::c_uint;
#[doc = "! opaque handler point to underlying implementation"]
pub type amdsmi_processor_handle = *mut ::std::os::raw::c_void;
pub type amdsmi_socket_handle = *mut ::std::os::raw::c_void;
pub type amdsmi_cpusocket_handle = *mut ::std::os::raw::c_void;
pub const processor_type_t_AMDSMI_PROCESSOR_TYPE_UNKNOWN: processor_type_t = 0;
pub const processor_type_t_AMDSMI_PROCESSOR_TYPE_AMD_GPU: processor_type_t = 1;
pub const processor_type_t_AMDSMI_PROCESSOR_TYPE_AMD_CPU: processor_type_t = 2;
pub const processor_type_t_AMDSMI_PROCESSOR_TYPE_NON_AMD_GPU: processor_type_t = 3;
pub const processor_type_t_AMDSMI_PROCESSOR_TYPE_NON_AMD_CPU: processor_type_t = 4;
pub const processor_type_t_AMDSMI_PROCESSOR_TYPE_AMD_CPU_CORE: processor_type_t = 5;
pub const processor_type_t_AMDSMI_PROCESSOR_TYPE_AMD_APU: processor_type_t = 6;
#[doc = " @brief Processor types detectable by AMD SMI\n AMDSMI_PROCESSOR_TYPE_AMD_CPU      - CPU Socket is a physical component that holds the CPU.\n AMDSMI_PROCESSOR_TYPE_AMD_CPU_CORE - CPU Cores are number of individual processing units within the CPU.\n AMDSMI_PROCESSOR_TYPE_AMD_APU      - Combination of AMDSMI_PROCESSOR_TYPE_AMD_CPU and integrated GPU on single die"]
pub type processor_type_t = ::std::os::raw::c_uint;
#[doc = "!< Call succeeded"]
pub const amdsmi_status_t_AMDSMI_STATUS_SUCCESS: amdsmi_status_t = 0;
#[doc = "!< Invalid parameters"]
pub const amdsmi_status_t_AMDSMI_STATUS_INVAL: amdsmi_status_t = 1;
#[doc = "!< Command not supported"]
pub const amdsmi_status_t_AMDSMI_STATUS_NOT_SUPPORTED: amdsmi_status_t = 2;
#[doc = "!< Not implemented yet"]
pub const amdsmi_status_t_AMDSMI_STATUS_NOT_YET_IMPLEMENTED: amdsmi_status_t = 3;
#[doc = "!< Fail to load lib"]
pub const amdsmi_status_t_AMDSMI_STATUS_FAIL_LOAD_MODULE: amdsmi_status_t = 4;
#[doc = "!< Fail to load symbol"]
pub const amdsmi_status_t_AMDSMI_STATUS_FAIL_LOAD_SYMBOL: amdsmi_status_t = 5;
#[doc = "!< Error when call libdrm"]
pub const amdsmi_status_t_AMDSMI_STATUS_DRM_ERROR: amdsmi_status_t = 6;
#[doc = "!< API call failed"]
pub const amdsmi_status_t_AMDSMI_STATUS_API_FAILED: amdsmi_status_t = 7;
#[doc = "!< Timeout in API call"]
pub const amdsmi_status_t_AMDSMI_STATUS_TIMEOUT: amdsmi_status_t = 8;
#[doc = "!< Retry operation"]
pub const amdsmi_status_t_AMDSMI_STATUS_RETRY: amdsmi_status_t = 9;
#[doc = "!< Permission Denied"]
pub const amdsmi_status_t_AMDSMI_STATUS_NO_PERM: amdsmi_status_t = 10;
#[doc = "!< An interrupt occurred during execution of function"]
pub const amdsmi_status_t_AMDSMI_STATUS_INTERRUPT: amdsmi_status_t = 11;
#[doc = "!< I/O Error"]
pub const amdsmi_status_t_AMDSMI_STATUS_IO: amdsmi_status_t = 12;
#[doc = "!< Bad address"]
pub const amdsmi_status_t_AMDSMI_STATUS_ADDRESS_FAULT: amdsmi_status_t = 13;
#[doc = "!< Problem accessing a file"]
pub const amdsmi_status_t_AMDSMI_STATUS_FILE_ERROR: amdsmi_status_t = 14;
#[doc = "!< Not enough memory"]
pub const amdsmi_status_t_AMDSMI_STATUS_OUT_OF_RESOURCES: amdsmi_status_t = 15;
#[doc = "!< An internal exception was caught"]
pub const amdsmi_status_t_AMDSMI_STATUS_INTERNAL_EXCEPTION: amdsmi_status_t = 16;
#[doc = "!< The provided input is out of allowable or safe range"]
pub const amdsmi_status_t_AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS: amdsmi_status_t = 17;
#[doc = "!< An error occurred when initializing internal data structures"]
pub const amdsmi_status_t_AMDSMI_STATUS_INIT_ERROR: amdsmi_status_t = 18;
#[doc = "!< An internal reference counter exceeded INT32_MAX"]
pub const amdsmi_status_t_AMDSMI_STATUS_REFCOUNT_OVERFLOW: amdsmi_status_t = 19;
#[doc = "!< Device busy"]
pub const amdsmi_status_t_AMDSMI_STATUS_BUSY: amdsmi_status_t = 30;
#[doc = "!< Device Not found"]
pub const amdsmi_status_t_AMDSMI_STATUS_NOT_FOUND: amdsmi_status_t = 31;
#[doc = "!< Device not initialized"]
pub const amdsmi_status_t_AMDSMI_STATUS_NOT_INIT: amdsmi_status_t = 32;
#[doc = "!< No more free slot"]
pub const amdsmi_status_t_AMDSMI_STATUS_NO_SLOT: amdsmi_status_t = 33;
#[doc = "!< Processor driver not loaded"]
pub const amdsmi_status_t_AMDSMI_STATUS_DRIVER_NOT_LOADED: amdsmi_status_t = 34;
#[doc = "!< No data was found for a given input"]
pub const amdsmi_status_t_AMDSMI_STATUS_NO_DATA: amdsmi_status_t = 40;
#[doc = "!< Not enough resources were available for the operation"]
pub const amdsmi_status_t_AMDSMI_STATUS_INSUFFICIENT_SIZE: amdsmi_status_t = 41;
#[doc = "!< An unexpected amount of data was read"]
pub const amdsmi_status_t_AMDSMI_STATUS_UNEXPECTED_SIZE: amdsmi_status_t = 42;
#[doc = "!< The data read or provided to function is not what was expected"]
pub const amdsmi_status_t_AMDSMI_STATUS_UNEXPECTED_DATA: amdsmi_status_t = 43;
#[doc = "!< System has different cpu than AMD"]
pub const amdsmi_status_t_AMDSMI_STATUS_NON_AMD_CPU: amdsmi_status_t = 44;
#[doc = "!< Energy driver not found"]
pub const amdsmi_status_t_AMDSMI_STATUS_NO_ENERGY_DRV: amdsmi_status_t = 45;
#[doc = "!< MSR driver not found"]
pub const amdsmi_status_t_AMDSMI_STATUS_NO_MSR_DRV: amdsmi_status_t = 46;
#[doc = "!< HSMP driver not found"]
pub const amdsmi_status_t_AMDSMI_STATUS_NO_HSMP_DRV: amdsmi_status_t = 47;
#[doc = "!< HSMP not supported"]
pub const amdsmi_status_t_AMDSMI_STATUS_NO_HSMP_SUP: amdsmi_status_t = 48;
#[doc = "!< HSMP message/feature not supported"]
pub const amdsmi_status_t_AMDSMI_STATUS_NO_HSMP_MSG_SUP: amdsmi_status_t = 49;
#[doc = "!< HSMP message is timedout"]
pub const amdsmi_status_t_AMDSMI_STATUS_HSMP_TIMEOUT: amdsmi_status_t = 50;
#[doc = "!< No Energy and HSMP driver present"]
pub const amdsmi_status_t_AMDSMI_STATUS_NO_DRV: amdsmi_status_t = 51;
#[doc = "!< file or directory not found"]
pub const amdsmi_status_t_AMDSMI_STATUS_FILE_NOT_FOUND: amdsmi_status_t = 52;
#[doc = "!< Parsed argument is invalid"]
pub const amdsmi_status_t_AMDSMI_STATUS_ARG_PTR_NULL: amdsmi_status_t = 53;
#[doc = "!< AMDGPU restart failed"]
pub const amdsmi_status_t_AMDSMI_STATUS_AMDGPU_RESTART_ERR: amdsmi_status_t = 54;
#[doc = "!< Setting is not available"]
pub const amdsmi_status_t_AMDSMI_STATUS_SETTING_UNAVAILABLE: amdsmi_status_t = 55;
#[doc = "!< The internal library error did not map to a status code"]
pub const amdsmi_status_t_AMDSMI_STATUS_MAP_ERROR: amdsmi_status_t = 4294967294;
#[doc = "!< An unknown error occurred"]
pub const amdsmi_status_t_AMDSMI_STATUS_UNKNOWN_ERROR: amdsmi_status_t = 4294967295;
#[doc = " @brief Error codes returned by amdsmi functions"]
pub type amdsmi_status_t = ::std::os::raw::c_uint;
#[doc = "!< System clock"]
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_SYS: amdsmi_clk_type_t = 0;
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_FIRST: amdsmi_clk_type_t = 0;
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_GFX: amdsmi_clk_type_t = 0;
#[doc = "!< Data Fabric clock (for ASICs\n!< running on a separate clock)"]
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_DF: amdsmi_clk_type_t = 1;
#[doc = "!< Display Controller Engine clock"]
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_DCEF: amdsmi_clk_type_t = 2;
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_SOC: amdsmi_clk_type_t = 3;
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_MEM: amdsmi_clk_type_t = 4;
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_PCIE: amdsmi_clk_type_t = 5;
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_VCLK0: amdsmi_clk_type_t = 6;
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_VCLK1: amdsmi_clk_type_t = 7;
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_DCLK0: amdsmi_clk_type_t = 8;
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE_DCLK1: amdsmi_clk_type_t = 9;
pub const amdsmi_clk_type_t_AMDSMI_CLK_TYPE__MAX: amdsmi_clk_type_t = 9;
#[doc = " @brief Clock types"]
pub type amdsmi_clk_type_t = ::std::os::raw::c_uint;
pub const amdsmi_accelerator_partition_type_t_AMDSMI_ACCELERATOR_PARTITION_INVALID:
    amdsmi_accelerator_partition_type_t = 0;
#[doc = "!< Single GPU mode (SPX)- All XCCs work\n!< together with shared memory"]
pub const amdsmi_accelerator_partition_type_t_AMDSMI_ACCELERATOR_PARTITION_SPX:
    amdsmi_accelerator_partition_type_t = 1;
#[doc = "!< Dual GPU mode (DPX)- Half XCCs work\n!< together with shared memory"]
pub const amdsmi_accelerator_partition_type_t_AMDSMI_ACCELERATOR_PARTITION_DPX:
    amdsmi_accelerator_partition_type_t = 2;
#[doc = "!< Triple GPU mode (TPX)- One-third XCCs\n!< work together with shared memory"]
pub const amdsmi_accelerator_partition_type_t_AMDSMI_ACCELERATOR_PARTITION_TPX:
    amdsmi_accelerator_partition_type_t = 3;
#[doc = "!< Quad GPU mode (QPX)- Quarter XCCs\n!< work together with shared memory"]
pub const amdsmi_accelerator_partition_type_t_AMDSMI_ACCELERATOR_PARTITION_QPX:
    amdsmi_accelerator_partition_type_t = 4;
#[doc = "!< Core mode (CPX)- Per-chip XCC with\n!< shared memory"]
pub const amdsmi_accelerator_partition_type_t_AMDSMI_ACCELERATOR_PARTITION_CPX:
    amdsmi_accelerator_partition_type_t = 5;
#[doc = " @brief Accelerator Partition. This enum is used to identify\n various accelerator partitioning settings."]
pub type amdsmi_accelerator_partition_type_t = ::std::os::raw::c_uint;
pub const amdsmi_compute_partition_type_t_AMDSMI_COMPUTE_PARTITION_INVALID:
    amdsmi_compute_partition_type_t = 0;
#[doc = "!< Single GPU mode (SPX)- All XCCs work\n!< together with shared memory"]
pub const amdsmi_compute_partition_type_t_AMDSMI_COMPUTE_PARTITION_SPX:
    amdsmi_compute_partition_type_t = 1;
#[doc = "!< Dual GPU mode (DPX)- Half XCCs work\n!< together with shared memory"]
pub const amdsmi_compute_partition_type_t_AMDSMI_COMPUTE_PARTITION_DPX:
    amdsmi_compute_partition_type_t = 2;
#[doc = "!< Triple GPU mode (TPX)- One-third XCCs\n!< work together with shared memory"]
pub const amdsmi_compute_partition_type_t_AMDSMI_COMPUTE_PARTITION_TPX:
    amdsmi_compute_partition_type_t = 3;
#[doc = "!< Quad GPU mode (QPX)- Quarter XCCs\n!< work together with shared memory"]
pub const amdsmi_compute_partition_type_t_AMDSMI_COMPUTE_PARTITION_QPX:
    amdsmi_compute_partition_type_t = 4;
#[doc = "!< Core mode (CPX)- Per-chip XCC with\n!< shared memory"]
pub const amdsmi_compute_partition_type_t_AMDSMI_COMPUTE_PARTITION_CPX:
    amdsmi_compute_partition_type_t = 5;
#[doc = " @brief Compute Partition. This enum is used to identify\n various compute partitioning settings."]
pub type amdsmi_compute_partition_type_t = ::std::os::raw::c_uint;
pub const amdsmi_memory_partition_type_t_AMDSMI_MEMORY_PARTITION_UNKNOWN:
    amdsmi_memory_partition_type_t = 0;
#[doc = "!< NPS1 - All CCD & XCD data is interleaved\n!< accross all 8 HBM stacks (all stacks/1)."]
pub const amdsmi_memory_partition_type_t_AMDSMI_MEMORY_PARTITION_NPS1:
    amdsmi_memory_partition_type_t = 1;
#[doc = "!< NPS2 - 2 sets of CCDs or 4 XCD interleaved\n!< accross the 4 HBM stacks per AID pair\n!< (8 stacks/2)."]
pub const amdsmi_memory_partition_type_t_AMDSMI_MEMORY_PARTITION_NPS2:
    amdsmi_memory_partition_type_t = 2;
#[doc = "!< NPS4 - Each XCD data is interleaved accross\n!< accross 2 (or single) HBM stacks\n!< (8 stacks/8 or 8 stacks/4)."]
pub const amdsmi_memory_partition_type_t_AMDSMI_MEMORY_PARTITION_NPS4:
    amdsmi_memory_partition_type_t = 3;
#[doc = "!< NPS8 - Each XCD uses a single HBM stack\n!< (8 stacks/8). Or each XCD uses a single\n!< HBM stack & CCDs share 2 non-interleaved\n!< HBM stacks on its AID\n!< (AID[1,2,3] = 6 stacks/6)."]
pub const amdsmi_memory_partition_type_t_AMDSMI_MEMORY_PARTITION_NPS8:
    amdsmi_memory_partition_type_t = 4;
#[doc = " @brief Memory Partitions. This enum is used to identify various\n memory partition types."]
pub type amdsmi_memory_partition_type_t = ::std::os::raw::c_uint;
pub const amdsmi_temperature_type_t_AMDSMI_TEMPERATURE_TYPE_EDGE: amdsmi_temperature_type_t = 0;
pub const amdsmi_temperature_type_t_AMDSMI_TEMPERATURE_TYPE_FIRST: amdsmi_temperature_type_t = 0;
pub const amdsmi_temperature_type_t_AMDSMI_TEMPERATURE_TYPE_HOTSPOT: amdsmi_temperature_type_t = 1;
pub const amdsmi_temperature_type_t_AMDSMI_TEMPERATURE_TYPE_JUNCTION: amdsmi_temperature_type_t = 1;
pub const amdsmi_temperature_type_t_AMDSMI_TEMPERATURE_TYPE_VRAM: amdsmi_temperature_type_t = 2;
pub const amdsmi_temperature_type_t_AMDSMI_TEMPERATURE_TYPE_HBM_0: amdsmi_temperature_type_t = 3;
pub const amdsmi_temperature_type_t_AMDSMI_TEMPERATURE_TYPE_HBM_1: amdsmi_temperature_type_t = 4;
pub const amdsmi_temperature_type_t_AMDSMI_TEMPERATURE_TYPE_HBM_2: amdsmi_temperature_type_t = 5;
pub const amdsmi_temperature_type_t_AMDSMI_TEMPERATURE_TYPE_HBM_3: amdsmi_temperature_type_t = 6;
pub const amdsmi_temperature_type_t_AMDSMI_TEMPERATURE_TYPE_PLX: amdsmi_temperature_type_t = 7;
pub const amdsmi_temperature_type_t_AMDSMI_TEMPERATURE_TYPE__MAX: amdsmi_temperature_type_t = 7;
#[doc = " @brief This enumeration is used to indicate from which part of the device a\n temperature reading should be obtained."]
pub type amdsmi_temperature_type_t = ::std::os::raw::c_uint;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SMU: amdsmi_fw_block_t = 1;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_FIRST: amdsmi_fw_block_t = 1;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_CP_CE: amdsmi_fw_block_t = 2;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_CP_PFP: amdsmi_fw_block_t = 3;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_CP_ME: amdsmi_fw_block_t = 4;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_CP_MEC_JT1: amdsmi_fw_block_t = 5;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_CP_MEC_JT2: amdsmi_fw_block_t = 6;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_CP_MEC1: amdsmi_fw_block_t = 7;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_CP_MEC2: amdsmi_fw_block_t = 8;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLC: amdsmi_fw_block_t = 9;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SDMA0: amdsmi_fw_block_t = 10;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SDMA1: amdsmi_fw_block_t = 11;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SDMA2: amdsmi_fw_block_t = 12;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SDMA3: amdsmi_fw_block_t = 13;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SDMA4: amdsmi_fw_block_t = 14;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SDMA5: amdsmi_fw_block_t = 15;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SDMA6: amdsmi_fw_block_t = 16;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SDMA7: amdsmi_fw_block_t = 17;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_VCN: amdsmi_fw_block_t = 18;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_UVD: amdsmi_fw_block_t = 19;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_VCE: amdsmi_fw_block_t = 20;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_ISP: amdsmi_fw_block_t = 21;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_DMCU_ERAM: amdsmi_fw_block_t = 22;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_DMCU_ISR: amdsmi_fw_block_t = 23;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLC_RESTORE_LIST_GPM_MEM: amdsmi_fw_block_t = 24;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLC_RESTORE_LIST_SRM_MEM: amdsmi_fw_block_t = 25;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLC_RESTORE_LIST_CNTL: amdsmi_fw_block_t = 26;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLC_V: amdsmi_fw_block_t = 27;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_MMSCH: amdsmi_fw_block_t = 28;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_PSP_SYSDRV: amdsmi_fw_block_t = 29;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_PSP_SOSDRV: amdsmi_fw_block_t = 30;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_PSP_TOC: amdsmi_fw_block_t = 31;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_PSP_KEYDB: amdsmi_fw_block_t = 32;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_DFC: amdsmi_fw_block_t = 33;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_PSP_SPL: amdsmi_fw_block_t = 34;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_DRV_CAP: amdsmi_fw_block_t = 35;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_MC: amdsmi_fw_block_t = 36;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_PSP_BL: amdsmi_fw_block_t = 37;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_CP_PM4: amdsmi_fw_block_t = 38;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLC_P: amdsmi_fw_block_t = 39;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SEC_POLICY_STAGE2: amdsmi_fw_block_t = 40;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_REG_ACCESS_WHITELIST: amdsmi_fw_block_t = 41;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_IMU_DRAM: amdsmi_fw_block_t = 42;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_IMU_IRAM: amdsmi_fw_block_t = 43;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SDMA_TH0: amdsmi_fw_block_t = 44;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_SDMA_TH1: amdsmi_fw_block_t = 45;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_CP_MES: amdsmi_fw_block_t = 46;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_MES_KIQ: amdsmi_fw_block_t = 47;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_MES_STACK: amdsmi_fw_block_t = 48;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_MES_THREAD1: amdsmi_fw_block_t = 49;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_MES_THREAD1_STACK: amdsmi_fw_block_t = 50;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLX6: amdsmi_fw_block_t = 51;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLX6_DRAM_BOOT: amdsmi_fw_block_t = 52;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RS64_ME: amdsmi_fw_block_t = 53;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RS64_ME_P0_DATA: amdsmi_fw_block_t = 54;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RS64_ME_P1_DATA: amdsmi_fw_block_t = 55;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RS64_PFP: amdsmi_fw_block_t = 56;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RS64_PFP_P0_DATA: amdsmi_fw_block_t = 57;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RS64_PFP_P1_DATA: amdsmi_fw_block_t = 58;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RS64_MEC: amdsmi_fw_block_t = 59;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RS64_MEC_P0_DATA: amdsmi_fw_block_t = 60;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RS64_MEC_P1_DATA: amdsmi_fw_block_t = 61;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RS64_MEC_P2_DATA: amdsmi_fw_block_t = 62;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RS64_MEC_P3_DATA: amdsmi_fw_block_t = 63;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_PPTABLE: amdsmi_fw_block_t = 64;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_PSP_SOC: amdsmi_fw_block_t = 65;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_PSP_DBG: amdsmi_fw_block_t = 66;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_PSP_INTF: amdsmi_fw_block_t = 67;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLX6_CORE1: amdsmi_fw_block_t = 68;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLX6_DRAM_BOOT_CORE1: amdsmi_fw_block_t = 69;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLCV_LX7: amdsmi_fw_block_t = 70;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLC_SAVE_RESTORE_LIST: amdsmi_fw_block_t = 71;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_ASD: amdsmi_fw_block_t = 72;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_TA_RAS: amdsmi_fw_block_t = 73;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_TA_XGMI: amdsmi_fw_block_t = 74;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLC_SRLG: amdsmi_fw_block_t = 75;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_RLC_SRLS: amdsmi_fw_block_t = 76;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_PM: amdsmi_fw_block_t = 77;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID_DMCU: amdsmi_fw_block_t = 78;
pub const amdsmi_fw_block_t_AMDSMI_FW_ID__MAX: amdsmi_fw_block_t = 79;
#[doc = " @brief The values of this enum are used to identify the various firmware\n blocks."]
pub type amdsmi_fw_block_t = ::std::os::raw::c_uint;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_UNKNOWN: amdsmi_vram_type_t = 0;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_HBM: amdsmi_vram_type_t = 1;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_HBM2: amdsmi_vram_type_t = 2;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_HBM2E: amdsmi_vram_type_t = 3;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_HBM3: amdsmi_vram_type_t = 4;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_DDR2: amdsmi_vram_type_t = 10;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_DDR3: amdsmi_vram_type_t = 11;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_DDR4: amdsmi_vram_type_t = 12;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_GDDR1: amdsmi_vram_type_t = 17;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_GDDR2: amdsmi_vram_type_t = 18;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_GDDR3: amdsmi_vram_type_t = 19;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_GDDR4: amdsmi_vram_type_t = 20;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_GDDR5: amdsmi_vram_type_t = 21;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_GDDR6: amdsmi_vram_type_t = 22;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE_GDDR7: amdsmi_vram_type_t = 23;
pub const amdsmi_vram_type_t_AMDSMI_VRAM_TYPE__MAX: amdsmi_vram_type_t = 23;
pub type amdsmi_vram_type_t = ::std::os::raw::c_uint;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__PLACEHOLDER0: amdsmi_vram_vendor_type_t = 0;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__SAMSUNG: amdsmi_vram_vendor_type_t = 1;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__INFINEON: amdsmi_vram_vendor_type_t = 2;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__ELPIDA: amdsmi_vram_vendor_type_t = 3;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__ETRON: amdsmi_vram_vendor_type_t = 4;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__NANYA: amdsmi_vram_vendor_type_t = 5;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__HYNIX: amdsmi_vram_vendor_type_t = 6;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__MOSEL: amdsmi_vram_vendor_type_t = 7;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__WINBOND: amdsmi_vram_vendor_type_t = 8;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__ESMT: amdsmi_vram_vendor_type_t = 9;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__PLACEHOLDER1: amdsmi_vram_vendor_type_t =
    10;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__PLACEHOLDER2: amdsmi_vram_vendor_type_t =
    11;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__PLACEHOLDER3: amdsmi_vram_vendor_type_t =
    12;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__PLACEHOLDER4: amdsmi_vram_vendor_type_t =
    13;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__PLACEHOLDER5: amdsmi_vram_vendor_type_t =
    14;
pub const amdsmi_vram_vendor_type_t_AMDSMI_VRAM_VENDOR__MICRON: amdsmi_vram_vendor_type_t = 15;
pub type amdsmi_vram_vendor_type_t = ::std::os::raw::c_uint;
#[doc = " @brief This structure represents a range (e.g., frequencies or voltages)."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_range_t {
    #[doc = "!< Lower bound of range"]
    pub lower_bound: u64,
    #[doc = "!< Upper bound of range"]
    pub upper_bound: u64,
    pub reserved: [u64; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_range_t"][::std::mem::size_of::<amdsmi_range_t>() - 32usize];
    ["Alignment of amdsmi_range_t"][::std::mem::align_of::<amdsmi_range_t>() - 8usize];
    ["Offset of field: amdsmi_range_t::lower_bound"]
        [::std::mem::offset_of!(amdsmi_range_t, lower_bound) - 0usize];
    ["Offset of field: amdsmi_range_t::upper_bound"]
        [::std::mem::offset_of!(amdsmi_range_t, upper_bound) - 8usize];
    ["Offset of field: amdsmi_range_t::reserved"]
        [::std::mem::offset_of!(amdsmi_range_t, reserved) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_xgmi_info_t {
    pub xgmi_lanes: u8,
    pub xgmi_hive_id: u64,
    pub xgmi_node_id: u64,
    pub index: u32,
    pub reserved: [u32; 9usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_xgmi_info_t"][::std::mem::size_of::<amdsmi_xgmi_info_t>() - 64usize];
    ["Alignment of amdsmi_xgmi_info_t"][::std::mem::align_of::<amdsmi_xgmi_info_t>() - 8usize];
    ["Offset of field: amdsmi_xgmi_info_t::xgmi_lanes"]
        [::std::mem::offset_of!(amdsmi_xgmi_info_t, xgmi_lanes) - 0usize];
    ["Offset of field: amdsmi_xgmi_info_t::xgmi_hive_id"]
        [::std::mem::offset_of!(amdsmi_xgmi_info_t, xgmi_hive_id) - 8usize];
    ["Offset of field: amdsmi_xgmi_info_t::xgmi_node_id"]
        [::std::mem::offset_of!(amdsmi_xgmi_info_t, xgmi_node_id) - 16usize];
    ["Offset of field: amdsmi_xgmi_info_t::index"]
        [::std::mem::offset_of!(amdsmi_xgmi_info_t, index) - 24usize];
    ["Offset of field: amdsmi_xgmi_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_xgmi_info_t, reserved) - 28usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_vram_usage_t {
    pub vram_total: u32,
    pub vram_used: u32,
    pub reserved: [u32; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_vram_usage_t"][::std::mem::size_of::<amdsmi_vram_usage_t>() - 16usize];
    ["Alignment of amdsmi_vram_usage_t"][::std::mem::align_of::<amdsmi_vram_usage_t>() - 4usize];
    ["Offset of field: amdsmi_vram_usage_t::vram_total"]
        [::std::mem::offset_of!(amdsmi_vram_usage_t, vram_total) - 0usize];
    ["Offset of field: amdsmi_vram_usage_t::vram_used"]
        [::std::mem::offset_of!(amdsmi_vram_usage_t, vram_used) - 4usize];
    ["Offset of field: amdsmi_vram_usage_t::reserved"]
        [::std::mem::offset_of!(amdsmi_vram_usage_t, reserved) - 8usize];
};
#[doc = " @brief This structure hold violation status information."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_violation_status_t {
    #[doc = "!< Represents CPU timestamp in microseconds (uS)"]
    pub reference_timestamp: u64,
    #[doc = "!< Violation time in milliseconds (ms)"]
    pub violation_timestamp: u64,
    #[doc = "!< Current accumulated counter; Max uint64 means unsupported"]
    pub acc_counter: u64,
    #[doc = "!< Current accumulated processor hot violation count; Max uint64 means unsupported"]
    pub acc_prochot_thrm: u64,
    #[doc = "!< PVIOL; Current accumulated Package Power Tracking (PPT) count; Max uint64 means unsupported"]
    pub acc_ppt_pwr: u64,
    #[doc = "!< TVIOL; Current accumulated Socket thermal count; Max uint64 means unsupported"]
    pub acc_socket_thrm: u64,
    #[doc = "!< Current accumulated voltage regulator count; Max uint64 means unsupported"]
    pub acc_vr_thrm: u64,
    #[doc = "!< Current accumulated High Bandwidth Memory (HBM) thermal count; Max uint64 means unsupported"]
    pub acc_hbm_thrm: u64,
    #[doc = "!< Processor hot violation % (greater than 0% is a violation); Max uint64 means unsupported"]
    pub per_prochot_thrm: u64,
    #[doc = "!< PVIOL; Package Power Tracking (PPT) violation % (greater than 0% is a violation); Max uint64 means unsupported"]
    pub per_ppt_pwr: u64,
    #[doc = "!< TVIOL; Socket thermal violation % (greater than 0% is a violation); Max uint64 means unsupported"]
    pub per_socket_thrm: u64,
    #[doc = "!< Voltage regulator violation % (greater than 0% is a violation); Max uint64 means unsupported"]
    pub per_vr_thrm: u64,
    #[doc = "!< High Bandwidth Memory (HBM) thermal violation % (greater than 0% is a violation); Max uint64 means unsupported"]
    pub per_hbm_thrm: u64,
    #[doc = "!< Processor hot violation; 1 = active 0 = not active; Max uint8 means unsupported"]
    pub active_prochot_thrm: u8,
    #[doc = "!< Package Power Tracking (PPT) violation; 1 = active 0 = not active; Max uint8 means unsupported"]
    pub active_ppt_pwr: u8,
    #[doc = "!< Socket thermal violation; 1 = active 0 = not active; Max uint8 means unsupported"]
    pub active_socket_thrm: u8,
    #[doc = "!< Voltage regulator violation; 1 = active 0 = not active; Max uint8 means unsupported"]
    pub active_vr_thrm: u8,
    #[doc = "!< High Bandwidth Memory (HBM) thermal violation; 1 = active 0 = not active; Max uint8 means unsupported"]
    pub active_hbm_thrm: u8,
    pub reserved: [u64; 30usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_violation_status_t"]
        [::std::mem::size_of::<amdsmi_violation_status_t>() - 352usize];
    ["Alignment of amdsmi_violation_status_t"]
        [::std::mem::align_of::<amdsmi_violation_status_t>() - 8usize];
    ["Offset of field: amdsmi_violation_status_t::reference_timestamp"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, reference_timestamp) - 0usize];
    ["Offset of field: amdsmi_violation_status_t::violation_timestamp"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, violation_timestamp) - 8usize];
    ["Offset of field: amdsmi_violation_status_t::acc_counter"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, acc_counter) - 16usize];
    ["Offset of field: amdsmi_violation_status_t::acc_prochot_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, acc_prochot_thrm) - 24usize];
    ["Offset of field: amdsmi_violation_status_t::acc_ppt_pwr"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, acc_ppt_pwr) - 32usize];
    ["Offset of field: amdsmi_violation_status_t::acc_socket_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, acc_socket_thrm) - 40usize];
    ["Offset of field: amdsmi_violation_status_t::acc_vr_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, acc_vr_thrm) - 48usize];
    ["Offset of field: amdsmi_violation_status_t::acc_hbm_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, acc_hbm_thrm) - 56usize];
    ["Offset of field: amdsmi_violation_status_t::per_prochot_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, per_prochot_thrm) - 64usize];
    ["Offset of field: amdsmi_violation_status_t::per_ppt_pwr"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, per_ppt_pwr) - 72usize];
    ["Offset of field: amdsmi_violation_status_t::per_socket_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, per_socket_thrm) - 80usize];
    ["Offset of field: amdsmi_violation_status_t::per_vr_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, per_vr_thrm) - 88usize];
    ["Offset of field: amdsmi_violation_status_t::per_hbm_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, per_hbm_thrm) - 96usize];
    ["Offset of field: amdsmi_violation_status_t::active_prochot_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, active_prochot_thrm) - 104usize];
    ["Offset of field: amdsmi_violation_status_t::active_ppt_pwr"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, active_ppt_pwr) - 105usize];
    ["Offset of field: amdsmi_violation_status_t::active_socket_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, active_socket_thrm) - 106usize];
    ["Offset of field: amdsmi_violation_status_t::active_vr_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, active_vr_thrm) - 107usize];
    ["Offset of field: amdsmi_violation_status_t::active_hbm_thrm"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, active_hbm_thrm) - 108usize];
    ["Offset of field: amdsmi_violation_status_t::reserved"]
        [::std::mem::offset_of!(amdsmi_violation_status_t, reserved) - 112usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_frequency_range_t {
    pub supported_freq_range: amdsmi_range_t,
    pub current_freq_range: amdsmi_range_t,
    pub reserved: [u32; 8usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_frequency_range_t"]
        [::std::mem::size_of::<amdsmi_frequency_range_t>() - 96usize];
    ["Alignment of amdsmi_frequency_range_t"]
        [::std::mem::align_of::<amdsmi_frequency_range_t>() - 8usize];
    ["Offset of field: amdsmi_frequency_range_t::supported_freq_range"]
        [::std::mem::offset_of!(amdsmi_frequency_range_t, supported_freq_range) - 0usize];
    ["Offset of field: amdsmi_frequency_range_t::current_freq_range"]
        [::std::mem::offset_of!(amdsmi_frequency_range_t, current_freq_range) - 32usize];
    ["Offset of field: amdsmi_frequency_range_t::reserved"]
        [::std::mem::offset_of!(amdsmi_frequency_range_t, reserved) - 64usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub union amdsmi_bdf_t {
    pub __bindgen_anon_1: amdsmi_bdf_t__bindgen_ty_1,
    pub as_uint: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_bdf_t__bindgen_ty_1 {
    pub _bitfield_align_1: [u64; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_bdf_t__bindgen_ty_1"]
        [::std::mem::size_of::<amdsmi_bdf_t__bindgen_ty_1>() - 8usize];
    ["Alignment of amdsmi_bdf_t__bindgen_ty_1"]
        [::std::mem::align_of::<amdsmi_bdf_t__bindgen_ty_1>() - 8usize];
};
impl amdsmi_bdf_t__bindgen_ty_1 {
    #[inline]
    pub fn function_number(&self) -> u64 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u64) }
    }
    #[inline]
    pub fn set_function_number(&mut self, val: u64) {
        unsafe {
            let val: u64 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 3u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn function_number_raw(this: *const Self) -> u64 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                0usize,
                3u8,
            ) as u64)
        }
    }
    #[inline]
    pub unsafe fn set_function_number_raw(this: *mut Self, val: u64) {
        unsafe {
            let val: u64 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                0usize,
                3u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn device_number(&self) -> u64 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u64) }
    }
    #[inline]
    pub fn set_device_number(&mut self, val: u64) {
        unsafe {
            let val: u64 = ::std::mem::transmute(val);
            self._bitfield_1.set(3usize, 5u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn device_number_raw(this: *const Self) -> u64 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                3usize,
                5u8,
            ) as u64)
        }
    }
    #[inline]
    pub unsafe fn set_device_number_raw(this: *mut Self, val: u64) {
        unsafe {
            let val: u64 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                3usize,
                5u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn bus_number(&self) -> u64 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u64) }
    }
    #[inline]
    pub fn set_bus_number(&mut self, val: u64) {
        unsafe {
            let val: u64 = ::std::mem::transmute(val);
            self._bitfield_1.set(8usize, 8u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn bus_number_raw(this: *const Self) -> u64 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                8usize,
                8u8,
            ) as u64)
        }
    }
    #[inline]
    pub unsafe fn set_bus_number_raw(this: *mut Self, val: u64) {
        unsafe {
            let val: u64 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                8usize,
                8u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn domain_number(&self) -> u64 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 48u8) as u64) }
    }
    #[inline]
    pub fn set_domain_number(&mut self, val: u64) {
        unsafe {
            let val: u64 = ::std::mem::transmute(val);
            self._bitfield_1.set(16usize, 48u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn domain_number_raw(this: *const Self) -> u64 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                16usize,
                48u8,
            ) as u64)
        }
    }
    #[inline]
    pub unsafe fn set_domain_number_raw(this: *mut Self, val: u64) {
        unsafe {
            let val: u64 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                16usize,
                48u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        function_number: u64,
        device_number: u64,
        bus_number: u64,
        domain_number: u64,
    ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 3u8, {
            let function_number: u64 = unsafe { ::std::mem::transmute(function_number) };
            function_number as u64
        });
        __bindgen_bitfield_unit.set(3usize, 5u8, {
            let device_number: u64 = unsafe { ::std::mem::transmute(device_number) };
            device_number as u64
        });
        __bindgen_bitfield_unit.set(8usize, 8u8, {
            let bus_number: u64 = unsafe { ::std::mem::transmute(bus_number) };
            bus_number as u64
        });
        __bindgen_bitfield_unit.set(16usize, 48u8, {
            let domain_number: u64 = unsafe { ::std::mem::transmute(domain_number) };
            domain_number as u64
        });
        __bindgen_bitfield_unit
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_bdf_t"][::std::mem::size_of::<amdsmi_bdf_t>() - 8usize];
    ["Alignment of amdsmi_bdf_t"][::std::mem::align_of::<amdsmi_bdf_t>() - 8usize];
    ["Offset of field: amdsmi_bdf_t::as_uint"]
        [::std::mem::offset_of!(amdsmi_bdf_t, as_uint) - 0usize];
};
pub const amdsmi_card_form_factor_t_AMDSMI_CARD_FORM_FACTOR_PCIE: amdsmi_card_form_factor_t = 0;
pub const amdsmi_card_form_factor_t_AMDSMI_CARD_FORM_FACTOR_OAM: amdsmi_card_form_factor_t = 1;
pub const amdsmi_card_form_factor_t_AMDSMI_CARD_FORM_FACTOR_CEM: amdsmi_card_form_factor_t = 2;
pub const amdsmi_card_form_factor_t_AMDSMI_CARD_FORM_FACTOR_UNKNOWN: amdsmi_card_form_factor_t = 3;
pub type amdsmi_card_form_factor_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_pcie_info_t {
    pub pcie_static: amdsmi_pcie_info_t_pcie_static_,
    pub pcie_metric: amdsmi_pcie_info_t_pcie_metric_,
    pub reserved: [u64; 32usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_pcie_info_t_pcie_static_ {
    #[doc = "!< maximum number of PCIe lanes"]
    pub max_pcie_width: u16,
    #[doc = "!< maximum PCIe speed"]
    pub max_pcie_speed: u32,
    #[doc = "!< PCIe interface version"]
    pub pcie_interface_version: u32,
    #[doc = "!< card form factor"]
    pub slot_type: amdsmi_card_form_factor_t,
    pub reserved: [u64; 10usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_pcie_info_t_pcie_static_"]
        [::std::mem::size_of::<amdsmi_pcie_info_t_pcie_static_>() - 96usize];
    ["Alignment of amdsmi_pcie_info_t_pcie_static_"]
        [::std::mem::align_of::<amdsmi_pcie_info_t_pcie_static_>() - 8usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_static_::max_pcie_width"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t_pcie_static_, max_pcie_width) - 0usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_static_::max_pcie_speed"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t_pcie_static_, max_pcie_speed) - 4usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_static_::pcie_interface_version"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t_pcie_static_, pcie_interface_version) - 8usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_static_::slot_type"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t_pcie_static_, slot_type) - 12usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_static_::reserved"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t_pcie_static_, reserved) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_pcie_info_t_pcie_metric_ {
    #[doc = "!< current PCIe width"]
    pub pcie_width: u16,
    #[doc = "!< current PCIe speed in MT/s"]
    pub pcie_speed: u32,
    #[doc = "!< current instantaneous PCIe bandwidth in Mb/s"]
    pub pcie_bandwidth: u32,
    #[doc = "!< total number of the replays issued on the PCIe link"]
    pub pcie_replay_count: u64,
    #[doc = "!< total number of times the PCIe link transitioned from L0 to the recovery state"]
    pub pcie_l0_to_recovery_count: u64,
    #[doc = "!< total number of replay rollovers issued on the PCIe link"]
    pub pcie_replay_roll_over_count: u64,
    #[doc = "!< total number of NAKs issued on the PCIe link by the device"]
    pub pcie_nak_sent_count: u64,
    #[doc = "!< total number of NAKs issued on the PCIe link by the receiver"]
    pub pcie_nak_received_count: u64,
    #[doc = "!< PCIe other end recovery counter"]
    pub pcie_lc_perf_other_end_recovery_count: u32,
    pub reserved: [u64; 12usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_pcie_info_t_pcie_metric_"]
        [::std::mem::size_of::<amdsmi_pcie_info_t_pcie_metric_>() - 160usize];
    ["Alignment of amdsmi_pcie_info_t_pcie_metric_"]
        [::std::mem::align_of::<amdsmi_pcie_info_t_pcie_metric_>() - 8usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_metric_::pcie_width"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t_pcie_metric_, pcie_width) - 0usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_metric_::pcie_speed"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t_pcie_metric_, pcie_speed) - 4usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_metric_::pcie_bandwidth"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t_pcie_metric_, pcie_bandwidth) - 8usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_metric_::pcie_replay_count"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t_pcie_metric_, pcie_replay_count) - 16usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_metric_::pcie_l0_to_recovery_count"][::std::mem::offset_of!(
        amdsmi_pcie_info_t_pcie_metric_,
        pcie_l0_to_recovery_count
    ) - 24usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_metric_::pcie_replay_roll_over_count"][::std::mem::offset_of!(
        amdsmi_pcie_info_t_pcie_metric_,
        pcie_replay_roll_over_count
    ) - 32usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_metric_::pcie_nak_sent_count"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t_pcie_metric_, pcie_nak_sent_count) - 40usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_metric_::pcie_nak_received_count"][::std::mem::offset_of!(
        amdsmi_pcie_info_t_pcie_metric_,
        pcie_nak_received_count
    ) - 48usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_metric_::pcie_lc_perf_other_end_recovery_count"][::std::mem::offset_of!(
        amdsmi_pcie_info_t_pcie_metric_,
        pcie_lc_perf_other_end_recovery_count
    )
        - 56usize];
    ["Offset of field: amdsmi_pcie_info_t_pcie_metric_::reserved"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t_pcie_metric_, reserved) - 64usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_pcie_info_t"][::std::mem::size_of::<amdsmi_pcie_info_t>() - 512usize];
    ["Alignment of amdsmi_pcie_info_t"][::std::mem::align_of::<amdsmi_pcie_info_t>() - 8usize];
    ["Offset of field: amdsmi_pcie_info_t::pcie_static"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t, pcie_static) - 0usize];
    ["Offset of field: amdsmi_pcie_info_t::pcie_metric"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t, pcie_metric) - 96usize];
    ["Offset of field: amdsmi_pcie_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_pcie_info_t, reserved) - 256usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_power_cap_info_t {
    #[doc = "!< current power cap (uW)"]
    pub power_cap: u64,
    #[doc = "!< default power cap (uW)"]
    pub default_power_cap: u64,
    #[doc = "!< dpm power cap (MHz)"]
    pub dpm_cap: u64,
    #[doc = "!< minimum power cap (uW)"]
    pub min_power_cap: u64,
    #[doc = "!< maximum power cap (uW)"]
    pub max_power_cap: u64,
    pub reserved: [u64; 3usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_power_cap_info_t"][::std::mem::size_of::<amdsmi_power_cap_info_t>() - 64usize];
    ["Alignment of amdsmi_power_cap_info_t"]
        [::std::mem::align_of::<amdsmi_power_cap_info_t>() - 8usize];
    ["Offset of field: amdsmi_power_cap_info_t::power_cap"]
        [::std::mem::offset_of!(amdsmi_power_cap_info_t, power_cap) - 0usize];
    ["Offset of field: amdsmi_power_cap_info_t::default_power_cap"]
        [::std::mem::offset_of!(amdsmi_power_cap_info_t, default_power_cap) - 8usize];
    ["Offset of field: amdsmi_power_cap_info_t::dpm_cap"]
        [::std::mem::offset_of!(amdsmi_power_cap_info_t, dpm_cap) - 16usize];
    ["Offset of field: amdsmi_power_cap_info_t::min_power_cap"]
        [::std::mem::offset_of!(amdsmi_power_cap_info_t, min_power_cap) - 24usize];
    ["Offset of field: amdsmi_power_cap_info_t::max_power_cap"]
        [::std::mem::offset_of!(amdsmi_power_cap_info_t, max_power_cap) - 32usize];
    ["Offset of field: amdsmi_power_cap_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_power_cap_info_t, reserved) - 40usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_vbios_info_t {
    pub name: [::std::os::raw::c_char; 64usize],
    pub build_date: [::std::os::raw::c_char; 32usize],
    pub part_number: [::std::os::raw::c_char; 64usize],
    pub version: [::std::os::raw::c_char; 32usize],
    pub reserved: [u32; 16usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_vbios_info_t"][::std::mem::size_of::<amdsmi_vbios_info_t>() - 256usize];
    ["Alignment of amdsmi_vbios_info_t"][::std::mem::align_of::<amdsmi_vbios_info_t>() - 4usize];
    ["Offset of field: amdsmi_vbios_info_t::name"]
        [::std::mem::offset_of!(amdsmi_vbios_info_t, name) - 0usize];
    ["Offset of field: amdsmi_vbios_info_t::build_date"]
        [::std::mem::offset_of!(amdsmi_vbios_info_t, build_date) - 64usize];
    ["Offset of field: amdsmi_vbios_info_t::part_number"]
        [::std::mem::offset_of!(amdsmi_vbios_info_t, part_number) - 96usize];
    ["Offset of field: amdsmi_vbios_info_t::version"]
        [::std::mem::offset_of!(amdsmi_vbios_info_t, version) - 160usize];
    ["Offset of field: amdsmi_vbios_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_vbios_info_t, reserved) - 192usize];
};
pub const amdsmi_cache_property_type_t_AMDSMI_CACHE_PROPERTY_ENABLED: amdsmi_cache_property_type_t =
    1;
pub const amdsmi_cache_property_type_t_AMDSMI_CACHE_PROPERTY_DATA_CACHE:
    amdsmi_cache_property_type_t = 2;
pub const amdsmi_cache_property_type_t_AMDSMI_CACHE_PROPERTY_INST_CACHE:
    amdsmi_cache_property_type_t = 4;
pub const amdsmi_cache_property_type_t_AMDSMI_CACHE_PROPERTY_CPU_CACHE:
    amdsmi_cache_property_type_t = 8;
pub const amdsmi_cache_property_type_t_AMDSMI_CACHE_PROPERTY_SIMD_CACHE:
    amdsmi_cache_property_type_t = 16;
#[doc = " @brief cache properties"]
pub type amdsmi_cache_property_type_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_gpu_cache_info_t {
    pub num_cache_types: u32,
    pub cache: [amdsmi_gpu_cache_info_t_cache_; 10usize],
    pub reserved: [u32; 15usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_gpu_cache_info_t_cache_ {
    pub cache_properties: u32,
    pub cache_size: u32,
    pub cache_level: u32,
    pub max_num_cu_shared: u32,
    pub num_cache_instance: u32,
    pub reserved: [u32; 3usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_gpu_cache_info_t_cache_"]
        [::std::mem::size_of::<amdsmi_gpu_cache_info_t_cache_>() - 32usize];
    ["Alignment of amdsmi_gpu_cache_info_t_cache_"]
        [::std::mem::align_of::<amdsmi_gpu_cache_info_t_cache_>() - 4usize];
    ["Offset of field: amdsmi_gpu_cache_info_t_cache_::cache_properties"]
        [::std::mem::offset_of!(amdsmi_gpu_cache_info_t_cache_, cache_properties) - 0usize];
    ["Offset of field: amdsmi_gpu_cache_info_t_cache_::cache_size"]
        [::std::mem::offset_of!(amdsmi_gpu_cache_info_t_cache_, cache_size) - 4usize];
    ["Offset of field: amdsmi_gpu_cache_info_t_cache_::cache_level"]
        [::std::mem::offset_of!(amdsmi_gpu_cache_info_t_cache_, cache_level) - 8usize];
    ["Offset of field: amdsmi_gpu_cache_info_t_cache_::max_num_cu_shared"]
        [::std::mem::offset_of!(amdsmi_gpu_cache_info_t_cache_, max_num_cu_shared) - 12usize];
    ["Offset of field: amdsmi_gpu_cache_info_t_cache_::num_cache_instance"]
        [::std::mem::offset_of!(amdsmi_gpu_cache_info_t_cache_, num_cache_instance) - 16usize];
    ["Offset of field: amdsmi_gpu_cache_info_t_cache_::reserved"]
        [::std::mem::offset_of!(amdsmi_gpu_cache_info_t_cache_, reserved) - 20usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_gpu_cache_info_t"]
        [::std::mem::size_of::<amdsmi_gpu_cache_info_t>() - 384usize];
    ["Alignment of amdsmi_gpu_cache_info_t"]
        [::std::mem::align_of::<amdsmi_gpu_cache_info_t>() - 4usize];
    ["Offset of field: amdsmi_gpu_cache_info_t::num_cache_types"]
        [::std::mem::offset_of!(amdsmi_gpu_cache_info_t, num_cache_types) - 0usize];
    ["Offset of field: amdsmi_gpu_cache_info_t::cache"]
        [::std::mem::offset_of!(amdsmi_gpu_cache_info_t, cache) - 4usize];
    ["Offset of field: amdsmi_gpu_cache_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_gpu_cache_info_t, reserved) - 324usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_fw_info_t {
    pub num_fw_info: u8,
    pub fw_info_list: [amdsmi_fw_info_t_fw_info_list_; 79usize],
    pub reserved: [u32; 7usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_fw_info_t_fw_info_list_ {
    pub fw_id: amdsmi_fw_block_t,
    pub fw_version: u64,
    pub reserved: [u64; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_fw_info_t_fw_info_list_"]
        [::std::mem::size_of::<amdsmi_fw_info_t_fw_info_list_>() - 32usize];
    ["Alignment of amdsmi_fw_info_t_fw_info_list_"]
        [::std::mem::align_of::<amdsmi_fw_info_t_fw_info_list_>() - 8usize];
    ["Offset of field: amdsmi_fw_info_t_fw_info_list_::fw_id"]
        [::std::mem::offset_of!(amdsmi_fw_info_t_fw_info_list_, fw_id) - 0usize];
    ["Offset of field: amdsmi_fw_info_t_fw_info_list_::fw_version"]
        [::std::mem::offset_of!(amdsmi_fw_info_t_fw_info_list_, fw_version) - 8usize];
    ["Offset of field: amdsmi_fw_info_t_fw_info_list_::reserved"]
        [::std::mem::offset_of!(amdsmi_fw_info_t_fw_info_list_, reserved) - 16usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_fw_info_t"][::std::mem::size_of::<amdsmi_fw_info_t>() - 2568usize];
    ["Alignment of amdsmi_fw_info_t"][::std::mem::align_of::<amdsmi_fw_info_t>() - 8usize];
    ["Offset of field: amdsmi_fw_info_t::num_fw_info"]
        [::std::mem::offset_of!(amdsmi_fw_info_t, num_fw_info) - 0usize];
    ["Offset of field: amdsmi_fw_info_t::fw_info_list"]
        [::std::mem::offset_of!(amdsmi_fw_info_t, fw_info_list) - 8usize];
    ["Offset of field: amdsmi_fw_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_fw_info_t, reserved) - 2536usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_asic_info_t {
    pub market_name: [::std::os::raw::c_char; 256usize],
    pub vendor_id: u32,
    pub vendor_name: [::std::os::raw::c_char; 64usize],
    pub subvendor_id: u32,
    pub device_id: u64,
    pub rev_id: u32,
    pub asic_serial: [::std::os::raw::c_char; 32usize],
    pub oam_id: u32,
    pub num_of_compute_units: u32,
    pub target_graphics_version: u64,
    pub reserved: [u32; 15usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_asic_info_t"][::std::mem::size_of::<amdsmi_asic_info_t>() - 456usize];
    ["Alignment of amdsmi_asic_info_t"][::std::mem::align_of::<amdsmi_asic_info_t>() - 8usize];
    ["Offset of field: amdsmi_asic_info_t::market_name"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, market_name) - 0usize];
    ["Offset of field: amdsmi_asic_info_t::vendor_id"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, vendor_id) - 256usize];
    ["Offset of field: amdsmi_asic_info_t::vendor_name"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, vendor_name) - 260usize];
    ["Offset of field: amdsmi_asic_info_t::subvendor_id"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, subvendor_id) - 324usize];
    ["Offset of field: amdsmi_asic_info_t::device_id"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, device_id) - 328usize];
    ["Offset of field: amdsmi_asic_info_t::rev_id"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, rev_id) - 336usize];
    ["Offset of field: amdsmi_asic_info_t::asic_serial"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, asic_serial) - 340usize];
    ["Offset of field: amdsmi_asic_info_t::oam_id"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, oam_id) - 372usize];
    ["Offset of field: amdsmi_asic_info_t::num_of_compute_units"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, num_of_compute_units) - 376usize];
    ["Offset of field: amdsmi_asic_info_t::target_graphics_version"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, target_graphics_version) - 384usize];
    ["Offset of field: amdsmi_asic_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_asic_info_t, reserved) - 392usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_kfd_info_t {
    pub kfd_id: u64,
    pub node_id: u32,
    pub current_partition_id: u32,
    pub reserved: [u32; 12usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_kfd_info_t"][::std::mem::size_of::<amdsmi_kfd_info_t>() - 64usize];
    ["Alignment of amdsmi_kfd_info_t"][::std::mem::align_of::<amdsmi_kfd_info_t>() - 8usize];
    ["Offset of field: amdsmi_kfd_info_t::kfd_id"]
        [::std::mem::offset_of!(amdsmi_kfd_info_t, kfd_id) - 0usize];
    ["Offset of field: amdsmi_kfd_info_t::node_id"]
        [::std::mem::offset_of!(amdsmi_kfd_info_t, node_id) - 8usize];
    ["Offset of field: amdsmi_kfd_info_t::current_partition_id"]
        [::std::mem::offset_of!(amdsmi_kfd_info_t, current_partition_id) - 12usize];
    ["Offset of field: amdsmi_kfd_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_kfd_info_t, reserved) - 16usize];
};
#[doc = " @brief Possible Memory Partition Modes.\n This union is used to identify various memory partitioning settings."]
#[repr(C)]
#[derive(Copy, Clone)]
pub union amdsmi_nps_caps_t {
    pub amdsmi_nps_flags_t: amdsmi_nps_caps_t_nps_flags_,
    pub nps_cap_mask: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_nps_caps_t_nps_flags_ {
    pub _bitfield_align_1: [u32; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_nps_caps_t_nps_flags_"]
        [::std::mem::size_of::<amdsmi_nps_caps_t_nps_flags_>() - 4usize];
    ["Alignment of amdsmi_nps_caps_t_nps_flags_"]
        [::std::mem::align_of::<amdsmi_nps_caps_t_nps_flags_>() - 4usize];
};
impl amdsmi_nps_caps_t_nps_flags_ {
    #[inline]
    pub fn nps1_cap(&self) -> u32 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_nps1_cap(&mut self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn nps1_cap_raw(this: *const Self) -> u32 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                0usize,
                1u8,
            ) as u32)
        }
    }
    #[inline]
    pub unsafe fn set_nps1_cap_raw(this: *mut Self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                0usize,
                1u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn nps2_cap(&self) -> u32 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_nps2_cap(&mut self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn nps2_cap_raw(this: *const Self) -> u32 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                1usize,
                1u8,
            ) as u32)
        }
    }
    #[inline]
    pub unsafe fn set_nps2_cap_raw(this: *mut Self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                1usize,
                1u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn nps4_cap(&self) -> u32 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_nps4_cap(&mut self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(2usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn nps4_cap_raw(this: *const Self) -> u32 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                2usize,
                1u8,
            ) as u32)
        }
    }
    #[inline]
    pub unsafe fn set_nps4_cap_raw(this: *mut Self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                2usize,
                1u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn nps8_cap(&self) -> u32 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_nps8_cap(&mut self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn nps8_cap_raw(this: *const Self) -> u32 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                3usize,
                1u8,
            ) as u32)
        }
    }
    #[inline]
    pub unsafe fn set_nps8_cap_raw(this: *mut Self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                3usize,
                1u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn reserved(&self) -> u32 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) }
    }
    #[inline]
    pub fn set_reserved(&mut self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(4usize, 28u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn reserved_raw(this: *const Self) -> u32 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                4usize,
                28u8,
            ) as u32)
        }
    }
    #[inline]
    pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                4usize,
                28u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        nps1_cap: u32,
        nps2_cap: u32,
        nps4_cap: u32,
        nps8_cap: u32,
        reserved: u32,
    ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let nps1_cap: u32 = unsafe { ::std::mem::transmute(nps1_cap) };
            nps1_cap as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let nps2_cap: u32 = unsafe { ::std::mem::transmute(nps2_cap) };
            nps2_cap as u64
        });
        __bindgen_bitfield_unit.set(2usize, 1u8, {
            let nps4_cap: u32 = unsafe { ::std::mem::transmute(nps4_cap) };
            nps4_cap as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let nps8_cap: u32 = unsafe { ::std::mem::transmute(nps8_cap) };
            nps8_cap as u64
        });
        __bindgen_bitfield_unit.set(4usize, 28u8, {
            let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
            reserved as u64
        });
        __bindgen_bitfield_unit
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_nps_caps_t"][::std::mem::size_of::<amdsmi_nps_caps_t>() - 4usize];
    ["Alignment of amdsmi_nps_caps_t"][::std::mem::align_of::<amdsmi_nps_caps_t>() - 4usize];
    ["Offset of field: amdsmi_nps_caps_t::amdsmi_nps_flags_t"]
        [::std::mem::offset_of!(amdsmi_nps_caps_t, amdsmi_nps_flags_t) - 0usize];
    ["Offset of field: amdsmi_nps_caps_t::nps_cap_mask"]
        [::std::mem::offset_of!(amdsmi_nps_caps_t, nps_cap_mask) - 0usize];
};
#[doc = " @brief Possible Memory Partition Modes.\n This union is used to identify various memory partitioning settings."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct amdsmi_accelerator_partition_profile_t {
    pub profile_type: amdsmi_accelerator_partition_type_t,
    pub num_partitions: u32,
    pub memory_caps: amdsmi_nps_caps_t,
    pub profile_index: u32,
    pub num_resources: u32,
    pub resources: [[u32; 32usize]; 8usize],
    pub reserved: [u64; 13usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_accelerator_partition_profile_t"]
        [::std::mem::size_of::<amdsmi_accelerator_partition_profile_t>() - 1152usize];
    ["Alignment of amdsmi_accelerator_partition_profile_t"]
        [::std::mem::align_of::<amdsmi_accelerator_partition_profile_t>() - 8usize];
    ["Offset of field: amdsmi_accelerator_partition_profile_t::profile_type"]
        [::std::mem::offset_of!(amdsmi_accelerator_partition_profile_t, profile_type) - 0usize];
    ["Offset of field: amdsmi_accelerator_partition_profile_t::num_partitions"]
        [::std::mem::offset_of!(amdsmi_accelerator_partition_profile_t, num_partitions) - 4usize];
    ["Offset of field: amdsmi_accelerator_partition_profile_t::memory_caps"]
        [::std::mem::offset_of!(amdsmi_accelerator_partition_profile_t, memory_caps) - 8usize];
    ["Offset of field: amdsmi_accelerator_partition_profile_t::profile_index"]
        [::std::mem::offset_of!(amdsmi_accelerator_partition_profile_t, profile_index) - 12usize];
    ["Offset of field: amdsmi_accelerator_partition_profile_t::num_resources"]
        [::std::mem::offset_of!(amdsmi_accelerator_partition_profile_t, num_resources) - 16usize];
    ["Offset of field: amdsmi_accelerator_partition_profile_t::resources"]
        [::std::mem::offset_of!(amdsmi_accelerator_partition_profile_t, resources) - 20usize];
    ["Offset of field: amdsmi_accelerator_partition_profile_t::reserved"]
        [::std::mem::offset_of!(amdsmi_accelerator_partition_profile_t, reserved) - 1048usize];
};
pub const amdsmi_link_type_t_AMDSMI_LINK_TYPE_INTERNAL: amdsmi_link_type_t = 0;
pub const amdsmi_link_type_t_AMDSMI_LINK_TYPE_XGMI: amdsmi_link_type_t = 1;
pub const amdsmi_link_type_t_AMDSMI_LINK_TYPE_PCIE: amdsmi_link_type_t = 2;
pub const amdsmi_link_type_t_AMDSMI_LINK_TYPE_NOT_APPLICABLE: amdsmi_link_type_t = 3;
pub const amdsmi_link_type_t_AMDSMI_LINK_TYPE_UNKNOWN: amdsmi_link_type_t = 4;
pub type amdsmi_link_type_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct amdsmi_link_metrics_t {
    #[doc = "!< number of links"]
    pub num_links: u32,
    pub links: [amdsmi_link_metrics_t__links; 64usize],
    pub reserved: [u64; 7usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct amdsmi_link_metrics_t__links {
    pub bdf: amdsmi_bdf_t,
    #[doc = "!< current link speed in Gb/s"]
    pub bit_rate: u32,
    #[doc = "!< max bandwidth of the link"]
    pub max_bandwidth: u32,
    #[doc = "!< type of the link"]
    pub link_type: amdsmi_link_type_t,
    #[doc = "!< total data received for each link in KB"]
    pub read: u64,
    #[doc = "!< total data transfered for each link in KB"]
    pub write: u64,
    pub reserved: [u64; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_link_metrics_t__links"]
        [::std::mem::size_of::<amdsmi_link_metrics_t__links>() - 56usize];
    ["Alignment of amdsmi_link_metrics_t__links"]
        [::std::mem::align_of::<amdsmi_link_metrics_t__links>() - 8usize];
    ["Offset of field: amdsmi_link_metrics_t__links::bdf"]
        [::std::mem::offset_of!(amdsmi_link_metrics_t__links, bdf) - 0usize];
    ["Offset of field: amdsmi_link_metrics_t__links::bit_rate"]
        [::std::mem::offset_of!(amdsmi_link_metrics_t__links, bit_rate) - 8usize];
    ["Offset of field: amdsmi_link_metrics_t__links::max_bandwidth"]
        [::std::mem::offset_of!(amdsmi_link_metrics_t__links, max_bandwidth) - 12usize];
    ["Offset of field: amdsmi_link_metrics_t__links::link_type"]
        [::std::mem::offset_of!(amdsmi_link_metrics_t__links, link_type) - 16usize];
    ["Offset of field: amdsmi_link_metrics_t__links::read"]
        [::std::mem::offset_of!(amdsmi_link_metrics_t__links, read) - 24usize];
    ["Offset of field: amdsmi_link_metrics_t__links::write"]
        [::std::mem::offset_of!(amdsmi_link_metrics_t__links, write) - 32usize];
    ["Offset of field: amdsmi_link_metrics_t__links::reserved"]
        [::std::mem::offset_of!(amdsmi_link_metrics_t__links, reserved) - 40usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_link_metrics_t"][::std::mem::size_of::<amdsmi_link_metrics_t>() - 3648usize];
    ["Alignment of amdsmi_link_metrics_t"]
        [::std::mem::align_of::<amdsmi_link_metrics_t>() - 8usize];
    ["Offset of field: amdsmi_link_metrics_t::num_links"]
        [::std::mem::offset_of!(amdsmi_link_metrics_t, num_links) - 0usize];
    ["Offset of field: amdsmi_link_metrics_t::links"]
        [::std::mem::offset_of!(amdsmi_link_metrics_t, links) - 8usize];
    ["Offset of field: amdsmi_link_metrics_t::reserved"]
        [::std::mem::offset_of!(amdsmi_link_metrics_t, reserved) - 3592usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_vram_info_t {
    pub vram_type: amdsmi_vram_type_t,
    pub vram_vendor: amdsmi_vram_vendor_type_t,
    pub vram_size: u64,
    pub vram_bit_width: u32,
    pub reserved: [u64; 5usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_vram_info_t"][::std::mem::size_of::<amdsmi_vram_info_t>() - 64usize];
    ["Alignment of amdsmi_vram_info_t"][::std::mem::align_of::<amdsmi_vram_info_t>() - 8usize];
    ["Offset of field: amdsmi_vram_info_t::vram_type"]
        [::std::mem::offset_of!(amdsmi_vram_info_t, vram_type) - 0usize];
    ["Offset of field: amdsmi_vram_info_t::vram_vendor"]
        [::std::mem::offset_of!(amdsmi_vram_info_t, vram_vendor) - 4usize];
    ["Offset of field: amdsmi_vram_info_t::vram_size"]
        [::std::mem::offset_of!(amdsmi_vram_info_t, vram_size) - 8usize];
    ["Offset of field: amdsmi_vram_info_t::vram_bit_width"]
        [::std::mem::offset_of!(amdsmi_vram_info_t, vram_bit_width) - 16usize];
    ["Offset of field: amdsmi_vram_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_vram_info_t, reserved) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_driver_info_t {
    pub driver_version: [::std::os::raw::c_char; 64usize],
    pub driver_date: [::std::os::raw::c_char; 64usize],
    pub driver_name: [::std::os::raw::c_char; 64usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_driver_info_t"][::std::mem::size_of::<amdsmi_driver_info_t>() - 192usize];
    ["Alignment of amdsmi_driver_info_t"][::std::mem::align_of::<amdsmi_driver_info_t>() - 1usize];
    ["Offset of field: amdsmi_driver_info_t::driver_version"]
        [::std::mem::offset_of!(amdsmi_driver_info_t, driver_version) - 0usize];
    ["Offset of field: amdsmi_driver_info_t::driver_date"]
        [::std::mem::offset_of!(amdsmi_driver_info_t, driver_date) - 64usize];
    ["Offset of field: amdsmi_driver_info_t::driver_name"]
        [::std::mem::offset_of!(amdsmi_driver_info_t, driver_name) - 128usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_board_info_t {
    pub model_number: [::std::os::raw::c_char; 256usize],
    pub product_serial: [::std::os::raw::c_char; 32usize],
    pub fru_id: [::std::os::raw::c_char; 32usize],
    pub product_name: [::std::os::raw::c_char; 256usize],
    pub manufacturer_name: [::std::os::raw::c_char; 64usize],
    pub reserved: [u32; 32usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_board_info_t"][::std::mem::size_of::<amdsmi_board_info_t>() - 768usize];
    ["Alignment of amdsmi_board_info_t"][::std::mem::align_of::<amdsmi_board_info_t>() - 4usize];
    ["Offset of field: amdsmi_board_info_t::model_number"]
        [::std::mem::offset_of!(amdsmi_board_info_t, model_number) - 0usize];
    ["Offset of field: amdsmi_board_info_t::product_serial"]
        [::std::mem::offset_of!(amdsmi_board_info_t, product_serial) - 256usize];
    ["Offset of field: amdsmi_board_info_t::fru_id"]
        [::std::mem::offset_of!(amdsmi_board_info_t, fru_id) - 288usize];
    ["Offset of field: amdsmi_board_info_t::product_name"]
        [::std::mem::offset_of!(amdsmi_board_info_t, product_name) - 320usize];
    ["Offset of field: amdsmi_board_info_t::manufacturer_name"]
        [::std::mem::offset_of!(amdsmi_board_info_t, manufacturer_name) - 576usize];
    ["Offset of field: amdsmi_board_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_board_info_t, reserved) - 640usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_power_info_t {
    pub current_socket_power: u32,
    pub average_socket_power: u32,
    pub gfx_voltage: u32,
    pub soc_voltage: u32,
    pub mem_voltage: u32,
    pub power_limit: u32,
    pub reserved: [u32; 11usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_power_info_t"][::std::mem::size_of::<amdsmi_power_info_t>() - 68usize];
    ["Alignment of amdsmi_power_info_t"][::std::mem::align_of::<amdsmi_power_info_t>() - 4usize];
    ["Offset of field: amdsmi_power_info_t::current_socket_power"]
        [::std::mem::offset_of!(amdsmi_power_info_t, current_socket_power) - 0usize];
    ["Offset of field: amdsmi_power_info_t::average_socket_power"]
        [::std::mem::offset_of!(amdsmi_power_info_t, average_socket_power) - 4usize];
    ["Offset of field: amdsmi_power_info_t::gfx_voltage"]
        [::std::mem::offset_of!(amdsmi_power_info_t, gfx_voltage) - 8usize];
    ["Offset of field: amdsmi_power_info_t::soc_voltage"]
        [::std::mem::offset_of!(amdsmi_power_info_t, soc_voltage) - 12usize];
    ["Offset of field: amdsmi_power_info_t::mem_voltage"]
        [::std::mem::offset_of!(amdsmi_power_info_t, mem_voltage) - 16usize];
    ["Offset of field: amdsmi_power_info_t::power_limit"]
        [::std::mem::offset_of!(amdsmi_power_info_t, power_limit) - 20usize];
    ["Offset of field: amdsmi_power_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_power_info_t, reserved) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_clk_info_t {
    pub clk: u32,
    pub min_clk: u32,
    pub max_clk: u32,
    pub clk_locked: u8,
    pub clk_deep_sleep: u8,
    pub reserved: [u32; 4usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_clk_info_t"][::std::mem::size_of::<amdsmi_clk_info_t>() - 32usize];
    ["Alignment of amdsmi_clk_info_t"][::std::mem::align_of::<amdsmi_clk_info_t>() - 4usize];
    ["Offset of field: amdsmi_clk_info_t::clk"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, clk) - 0usize];
    ["Offset of field: amdsmi_clk_info_t::min_clk"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, min_clk) - 4usize];
    ["Offset of field: amdsmi_clk_info_t::max_clk"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, max_clk) - 8usize];
    ["Offset of field: amdsmi_clk_info_t::clk_locked"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, clk_locked) - 12usize];
    ["Offset of field: amdsmi_clk_info_t::clk_deep_sleep"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, clk_deep_sleep) - 13usize];
    ["Offset of field: amdsmi_clk_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_clk_info_t, reserved) - 16usize];
};
#[doc = " amdsmi_engine_usage_t:\n This structure holds common\n GPU activity values seen in both BM or\n SRIOV"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_engine_usage_t {
    pub gfx_activity: u32,
    pub umc_activity: u32,
    pub mm_activity: u32,
    pub reserved: [u32; 13usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_engine_usage_t"][::std::mem::size_of::<amdsmi_engine_usage_t>() - 64usize];
    ["Alignment of amdsmi_engine_usage_t"]
        [::std::mem::align_of::<amdsmi_engine_usage_t>() - 4usize];
    ["Offset of field: amdsmi_engine_usage_t::gfx_activity"]
        [::std::mem::offset_of!(amdsmi_engine_usage_t, gfx_activity) - 0usize];
    ["Offset of field: amdsmi_engine_usage_t::umc_activity"]
        [::std::mem::offset_of!(amdsmi_engine_usage_t, umc_activity) - 4usize];
    ["Offset of field: amdsmi_engine_usage_t::mm_activity"]
        [::std::mem::offset_of!(amdsmi_engine_usage_t, mm_activity) - 8usize];
    ["Offset of field: amdsmi_engine_usage_t::reserved"]
        [::std::mem::offset_of!(amdsmi_engine_usage_t, reserved) - 12usize];
};
pub type amdsmi_process_handle_t = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_proc_info_t {
    pub name: [::std::os::raw::c_char; 32usize],
    pub pid: amdsmi_process_handle_t,
    pub mem: u64,
    pub engine_usage: amdsmi_proc_info_t_engine_usage_,
    pub memory_usage: amdsmi_proc_info_t_memory_usage_,
    #[doc = " in bytes"]
    pub container_name: [::std::os::raw::c_char; 32usize],
    pub reserved: [u32; 4usize],
}
#[doc = " in bytes"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_proc_info_t_engine_usage_ {
    pub gfx: u64,
    pub enc: u64,
    pub reserved: [u32; 12usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_proc_info_t_engine_usage_"]
        [::std::mem::size_of::<amdsmi_proc_info_t_engine_usage_>() - 64usize];
    ["Alignment of amdsmi_proc_info_t_engine_usage_"]
        [::std::mem::align_of::<amdsmi_proc_info_t_engine_usage_>() - 8usize];
    ["Offset of field: amdsmi_proc_info_t_engine_usage_::gfx"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_engine_usage_, gfx) - 0usize];
    ["Offset of field: amdsmi_proc_info_t_engine_usage_::enc"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_engine_usage_, enc) - 8usize];
    ["Offset of field: amdsmi_proc_info_t_engine_usage_::reserved"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_engine_usage_, reserved) - 16usize];
};
#[doc = " How much time the process spend using these engines in ns"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_proc_info_t_memory_usage_ {
    pub gtt_mem: u64,
    pub cpu_mem: u64,
    pub vram_mem: u64,
    pub reserved: [u32; 10usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_proc_info_t_memory_usage_"]
        [::std::mem::size_of::<amdsmi_proc_info_t_memory_usage_>() - 64usize];
    ["Alignment of amdsmi_proc_info_t_memory_usage_"]
        [::std::mem::align_of::<amdsmi_proc_info_t_memory_usage_>() - 8usize];
    ["Offset of field: amdsmi_proc_info_t_memory_usage_::gtt_mem"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_memory_usage_, gtt_mem) - 0usize];
    ["Offset of field: amdsmi_proc_info_t_memory_usage_::cpu_mem"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_memory_usage_, cpu_mem) - 8usize];
    ["Offset of field: amdsmi_proc_info_t_memory_usage_::vram_mem"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_memory_usage_, vram_mem) - 16usize];
    ["Offset of field: amdsmi_proc_info_t_memory_usage_::reserved"]
        [::std::mem::offset_of!(amdsmi_proc_info_t_memory_usage_, reserved) - 24usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_proc_info_t"][::std::mem::size_of::<amdsmi_proc_info_t>() - 224usize];
    ["Alignment of amdsmi_proc_info_t"][::std::mem::align_of::<amdsmi_proc_info_t>() - 8usize];
    ["Offset of field: amdsmi_proc_info_t::name"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, name) - 0usize];
    ["Offset of field: amdsmi_proc_info_t::pid"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, pid) - 32usize];
    ["Offset of field: amdsmi_proc_info_t::mem"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, mem) - 40usize];
    ["Offset of field: amdsmi_proc_info_t::engine_usage"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, engine_usage) - 48usize];
    ["Offset of field: amdsmi_proc_info_t::memory_usage"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, memory_usage) - 112usize];
    ["Offset of field: amdsmi_proc_info_t::container_name"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, container_name) - 176usize];
    ["Offset of field: amdsmi_proc_info_t::reserved"]
        [::std::mem::offset_of!(amdsmi_proc_info_t, reserved) - 208usize];
};
#[doc = " @brief IO Link P2P Capability"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_p2p_capability_t {
    pub is_iolink_coherent: u8,
    pub is_iolink_atomics_32bit: u8,
    pub is_iolink_atomics_64bit: u8,
    pub is_iolink_dma: u8,
    pub is_iolink_bi_directional: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_p2p_capability_t"][::std::mem::size_of::<amdsmi_p2p_capability_t>() - 5usize];
    ["Alignment of amdsmi_p2p_capability_t"]
        [::std::mem::align_of::<amdsmi_p2p_capability_t>() - 1usize];
    ["Offset of field: amdsmi_p2p_capability_t::is_iolink_coherent"]
        [::std::mem::offset_of!(amdsmi_p2p_capability_t, is_iolink_coherent) - 0usize];
    ["Offset of field: amdsmi_p2p_capability_t::is_iolink_atomics_32bit"]
        [::std::mem::offset_of!(amdsmi_p2p_capability_t, is_iolink_atomics_32bit) - 1usize];
    ["Offset of field: amdsmi_p2p_capability_t::is_iolink_atomics_64bit"]
        [::std::mem::offset_of!(amdsmi_p2p_capability_t, is_iolink_atomics_64bit) - 2usize];
    ["Offset of field: amdsmi_p2p_capability_t::is_iolink_dma"]
        [::std::mem::offset_of!(amdsmi_p2p_capability_t, is_iolink_dma) - 3usize];
    ["Offset of field: amdsmi_p2p_capability_t::is_iolink_bi_directional"]
        [::std::mem::offset_of!(amdsmi_p2p_capability_t, is_iolink_bi_directional) - 4usize];
};
#[doc = "!< Performance level is \"auto\""]
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_AUTO: amdsmi_dev_perf_level_t = 0;
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_FIRST: amdsmi_dev_perf_level_t = 0;
#[doc = "!< Keep PowerPlay levels \"low\",\n!< regardless of workload"]
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_LOW: amdsmi_dev_perf_level_t = 1;
#[doc = "!< Keep PowerPlay levels \"high\",\n!< regardless of workload"]
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_HIGH: amdsmi_dev_perf_level_t = 2;
#[doc = "!< Only use values defined by manually\n!< setting the AMDSMI_CLK_TYPE_SYS speed"]
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_MANUAL: amdsmi_dev_perf_level_t = 3;
#[doc = "!< Stable power state with profiling\n!< clocks"]
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_STABLE_STD: amdsmi_dev_perf_level_t = 4;
#[doc = "!< Stable power state with peak clocks"]
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_STABLE_PEAK: amdsmi_dev_perf_level_t = 5;
#[doc = "!< Stable power state with minimum\n!< memory clock"]
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK: amdsmi_dev_perf_level_t =
    6;
#[doc = "!< Stable power state with minimum\n!< system clock"]
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK: amdsmi_dev_perf_level_t =
    7;
#[doc = "!< Performance determinism state"]
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_DETERMINISM: amdsmi_dev_perf_level_t = 8;
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_LAST: amdsmi_dev_perf_level_t = 8;
#[doc = "!< Unknown performance level"]
pub const amdsmi_dev_perf_level_t_AMDSMI_DEV_PERF_LEVEL_UNKNOWN: amdsmi_dev_perf_level_t = 256;
#[doc = " @brief PowerPlay performance levels"]
pub type amdsmi_dev_perf_level_t = ::std::os::raw::c_uint;
#[doc = " @brief Handle to performance event counter"]
pub type amdsmi_event_handle_t = usize;
#[doc = "!< Data Fabric (XGMI) related events"]
pub const amdsmi_event_group_t_AMDSMI_EVNT_GRP_XGMI: amdsmi_event_group_t = 0;
#[doc = "!< XGMI Outbound data"]
pub const amdsmi_event_group_t_AMDSMI_EVNT_GRP_XGMI_DATA_OUT: amdsmi_event_group_t = 10;
pub const amdsmi_event_group_t_AMDSMI_EVNT_GRP_INVALID: amdsmi_event_group_t = 4294967295;
#[doc = " Event Groups\n\n @brief Enum denoting an event group. The value of the enum is the\n base value for all the event enums in the group."]
pub type amdsmi_event_group_t = ::std::os::raw::c_uint;
pub const amdsmi_event_type_t_AMDSMI_EVNT_FIRST: amdsmi_event_type_t = 0;
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_FIRST: amdsmi_event_type_t = 0;
#[doc = "!< NOPs sent to neighbor 0"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_0_NOP_TX: amdsmi_event_type_t = 0;
#[doc = "!< Outgoing requests to\n!< neighbor 0"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_0_REQUEST_TX: amdsmi_event_type_t = 1;
#[doc = "!< Outgoing responses to\n!< neighbor 0"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_0_RESPONSE_TX: amdsmi_event_type_t = 2;
#[doc = " @brief\n\n Data beats sent to neighbor 0; Each beat represents 32 bytes.<br><br>\n\n XGMI throughput can be calculated by multiplying a BEATs event\n such as ::AMDSMI_EVNT_XGMI_0_BEATS_TX by 32 and dividing by\n the time for which event collection occurred,\n ::amdsmi_counter_value_t.time_running (which is in nanoseconds). To get\n bytes per second, multiply this value by 10<sup>9</sup>.<br>\n <br>\n Throughput = BEATS/time_running * 10<sup>9</sup>  (bytes/second)<br>"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_0_BEATS_TX: amdsmi_event_type_t = 3;
#[doc = "!< NOPs sent to neighbor 1"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_1_NOP_TX: amdsmi_event_type_t = 4;
#[doc = "!< Outgoing requests to\n!< neighbor 1"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_1_REQUEST_TX: amdsmi_event_type_t = 5;
#[doc = "!< Outgoing responses to\n!< neighbor 1"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_1_RESPONSE_TX: amdsmi_event_type_t = 6;
#[doc = "!< Data beats sent to\n!< neighbor 1; Each beat\n!< represents 32 bytes"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_1_BEATS_TX: amdsmi_event_type_t = 7;
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_LAST: amdsmi_event_type_t = 7;
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_DATA_OUT_FIRST: amdsmi_event_type_t = 10;
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_DATA_OUT_0: amdsmi_event_type_t = 10;
#[doc = "!< Outbound beats to neighbor 1"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_DATA_OUT_1: amdsmi_event_type_t = 11;
#[doc = "!< Outbound beats to neighbor 2"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_DATA_OUT_2: amdsmi_event_type_t = 12;
#[doc = "!< Outbound beats to neighbor 3"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_DATA_OUT_3: amdsmi_event_type_t = 13;
#[doc = "!< Outbound beats to neighbor 4"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_DATA_OUT_4: amdsmi_event_type_t = 14;
#[doc = "!< Outbound beats to neighbor 5"]
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_DATA_OUT_5: amdsmi_event_type_t = 15;
pub const amdsmi_event_type_t_AMDSMI_EVNT_XGMI_DATA_OUT_LAST: amdsmi_event_type_t = 15;
pub const amdsmi_event_type_t_AMDSMI_EVNT_LAST: amdsmi_event_type_t = 15;
#[doc = " Event types\n @brief Event type enum. Events belonging to a particular event group\n ::amdsmi_event_group_t should begin enumerating at the ::amdsmi_event_group_t\n value for that group."]
pub type amdsmi_event_type_t = ::std::os::raw::c_uint;
#[doc = "!< Start the counter"]
pub const amdsmi_counter_command_t_AMDSMI_CNTR_CMD_START: amdsmi_counter_command_t = 0;
#[doc = "!< Stop the counter; note that this should not\n!< be used before reading."]
pub const amdsmi_counter_command_t_AMDSMI_CNTR_CMD_STOP: amdsmi_counter_command_t = 1;
#[doc = " Event counter commands"]
pub type amdsmi_counter_command_t = ::std::os::raw::c_uint;
#[doc = " Counter value"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_counter_value_t {
    #[doc = "!< Counter value"]
    pub value: u64,
    #[doc = "!< Time that the counter was enabled\n!< (in nanoseconds)"]
    pub time_enabled: u64,
    #[doc = "!< Time that the counter was running\n!< (in nanoseconds)"]
    pub time_running: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_counter_value_t"][::std::mem::size_of::<amdsmi_counter_value_t>() - 24usize];
    ["Alignment of amdsmi_counter_value_t"]
        [::std::mem::align_of::<amdsmi_counter_value_t>() - 8usize];
    ["Offset of field: amdsmi_counter_value_t::value"]
        [::std::mem::offset_of!(amdsmi_counter_value_t, value) - 0usize];
    ["Offset of field: amdsmi_counter_value_t::time_enabled"]
        [::std::mem::offset_of!(amdsmi_counter_value_t, time_enabled) - 8usize];
    ["Offset of field: amdsmi_counter_value_t::time_running"]
        [::std::mem::offset_of!(amdsmi_counter_value_t, time_running) - 16usize];
};
#[doc = "!< Not used"]
pub const amdsmi_evt_notification_type_t_AMDSMI_EVT_NOTIF_NONE: amdsmi_evt_notification_type_t = 0;
#[doc = "!< VM page fault"]
pub const amdsmi_evt_notification_type_t_AMDSMI_EVT_NOTIF_VMFAULT: amdsmi_evt_notification_type_t =
    1;
pub const amdsmi_evt_notification_type_t_AMDSMI_EVT_NOTIF_FIRST: amdsmi_evt_notification_type_t = 1;
pub const amdsmi_evt_notification_type_t_AMDSMI_EVT_NOTIF_THERMAL_THROTTLE:
    amdsmi_evt_notification_type_t = 2;
pub const amdsmi_evt_notification_type_t_AMDSMI_EVT_NOTIF_GPU_PRE_RESET:
    amdsmi_evt_notification_type_t = 3;
pub const amdsmi_evt_notification_type_t_AMDSMI_EVT_NOTIF_GPU_POST_RESET:
    amdsmi_evt_notification_type_t = 4;
pub const amdsmi_evt_notification_type_t_AMDSMI_EVT_NOTIF_RING_HANG:
    amdsmi_evt_notification_type_t = 5;
pub const amdsmi_evt_notification_type_t_AMDSMI_EVT_NOTIF_LAST: amdsmi_evt_notification_type_t = 5;
#[doc = " Event notification event types"]
pub type amdsmi_evt_notification_type_t = ::std::os::raw::c_uint;
#[doc = " Event notification data returned from event notification API"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_evt_notification_data_t {
    #[doc = "!< Handler of device that corresponds to the event"]
    pub processor_handle: amdsmi_processor_handle,
    #[doc = "!< Event type"]
    pub event: amdsmi_evt_notification_type_t,
    #[doc = "!< Event message"]
    pub message: [::std::os::raw::c_char; 96usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_evt_notification_data_t"]
        [::std::mem::size_of::<amdsmi_evt_notification_data_t>() - 112usize];
    ["Alignment of amdsmi_evt_notification_data_t"]
        [::std::mem::align_of::<amdsmi_evt_notification_data_t>() - 8usize];
    ["Offset of field: amdsmi_evt_notification_data_t::processor_handle"]
        [::std::mem::offset_of!(amdsmi_evt_notification_data_t, processor_handle) - 0usize];
    ["Offset of field: amdsmi_evt_notification_data_t::event"]
        [::std::mem::offset_of!(amdsmi_evt_notification_data_t, event) - 8usize];
    ["Offset of field: amdsmi_evt_notification_data_t::message"]
        [::std::mem::offset_of!(amdsmi_evt_notification_data_t, message) - 12usize];
};
#[doc = "!< Temperature current value."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_CURRENT: amdsmi_temperature_metric_t = 0;
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_FIRST: amdsmi_temperature_metric_t = 0;
#[doc = "!< Temperature max value."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_MAX: amdsmi_temperature_metric_t = 1;
#[doc = "!< Temperature min value."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_MIN: amdsmi_temperature_metric_t = 2;
#[doc = "!< Temperature hysteresis value for max limit.\n!< (This is an absolute temperature, not a\n!< delta)."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_MAX_HYST: amdsmi_temperature_metric_t = 3;
#[doc = "!< Temperature hysteresis value for min limit.\n!< (This is an absolute temperature,\n!<  not a delta)."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_MIN_HYST: amdsmi_temperature_metric_t = 4;
#[doc = "!< Temperature critical max value, typically\n!<  greater than corresponding temp_max values."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_CRITICAL: amdsmi_temperature_metric_t = 5;
#[doc = "!< Temperature hysteresis value for critical\n!<  limit. (This is an absolute temperature,\n!<  not a delta)."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_CRITICAL_HYST: amdsmi_temperature_metric_t = 6;
#[doc = "!< Temperature emergency max value, for chips\n!<  supporting more than two upper temperature\n!<  limits. Must be equal or greater than\n!<  corresponding temp_crit values."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_EMERGENCY: amdsmi_temperature_metric_t = 7;
#[doc = "!< Temperature hysteresis value for emergency\n!<  limit. (This is an absolute temperature,\n!<  not a delta)."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_EMERGENCY_HYST: amdsmi_temperature_metric_t = 8;
#[doc = "!< Temperature critical min value, typically\n!<  lower than corresponding temperature\n!<  minimum values."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_CRIT_MIN: amdsmi_temperature_metric_t = 9;
#[doc = "!< Temperature hysteresis value for critical\n!< minimum limit. (This is an absolute\n!< temperature, not a delta)."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_CRIT_MIN_HYST: amdsmi_temperature_metric_t = 10;
#[doc = "!< Temperature offset which is added to the"]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_OFFSET: amdsmi_temperature_metric_t = 11;
#[doc = "!< Historical minimum temperature."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_LOWEST: amdsmi_temperature_metric_t = 12;
#[doc = "!< Historical maximum temperature."]
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_HIGHEST: amdsmi_temperature_metric_t = 13;
pub const amdsmi_temperature_metric_t_AMDSMI_TEMP_LAST: amdsmi_temperature_metric_t = 13;
#[doc = " @brief Temperature Metrics.  This enum is used to identify various\n temperature metrics. Corresponding values will be in millidegress\n Celcius."]
pub type amdsmi_temperature_metric_t = ::std::os::raw::c_uint;
#[doc = "!< Voltage current value."]
pub const amdsmi_voltage_metric_t_AMDSMI_VOLT_CURRENT: amdsmi_voltage_metric_t = 0;
pub const amdsmi_voltage_metric_t_AMDSMI_VOLT_FIRST: amdsmi_voltage_metric_t = 0;
#[doc = "!< Voltage max value."]
pub const amdsmi_voltage_metric_t_AMDSMI_VOLT_MAX: amdsmi_voltage_metric_t = 1;
#[doc = "!< Voltage critical min value."]
pub const amdsmi_voltage_metric_t_AMDSMI_VOLT_MIN_CRIT: amdsmi_voltage_metric_t = 2;
#[doc = "!< Voltage min value."]
pub const amdsmi_voltage_metric_t_AMDSMI_VOLT_MIN: amdsmi_voltage_metric_t = 3;
#[doc = "!< Voltage critical max value."]
pub const amdsmi_voltage_metric_t_AMDSMI_VOLT_MAX_CRIT: amdsmi_voltage_metric_t = 4;
#[doc = "!< Average voltage."]
pub const amdsmi_voltage_metric_t_AMDSMI_VOLT_AVERAGE: amdsmi_voltage_metric_t = 5;
#[doc = "!< Historical minimum voltage."]
pub const amdsmi_voltage_metric_t_AMDSMI_VOLT_LOWEST: amdsmi_voltage_metric_t = 6;
#[doc = "!< Historical maximum voltage."]
pub const amdsmi_voltage_metric_t_AMDSMI_VOLT_HIGHEST: amdsmi_voltage_metric_t = 7;
pub const amdsmi_voltage_metric_t_AMDSMI_VOLT_LAST: amdsmi_voltage_metric_t = 7;
#[doc = " @brief Voltage Metrics.  This enum is used to identify various\n Volatge metrics. Corresponding values will be in millivolt.\n"]
pub type amdsmi_voltage_metric_t = ::std::os::raw::c_uint;
pub const amdsmi_voltage_type_t_AMDSMI_VOLT_TYPE_FIRST: amdsmi_voltage_type_t = 0;
#[doc = "!< Vddgfx GPU\n!< voltage"]
pub const amdsmi_voltage_type_t_AMDSMI_VOLT_TYPE_VDDGFX: amdsmi_voltage_type_t = 0;
pub const amdsmi_voltage_type_t_AMDSMI_VOLT_TYPE_LAST: amdsmi_voltage_type_t = 0;
#[doc = "!< Invalid type"]
pub const amdsmi_voltage_type_t_AMDSMI_VOLT_TYPE_INVALID: amdsmi_voltage_type_t = 4294967295;
#[doc = " @brief This ennumeration is used to indicate which type of\n voltage reading should be obtained."]
pub type amdsmi_voltage_type_t = ::std::os::raw::c_uint;
#[doc = "!< Custom Power Profile"]
pub const amdsmi_power_profile_preset_masks_t_AMDSMI_PWR_PROF_PRST_CUSTOM_MASK:
    amdsmi_power_profile_preset_masks_t = 1;
#[doc = "!< Video Power Profile"]
pub const amdsmi_power_profile_preset_masks_t_AMDSMI_PWR_PROF_PRST_VIDEO_MASK:
    amdsmi_power_profile_preset_masks_t = 2;
#[doc = "!< Power Saving Profile"]
pub const amdsmi_power_profile_preset_masks_t_AMDSMI_PWR_PROF_PRST_POWER_SAVING_MASK:
    amdsmi_power_profile_preset_masks_t = 4;
#[doc = "!< Compute Saving Profile"]
pub const amdsmi_power_profile_preset_masks_t_AMDSMI_PWR_PROF_PRST_COMPUTE_MASK:
    amdsmi_power_profile_preset_masks_t = 8;
#[doc = "!< VR Power Profile"]
pub const amdsmi_power_profile_preset_masks_t_AMDSMI_PWR_PROF_PRST_VR_MASK:
    amdsmi_power_profile_preset_masks_t = 16;
pub const amdsmi_power_profile_preset_masks_t_AMDSMI_PWR_PROF_PRST_3D_FULL_SCR_MASK:
    amdsmi_power_profile_preset_masks_t = 32;
#[doc = "!< Default Boot Up Profile"]
pub const amdsmi_power_profile_preset_masks_t_AMDSMI_PWR_PROF_PRST_BOOTUP_DEFAULT:
    amdsmi_power_profile_preset_masks_t = 64;
pub const amdsmi_power_profile_preset_masks_t_AMDSMI_PWR_PROF_PRST_LAST:
    amdsmi_power_profile_preset_masks_t = 64;
pub const amdsmi_power_profile_preset_masks_t_AMDSMI_PWR_PROF_PRST_INVALID:
    amdsmi_power_profile_preset_masks_t = 18446744073709551615;
#[doc = " @brief Pre-set Profile Selections. These bitmasks can be AND'd with the\n ::amdsmi_power_profile_status_t.available_profiles returned from\n :: amdsmi_get_gpu_power_profile_presets to determine which power profiles\n are supported by the system."]
pub type amdsmi_power_profile_preset_masks_t = ::std::os::raw::c_ulong;
#[doc = "!< Used to indicate an\n!< invalid block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_INVALID: amdsmi_gpu_block_t = 0;
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_FIRST: amdsmi_gpu_block_t = 1;
#[doc = "!< UMC block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_UMC: amdsmi_gpu_block_t = 1;
#[doc = "!< SDMA block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_SDMA: amdsmi_gpu_block_t = 2;
#[doc = "!< GFX block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_GFX: amdsmi_gpu_block_t = 4;
#[doc = "!< MMHUB block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_MMHUB: amdsmi_gpu_block_t = 8;
#[doc = "!< ATHUB block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_ATHUB: amdsmi_gpu_block_t = 16;
#[doc = "!< PCIE_BIF block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_PCIE_BIF: amdsmi_gpu_block_t = 32;
#[doc = "!< HDP block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_HDP: amdsmi_gpu_block_t = 64;
#[doc = "!< XGMI block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_XGMI_WAFL: amdsmi_gpu_block_t = 128;
#[doc = "!< DF block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_DF: amdsmi_gpu_block_t = 256;
#[doc = "!< SMN block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_SMN: amdsmi_gpu_block_t = 512;
#[doc = "!< SEM block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_SEM: amdsmi_gpu_block_t = 1024;
#[doc = "!< MP0 block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_MP0: amdsmi_gpu_block_t = 2048;
#[doc = "!< MP1 block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_MP1: amdsmi_gpu_block_t = 4096;
#[doc = "!< Fuse block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_FUSE: amdsmi_gpu_block_t = 8192;
#[doc = "!< MCA block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_MCA: amdsmi_gpu_block_t = 16384;
#[doc = "!< VCN block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_VCN: amdsmi_gpu_block_t = 32768;
#[doc = "!< JPEG block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_JPEG: amdsmi_gpu_block_t = 65536;
#[doc = "!< IH block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_IH: amdsmi_gpu_block_t = 131072;
#[doc = "!< MPIO block"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_MPIO: amdsmi_gpu_block_t = 262144;
#[doc = "!< The highest bit position\n!< for supported blocks"]
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_LAST: amdsmi_gpu_block_t = 262144;
pub const amdsmi_gpu_block_t_AMDSMI_GPU_BLOCK_RESERVED: amdsmi_gpu_block_t = 9223372036854775808;
#[doc = " @brief This enum is used to identify different GPU blocks."]
pub type amdsmi_gpu_block_t = ::std::os::raw::c_ulong;
pub const amdsmi_clk_limit_type_t_CLK_LIMIT_MIN: amdsmi_clk_limit_type_t = 0;
pub const amdsmi_clk_limit_type_t_CLK_LIMIT_MAX: amdsmi_clk_limit_type_t = 1;
#[doc = " @brief The clk limit type"]
pub type amdsmi_clk_limit_type_t = ::std::os::raw::c_uint;
#[doc = "!< No current errors"]
pub const amdsmi_ras_err_state_t_AMDSMI_RAS_ERR_STATE_NONE: amdsmi_ras_err_state_t = 0;
#[doc = "!< ECC is disabled"]
pub const amdsmi_ras_err_state_t_AMDSMI_RAS_ERR_STATE_DISABLED: amdsmi_ras_err_state_t = 1;
#[doc = "!< ECC errors present, but type unknown"]
pub const amdsmi_ras_err_state_t_AMDSMI_RAS_ERR_STATE_PARITY: amdsmi_ras_err_state_t = 2;
#[doc = "!< Single correctable error"]
pub const amdsmi_ras_err_state_t_AMDSMI_RAS_ERR_STATE_SING_C: amdsmi_ras_err_state_t = 3;
#[doc = "!< Multiple uncorrectable errors"]
pub const amdsmi_ras_err_state_t_AMDSMI_RAS_ERR_STATE_MULT_UC: amdsmi_ras_err_state_t = 4;
#[doc = "!< Firmware detected error and isolated\n!< page. Treat as uncorrectable."]
pub const amdsmi_ras_err_state_t_AMDSMI_RAS_ERR_STATE_POISON: amdsmi_ras_err_state_t = 5;
#[doc = "!< ECC is enabled"]
pub const amdsmi_ras_err_state_t_AMDSMI_RAS_ERR_STATE_ENABLED: amdsmi_ras_err_state_t = 6;
pub const amdsmi_ras_err_state_t_AMDSMI_RAS_ERR_STATE_LAST: amdsmi_ras_err_state_t = 6;
pub const amdsmi_ras_err_state_t_AMDSMI_RAS_ERR_STATE_INVALID: amdsmi_ras_err_state_t = 4294967295;
#[doc = " @brief The current ECC state"]
pub type amdsmi_ras_err_state_t = ::std::os::raw::c_uint;
pub const amdsmi_memory_type_t_AMDSMI_MEM_TYPE_FIRST: amdsmi_memory_type_t = 0;
#[doc = "!< VRAM memory"]
pub const amdsmi_memory_type_t_AMDSMI_MEM_TYPE_VRAM: amdsmi_memory_type_t = 0;
#[doc = "!< VRAM memory that is visible"]
pub const amdsmi_memory_type_t_AMDSMI_MEM_TYPE_VIS_VRAM: amdsmi_memory_type_t = 1;
#[doc = "!< GTT memory"]
pub const amdsmi_memory_type_t_AMDSMI_MEM_TYPE_GTT: amdsmi_memory_type_t = 2;
pub const amdsmi_memory_type_t_AMDSMI_MEM_TYPE_LAST: amdsmi_memory_type_t = 2;
#[doc = " @brief Types of memory"]
pub type amdsmi_memory_type_t = ::std::os::raw::c_uint;
#[doc = "!< Index used for the minimum frequency value"]
pub const amdsmi_freq_ind_t_AMDSMI_FREQ_IND_MIN: amdsmi_freq_ind_t = 0;
#[doc = "!< Index used for the maximum frequency value"]
pub const amdsmi_freq_ind_t_AMDSMI_FREQ_IND_MAX: amdsmi_freq_ind_t = 1;
#[doc = "!< An invalid frequency index"]
pub const amdsmi_freq_ind_t_AMDSMI_FREQ_IND_INVALID: amdsmi_freq_ind_t = 4294967295;
#[doc = " @brief The values of this enum are used as frequency identifiers."]
pub type amdsmi_freq_ind_t = ::std::os::raw::c_uint;
pub const amdsmi_xgmi_status_t_AMDSMI_XGMI_STATUS_NO_ERRORS: amdsmi_xgmi_status_t = 0;
pub const amdsmi_xgmi_status_t_AMDSMI_XGMI_STATUS_ERROR: amdsmi_xgmi_status_t = 1;
pub const amdsmi_xgmi_status_t_AMDSMI_XGMI_STATUS_MULTIPLE_ERRORS: amdsmi_xgmi_status_t = 2;
#[doc = " @brief XGMI Status"]
pub type amdsmi_xgmi_status_t = ::std::os::raw::c_uint;
#[doc = " @brief Bitfield used in various AMDSMI calls"]
pub type amdsmi_bit_field_t = u64;
#[doc = "!< Reserved. This gpu page is reserved\n!<  and not available for use"]
pub const amdsmi_memory_page_status_t_AMDSMI_MEM_PAGE_STATUS_RESERVED: amdsmi_memory_page_status_t =
    0;
#[doc = "!< Pending. This gpu page is marked\n!<  as bad and will be marked reserved\n!<  at the next window."]
pub const amdsmi_memory_page_status_t_AMDSMI_MEM_PAGE_STATUS_PENDING: amdsmi_memory_page_status_t =
    1;
#[doc = "!< Unable to reserve this page"]
pub const amdsmi_memory_page_status_t_AMDSMI_MEM_PAGE_STATUS_UNRESERVABLE:
    amdsmi_memory_page_status_t = 2;
#[doc = " @brief Reserved Memory Page States"]
pub type amdsmi_memory_page_status_t = ::std::os::raw::c_uint;
#[doc = "!< unknown type."]
pub const amdsmi_io_link_type_t_AMDSMI_IOLINK_TYPE_UNDEFINED: amdsmi_io_link_type_t = 0;
#[doc = "!< PCI Express"]
pub const amdsmi_io_link_type_t_AMDSMI_IOLINK_TYPE_PCIEXPRESS: amdsmi_io_link_type_t = 1;
#[doc = "!< XGMI"]
pub const amdsmi_io_link_type_t_AMDSMI_IOLINK_TYPE_XGMI: amdsmi_io_link_type_t = 2;
#[doc = "!< Number of IO Link types"]
pub const amdsmi_io_link_type_t_AMDSMI_IOLINK_TYPE_NUMIOLINKTYPES: amdsmi_io_link_type_t = 3;
#[doc = "!< Max of IO Link types"]
pub const amdsmi_io_link_type_t_AMDSMI_IOLINK_TYPE_SIZE: amdsmi_io_link_type_t = 4294967295;
#[doc = " @brief Types for IO Link"]
pub type amdsmi_io_link_type_t = ::std::os::raw::c_uint;
pub const amdsmi_utilization_counter_type_t_AMDSMI_UTILIZATION_COUNTER_FIRST:
    amdsmi_utilization_counter_type_t = 0;
pub const amdsmi_utilization_counter_type_t_AMDSMI_COARSE_GRAIN_GFX_ACTIVITY:
    amdsmi_utilization_counter_type_t = 0;
#[doc = "!< Memory Activity"]
pub const amdsmi_utilization_counter_type_t_AMDSMI_COARSE_GRAIN_MEM_ACTIVITY:
    amdsmi_utilization_counter_type_t = 1;
#[doc = "!< Decoder Activity\n!< Fine grain activity counters"]
pub const amdsmi_utilization_counter_type_t_AMDSMI_COARSE_DECODER_ACTIVITY:
    amdsmi_utilization_counter_type_t = 2;
pub const amdsmi_utilization_counter_type_t_AMDSMI_FINE_GRAIN_GFX_ACTIVITY:
    amdsmi_utilization_counter_type_t = 100;
pub const amdsmi_utilization_counter_type_t_AMDSMI_FINE_GRAIN_MEM_ACTIVITY:
    amdsmi_utilization_counter_type_t = 101;
pub const amdsmi_utilization_counter_type_t_AMDSMI_FINE_DECODER_ACTIVITY:
    amdsmi_utilization_counter_type_t = 102;
pub const amdsmi_utilization_counter_type_t_AMDSMI_UTILIZATION_COUNTER_LAST:
    amdsmi_utilization_counter_type_t = 102;
#[doc = " @brief The utilization counter type"]
pub type amdsmi_utilization_counter_type_t = ::std::os::raw::c_uint;
#[doc = "!< Average Power"]
pub const amdsmi_power_type_t_AMDSMI_AVERAGE_POWER: amdsmi_power_type_t = 0;
#[doc = "!< Current / Instant Power"]
pub const amdsmi_power_type_t_AMDSMI_CURRENT_POWER: amdsmi_power_type_t = 1;
#[doc = "!< Invalid / Undetected Power"]
pub const amdsmi_power_type_t_AMDSMI_INVALID_POWER: amdsmi_power_type_t = 4294967295;
#[doc = " @brief Power types"]
pub type amdsmi_power_type_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_utilization_counter_t {
    #[doc = "!< Utilization counter type"]
    pub type_: amdsmi_utilization_counter_type_t,
    #[doc = "!< Coarse grain activity counter value (average)"]
    pub value: u64,
    #[doc = "!< Utilization counter value"]
    pub fine_value: [u64; 4usize],
    pub fine_value_count: u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_utilization_counter_t"]
        [::std::mem::size_of::<amdsmi_utilization_counter_t>() - 56usize];
    ["Alignment of amdsmi_utilization_counter_t"]
        [::std::mem::align_of::<amdsmi_utilization_counter_t>() - 8usize];
    ["Offset of field: amdsmi_utilization_counter_t::type_"]
        [::std::mem::offset_of!(amdsmi_utilization_counter_t, type_) - 0usize];
    ["Offset of field: amdsmi_utilization_counter_t::value"]
        [::std::mem::offset_of!(amdsmi_utilization_counter_t, value) - 8usize];
    ["Offset of field: amdsmi_utilization_counter_t::fine_value"]
        [::std::mem::offset_of!(amdsmi_utilization_counter_t, fine_value) - 16usize];
    ["Offset of field: amdsmi_utilization_counter_t::fine_value_count"]
        [::std::mem::offset_of!(amdsmi_utilization_counter_t, fine_value_count) - 48usize];
};
#[doc = " @brief Reserved Memory Page Record"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_retired_page_record_t {
    #[doc = "!< Start address of page"]
    pub page_address: u64,
    #[doc = "!< Page size"]
    pub page_size: u64,
    #[doc = "!< Page \"reserved\" status"]
    pub status: amdsmi_memory_page_status_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_retired_page_record_t"]
        [::std::mem::size_of::<amdsmi_retired_page_record_t>() - 24usize];
    ["Alignment of amdsmi_retired_page_record_t"]
        [::std::mem::align_of::<amdsmi_retired_page_record_t>() - 8usize];
    ["Offset of field: amdsmi_retired_page_record_t::page_address"]
        [::std::mem::offset_of!(amdsmi_retired_page_record_t, page_address) - 0usize];
    ["Offset of field: amdsmi_retired_page_record_t::page_size"]
        [::std::mem::offset_of!(amdsmi_retired_page_record_t, page_size) - 8usize];
    ["Offset of field: amdsmi_retired_page_record_t::status"]
        [::std::mem::offset_of!(amdsmi_retired_page_record_t, status) - 16usize];
};
#[doc = " @brief This structure contains information about which power profiles are\n supported by the system for a given device, and which power profile is\n currently active."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_power_profile_status_t {
    #[doc = " Which profiles are supported by this system"]
    pub available_profiles: amdsmi_bit_field_t,
    #[doc = " Which power profile is currently active"]
    pub current: amdsmi_power_profile_preset_masks_t,
    #[doc = " How many power profiles are available"]
    pub num_profiles: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_power_profile_status_t"]
        [::std::mem::size_of::<amdsmi_power_profile_status_t>() - 24usize];
    ["Alignment of amdsmi_power_profile_status_t"]
        [::std::mem::align_of::<amdsmi_power_profile_status_t>() - 8usize];
    ["Offset of field: amdsmi_power_profile_status_t::available_profiles"]
        [::std::mem::offset_of!(amdsmi_power_profile_status_t, available_profiles) - 0usize];
    ["Offset of field: amdsmi_power_profile_status_t::current"]
        [::std::mem::offset_of!(amdsmi_power_profile_status_t, current) - 8usize];
    ["Offset of field: amdsmi_power_profile_status_t::num_profiles"]
        [::std::mem::offset_of!(amdsmi_power_profile_status_t, num_profiles) - 16usize];
};
#[doc = " @brief This structure holds information about clock frequencies."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_frequencies_t {
    #[doc = " Deep Sleep frequency is only supported by some GPUs"]
    pub has_deep_sleep: bool,
    #[doc = " The number of supported frequencies"]
    pub num_supported: u32,
    #[doc = " The current frequency index"]
    pub current: u32,
    #[doc = " List of frequencies.\n Only the first num_supported frequencies are valid."]
    pub frequency: [u64; 33usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_frequencies_t"][::std::mem::size_of::<amdsmi_frequencies_t>() - 280usize];
    ["Alignment of amdsmi_frequencies_t"][::std::mem::align_of::<amdsmi_frequencies_t>() - 8usize];
    ["Offset of field: amdsmi_frequencies_t::has_deep_sleep"]
        [::std::mem::offset_of!(amdsmi_frequencies_t, has_deep_sleep) - 0usize];
    ["Offset of field: amdsmi_frequencies_t::num_supported"]
        [::std::mem::offset_of!(amdsmi_frequencies_t, num_supported) - 4usize];
    ["Offset of field: amdsmi_frequencies_t::current"]
        [::std::mem::offset_of!(amdsmi_frequencies_t, current) - 8usize];
    ["Offset of field: amdsmi_frequencies_t::frequency"]
        [::std::mem::offset_of!(amdsmi_frequencies_t, frequency) - 16usize];
};
#[doc = " @brief The dpm policy."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_dpm_policy_entry_t {
    pub policy_id: u32,
    pub policy_description: [::std::os::raw::c_char; 32usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_dpm_policy_entry_t"]
        [::std::mem::size_of::<amdsmi_dpm_policy_entry_t>() - 36usize];
    ["Alignment of amdsmi_dpm_policy_entry_t"]
        [::std::mem::align_of::<amdsmi_dpm_policy_entry_t>() - 4usize];
    ["Offset of field: amdsmi_dpm_policy_entry_t::policy_id"]
        [::std::mem::offset_of!(amdsmi_dpm_policy_entry_t, policy_id) - 0usize];
    ["Offset of field: amdsmi_dpm_policy_entry_t::policy_description"]
        [::std::mem::offset_of!(amdsmi_dpm_policy_entry_t, policy_description) - 4usize];
};
#[doc = " @brief This structure holds information about dpm policies."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_dpm_policy_t {
    #[doc = " The number of supported policies"]
    pub num_supported: u32,
    #[doc = " The current policy index"]
    pub current: u32,
    #[doc = " List of policies.\n Only the first num_supported policies are valid."]
    pub policies: [amdsmi_dpm_policy_entry_t; 32usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_dpm_policy_t"][::std::mem::size_of::<amdsmi_dpm_policy_t>() - 1160usize];
    ["Alignment of amdsmi_dpm_policy_t"][::std::mem::align_of::<amdsmi_dpm_policy_t>() - 4usize];
    ["Offset of field: amdsmi_dpm_policy_t::num_supported"]
        [::std::mem::offset_of!(amdsmi_dpm_policy_t, num_supported) - 0usize];
    ["Offset of field: amdsmi_dpm_policy_t::current"]
        [::std::mem::offset_of!(amdsmi_dpm_policy_t, current) - 4usize];
    ["Offset of field: amdsmi_dpm_policy_t::policies"]
        [::std::mem::offset_of!(amdsmi_dpm_policy_t, policies) - 8usize];
};
#[doc = " @brief This structure holds information about the possible PCIe\n bandwidths. Specifically, the possible transfer rates and their\n associated numbers of lanes are stored here."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_pcie_bandwidth_t {
    #[doc = " Transfer rates (T/s) that are possible"]
    pub transfer_rate: amdsmi_frequencies_t,
    #[doc = " List of lanes for corresponding transfer rate.\n Only the first num_supported bandwidths are valid."]
    pub lanes: [u32; 33usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_pcie_bandwidth_t"]
        [::std::mem::size_of::<amdsmi_pcie_bandwidth_t>() - 416usize];
    ["Alignment of amdsmi_pcie_bandwidth_t"]
        [::std::mem::align_of::<amdsmi_pcie_bandwidth_t>() - 8usize];
    ["Offset of field: amdsmi_pcie_bandwidth_t::transfer_rate"]
        [::std::mem::offset_of!(amdsmi_pcie_bandwidth_t, transfer_rate) - 0usize];
    ["Offset of field: amdsmi_pcie_bandwidth_t::lanes"]
        [::std::mem::offset_of!(amdsmi_pcie_bandwidth_t, lanes) - 280usize];
};
#[doc = " @brief This structure holds version information."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_version_t {
    #[doc = "!< Last 2 digits of the Year released"]
    pub year: u32,
    #[doc = "!< Major version"]
    pub major: u32,
    #[doc = "!< Minor version"]
    pub minor: u32,
    #[doc = "!< Patch, build or stepping version"]
    pub release: u32,
    #[doc = "!< Full Build version string"]
    pub build: *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_version_t"][::std::mem::size_of::<amdsmi_version_t>() - 24usize];
    ["Alignment of amdsmi_version_t"][::std::mem::align_of::<amdsmi_version_t>() - 8usize];
    ["Offset of field: amdsmi_version_t::year"]
        [::std::mem::offset_of!(amdsmi_version_t, year) - 0usize];
    ["Offset of field: amdsmi_version_t::major"]
        [::std::mem::offset_of!(amdsmi_version_t, major) - 4usize];
    ["Offset of field: amdsmi_version_t::minor"]
        [::std::mem::offset_of!(amdsmi_version_t, minor) - 8usize];
    ["Offset of field: amdsmi_version_t::release"]
        [::std::mem::offset_of!(amdsmi_version_t, release) - 12usize];
    ["Offset of field: amdsmi_version_t::build"]
        [::std::mem::offset_of!(amdsmi_version_t, build) - 16usize];
};
#[doc = " @brief This structure represents a point on the frequency-voltage plane."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_od_vddc_point_t {
    #[doc = "!< Frequency coordinate (in Hz)"]
    pub frequency: u64,
    #[doc = "!< Voltage coordinate (in mV)"]
    pub voltage: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_od_vddc_point_t"][::std::mem::size_of::<amdsmi_od_vddc_point_t>() - 16usize];
    ["Alignment of amdsmi_od_vddc_point_t"]
        [::std::mem::align_of::<amdsmi_od_vddc_point_t>() - 8usize];
    ["Offset of field: amdsmi_od_vddc_point_t::frequency"]
        [::std::mem::offset_of!(amdsmi_od_vddc_point_t, frequency) - 0usize];
    ["Offset of field: amdsmi_od_vddc_point_t::voltage"]
        [::std::mem::offset_of!(amdsmi_od_vddc_point_t, voltage) - 8usize];
};
#[doc = " @brief This structure holds 2 ::amdsmi_range_t's, one for frequency and one for\n voltage. These 2 ranges indicate the range of possible values for the\n corresponding ::amdsmi_od_vddc_point_t."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_freq_volt_region_t {
    #[doc = "!< The frequency range for this VDDC Curve point"]
    pub freq_range: amdsmi_range_t,
    #[doc = "!< The voltage range for this VDDC Curve point"]
    pub volt_range: amdsmi_range_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_freq_volt_region_t"]
        [::std::mem::size_of::<amdsmi_freq_volt_region_t>() - 64usize];
    ["Alignment of amdsmi_freq_volt_region_t"]
        [::std::mem::align_of::<amdsmi_freq_volt_region_t>() - 8usize];
    ["Offset of field: amdsmi_freq_volt_region_t::freq_range"]
        [::std::mem::offset_of!(amdsmi_freq_volt_region_t, freq_range) - 0usize];
    ["Offset of field: amdsmi_freq_volt_region_t::volt_range"]
        [::std::mem::offset_of!(amdsmi_freq_volt_region_t, volt_range) - 32usize];
};
#[doc = " ::AMDSMI_NUM_VOLTAGE_CURVE_POINTS number of ::amdsmi_od_vddc_point_t's"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_od_volt_curve_t {
    #[doc = " Array of ::AMDSMI_NUM_VOLTAGE_CURVE_POINTS ::amdsmi_od_vddc_point_t's that\n make up the voltage frequency curve points."]
    pub vc_points: [amdsmi_od_vddc_point_t; 3usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_od_volt_curve_t"][::std::mem::size_of::<amdsmi_od_volt_curve_t>() - 48usize];
    ["Alignment of amdsmi_od_volt_curve_t"]
        [::std::mem::align_of::<amdsmi_od_volt_curve_t>() - 8usize];
    ["Offset of field: amdsmi_od_volt_curve_t::vc_points"]
        [::std::mem::offset_of!(amdsmi_od_volt_curve_t, vc_points) - 0usize];
};
#[doc = " @brief This structure holds the frequency-voltage values for a device."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_od_volt_freq_data_t {
    #[doc = "!< The current SCLK frequency range"]
    pub curr_sclk_range: amdsmi_range_t,
    #[doc = "!< The current MCLK frequency range;\n!< (upper bound only)"]
    pub curr_mclk_range: amdsmi_range_t,
    #[doc = "!< The range possible of SCLK values"]
    pub sclk_freq_limits: amdsmi_range_t,
    #[doc = "!< The range possible of MCLK values"]
    pub mclk_freq_limits: amdsmi_range_t,
    #[doc = " @brief The current voltage curve"]
    pub curve: amdsmi_od_volt_curve_t,
    #[doc = "!< The number of voltage curve regions"]
    pub num_regions: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_od_volt_freq_data_t"]
        [::std::mem::size_of::<amdsmi_od_volt_freq_data_t>() - 184usize];
    ["Alignment of amdsmi_od_volt_freq_data_t"]
        [::std::mem::align_of::<amdsmi_od_volt_freq_data_t>() - 8usize];
    ["Offset of field: amdsmi_od_volt_freq_data_t::curr_sclk_range"]
        [::std::mem::offset_of!(amdsmi_od_volt_freq_data_t, curr_sclk_range) - 0usize];
    ["Offset of field: amdsmi_od_volt_freq_data_t::curr_mclk_range"]
        [::std::mem::offset_of!(amdsmi_od_volt_freq_data_t, curr_mclk_range) - 32usize];
    ["Offset of field: amdsmi_od_volt_freq_data_t::sclk_freq_limits"]
        [::std::mem::offset_of!(amdsmi_od_volt_freq_data_t, sclk_freq_limits) - 64usize];
    ["Offset of field: amdsmi_od_volt_freq_data_t::mclk_freq_limits"]
        [::std::mem::offset_of!(amdsmi_od_volt_freq_data_t, mclk_freq_limits) - 96usize];
    ["Offset of field: amdsmi_od_volt_freq_data_t::curve"]
        [::std::mem::offset_of!(amdsmi_od_volt_freq_data_t, curve) - 128usize];
    ["Offset of field: amdsmi_od_volt_freq_data_t::num_regions"]
        [::std::mem::offset_of!(amdsmi_od_volt_freq_data_t, num_regions) - 176usize];
};
#[doc = " @brief Size and version information of metrics data"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amd_metrics_table_header_t {
    #[doc = " \\cond Ignore in docs."]
    pub structure_size: u16,
    pub format_revision: u8,
    pub content_revision: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amd_metrics_table_header_t"]
        [::std::mem::size_of::<amd_metrics_table_header_t>() - 4usize];
    ["Alignment of amd_metrics_table_header_t"]
        [::std::mem::align_of::<amd_metrics_table_header_t>() - 2usize];
    ["Offset of field: amd_metrics_table_header_t::structure_size"]
        [::std::mem::offset_of!(amd_metrics_table_header_t, structure_size) - 0usize];
    ["Offset of field: amd_metrics_table_header_t::format_revision"]
        [::std::mem::offset_of!(amd_metrics_table_header_t, format_revision) - 2usize];
    ["Offset of field: amd_metrics_table_header_t::content_revision"]
        [::std::mem::offset_of!(amd_metrics_table_header_t, content_revision) - 3usize];
};
#[doc = " @brief The following structures hold the gpu statistics for a device."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_gpu_xcp_metrics_t {
    pub gfx_busy_inst: [u32; 8usize],
    pub jpeg_busy: [u16; 32usize],
    pub vcn_busy: [u16; 4usize],
    pub gfx_busy_acc: [u64; 8usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_gpu_xcp_metrics_t"]
        [::std::mem::size_of::<amdsmi_gpu_xcp_metrics_t>() - 168usize];
    ["Alignment of amdsmi_gpu_xcp_metrics_t"]
        [::std::mem::align_of::<amdsmi_gpu_xcp_metrics_t>() - 8usize];
    ["Offset of field: amdsmi_gpu_xcp_metrics_t::gfx_busy_inst"]
        [::std::mem::offset_of!(amdsmi_gpu_xcp_metrics_t, gfx_busy_inst) - 0usize];
    ["Offset of field: amdsmi_gpu_xcp_metrics_t::jpeg_busy"]
        [::std::mem::offset_of!(amdsmi_gpu_xcp_metrics_t, jpeg_busy) - 32usize];
    ["Offset of field: amdsmi_gpu_xcp_metrics_t::vcn_busy"]
        [::std::mem::offset_of!(amdsmi_gpu_xcp_metrics_t, vcn_busy) - 96usize];
    ["Offset of field: amdsmi_gpu_xcp_metrics_t::gfx_busy_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_xcp_metrics_t, gfx_busy_acc) - 104usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_gpu_metrics_t {
    #[doc = " \\cond Ignore in docs."]
    pub common_header: amd_metrics_table_header_t,
    pub temperature_edge: u16,
    pub temperature_hotspot: u16,
    pub temperature_mem: u16,
    pub temperature_vrgfx: u16,
    pub temperature_vrsoc: u16,
    pub temperature_vrmem: u16,
    pub average_gfx_activity: u16,
    pub average_umc_activity: u16,
    pub average_mm_activity: u16,
    pub average_socket_power: u16,
    pub energy_accumulator: u64,
    pub system_clock_counter: u64,
    pub average_gfxclk_frequency: u16,
    pub average_socclk_frequency: u16,
    pub average_uclk_frequency: u16,
    pub average_vclk0_frequency: u16,
    pub average_dclk0_frequency: u16,
    pub average_vclk1_frequency: u16,
    pub average_dclk1_frequency: u16,
    pub current_gfxclk: u16,
    pub current_socclk: u16,
    pub current_uclk: u16,
    pub current_vclk0: u16,
    pub current_dclk0: u16,
    pub current_vclk1: u16,
    pub current_dclk1: u16,
    pub throttle_status: u32,
    pub current_fan_speed: u16,
    pub pcie_link_width: u16,
    pub pcie_link_speed: u16,
    pub gfx_activity_acc: u32,
    pub mem_activity_acc: u32,
    pub temperature_hbm: [u16; 4usize],
    pub firmware_timestamp: u64,
    pub voltage_soc: u16,
    pub voltage_gfx: u16,
    pub voltage_mem: u16,
    pub indep_throttle_status: u64,
    pub current_socket_power: u16,
    pub vcn_activity: [u16; 4usize],
    pub gfxclk_lock_status: u32,
    pub xgmi_link_width: u16,
    pub xgmi_link_speed: u16,
    pub pcie_bandwidth_acc: u64,
    pub pcie_bandwidth_inst: u64,
    pub pcie_l0_to_recov_count_acc: u64,
    pub pcie_replay_count_acc: u64,
    pub pcie_replay_rover_count_acc: u64,
    pub xgmi_read_data_acc: [u64; 8usize],
    pub xgmi_write_data_acc: [u64; 8usize],
    pub current_gfxclks: [u16; 8usize],
    pub current_socclks: [u16; 4usize],
    pub current_vclk0s: [u16; 4usize],
    pub current_dclk0s: [u16; 4usize],
    pub jpeg_activity: [u16; 32usize],
    pub pcie_nak_sent_count_acc: u32,
    pub pcie_nak_rcvd_count_acc: u32,
    pub accumulation_counter: u64,
    #[doc = " Accumulated throttler residencies"]
    pub prochot_residency_acc: u64,
    #[doc = " Accumulated throttler residencies\n\n Prochot (thermal) - PPT (power)\n Package Power Tracking (PPT) violation % (greater than 0% is a violation);\n aka PVIOL\n\n Ex. PVIOL/TVIOL calculations\n Where A and B are measurments recorded at prior points in time.\n Typically A is the earlier measured value and B is the latest measured value.\n\n PVIOL % = (PptResidencyAcc (B) - PptResidencyAcc (A)) * 100/ (AccumulationCounter (B) - AccumulationCounter (A))\n TVIOL % = (SocketThmResidencyAcc (B) -  SocketThmResidencyAcc (A)) * 100 / (AccumulationCounter (B) - AccumulationCounter (A))"]
    pub ppt_residency_acc: u64,
    #[doc = " Accumulated throttler residencies\n\n Socket (thermal)\t-\n Socket thermal violation % (greater than 0% is a violation);\n aka TVIOL\n\n Ex. PVIOL/TVIOL calculations\n Where A and B are measurments recorded at prior points in time.\n Typically A is the earlier measured value and B is the latest measured value.\n\n PVIOL % = (PptResidencyAcc (B) - PptResidencyAcc (A)) * 100/ (AccumulationCounter (B) - AccumulationCounter (A))\n TVIOL % = (SocketThmResidencyAcc (B) -  SocketThmResidencyAcc (A)) * 100 / (AccumulationCounter (B) - AccumulationCounter (A))"]
    pub socket_thm_residency_acc: u64,
    pub vr_thm_residency_acc: u64,
    pub hbm_thm_residency_acc: u64,
    pub num_partition: u16,
    pub xcp_stats: [amdsmi_gpu_xcp_metrics_t; 8usize],
    pub pcie_lc_perf_other_end_recovery: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_gpu_metrics_t"][::std::mem::size_of::<amdsmi_gpu_metrics_t>() - 1832usize];
    ["Alignment of amdsmi_gpu_metrics_t"][::std::mem::align_of::<amdsmi_gpu_metrics_t>() - 8usize];
    ["Offset of field: amdsmi_gpu_metrics_t::common_header"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, common_header) - 0usize];
    ["Offset of field: amdsmi_gpu_metrics_t::temperature_edge"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, temperature_edge) - 4usize];
    ["Offset of field: amdsmi_gpu_metrics_t::temperature_hotspot"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, temperature_hotspot) - 6usize];
    ["Offset of field: amdsmi_gpu_metrics_t::temperature_mem"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, temperature_mem) - 8usize];
    ["Offset of field: amdsmi_gpu_metrics_t::temperature_vrgfx"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, temperature_vrgfx) - 10usize];
    ["Offset of field: amdsmi_gpu_metrics_t::temperature_vrsoc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, temperature_vrsoc) - 12usize];
    ["Offset of field: amdsmi_gpu_metrics_t::temperature_vrmem"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, temperature_vrmem) - 14usize];
    ["Offset of field: amdsmi_gpu_metrics_t::average_gfx_activity"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, average_gfx_activity) - 16usize];
    ["Offset of field: amdsmi_gpu_metrics_t::average_umc_activity"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, average_umc_activity) - 18usize];
    ["Offset of field: amdsmi_gpu_metrics_t::average_mm_activity"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, average_mm_activity) - 20usize];
    ["Offset of field: amdsmi_gpu_metrics_t::average_socket_power"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, average_socket_power) - 22usize];
    ["Offset of field: amdsmi_gpu_metrics_t::energy_accumulator"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, energy_accumulator) - 24usize];
    ["Offset of field: amdsmi_gpu_metrics_t::system_clock_counter"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, system_clock_counter) - 32usize];
    ["Offset of field: amdsmi_gpu_metrics_t::average_gfxclk_frequency"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, average_gfxclk_frequency) - 40usize];
    ["Offset of field: amdsmi_gpu_metrics_t::average_socclk_frequency"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, average_socclk_frequency) - 42usize];
    ["Offset of field: amdsmi_gpu_metrics_t::average_uclk_frequency"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, average_uclk_frequency) - 44usize];
    ["Offset of field: amdsmi_gpu_metrics_t::average_vclk0_frequency"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, average_vclk0_frequency) - 46usize];
    ["Offset of field: amdsmi_gpu_metrics_t::average_dclk0_frequency"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, average_dclk0_frequency) - 48usize];
    ["Offset of field: amdsmi_gpu_metrics_t::average_vclk1_frequency"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, average_vclk1_frequency) - 50usize];
    ["Offset of field: amdsmi_gpu_metrics_t::average_dclk1_frequency"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, average_dclk1_frequency) - 52usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_gfxclk"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_gfxclk) - 54usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_socclk"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_socclk) - 56usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_uclk"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_uclk) - 58usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_vclk0"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_vclk0) - 60usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_dclk0"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_dclk0) - 62usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_vclk1"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_vclk1) - 64usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_dclk1"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_dclk1) - 66usize];
    ["Offset of field: amdsmi_gpu_metrics_t::throttle_status"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, throttle_status) - 68usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_fan_speed"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_fan_speed) - 72usize];
    ["Offset of field: amdsmi_gpu_metrics_t::pcie_link_width"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, pcie_link_width) - 74usize];
    ["Offset of field: amdsmi_gpu_metrics_t::pcie_link_speed"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, pcie_link_speed) - 76usize];
    ["Offset of field: amdsmi_gpu_metrics_t::gfx_activity_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, gfx_activity_acc) - 80usize];
    ["Offset of field: amdsmi_gpu_metrics_t::mem_activity_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, mem_activity_acc) - 84usize];
    ["Offset of field: amdsmi_gpu_metrics_t::temperature_hbm"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, temperature_hbm) - 88usize];
    ["Offset of field: amdsmi_gpu_metrics_t::firmware_timestamp"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, firmware_timestamp) - 96usize];
    ["Offset of field: amdsmi_gpu_metrics_t::voltage_soc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, voltage_soc) - 104usize];
    ["Offset of field: amdsmi_gpu_metrics_t::voltage_gfx"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, voltage_gfx) - 106usize];
    ["Offset of field: amdsmi_gpu_metrics_t::voltage_mem"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, voltage_mem) - 108usize];
    ["Offset of field: amdsmi_gpu_metrics_t::indep_throttle_status"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, indep_throttle_status) - 112usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_socket_power"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_socket_power) - 120usize];
    ["Offset of field: amdsmi_gpu_metrics_t::vcn_activity"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, vcn_activity) - 122usize];
    ["Offset of field: amdsmi_gpu_metrics_t::gfxclk_lock_status"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, gfxclk_lock_status) - 132usize];
    ["Offset of field: amdsmi_gpu_metrics_t::xgmi_link_width"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, xgmi_link_width) - 136usize];
    ["Offset of field: amdsmi_gpu_metrics_t::xgmi_link_speed"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, xgmi_link_speed) - 138usize];
    ["Offset of field: amdsmi_gpu_metrics_t::pcie_bandwidth_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, pcie_bandwidth_acc) - 144usize];
    ["Offset of field: amdsmi_gpu_metrics_t::pcie_bandwidth_inst"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, pcie_bandwidth_inst) - 152usize];
    ["Offset of field: amdsmi_gpu_metrics_t::pcie_l0_to_recov_count_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, pcie_l0_to_recov_count_acc) - 160usize];
    ["Offset of field: amdsmi_gpu_metrics_t::pcie_replay_count_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, pcie_replay_count_acc) - 168usize];
    ["Offset of field: amdsmi_gpu_metrics_t::pcie_replay_rover_count_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, pcie_replay_rover_count_acc) - 176usize];
    ["Offset of field: amdsmi_gpu_metrics_t::xgmi_read_data_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, xgmi_read_data_acc) - 184usize];
    ["Offset of field: amdsmi_gpu_metrics_t::xgmi_write_data_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, xgmi_write_data_acc) - 248usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_gfxclks"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_gfxclks) - 312usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_socclks"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_socclks) - 328usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_vclk0s"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_vclk0s) - 336usize];
    ["Offset of field: amdsmi_gpu_metrics_t::current_dclk0s"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, current_dclk0s) - 344usize];
    ["Offset of field: amdsmi_gpu_metrics_t::jpeg_activity"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, jpeg_activity) - 352usize];
    ["Offset of field: amdsmi_gpu_metrics_t::pcie_nak_sent_count_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, pcie_nak_sent_count_acc) - 416usize];
    ["Offset of field: amdsmi_gpu_metrics_t::pcie_nak_rcvd_count_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, pcie_nak_rcvd_count_acc) - 420usize];
    ["Offset of field: amdsmi_gpu_metrics_t::accumulation_counter"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, accumulation_counter) - 424usize];
    ["Offset of field: amdsmi_gpu_metrics_t::prochot_residency_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, prochot_residency_acc) - 432usize];
    ["Offset of field: amdsmi_gpu_metrics_t::ppt_residency_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, ppt_residency_acc) - 440usize];
    ["Offset of field: amdsmi_gpu_metrics_t::socket_thm_residency_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, socket_thm_residency_acc) - 448usize];
    ["Offset of field: amdsmi_gpu_metrics_t::vr_thm_residency_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, vr_thm_residency_acc) - 456usize];
    ["Offset of field: amdsmi_gpu_metrics_t::hbm_thm_residency_acc"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, hbm_thm_residency_acc) - 464usize];
    ["Offset of field: amdsmi_gpu_metrics_t::num_partition"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, num_partition) - 472usize];
    ["Offset of field: amdsmi_gpu_metrics_t::xcp_stats"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, xcp_stats) - 480usize];
    ["Offset of field: amdsmi_gpu_metrics_t::pcie_lc_perf_other_end_recovery"]
        [::std::mem::offset_of!(amdsmi_gpu_metrics_t, pcie_lc_perf_other_end_recovery) - 1824usize];
};
#[doc = " @brief This structure holds the name value pairs"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_name_value_t {
    #[doc = "!< Name"]
    pub name: [::std::os::raw::c_char; 64usize],
    #[doc = "!< Use uint64_t to make it universal"]
    pub value: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_name_value_t"][::std::mem::size_of::<amdsmi_name_value_t>() - 72usize];
    ["Alignment of amdsmi_name_value_t"][::std::mem::align_of::<amdsmi_name_value_t>() - 8usize];
    ["Offset of field: amdsmi_name_value_t::name"]
        [::std::mem::offset_of!(amdsmi_name_value_t, name) - 0usize];
    ["Offset of field: amdsmi_name_value_t::value"]
        [::std::mem::offset_of!(amdsmi_name_value_t, value) - 64usize];
};
pub const amdsmi_reg_type_t_AMDSMI_REG_XGMI: amdsmi_reg_type_t = 0;
pub const amdsmi_reg_type_t_AMDSMI_REG_WAFL: amdsmi_reg_type_t = 1;
pub const amdsmi_reg_type_t_AMDSMI_REG_PCIE: amdsmi_reg_type_t = 2;
pub const amdsmi_reg_type_t_AMDSMI_REG_USR: amdsmi_reg_type_t = 3;
pub const amdsmi_reg_type_t_AMDSMI_REG_USR1: amdsmi_reg_type_t = 4;
#[doc = " @brief This register type for register table"]
pub type amdsmi_reg_type_t = ::std::os::raw::c_uint;
#[doc = " @brief This structure holds ras feature"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_ras_feature_t {
    pub ras_eeprom_version: u32,
    #[doc = "!< ecc_correction_schema mask"]
    pub ecc_correction_schema_flag: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_ras_feature_t"][::std::mem::size_of::<amdsmi_ras_feature_t>() - 8usize];
    ["Alignment of amdsmi_ras_feature_t"][::std::mem::align_of::<amdsmi_ras_feature_t>() - 4usize];
    ["Offset of field: amdsmi_ras_feature_t::ras_eeprom_version"]
        [::std::mem::offset_of!(amdsmi_ras_feature_t, ras_eeprom_version) - 0usize];
    ["Offset of field: amdsmi_ras_feature_t::ecc_correction_schema_flag"]
        [::std::mem::offset_of!(amdsmi_ras_feature_t, ecc_correction_schema_flag) - 4usize];
};
#[doc = " @brief This structure holds error counts."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_error_count_t {
    #[doc = "!< Accumulated correctable errors"]
    pub correctable_count: u64,
    #[doc = "!< Accumulated uncorrectable errors"]
    pub uncorrectable_count: u64,
    #[doc = "!< Accumulated deferred errors"]
    pub deferred_count: u64,
    pub reserved: [u64; 5usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_error_count_t"][::std::mem::size_of::<amdsmi_error_count_t>() - 64usize];
    ["Alignment of amdsmi_error_count_t"][::std::mem::align_of::<amdsmi_error_count_t>() - 8usize];
    ["Offset of field: amdsmi_error_count_t::correctable_count"]
        [::std::mem::offset_of!(amdsmi_error_count_t, correctable_count) - 0usize];
    ["Offset of field: amdsmi_error_count_t::uncorrectable_count"]
        [::std::mem::offset_of!(amdsmi_error_count_t, uncorrectable_count) - 8usize];
    ["Offset of field: amdsmi_error_count_t::deferred_count"]
        [::std::mem::offset_of!(amdsmi_error_count_t, deferred_count) - 16usize];
    ["Offset of field: amdsmi_error_count_t::reserved"]
        [::std::mem::offset_of!(amdsmi_error_count_t, reserved) - 24usize];
};
#[doc = " @brief This structure contains information specific to a process."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_process_info_t {
    #[doc = "!< Process ID"]
    pub process_id: u32,
    #[doc = "!< PASID"]
    pub pasid: u32,
    #[doc = "!< VRAM usage"]
    pub vram_usage: u64,
    #[doc = "!< SDMA usage in microseconds"]
    pub sdma_usage: u64,
    #[doc = "!< Compute Unit usage in percent"]
    pub cu_occupancy: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_process_info_t"][::std::mem::size_of::<amdsmi_process_info_t>() - 32usize];
    ["Alignment of amdsmi_process_info_t"]
        [::std::mem::align_of::<amdsmi_process_info_t>() - 8usize];
    ["Offset of field: amdsmi_process_info_t::process_id"]
        [::std::mem::offset_of!(amdsmi_process_info_t, process_id) - 0usize];
    ["Offset of field: amdsmi_process_info_t::pasid"]
        [::std::mem::offset_of!(amdsmi_process_info_t, pasid) - 4usize];
    ["Offset of field: amdsmi_process_info_t::vram_usage"]
        [::std::mem::offset_of!(amdsmi_process_info_t, vram_usage) - 8usize];
    ["Offset of field: amdsmi_process_info_t::sdma_usage"]
        [::std::mem::offset_of!(amdsmi_process_info_t, sdma_usage) - 16usize];
    ["Offset of field: amdsmi_process_info_t::cu_occupancy"]
        [::std::mem::offset_of!(amdsmi_process_info_t, cu_occupancy) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_topology_nearest_t {
    pub count: u32,
    pub processor_list: [amdsmi_processor_handle; 32usize],
    pub reserved: [u64; 15usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_topology_nearest_t"]
        [::std::mem::size_of::<amdsmi_topology_nearest_t>() - 384usize];
    ["Alignment of amdsmi_topology_nearest_t"]
        [::std::mem::align_of::<amdsmi_topology_nearest_t>() - 8usize];
    ["Offset of field: amdsmi_topology_nearest_t::count"]
        [::std::mem::offset_of!(amdsmi_topology_nearest_t, count) - 0usize];
    ["Offset of field: amdsmi_topology_nearest_t::processor_list"]
        [::std::mem::offset_of!(amdsmi_topology_nearest_t, processor_list) - 8usize];
    ["Offset of field: amdsmi_topology_nearest_t::reserved"]
        [::std::mem::offset_of!(amdsmi_topology_nearest_t, reserved) - 264usize];
};
#[doc = " @brief This structure holds SMU Firmware version information."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_smu_fw_version_t {
    #[doc = "!< SMU fw Debug version number"]
    pub debug: u8,
    #[doc = "!< SMU fw Minor version number"]
    pub minor: u8,
    #[doc = "!< SMU fw Major version number"]
    pub major: u8,
    #[doc = "!< reserved fields"]
    pub unused: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_smu_fw_version_t"][::std::mem::size_of::<amdsmi_smu_fw_version_t>() - 4usize];
    ["Alignment of amdsmi_smu_fw_version_t"]
        [::std::mem::align_of::<amdsmi_smu_fw_version_t>() - 1usize];
    ["Offset of field: amdsmi_smu_fw_version_t::debug"]
        [::std::mem::offset_of!(amdsmi_smu_fw_version_t, debug) - 0usize];
    ["Offset of field: amdsmi_smu_fw_version_t::minor"]
        [::std::mem::offset_of!(amdsmi_smu_fw_version_t, minor) - 1usize];
    ["Offset of field: amdsmi_smu_fw_version_t::major"]
        [::std::mem::offset_of!(amdsmi_smu_fw_version_t, major) - 2usize];
    ["Offset of field: amdsmi_smu_fw_version_t::unused"]
        [::std::mem::offset_of!(amdsmi_smu_fw_version_t, unused) - 3usize];
};
#[doc = " @brief DDR bandwidth metrics."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_ddr_bw_metrics_t {
    #[doc = "!< DDR Maximum theoritical bandwidth in GB/s"]
    pub max_bw: u32,
    #[doc = "!< DDR bandwidth utilization in GB/s"]
    pub utilized_bw: u32,
    #[doc = "!< DDR bandwidth utilization in % of theoritical max"]
    pub utilized_pct: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_ddr_bw_metrics_t"][::std::mem::size_of::<amdsmi_ddr_bw_metrics_t>() - 12usize];
    ["Alignment of amdsmi_ddr_bw_metrics_t"]
        [::std::mem::align_of::<amdsmi_ddr_bw_metrics_t>() - 4usize];
    ["Offset of field: amdsmi_ddr_bw_metrics_t::max_bw"]
        [::std::mem::offset_of!(amdsmi_ddr_bw_metrics_t, max_bw) - 0usize];
    ["Offset of field: amdsmi_ddr_bw_metrics_t::utilized_bw"]
        [::std::mem::offset_of!(amdsmi_ddr_bw_metrics_t, utilized_bw) - 4usize];
    ["Offset of field: amdsmi_ddr_bw_metrics_t::utilized_pct"]
        [::std::mem::offset_of!(amdsmi_ddr_bw_metrics_t, utilized_pct) - 8usize];
};
#[doc = " @brief temperature range and refresh rate metrics of a DIMM"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_temp_range_refresh_rate_t {
    pub _bitfield_align_1: [u8; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_temp_range_refresh_rate_t"]
        [::std::mem::size_of::<amdsmi_temp_range_refresh_rate_t>() - 1usize];
    ["Alignment of amdsmi_temp_range_refresh_rate_t"]
        [::std::mem::align_of::<amdsmi_temp_range_refresh_rate_t>() - 1usize];
};
impl amdsmi_temp_range_refresh_rate_t {
    #[inline]
    pub fn range(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) }
    }
    #[inline]
    pub fn set_range(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 3u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn range_raw(this: *const Self) -> u8 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                0usize,
                3u8,
            ) as u8)
        }
    }
    #[inline]
    pub unsafe fn set_range_raw(this: *mut Self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                0usize,
                3u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn ref_rate(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_ref_rate(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn ref_rate_raw(this: *const Self) -> u8 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                3usize,
                1u8,
            ) as u8)
        }
    }
    #[inline]
    pub unsafe fn set_ref_rate_raw(this: *mut Self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                3usize,
                1u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn new_bitfield_1(range: u8, ref_rate: u8) -> __BindgenBitfieldUnit<[u8; 1usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 3u8, {
            let range: u8 = unsafe { ::std::mem::transmute(range) };
            range as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let ref_rate: u8 = unsafe { ::std::mem::transmute(ref_rate) };
            ref_rate as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = " @brief DIMM Power(mW), power update rate(ms) and dimm address"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_dimm_power_t {
    pub _bitfield_align_1: [u16; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
    #[doc = "!< Dimm address[7:0](8 bit data)"]
    pub dimm_addr: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_dimm_power_t"][::std::mem::size_of::<amdsmi_dimm_power_t>() - 6usize];
    ["Alignment of amdsmi_dimm_power_t"][::std::mem::align_of::<amdsmi_dimm_power_t>() - 2usize];
    ["Offset of field: amdsmi_dimm_power_t::dimm_addr"]
        [::std::mem::offset_of!(amdsmi_dimm_power_t, dimm_addr) - 4usize];
};
impl amdsmi_dimm_power_t {
    #[inline]
    pub fn power(&self) -> u16 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 15u8) as u16) }
    }
    #[inline]
    pub fn set_power(&mut self, val: u16) {
        unsafe {
            let val: u16 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 15u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn power_raw(this: *const Self) -> u16 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                0usize,
                15u8,
            ) as u16)
        }
    }
    #[inline]
    pub unsafe fn set_power_raw(this: *mut Self, val: u16) {
        unsafe {
            let val: u16 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                0usize,
                15u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn update_rate(&self) -> u16 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 9u8) as u16) }
    }
    #[inline]
    pub fn set_update_rate(&mut self, val: u16) {
        unsafe {
            let val: u16 = ::std::mem::transmute(val);
            self._bitfield_1.set(16usize, 9u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn update_rate_raw(this: *const Self) -> u16 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                16usize,
                9u8,
            ) as u16)
        }
    }
    #[inline]
    pub unsafe fn set_update_rate_raw(this: *mut Self, val: u16) {
        unsafe {
            let val: u16 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                16usize,
                9u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn new_bitfield_1(power: u16, update_rate: u16) -> __BindgenBitfieldUnit<[u8; 4usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 15u8, {
            let power: u16 = unsafe { ::std::mem::transmute(power) };
            power as u64
        });
        __bindgen_bitfield_unit.set(16usize, 9u8, {
            let update_rate: u16 = unsafe { ::std::mem::transmute(update_rate) };
            update_rate as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = " @brief DIMM temperature(°C) and update rate(ms) and dimm address"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_dimm_thermal_t {
    pub _bitfield_align_1: [u16; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
    #[doc = "!< Dimm address[7:0](8 bit data)"]
    pub dimm_addr: u8,
    #[doc = "!< temperature in degree celcius"]
    pub temp: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_dimm_thermal_t"][::std::mem::size_of::<amdsmi_dimm_thermal_t>() - 12usize];
    ["Alignment of amdsmi_dimm_thermal_t"]
        [::std::mem::align_of::<amdsmi_dimm_thermal_t>() - 4usize];
    ["Offset of field: amdsmi_dimm_thermal_t::dimm_addr"]
        [::std::mem::offset_of!(amdsmi_dimm_thermal_t, dimm_addr) - 4usize];
    ["Offset of field: amdsmi_dimm_thermal_t::temp"]
        [::std::mem::offset_of!(amdsmi_dimm_thermal_t, temp) - 8usize];
};
impl amdsmi_dimm_thermal_t {
    #[inline]
    pub fn sensor(&self) -> u16 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 11u8) as u16) }
    }
    #[inline]
    pub fn set_sensor(&mut self, val: u16) {
        unsafe {
            let val: u16 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 11u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn sensor_raw(this: *const Self) -> u16 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                0usize,
                11u8,
            ) as u16)
        }
    }
    #[inline]
    pub unsafe fn set_sensor_raw(this: *mut Self, val: u16) {
        unsafe {
            let val: u16 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                0usize,
                11u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn update_rate(&self) -> u16 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 9u8) as u16) }
    }
    #[inline]
    pub fn set_update_rate(&mut self, val: u16) {
        unsafe {
            let val: u16 = ::std::mem::transmute(val);
            self._bitfield_1.set(16usize, 9u8, val as u64)
        }
    }
    #[inline]
    pub unsafe fn update_rate_raw(this: *const Self) -> u16 {
        unsafe {
            ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
                ::std::ptr::addr_of!((*this)._bitfield_1),
                16usize,
                9u8,
            ) as u16)
        }
    }
    #[inline]
    pub unsafe fn set_update_rate_raw(this: *mut Self, val: u16) {
        unsafe {
            let val: u16 = ::std::mem::transmute(val);
            <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
                ::std::ptr::addr_of_mut!((*this)._bitfield_1),
                16usize,
                9u8,
                val as u64,
            )
        }
    }
    #[inline]
    pub fn new_bitfield_1(sensor: u16, update_rate: u16) -> __BindgenBitfieldUnit<[u8; 4usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 11u8, {
            let sensor: u16 = unsafe { ::std::mem::transmute(sensor) };
            sensor as u64
        });
        __bindgen_bitfield_unit.set(16usize, 9u8, {
            let update_rate: u16 = unsafe { ::std::mem::transmute(update_rate) };
            update_rate as u64
        });
        __bindgen_bitfield_unit
    }
}
#[doc = "!< Aggregate Bandwidth"]
pub const amdsmi_io_bw_encoding_t_AGG_BW0: amdsmi_io_bw_encoding_t = 1;
#[doc = "!< Read Bandwidth"]
pub const amdsmi_io_bw_encoding_t_RD_BW0: amdsmi_io_bw_encoding_t = 2;
#[doc = "!< Write Bandwdith"]
pub const amdsmi_io_bw_encoding_t_WR_BW0: amdsmi_io_bw_encoding_t = 4;
#[doc = " @brief xGMI Bandwidth Encoding types"]
pub type amdsmi_io_bw_encoding_t = ::std::os::raw::c_uint;
#[doc = " @brief LINK name and Bandwidth type Information.It contains\n link names i.e valid link names are\n \"P0\", \"P1\", \"P2\", \"P3\", \"P4\", \"G0\", \"G1\", \"G2\", \"G3\", \"G4\"\n \"G5\", \"G6\", \"G7\"\n Valid bandwidth types 1(Aggregate_BW), 2 (Read BW), 4 (Write BW)."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_link_id_bw_type_t {
    #[doc = "!< Bandwidth Type Information [1, 2, 4]"]
    pub bw_type: amdsmi_io_bw_encoding_t,
    #[doc = "!< Link name [P0, P1, G0, G1 etc]"]
    pub link_name: *mut ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_link_id_bw_type_t"]
        [::std::mem::size_of::<amdsmi_link_id_bw_type_t>() - 16usize];
    ["Alignment of amdsmi_link_id_bw_type_t"]
        [::std::mem::align_of::<amdsmi_link_id_bw_type_t>() - 8usize];
    ["Offset of field: amdsmi_link_id_bw_type_t::bw_type"]
        [::std::mem::offset_of!(amdsmi_link_id_bw_type_t, bw_type) - 0usize];
    ["Offset of field: amdsmi_link_id_bw_type_t::link_name"]
        [::std::mem::offset_of!(amdsmi_link_id_bw_type_t, link_name) - 8usize];
};
#[doc = " @brief max and min LCLK DPM level on a given NBIO ID.\n Valid max and min DPM level values are 0 - 1."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_dpm_level_t {
    #[doc = "!< Max LCLK DPM level[15:8](8 bit data)"]
    pub max_dpm_level: u8,
    #[doc = "!< Min LCLK DPM level[7:0](8 bit data)"]
    pub min_dpm_level: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_dpm_level_t"][::std::mem::size_of::<amdsmi_dpm_level_t>() - 2usize];
    ["Alignment of amdsmi_dpm_level_t"][::std::mem::align_of::<amdsmi_dpm_level_t>() - 1usize];
    ["Offset of field: amdsmi_dpm_level_t::max_dpm_level"]
        [::std::mem::offset_of!(amdsmi_dpm_level_t, max_dpm_level) - 0usize];
    ["Offset of field: amdsmi_dpm_level_t::min_dpm_level"]
        [::std::mem::offset_of!(amdsmi_dpm_level_t, min_dpm_level) - 1usize];
};
#[doc = " @brief HSMP Metrics table (supported only with hsmp proto version 6)."]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct amdsmi_hsmp_metrics_table_t {
    pub accumulation_counter: u32,
    pub max_socket_temperature: u32,
    pub max_vr_temperature: u32,
    pub max_hbm_temperature: u32,
    pub max_socket_temperature_acc: u64,
    pub max_vr_temperature_acc: u64,
    pub max_hbm_temperature_acc: u64,
    pub socket_power_limit: u32,
    pub max_socket_power_limit: u32,
    pub socket_power: u32,
    pub timestamp: u64,
    pub socket_energy_acc: u64,
    pub ccd_energy_acc: u64,
    pub xcd_energy_acc: u64,
    pub aid_energy_acc: u64,
    pub hbm_energy_acc: u64,
    pub cclk_frequency_limit: u32,
    pub gfxclk_frequency_limit: u32,
    pub fclk_frequency: u32,
    pub uclk_frequency: u32,
    pub socclk_frequency: [u32; 4usize],
    pub vclk_frequency: [u32; 4usize],
    pub dclk_frequency: [u32; 4usize],
    pub lclk_frequency: [u32; 4usize],
    pub gfxclk_frequency_acc: [u64; 8usize],
    pub cclk_frequency_acc: [u64; 96usize],
    pub max_cclk_frequency: u32,
    pub min_cclk_frequency: u32,
    pub max_gfxclk_frequency: u32,
    pub min_gfxclk_frequency: u32,
    pub fclk_frequency_table: [u32; 4usize],
    pub uclk_frequency_table: [u32; 4usize],
    pub socclk_frequency_table: [u32; 4usize],
    pub vclk_frequency_table: [u32; 4usize],
    pub dclk_frequency_table: [u32; 4usize],
    pub lclk_frequency_table: [u32; 4usize],
    pub max_lclk_dpm_range: u32,
    pub min_lclk_dpm_range: u32,
    pub xgmi_width: u32,
    pub xgmi_bitrate: u32,
    pub xgmi_read_bandwidth_acc: [u64; 8usize],
    pub xgmi_write_bandwidth_acc: [u64; 8usize],
    pub socket_c0_residency: u32,
    pub socket_gfx_busy: u32,
    pub dram_bandwidth_utilization: u32,
    pub socket_c0_residency_acc: u64,
    pub socket_gfx_busy_acc: u64,
    pub dram_bandwidth_acc: u64,
    pub max_dram_bandwidth: u32,
    pub dram_bandwidth_utilization_acc: u64,
    pub pcie_bandwidth_acc: [u64; 4usize],
    pub prochot_residency_acc: u32,
    pub ppt_residency_acc: u32,
    pub socket_thm_residency_acc: u32,
    pub vr_thm_residency_acc: u32,
    pub hbm_thm_residency_acc: u32,
    pub spare: u32,
    pub gfxclk_frequency: [u32; 8usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of amdsmi_hsmp_metrics_table_t"]
        [::std::mem::size_of::<amdsmi_hsmp_metrics_table_t>() - 1404usize];
    ["Alignment of amdsmi_hsmp_metrics_table_t"]
        [::std::mem::align_of::<amdsmi_hsmp_metrics_table_t>() - 1usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::accumulation_counter"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, accumulation_counter) - 0usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::max_socket_temperature"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, max_socket_temperature) - 4usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::max_vr_temperature"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, max_vr_temperature) - 8usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::max_hbm_temperature"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, max_hbm_temperature) - 12usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::max_socket_temperature_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, max_socket_temperature_acc) - 16usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::max_vr_temperature_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, max_vr_temperature_acc) - 24usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::max_hbm_temperature_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, max_hbm_temperature_acc) - 32usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::socket_power_limit"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, socket_power_limit) - 40usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::max_socket_power_limit"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, max_socket_power_limit) - 44usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::socket_power"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, socket_power) - 48usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::timestamp"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, timestamp) - 52usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::socket_energy_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, socket_energy_acc) - 60usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::ccd_energy_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, ccd_energy_acc) - 68usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::xcd_energy_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, xcd_energy_acc) - 76usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::aid_energy_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, aid_energy_acc) - 84usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::hbm_energy_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, hbm_energy_acc) - 92usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::cclk_frequency_limit"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, cclk_frequency_limit) - 100usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::gfxclk_frequency_limit"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, gfxclk_frequency_limit) - 104usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::fclk_frequency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, fclk_frequency) - 108usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::uclk_frequency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, uclk_frequency) - 112usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::socclk_frequency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, socclk_frequency) - 116usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::vclk_frequency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, vclk_frequency) - 132usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::dclk_frequency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, dclk_frequency) - 148usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::lclk_frequency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, lclk_frequency) - 164usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::gfxclk_frequency_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, gfxclk_frequency_acc) - 180usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::cclk_frequency_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, cclk_frequency_acc) - 244usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::max_cclk_frequency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, max_cclk_frequency) - 1012usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::min_cclk_frequency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, min_cclk_frequency) - 1016usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::max_gfxclk_frequency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, max_gfxclk_frequency) - 1020usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::min_gfxclk_frequency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, min_gfxclk_frequency) - 1024usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::fclk_frequency_table"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, fclk_frequency_table) - 1028usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::uclk_frequency_table"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, uclk_frequency_table) - 1044usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::socclk_frequency_table"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, socclk_frequency_table) - 1060usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::vclk_frequency_table"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, vclk_frequency_table) - 1076usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::dclk_frequency_table"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, dclk_frequency_table) - 1092usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::lclk_frequency_table"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, lclk_frequency_table) - 1108usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::max_lclk_dpm_range"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, max_lclk_dpm_range) - 1124usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::min_lclk_dpm_range"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, min_lclk_dpm_range) - 1128usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::xgmi_width"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, xgmi_width) - 1132usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::xgmi_bitrate"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, xgmi_bitrate) - 1136usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::xgmi_read_bandwidth_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, xgmi_read_bandwidth_acc) - 1140usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::xgmi_write_bandwidth_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, xgmi_write_bandwidth_acc) - 1204usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::socket_c0_residency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, socket_c0_residency) - 1268usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::socket_gfx_busy"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, socket_gfx_busy) - 1272usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::dram_bandwidth_utilization"][::std::mem::offset_of!(
        amdsmi_hsmp_metrics_table_t,
        dram_bandwidth_utilization
    ) - 1276usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::socket_c0_residency_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, socket_c0_residency_acc) - 1280usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::socket_gfx_busy_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, socket_gfx_busy_acc) - 1288usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::dram_bandwidth_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, dram_bandwidth_acc) - 1296usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::max_dram_bandwidth"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, max_dram_bandwidth) - 1304usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::dram_bandwidth_utilization_acc"][::std::mem::offset_of!(
        amdsmi_hsmp_metrics_table_t,
        dram_bandwidth_utilization_acc
    ) - 1308usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::pcie_bandwidth_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, pcie_bandwidth_acc) - 1316usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::prochot_residency_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, prochot_residency_acc) - 1348usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::ppt_residency_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, ppt_residency_acc) - 1352usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::socket_thm_residency_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, socket_thm_residency_acc) - 1356usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::vr_thm_residency_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, vr_thm_residency_acc) - 1360usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::hbm_thm_residency_acc"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, hbm_thm_residency_acc) - 1364usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::spare"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, spare) - 1368usize];
    ["Offset of field: amdsmi_hsmp_metrics_table_t::gfxclk_frequency"]
        [::std::mem::offset_of!(amdsmi_hsmp_metrics_table_t, gfxclk_frequency) - 1372usize];
};
unsafe extern "C" {
    #[doc = " @brief hsmp frequency limit source names"]
    pub static amdsmi_hsmp_freqlimit_src_names: [*mut ::std::os::raw::c_char; 8usize];
}
unsafe extern "C" {
    #[doc = "  @brief Initialize the AMD SMI library\n\n  @platform{gpu_bm_linux}  @platform{host} @platform{cpu_bm}  @platform{guest_1vf}\n  @platform{guest_mvf} @platform{guest_windows}\n\n  @details This function initializes the library and the internal data structures,\n  including those corresponding to sources of information that SMI provides.\n\n  The @p init_flags decides which type of processor\n  can be discovered by ::amdsmi_get_socket_handles(). AMDSMI_INIT_AMD_GPUS returns\n  sockets with AMD GPUS, and AMDSMI_INIT_AMD_GPUS | AMDSMI_INIT_AMD_CPUS returns\n  sockets with either AMD GPUS or CPUS.\n  Currently, only AMDSMI_INIT_AMD_GPUS is supported.\n\n  @param[in] init_flags Bit flags that tell SMI how to initialze. Values of\n  ::amdsmi_init_flags_t may be OR'd together and passed through @p init_flags\n  to modify how AMDSMI initializes.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_init(init_flags: u64) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Shutdown the AMD SMI library\n\n  @platform{gpu_bm_linux}  @platform{host} @platform{cpu_bm}  @platform{guest_1vf}\n  @platform{guest_mvf} @platform{guest_windows}\n\n  @details This function shuts down the library and internal data structures and\n  performs any necessary clean ups.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_shut_down() -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the list of socket handles in the system.\n\n  @platform{gpu_bm_linux}  @platform{host} @platform{cpu_bm}  @platform{guest_1vf}\n  @platform{guest_mvf} @platform{guest_windows}\n\n  @details Depends on what flag is passed to ::amdsmi_init.  AMDSMI_INIT_AMD_GPUS\n  returns sockets with AMD GPUS, and AMDSMI_INIT_AMD_GPUS | AMDSMI_INIT_AMD_CPUS returns\n  sockets with either AMD GPUS or CPUS.\n  The socket handles can be used to query the processor handles in that socket, which\n  will be used in other APIs to get processor detail information or telemtries.\n\n  @param[in,out] socket_count As input, the value passed\n  through this parameter is the number of ::amdsmi_socket_handle that\n  may be safely written to the memory pointed to by @p socket_handles. This is the\n  limit on how many socket handles will be written to @p socket_handles. On return, @p\n  socket_count will contain the number of socket handles written to @p socket_handles,\n  or the number of socket handles that could have been written if enough memory had been\n  provided.\n  If @p socket_handles is NULL, as output, @p socket_count will contain\n  how many sockets are available to read in the system.\n\n  @param[in,out] socket_handles A pointer to a block of memory to which the\n  ::amdsmi_socket_handle values will be written. This value may be NULL.\n  In this case, this function can be used to query how many sockets are\n  available to read in the system.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_socket_handles(
        socket_count: *mut u32,
        socket_handles: *mut amdsmi_socket_handle,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the list of cpu handles in the system.\n\n  @platform{cpu_bm}\n\n  @details Depends on AMDSMI_INIT_AMD_CPUS flag passed to ::amdsmi_init.\n  The processor handles can be used in other APIs to get processor detail information.\n\n  @param[in,out] cpu_count As input, the value passed\n  through this parameter is the number of ::amdsmi_processor_handle that\n  may be safely written to the memory pointed to by @p processor_handles. This is the\n  limit on how many processor handles will be written to @p processor_handles. On return, @p\n  socket_count will contain the number of processor handles written to @p processor_handles,\n  or the number of processor handles that could have been written if enough memory had been\n  provided.\n  If @p processor_handles is NULL, as output, @p cpu_count will contain\n  how many processors are available to read in the system.\n\n  @param[in,out] socket_handles A pointer to a block of memory to which the\n  ::amdsmi_processor_handle values will be written. This value may be NULL.\n  In this case, this function can be used to query how many processors are\n  available to read in the system.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_handles(
        cpu_count: *mut u32,
        processor_handles: *mut amdsmi_processor_handle,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get information about the given socket\n\n  @platform{gpu_bm_linux}  @platform{host}  @platform{guest_1vf}\n  @platform{guest_mvf} @platform{guest_windows}\n\n  @details This function retrieves socket information. The @p socket_handle must\n  be provided to retrieve the Socket ID.\n\n  @param[in] socket_handle a socket handle\n\n  @param[out] name The id of the socket.\n\n  @param[in] len the length of the caller provided buffer @p name.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_socket_info(
        socket_handle: amdsmi_socket_handle,
        len: usize,
        name: *mut ::std::os::raw::c_char,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get information about the given processor\n\n  @platform{cpu_bm}\n\n  @details This function retrieves processor information. The @p processor_handle must\n  be provided to retrieve the processor ID.\n\n  @param[in] processor_handle a processor handle\n\n  @param[out] name The id of the processor.\n\n  @param[in] len the length of the caller provided buffer @p name.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_processor_info(
        processor_handle: amdsmi_processor_handle,
        len: usize,
        name: *mut ::std::os::raw::c_char,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get respective processor counts from the processor handles\n\n  @platform{cpu_bm}\n\n  @details This function retrieves respective processor counts information.\n  The @p processor_handle must be provided to retrieve the processor ID.\n\n  @param[in] processor_handles A pointer to a block of memory to which the\n  ::amdsmi_processor_handle values will be written. This value may be NULL.\n\n  @param[in] processor_count total processor count per socket\n\n  @param[out] nr_cpusockets Total number of cpu sockets\n\n  @param[out] nr_cpucores Total number of cpu cores\n\n  @param[out] nr_gpus Total number of gpu devices\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_processor_count_from_handles(
        processor_handles: *mut amdsmi_processor_handle,
        processor_count: *mut u32,
        nr_cpusockets: *mut u32,
        nr_cpucores: *mut u32,
        nr_gpus: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get processor list as per processor type\n\n  @platform{cpu_bm}\n\n  @details This function retrieves processor list as per the processor type\n  from the total processor handles list.\n  The @p list of processor_handles and processor type must be provided.\n\n  @param[in] socket_handle socket handle\n\n  @param[in] processor_type processor type\n\n  @param[out] processor_handles list of processor handles as per processor type\n\n  @param[out] processor_count processor count as per processor type selected\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_processor_handles_by_type(
        socket_handle: amdsmi_socket_handle,
        processor_type: processor_type_t,
        processor_handles: *mut amdsmi_processor_handle,
        processor_count: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the list of the processor handles associated to a socket.\n\n  @platform{gpu_bm_linux}  @platform{host} @platform{guest_1vf}\n  @platform{guest_mvf} @platform{guest_windows}\n\n  @details This function retrieves the processor handles of a socket. The\n  @p socket_handle must be provided for the processor. A socket may have mulitple different\n  type processors: An APU on a socket have both CPUs and GPUs.\n  Currently, only AMD GPUs are supported.\n\n  The number of processor count is returned through @p processor_count\n  if @p processor_handles is NULL. Then the number of @p processor_count can be pass\n  as input to retrieval all processors on the socket to @p processor_handles.\n\n  @param[in] socket_handle The socket to query\n\n  @param[in,out] processor_count As input, the value passed\n  through this parameter is the number of ::amdsmi_processor_handle's that\n  may be safely written to the memory pointed to by @p processor_handles. This is the\n  limit on how many processor handles will be written to @p processor_handles. On return, @p\n  processor_count will contain the number of processor handles written to @p processor_handles,\n  or the number of processor handles that could have been written if enough memory had been\n  provided.\n  If @p processor_handles is NULL, as output, @p processor_count will contain\n  how many processors are available to read for the socket.\n\n  @param[in,out] processor_handles A pointer to a block of memory to which the\n  ::amdsmi_processor_handle values will be written. This value may be NULL.\n  In this case, this function can be used to query how many processors are\n  available to read.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_processor_handles(
        socket_handle: amdsmi_socket_handle,
        processor_count: *mut u32,
        processor_handles: *mut amdsmi_processor_handle,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the list of the cpu core handles in a system.\n\n  @platform{cpu_bm}\n\n  @details This function retrieves the cpu core handles of a system.\n  @param[in,out] cores_count As input, the value passed\n  through this parameter is the number of ::amdsmi_processor_handle's that\n  may be safely written to the memory pointed to by @p processor_handles. This is the\n  limit on how many core handles will be written to @p processor_handles. On return, @p\n  cores_count will contain the number of core processor handles written to @p processor_handles,\n  or the number of core processor handles that could have been written if enough memory had been\n  provided.\n  If @p processor_handles is NULL, as output, @p processor_count will contain\n  how many cpu cores are available to read in the system.\n\n  @param[in,out] processor_handles A pointer to a block of memory to which the\n  ::amdsmi_processor_handle values will be written. This value may be NULL.\n  In this case, this function can be used to query how many processors are\n  available to read.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpucore_handles(
        cores_count: *mut u32,
        processor_handles: *mut amdsmi_processor_handle,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the processor type of the processor_handle\n\n  @platform{gpu_bm_linux}  @platform{host} @platform{cpu_bm}  @platform{guest_1vf}\n  @platform{guest_mvf} @platform{guest_windows}\n\n  @details This function retrieves the processor type. A processor_handle must be provided\n  for that processor.\n\n  @param[in] processor_handle a processor handle\n\n  @param[out] processor_type a pointer to processor_type_t to which the processor type\n  will be written. If this parameter is nullptr, this function will return\n ::AMDSMI_STATUS_INVAL.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_processor_type(
        processor_handle: amdsmi_processor_handle,
        processor_type: *mut processor_type_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get processor handle with the matching bdf.\n\n  @platform{gpu_bm_linux}  @platform{host} @platform{guest_1vf}\n  @platform{guest_mvf} @platform{guest_windows}\n\n  @details Given bdf info @p bdf, this function will get\n  the processor handle with the matching bdf.\n\n  @param[in] bdf The bdf to match with corresponding processor handle.\n\n  @param[out] processor_handle processor handle with the matching bdf.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_processor_handle_from_bdf(
        bdf: amdsmi_bdf_t,
        processor_handle: *mut amdsmi_processor_handle,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the device id associated with the device with provided device\n  handler.\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}  @platform{guest_mvf}\n\n  @details Given a processor handle @p processor_handle and a pointer to a uint32_t @p id,\n  this function will write the device id value to the uint64_t pointed to by\n  @p id. This ID is an identification of the type of device, so calling this\n  function for different devices will give the same value if they are kind\n  of device. Consequently, this function should not be used to distinguish\n  one device from another. amdsmi_get_gpu_bdf_id() should be used to get a\n  unique identifier.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] id a pointer to uint64_t to which the device id will be\n  written\n If this parameter is nullptr, this function will return\n ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_id(
        processor_handle: amdsmi_processor_handle,
        id: *mut u16,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the device revision associated with the device\n\n  @platform{gpu_bm_linux} @platform{guest_1vf}  @platform{guest_mvf}\n\n  @details Given a processor handle @p processor_handle and a pointer to a\n  uint16_t @p revision to which the revision id will be written\n\n  @param[in] processor_handle a processor handle\n\n  @param[out] revision a pointer to uint16_t to which the device revision\n  will be written\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_revision(
        processor_handle: amdsmi_processor_handle,
        revision: *mut u16,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the name string for a give vendor ID\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}  @platform{guest_mvf}\n\n  @details Given a processor handle @p processor_handle, a pointer to a caller provided\n  char buffer @p name, and a length of this buffer @p len, this function will\n  write the name of the vendor (up to @p len characters) buffer @p name. The\n  @p id may be a device vendor or subsystem vendor ID.\n\n  If the integer ID associated with the vendor is not found in one of the\n  system files containing device name information (e.g.\n  /usr/share/misc/pci.ids), then this function will return the hex vendor ID\n  as a string. Updating the system name files can be accompplished with\n  \"sudo update-pciids\".\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] name a pointer to a caller provided char buffer to which the\n  name will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @param[in] len the length of the caller provided buffer @p name.\n\n  @note ::AMDSMI_STATUS_INSUFFICIENT_SIZE is returned if @p len bytes is not\n  large enough to hold the entire name. In this case, only @p len bytes will\n  be written.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_vendor_name(
        processor_handle: amdsmi_processor_handle,
        name: *mut ::std::os::raw::c_char,
        len: usize,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the vram vendor string of a device.\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}  @platform{guest_mvf}\n\n  @details This function retrieves the vram vendor name given a processor handle\n  @p processor_handle, a pointer to a caller provided\n  char buffer @p brand, and a length of this buffer @p len, this function\n  will write the vram vendor of the device (up to @p len characters) to the\n  buffer @p brand.\n\n  If the vram vendor for the device is not found as one of the values\n  contained within amdsmi_get_gpu_vram_vendor, then this function will return\n  the string 'unknown' instead of the vram vendor.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] brand a pointer to a caller provided char buffer to which the\n  vram vendor will be written\n\n  @param[in] len the length of the caller provided buffer @p brand.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_vram_vendor(
        processor_handle: amdsmi_processor_handle,
        brand: *mut ::std::os::raw::c_char,
        len: u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the subsystem device id associated with the device with\n  provided processor handle.\n\n @platform{gpu_bm_linux} @platform{guest_1vf}  @platform{guest_mvf}\n\n  @details Given a processor handle @p processor_handle and a pointer to a uint32_t @p id,\n  this function will write the subsystem device id value to the uint64_t\n  pointed to by @p id.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] id a pointer to uint64_t to which the subsystem device id\n  will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_subsystem_id(
        processor_handle: amdsmi_processor_handle,
        id: *mut u16,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the name string for the device subsytem\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}  @platform{guest_mvf}\n\n  @details Given a processor handle @p processor_handle, a pointer to a caller provided\n  char buffer @p name, and a length of this buffer @p len, this function\n  will write the name of the device subsystem (up to @p len characters)\n  to the buffer @p name.\n\n  If the integer ID associated with the sub-system is not found in one of the\n  system files containing device name information (e.g.\n  /usr/share/misc/pci.ids), then this function will return the hex sub-system\n  ID as a string. Updating the system name files can be accompplished with\n  \"sudo update-pciids\".\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] name a pointer to a caller provided char buffer to which the\n  name will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @param[in] len the length of the caller provided buffer @p name.\n\n  @note ::AMDSMI_STATUS_INSUFFICIENT_SIZE is returned if @p len bytes is not\n  large enough to hold the entire name. In this case, only @p len bytes will\n  be written.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_subsystem_name(
        processor_handle: amdsmi_processor_handle,
        name: *mut ::std::os::raw::c_char,
        len: usize,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the list of possible PCIe bandwidths that are available. It is not\n  supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a pointer to a to an\n  ::amdsmi_pcie_bandwidth_t structure @p bandwidth, this function will fill in\n  @p bandwidth with the possible T/s values and associated number of lanes,\n  and indication of the current selection.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] bandwidth a pointer to a caller provided\n  ::amdsmi_pcie_bandwidth_t structure to which the frequency information will be\n  written\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_pci_bandwidth(
        processor_handle: amdsmi_processor_handle,
        bandwidth: *mut amdsmi_pcie_bandwidth_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the unique PCI device identifier associated for a device\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}\n\n  @details Give a processor handle @p processor_handle and a pointer to a uint64_t @p\n  bdfid, this function will write the Bus/Device/Function PCI identifier\n  (BDFID) associated with device @p processor_handle to the value pointed to by\n  @p bdfid.\n\n  The format of @p bdfid will be as follows:\n\n      BDFID = ((DOMAIN & 0xFFFFFFFF) << 32) | ((Partition & 0xF) << 28)\n              | ((BUS & 0xFF) << 8) | ((DEVICE & 0x1F) <<3 )\n              | (FUNCTION & 0x7)\n\n  | Name         | Field   | KFD property       KFD -> PCIe ID (uint64_t)\n  -------------- | ------- | ---------------- | ---------------------------- |\n  | Domain       | [63:32] | \"domain\"         | (DOMAIN & 0xFFFFFFFF) << 32  |\n  | Partition id | [31:28] | \"location id\"    | (LOCATION & 0xF0000000)      |\n  | Reserved     | [27:16] | \"location id\"    | N/A                          |\n  | Bus          | [15: 8] | \"location id\"    | (LOCATION & 0xFF00)          |\n  | Device       | [ 7: 3] | \"location id\"    | (LOCATION & 0xF8)            |\n  | Function     | [ 2: 0] | \"location id\"    | (LOCATION & 0x7)             |\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] bdfid a pointer to uint64_t to which the device bdfid value\n  will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_bdf_id(
        processor_handle: amdsmi_processor_handle,
        bdfid: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the NUMA node associated with a device\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a pointer to a int32_t @p\n  numa_node, this function will retrieve the NUMA node value associated\n  with device @p processor_handle and store the value at location pointed to by\n  @p numa_node.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] numa_node pointer to location where NUMA node value will\n  be written.\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_topo_numa_affinity(
        processor_handle: amdsmi_processor_handle,
        numa_node: *mut i32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get PCIe traffic information. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Give a processor handle @p processor_handle and pointers to a uint64_t's, @p\n  sent, @p received and @p max_pkt_sz, this function will write the number\n  of bytes sent and received in 1 second to @p sent and @p received,\n  respectively. The maximum possible packet size will be written to\n  @p max_pkt_sz.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] sent a pointer to uint64_t to which the number of bytes sent\n  will be written in 1 second. If pointer is NULL, it will be ignored.\n\n  @param[in,out] received a pointer to uint64_t to which the number of bytes\n  received will be written. If pointer is NULL, it will be ignored.\n\n  @param[in,out] max_pkt_sz a pointer to uint64_t to which the maximum packet\n  size will be written. If pointer is NULL, it will be ignored.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_pci_throughput(
        processor_handle: amdsmi_processor_handle,
        sent: *mut u64,
        received: *mut u64,
        max_pkt_sz: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get PCIe replay counter\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a pointer to a uint64_t @p\n  counter, this function will write the sum of the number of NAK's received\n  by the GPU and the NAK's generated by the GPU to memory pointed to by @p\n  counter.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] counter a pointer to uint64_t to which the sum of the NAK's\n  received and generated by the GPU is written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_pci_replay_counter(
        processor_handle: amdsmi_processor_handle,
        counter: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Control the set of allowed PCIe bandwidths that can be used. It is not\n  supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a 64 bit bitmask @p bw_bitmask,\n  this function will limit the set of allowable bandwidths. If a bit in @p\n  bw_bitmask has a value of 1, then the frequency (as ordered in an\n  ::amdsmi_frequencies_t returned by :: amdsmi_get_clk_freq()) corresponding\n  to that bit index will be allowed.\n\n  This function will change the performance level to\n  ::AMDSMI_DEV_PERF_LEVEL_MANUAL in order to modify the set of allowable\n  band_widths. Caller will need to set to ::AMDSMI_DEV_PERF_LEVEL_AUTO in order\n  to get back to default state.\n\n  All bits with indices greater than or equal to the value of the\n  ::amdsmi_frequencies_t::num_supported field of ::amdsmi_pcie_bandwidth_t will be\n  ignored.\n\n  @note This function requires root access\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] bw_bitmask A bitmask indicating the indices of the\n  bandwidths that are to be enabled (1) and disabled (0). Only the lowest\n  ::amdsmi_frequencies_t::num_supported (of ::amdsmi_pcie_bandwidth_t) bits of\n  this mask are relevant.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_pci_bandwidth(
        processor_handle: amdsmi_processor_handle,
        bw_bitmask: u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the energy accumulator counter of the processor with provided\n  processor handle. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, a pointer to a uint64_t\n  @p energy_accumulator, and a pointer to a uint64_t @p timestamp, this function\n  will write amount of energy consumed to the uint64_t pointed to by\n  @p energy_accumulator, and the timestamp to the uint64_t pointed to by @p timestamp.\n  This function accumulates all energy consumed.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] energy_accumulator a pointer to uint64_t to which the energy\n  counter will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @param[in,out] counter_resolution resolution of the counter @p energy_accumulator in\n  micro Joules\n\n  @param[in,out] timestamp a pointer to uint64_t to which the timestamp\n  will be written. Resolution: 1 ns.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_energy_count(
        processor_handle: amdsmi_processor_handle,
        energy_accumulator: *mut u64,
        counter_resolution: *mut f32,
        timestamp: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "/\n/** @defgroup PowerCont Power Control\n  These functions provide ways to control power usage.\n  @{\n/\n/**\n  @brief Set the maximum gpu power cap value. It is not supported on virtual\n  machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details This function will set the power cap to the provided value @p cap.\n  @p cap must be between the minimum and maximum power cap values set by the\n  system, which can be obtained from ::amdsmi_dev_power_cap_range_get.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_ind a 0-based sensor index. Normally, this will be 0.\n  If a processor has more than one sensor, it could be greater than 0.\n\n  @param[in] cap a uint64_t that indicates the desired power cap, in\n  microwatts\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_power_cap(
        processor_handle: amdsmi_processor_handle,
        sensor_ind: u32,
        cap: u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set the power performance profile. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details This function will attempt to set the current profile to the provided\n  profile, given a processor handle @p processor_handle and a @p profile. The provided\n  profile must be one of the currently supported profiles, as indicated by a\n  call to :: amdsmi_get_gpu_power_profile_presets()\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] reserved Not currently used. Set to 0.\n\n  @param[in] profile a ::amdsmi_power_profile_preset_masks_t that hold the mask\n  of the desired new power profile\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_power_profile(
        processor_handle: amdsmi_processor_handle,
        reserved: u32,
        profile: amdsmi_power_profile_preset_masks_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the total amount of memory that exists\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}  @platform{guest_mvf}\n\n  @details Given a processor handle @p processor_handle, a type of memory @p mem_type, and\n  a pointer to a uint64_t @p total, this function will write the total amount\n  of @p mem_type memory that exists to the location pointed to by @p total.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] mem_type The type of memory for which the total amount will be\n  found\n\n  @param[in,out] total a pointer to uint64_t to which the total amount of\n  memory will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_memory_total(
        processor_handle: amdsmi_processor_handle,
        mem_type: amdsmi_memory_type_t,
        total: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the current memory usage\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}  @platform{guest_mvf}\n\n  @details This function will write the amount of @p mem_type memory that\n  that is currently being used to the location pointed to by @p used.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] mem_type The type of memory for which the amount being used will\n  be found\n\n  @param[in,out] used a pointer to uint64_t to which the amount of memory\n  currently being used will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_memory_usage(
        processor_handle: amdsmi_processor_handle,
        mem_type: amdsmi_memory_type_t,
        used: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the bad pages of a processor. It is not supported on virtual\n machine guest\n\n @platform{gpu_bm_linux} @platform{host}\n\n @details This call will query the device @p processor_handle for the\n number of bad pages (written to @p num_pages address). The results are\n written to address held by the @p info pointer.\n The first call to this API returns the number of bad pages which\n should be used to allocate the buffer that should contain the bad page\n records.\n @param[in] processor_handle a processor handle\n @param[out] num_pages Number of bad page records.\n @param[out] info The results will be written to the\n amdsmi_retired_page_record_t pointer.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_bad_page_info(
        processor_handle: amdsmi_processor_handle,
        num_pages: *mut u32,
        info: *mut amdsmi_retired_page_record_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Returns RAS features info.\n\n  @platform{gpu_bm_linux}  @platform{host}\n\n  @param[in] processor_handle Device handle which to query\n\n  @param[out] ras_feature RAS features that are currently enabled and supported on\n  the processor. Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_ras_feature_info(
        processor_handle: amdsmi_processor_handle,
        ras_feature: *mut amdsmi_ras_feature_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Returns if RAS features are enabled or disabled for given block. It is not\n supported on virtual machine guest\n\n @platform{gpu_bm_linux}\n\n @details Given a processor handle @p processor_handle, this function queries the\n state of RAS features for a specific block @p block. Result will be written\n to address held by pointer @p state.\n\n @param[in] processor_handle Device handle which to query\n\n @param[in] block Block which to query\n\n @param[in,out] state A pointer to amdsmi_ras_err_state_t to which the state\n of block will be written.\n If this parameter is nullptr, this function will return\n ::AMDSMI_STATUS_INVAL if the function is supported with the provided\n arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_ras_block_features_enabled(
        processor_handle: amdsmi_processor_handle,
        block: amdsmi_gpu_block_t,
        state: *mut amdsmi_ras_err_state_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get information about reserved (\"retired\") memory pages. It is not supported on\n  virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, this function returns retired page\n  information @p records corresponding to the device with the provided processor\n  handle @p processor_handle. The number of retired page records is returned through @p\n  num_pages. @p records may be NULL on input. In this case, the number of\n  records available for retrieval will be returned through @p num_pages.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] num_pages a pointer to a uint32. As input, the value passed\n  through this parameter is the number of ::amdsmi_retired_page_record_t's that\n  may be safely written to the memory pointed to by @p records. This is the\n  limit on how many records will be written to @p records. On return, @p\n  num_pages will contain the number of records written to @p records, or the\n  number of records that could have been written if enough memory had been\n  provided.\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @param[in,out] records A pointer to a block of memory to which the\n  ::amdsmi_retired_page_record_t values will be written. This value may be NULL.\n  In this case, this function can be used to query how many records are\n  available to read.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_memory_reserved_pages(
        processor_handle: amdsmi_processor_handle,
        num_pages: *mut u32,
        records: *mut amdsmi_retired_page_record_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the fan speed in RPMs of the device with the specified processor\n  handle and 0-based sensor index. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a pointer to a uint32_t\n  @p speed, this function will write the current fan speed in RPMs to the\n  uint32_t pointed to by @p speed\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_ind a 0-based sensor index. Normally, this will be 0.\n  If a device has more than one sensor, it could be greater than 0.\n\n  @param[in,out] speed a pointer to uint32_t to which the speed will be\n  written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_fan_rpms(
        processor_handle: amdsmi_processor_handle,
        sensor_ind: u32,
        speed: *mut i64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the fan speed for the specified device as a value relative to\n  ::AMDSMI_MAX_FAN_SPEED. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a pointer to a uint32_t\n  @p speed, this function will write the current fan speed (a value\n  between 0 and the maximum fan speed, ::AMDSMI_MAX_FAN_SPEED) to the uint32_t\n  pointed to by @p speed\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_ind a 0-based sensor index. Normally, this will be 0.\n  If a device has more than one sensor, it could be greater than 0.\n\n  @param[in,out] speed a pointer to uint32_t to which the speed will be\n  written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_fan_speed(
        processor_handle: amdsmi_processor_handle,
        sensor_ind: u32,
        speed: *mut i64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the max. fan speed of the device with provided processor handle. It is\n  not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a pointer to a uint32_t\n  @p max_speed, this function will write the maximum fan speed possible to\n  the uint32_t pointed to by @p max_speed\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_ind a 0-based sensor index. Normally, this will be 0.\n  If a device has more than one sensor, it could be greater than 0.\n\n  @param[in,out] max_speed a pointer to uint32_t to which the maximum speed\n  will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_fan_speed_max(
        processor_handle: amdsmi_processor_handle,
        sensor_ind: u32,
        max_speed: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the temperature metric value for the specified metric, from the\n  specified temperature sensor on the specified device. It is not supported on\n  virtual machine guest\n\n  @platform{gpu_bm_linux} @platform{host}\n\n  @details Given a processor handle @p processor_handle, a sensor type @p sensor_type, a\n  ::amdsmi_temperature_metric_t @p metric and a pointer to an int64_t @p\n  temperature, this function will write the value of the metric indicated by\n  @p metric and @p sensor_type to the memory location @p temperature.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_type part of device from which temperature should be\n  obtained. This should come from the enum ::amdsmi_temperature_type_t\n\n  @param[in] metric enum indicated which temperature value should be\n  retrieved\n\n  @param[in,out] temperature a pointer to int64_t to which the temperature\n  will be written, in millidegrees Celcius.\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_temp_metric(
        processor_handle: amdsmi_processor_handle,
        sensor_type: amdsmi_temperature_type_t,
        metric: amdsmi_temperature_metric_t,
        temperature: *mut i64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Returns gpu cache info.\n\n  @platform{gpu_bm_linux}  @platform{host}\n\n  @param[in] processor_handle PF of a processor for which to query\n\n  @param[out] info reference to the cache info struct.\n  Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_cache_info(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_gpu_cache_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the voltage metric value for the specified metric, from the\n  specified voltage sensor on the specified device. It is not supported on\n  virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, a sensor type @p sensor_type, a\n  ::amdsmi_voltage_metric_t @p metric and a pointer to an int64_t @p\n  voltage, this function will write the value of the metric indicated by\n  @p metric and @p sensor_type to the memory location @p voltage.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_type part of device from which voltage should be\n  obtained. This should come from the enum ::amdsmi_voltage_type_t\n\n  @param[in] metric enum indicated which voltage value should be\n  retrieved\n\n  @param[in,out] voltage a pointer to int64_t to which the voltage\n  will be written, in millivolts.\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_volt_metric(
        processor_handle: amdsmi_processor_handle,
        sensor_type: amdsmi_voltage_type_t,
        metric: amdsmi_voltage_metric_t,
        voltage: *mut i64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Reset the fan to automatic driver control. It is not supported on virtual\n  machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details This function returns control of the fan to the system\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_ind a 0-based sensor index. Normally, this will be 0.\n  If a device has more than one sensor, it could be greater than 0.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_reset_gpu_fan(
        processor_handle: amdsmi_processor_handle,
        sensor_ind: u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set the fan speed for the specified device with the provided speed,\n  in RPMs. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a integer value indicating\n  speed @p speed, this function will attempt to set the fan speed to @p speed.\n  An error will be returned if the specified speed is outside the allowable\n  range for the device. The maximum value is 255 and the minimum is 0.\n\n  @note This function requires root access\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_ind a 0-based sensor index. Normally, this will be 0.\n  If a device has more than one sensor, it could be greater than 0.\n\n  @param[in] speed the speed to which the function will attempt to set the fan\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_fan_speed(
        processor_handle: amdsmi_processor_handle,
        sensor_ind: u32,
        speed: u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get coarse grain utilization counter of the specified device\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, the array of the utilization counters,\n  the size of the array, this function returns the coarse grain utilization counters\n  and timestamp.\n  The counter is the accumulated percentages. Every milliseconds the firmware calculates\n  % busy count and then accumulates that value in the counter. This provides minimally\n  invasive coarse grain GPU usage information.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] utilization_counters Multiple utilization counters can be retreived with a single\n  call. The caller must allocate enough space to the utilization_counters array. The caller also\n  needs to set valid AMDSMI_UTILIZATION_COUNTER_TYPE type for each element of the array.\n  ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.\n\n  If the function reutrns AMDSMI_STATUS_SUCCESS, the counter will be set in the value field of\n  the amdsmi_utilization_counter_t.\n\n  @param[in] count The size of @p utilization_counters array.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_utilization_count(
        processor_handle: amdsmi_processor_handle,
        utilization_counters: *mut amdsmi_utilization_counter_t,
        count: u32,
        timestamp: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the performance level of the device. It is not supported on virtual\n  machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details This function will write the ::amdsmi_dev_perf_level_t to the uint32_t\n  pointed to by @p perf, for a given processor handle @p processor_handle and a pointer\n  to a uint32_t @p perf.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] perf a pointer to ::amdsmi_dev_perf_level_t to which the\n  performance level will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_perf_level(
        processor_handle: amdsmi_processor_handle,
        perf: *mut amdsmi_dev_perf_level_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Enter performance determinism mode with provided processor handle. It is\n  not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and @p clkvalue this function\n  will enable performance determinism mode, which enforces a GFXCLK frequency\n  SoftMax limit per GPU set by the user. This prevents the GFXCLK PLL from\n  stretching when running the same workload on different GPUS, making\n  performance variation minimal. This call will result in the performance\n  level ::amdsmi_dev_perf_level_t of the device being\n  ::AMDSMI_DEV_PERF_LEVEL_DETERMINISM.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] clkvalue Softmax value for GFXCLK in MHz.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_perf_determinism_mode(
        processor_handle: amdsmi_processor_handle,
        clkvalue: u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the overdrive percent associated with the device with provided\n  processor handle. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a pointer to a uint32_t @p od,\n  this function will write the overdrive percentage to the uint32_t pointed\n  to by @p od\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] od a pointer to uint32_t to which the overdrive percentage\n  will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_overdrive_level(
        processor_handle: amdsmi_processor_handle,
        od: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the GPU memory clock overdrive percent associated with the device with provided\n  processor handle. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a pointer to a uint32_t @p od,\n  this function will write the overdrive percentage to the uint32_t pointed\n  to by @p od\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] od a pointer to uint32_t to which the GPU memory clock overdrive percentage\n  will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_mem_overdrive_level(
        processor_handle: amdsmi_processor_handle,
        od: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the list of possible system clock speeds of device for a\n  specified clock type. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}\n\n  @details Given a processor handle @p processor_handle, a clock type @p clk_type, and a\n  pointer to a to an ::amdsmi_frequencies_t structure @p f, this function will\n  fill in @p f with the possible clock speeds, and indication of the current\n  clock speed selection.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] clk_type the type of clock for which the frequency is desired\n\n  @param[in,out] f a pointer to a caller provided ::amdsmi_frequencies_t structure\n  to which the frequency information will be written. Frequency values are in\n  Hz.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_clk_freq(
        processor_handle: amdsmi_processor_handle,
        clk_type: amdsmi_clk_type_t,
        f: *mut amdsmi_frequencies_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Reset the gpu associated with the device with provided processor handle. It is not\n  supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, this function will reset the GPU\n\n  @param[in] processor_handle a processor handle\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_reset_gpu(processor_handle: amdsmi_processor_handle) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief This function retrieves the overdrive GFX & MCLK information. If valid\n  for the GPU it will also populate the voltage curve data. It is not supported\n  on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a pointer to a\n  ::amdsmi_od_volt_freq_data_t structure @p odv, this function will populate @p\n  odv. See ::amdsmi_od_volt_freq_data_t for more details.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] odv a pointer to an ::amdsmi_od_volt_freq_data_t structure\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_od_volt_info(
        processor_handle: amdsmi_processor_handle,
        odv: *mut amdsmi_od_volt_freq_data_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the 'metrics_header_info' from the GPU metrics associated with the device\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}\n\n  @details Given a processor handle @p processor_handle and a pointer to a amd_metrics_table_header_t in which\n  the 'metrics_header_info' will stored\n\n  @param[in] processor_handle Device which to query\n\n  @param[inout] header_value a pointer to amd_metrics_table_header_t to which the device gpu\n  metric unit will be stored\n\n  @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call.\n          ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit\n            does not exist for the given device\n"]
    pub fn amdsmi_get_gpu_metrics_header_info(
        processor_handle: amdsmi_processor_handle,
        header_value: *mut amd_metrics_table_header_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief This function retrieves the gpu metrics information. It is not supported\n  on virtual machine guest\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}\n\n  @details Given a processor handle @p processor_handle and a pointer to a\n  ::amdsmi_gpu_metrics_t structure @p pgpu_metrics, this function will populate\n  @p pgpu_metrics. See ::amdsmi_gpu_metrics_t for more details.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] pgpu_metrics a pointer to an ::amdsmi_gpu_metrics_t structure\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_metrics_info(
        processor_handle: amdsmi_processor_handle,
        pgpu_metrics: *mut amdsmi_gpu_metrics_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the pm metrics table with provided device index.\n\n  @platform{gpu_bm_linux}\n\n  @details Given a device handle @p processor_handle, @p pm_metrics pointer,\n  and @p num_of_metrics pointer,\n  this function will write the pm metrics name value pair\n  to the array at @p pm_metrics and the number of metrics retreived to @p num_of_metrics\n  Note: the library allocated memory for pm_metrics, and user must call\n  free(pm_metrics) to free it after use.\n\n  @param[in] processor_handle a processor handle\n\n  @param[inout] pm_metrics A pointerto an array to hold multiple PM metrics. On successs,\n  the library will allocate memory of pm_metrics and write metrics to this array.\n  The caller must free this memory after usage to avoid memory leak.\n\n  @param[inout] num_of_metrics a pointer to uint32_t to which the number of\n  metrics is allocated for pm_metrics array as input, and the number of metrics retreived\n  as output. If this parameter is NULL, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @retval ::AMDSMI_STATUS_SUCCESS call was successful\n  @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not\n  support this function with the given arguments\n  @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid\n"]
    pub fn amdsmi_get_gpu_pm_metrics_info(
        processor_handle: amdsmi_processor_handle,
        pm_metrics: *mut *mut amdsmi_name_value_t,
        num_of_metrics: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the register metrics table with provided device index and register type.\n\n  @platform{gpu_bm_linux}\n\n  @details Given a device handle @p processor_handle, @p reg_type, @p reg_metrics pointer,\n  and @p num_of_metrics pointer,\n  this function will write the register metrics name value pair\n  to the array at @p reg_metrics and the number of metrics retreived to @p num_of_metrics\n  Note: the library allocated memory for reg_metrics, and user must call\n  free(reg_metrics) to free it after use.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] reg_type The register type\n\n  @param[inout] reg_metrics A pointerto an array to hold multiple register metrics. On successs,\n  the library will allocate memory of reg_metrics and write metrics to this array.\n  The caller must free this memory after usage to avoid memory leak.\n\n  @param[inout] num_of_metrics a pointer to uint32_t to which the number of\n  metrics is allocated for reg_metrics array as input, and the number of metrics retreived\n  as output. If this parameter is NULL, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @retval ::AMDSMI_STATUS_SUCCESS call was successful\n  @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not\n  support this function with the given arguments\n  @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid\n"]
    pub fn amdsmi_get_gpu_reg_table_info(
        processor_handle: amdsmi_processor_handle,
        reg_type: amdsmi_reg_type_t,
        reg_metrics: *mut *mut amdsmi_name_value_t,
        num_of_metrics: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief This function sets the clock range information. It is not supported on virtual\n  machine guest\n\n  @deprecated ::amdsmi_set_gpu_clk_limit() should be used, with an\n  interface that set the min_value and then max_value.\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, a minimum clock value @p minclkvalue,\n  a maximum clock value @p maxclkvalue and a clock type @p clkType this function\n  will set the sclk|mclk range\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] minclkvalue value to apply to the clock range. Frequency values\n  are in MHz.\n\n  @param[in] maxclkvalue value to apply to the clock range. Frequency values\n  are in MHz.\n\n  @param[in] clkType AMDSMI_CLK_TYPE_SYS | AMDSMI_CLK_TYPE_MEM range type\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_clk_range(
        processor_handle: amdsmi_processor_handle,
        minclkvalue: u64,
        maxclkvalue: u64,
        clkType: amdsmi_clk_type_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief This function sets the clock sets the clock min/max level\n\n  @platform{gpu_bm_linux} @platform{guest_1vf}\n\n  @details Given a processor handle @p processor_handle, a clock type @p clk_type,\n  a value @p clk_value needs to be set, and the @p level indicates min or max\n  clock you want to set, this function the clock limit.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] clk_type AMDSMI_CLK_TYPE_SYS, AMDSMI_CLK_TYPE_MEM and so on\n\n  @param[in] limit_type AMDSMI_FREQ_IND_MIN|AMDSMI_FREQ_IND_MAX to set the\n  minimum (0) or maximum (1) speed.\n\n  @param[in] clk_value value to apply to. Frequency values are in MHz.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_clk_limit(
        processor_handle: amdsmi_processor_handle,
        clk_type: amdsmi_clk_type_t,
        limit_type: amdsmi_clk_limit_type_t,
        clk_value: u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Frees heap memory allocated by reg_table and pm_metrics\n\n  @platform{gpu_bm_linux}\n\n  @details Frees heap memory.\n\n  @param[in] p a pointer to the memory to free.\n"]
    pub fn amdsmi_free_name_value_pairs(p: *mut ::std::os::raw::c_void);
}
unsafe extern "C" {
    #[doc = "  @brief This function sets the clock frequency information. It is not supported on\n  virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, a frequency level @p level,\n  a clock value @p clkvalue and a clock type @p clkType this function\n  will set the sclk|mclk range\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] level AMDSMI_FREQ_IND_MIN|AMDSMI_FREQ_IND_MAX to set the\n  minimum (0) or maximum (1) speed.\n\n  @param[in] clkvalue value to apply to the clock range. Frequency values\n  are in MHz.\n\n  @param[in] clkType AMDSMI_CLK_TYPE_SYS | AMDSMI_CLK_TYPE_MEM range type\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_od_clk_info(
        processor_handle: amdsmi_processor_handle,
        level: amdsmi_freq_ind_t,
        clkvalue: u64,
        clkType: amdsmi_clk_type_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief This function sets  1 of the 3 voltage curve points. It is not supported\n  on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, a voltage point @p vpoint\n  and a voltage value @p voltvalue this function will set voltage curve point\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] vpoint voltage point [0|1|2] on the voltage curve\n\n  @param[in] clkvalue clock value component of voltage curve point.\n  Frequency values are in MHz.\n\n  @param[in] voltvalue voltage value component of voltage curve point.\n  Voltage is in mV.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_od_volt_info(
        processor_handle: amdsmi_processor_handle,
        vpoint: u32,
        clkvalue: u64,
        voltvalue: u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief This function will retrieve the current valid regions in the\n  frequency/voltage space. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, a pointer to an unsigned integer\n  @p num_regions and a buffer of ::amdsmi_freq_volt_region_t structures, @p\n  buffer, this function will populate @p buffer with the current\n  frequency-volt space regions. The caller should assign @p buffer to memory\n  that can be written to by this function. The caller should also\n  indicate the number of ::amdsmi_freq_volt_region_t structures that can safely\n  be written to @p buffer in @p num_regions.\n\n  The number of regions to expect this function provide (@p num_regions) can\n  be obtained by calling :: amdsmi_get_gpu_od_volt_info().\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] num_regions As input, this is the number of\n  ::amdsmi_freq_volt_region_t structures that can be written to @p buffer. As\n  output, this is the number of ::amdsmi_freq_volt_region_t structures that were\n  actually written.\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @param[in,out] buffer a caller provided buffer to which\n  ::amdsmi_freq_volt_region_t structures will be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_od_volt_curve_regions(
        processor_handle: amdsmi_processor_handle,
        num_regions: *mut u32,
        buffer: *mut amdsmi_freq_volt_region_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the list of available preset power profiles and an indication of\n  which profile is currently active. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a pointer to a\n  ::amdsmi_power_profile_status_t @p status, this function will set the bits of\n  the ::amdsmi_power_profile_status_t.available_profiles bit field of @p status to\n  1 if the profile corresponding to the respective\n  ::amdsmi_power_profile_preset_masks_t profiles are enabled. For example, if both\n  the VIDEO and VR power profiles are available selections, then\n  ::AMDSMI_PWR_PROF_PRST_VIDEO_MASK AND'ed with\n  ::amdsmi_power_profile_status_t.available_profiles will be non-zero as will\n  ::AMDSMI_PWR_PROF_PRST_VR_MASK AND'ed with\n  ::amdsmi_power_profile_status_t.available_profiles. Additionally,\n  ::amdsmi_power_profile_status_t.current will be set to the\n  ::amdsmi_power_profile_preset_masks_t of the profile that is currently active.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] sensor_ind a 0-based sensor index. Normally, this will be 0.\n  If a device has more than one sensor, it could be greater than 0.\n\n  @param[in,out] status a pointer to ::amdsmi_power_profile_status_t that will be\n  populated by a call to this function\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_power_profile_presets(
        processor_handle: amdsmi_processor_handle,
        sensor_ind: u32,
        status: *mut amdsmi_power_profile_status_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set the PowerPlay performance level associated with the device with\n  provided processor handle with the provided value. It is not supported\n  on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and an ::amdsmi_dev_perf_level_t @p\n  perf_level, this function will set the PowerPlay performance level for the\n  device to the value @p perf_lvl.\n\n  @note This function requires root access\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] perf_lvl the value to which the performance level should be set\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_perf_level(
        processor_handle: amdsmi_processor_handle,
        perf_lvl: amdsmi_dev_perf_level_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set the overdrive percent associated with the device with provided\n  processor handle with the provided value. See details for WARNING. It is\n  not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and an overdrive level @p od,\n  this function will set the overdrive level for the device to the value\n  @p od. The overdrive level is an integer value between 0 and 20, inclusive,\n  which represents the overdrive percentage; e.g., a value of 5 specifies\n  an overclocking of 5%.\n\n  The overdrive level is specific to the gpu system clock.\n\n  The overdrive level is the percentage above the maximum Performance Level\n  to which overclocking will be limited. The overclocking percentage does\n  not apply to clock speeds other than the maximum. This percentage is\n  limited to 20%.\n\n   ******WARNING******\n  Operating your AMD GPU outside of official AMD specifications or outside of\n  factory settings, including but not limited to the conducting of\n  overclocking (including use of this overclocking software, even if such\n  software has been directly or indirectly provided by AMD or otherwise\n  affiliated in any way with AMD), may cause damage to your AMD GPU, system\n  components and/or result in system failure, as well as cause other problems.\n  DAMAGES CAUSED BY USE OF YOUR AMD GPU OUTSIDE OF OFFICIAL AMD SPECIFICATIONS\n  OR OUTSIDE OF FACTORY SETTINGS ARE NOT COVERED UNDER ANY AMD PRODUCT\n  WARRANTY AND MAY NOT BE COVERED BY YOUR BOARD OR SYSTEM MANUFACTURER'S\n  WARRANTY. Please use this utility with caution.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] od the value to which the overdrive level should be set\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_overdrive_level(
        processor_handle: amdsmi_processor_handle,
        od: u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Control the set of allowed frequencies that can be used for the\n specified clock. It is not supported on virtual machine guest\n\n @platform{gpu_bm_linux}\n\n @details Given a processor handle @p processor_handle, a clock type @p clk_type, and a\n 64 bit bitmask @p freq_bitmask, this function will limit the set of\n allowable frequencies. If a bit in @p freq_bitmask has a value of 1, then\n the frequency (as ordered in an ::amdsmi_frequencies_t returned by\n  amdsmi_get_clk_freq()) corresponding to that bit index will be\n allowed.\n\n This function will change the performance level to\n ::AMDSMI_DEV_PERF_LEVEL_MANUAL in order to modify the set of allowable\n frequencies. Caller will need to set to ::AMDSMI_DEV_PERF_LEVEL_AUTO in order\n to get back to default state.\n\n All bits with indices greater than or equal to\n ::amdsmi_frequencies_t::num_supported will be ignored.\n\n  @note This function requires root access\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] clk_type the type of clock for which the set of frequencies\n  will be modified\n\n  @param[in] freq_bitmask A bitmask indicating the indices of the\n  frequencies that are to be enabled (1) and disabled (0). Only the lowest\n  ::amdsmi_frequencies_t.num_supported bits of this mask are relevant.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_clk_freq(
        processor_handle: amdsmi_processor_handle,
        clk_type: amdsmi_clk_type_t,
        freq_bitmask: u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the soc pstate policy for the processor\n\n @platform{gpu_bm_linux} @platform{guest_1vf}\n\n @details Given a processor handle @p processor_handle, this function will write\n current soc pstate  policy settings to @p policy. All the processors at the same socket\n will have the same policy.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in, out] policy the soc pstate  policy for this processor.\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_soc_pstate(
        processor_handle: amdsmi_processor_handle,
        policy: *mut amdsmi_dpm_policy_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Set the soc pstate  policy for the processor\n\n @platform{gpu_bm_linux} @platform{guest_1vf}\n\n @details Given a processor handle @p processor_handle and a soc pstate  policy @p policy_id,\n this function will set the soc pstate  policy for this processor. All the processors at\n the same socket will be set to the same policy.\n\n  @note This function requires root access\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] policy_id the soc pstate  policy id to set. The id is the id in\n  amdsmi_dpm_policy_entry_t, which can be obtained by calling\n  amdsmi_get_soc_pstate()\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_soc_pstate(
        processor_handle: amdsmi_processor_handle,
        policy_id: u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the xgmi per-link power down policy parameter for the processor\n\n @platform{gpu_bm_linux}\n\n @details Given a processor handle @p processor_handle, this function will write\n current xgmi plpd settings to @p policy. All the processors at the same socket\n will have the same policy.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in, out] policy the xgmi plpd for this processor.\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_xgmi_plpd(
        processor_handle: amdsmi_processor_handle,
        xgmi_plpd: *mut amdsmi_dpm_policy_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Set the xgmi per-link power down policy parameter for the processor\n\n @platform{gpu_bm_linux}\n\n @details Given a processor handle @p processor_handle and a dpm policy @p plpd_id,\n this function will set the xgmi plpd for this processor. All the processors at\n the same socket will be set to the same policy.\n\n  @note This function requires root access\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] xgmi_plpd_id the xgmi plpd id to set. The id is the id in\n  amdsmi_dpm_policy_entry_t, which can be obtained by calling\n  amdsmi_get_xgmi_plpd()\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_xgmi_plpd(
        processor_handle: amdsmi_processor_handle,
        plpd_id: u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the status of the Process Isolation\n\n @platform{gpu_bm_linux} @platform{guest_1vf}\n\n @details Given a processor handle @p processor_handle, this function will write\n current process isolation status to @p pisolate. The 0 is the process isolation\n disabled, and the 1 is the process isolation enabled.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in, out] pisolate the process isolation status.\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_process_isolation(
        processor_handle: amdsmi_processor_handle,
        pisolate: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Enable/disable the system Process Isolation\n\n @platform{gpu_bm_linux} @platform{guest_1vf}\n\n @details Given a processor handle @p processor_handle and a process isolation @p pisolate,\n flag, this function will set the Process Isolation for this processor. The 0 is the process\n isolation disabled, and the 1 is the process isolation enabled.\n\n  @note This function requires root access\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] pisolate the process isolation status to set.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_process_isolation(
        processor_handle: amdsmi_processor_handle,
        pisolate: u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Clean up local data in LDS/GPRs\n\n @platform{gpu_bm_linux} @platform{guest_1vf}\n\n @details Given a processor handle @p processor_handle,\n this function will clean the local data of this processor. This can be called between\n user logins to prevent information leak.\n\n  @note This function requires root access\n\n  @param[in] processor_handle a processor handle\n\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_clean_gpu_local_data(
        processor_handle: amdsmi_processor_handle,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Get the build version information for the currently running build of\n AMDSMI.\n\n @platform{gpu_bm_linux} @platform{cpu_bm}  @platform{guest_1vf}  @platform{guest_mvf}\n\n @details  Get the major, minor, patch and build string for AMDSMI build\n currently in use through @p version\n\n @param[in,out] version A pointer to an ::amdsmi_version_t structure that will\n be updated with the version information upon return.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_lib_version(version: *mut amdsmi_version_t) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Retrieve the error counts for a GPU block. It is not supported on virtual\n  machine guest\n\n  @platform{gpu_bm_linux}  @platform{host}\n\n  @details Given a processor handle @p processor_handle, an ::amdsmi_gpu_block_t @p block and a\n  pointer to an ::amdsmi_error_count_t @p ec, this function will write the error\n  count values for the GPU block indicated by @p block to memory pointed to by\n  @p ec.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] block The block for which error counts should be retrieved\n\n  @param[in,out] ec A pointer to an ::amdsmi_error_count_t to which the error\n  counts should be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_ecc_count(
        processor_handle: amdsmi_processor_handle,
        block: amdsmi_gpu_block_t,
        ec: *mut amdsmi_error_count_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Retrieve the enabled ECC bit-mask. It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux} @platform{host}\n\n  @details Given a processor handle @p processor_handle, and a pointer to a uint64_t @p\n  enabled_mask, this function will write bits to memory pointed to by\n  @p enabled_blocks. Upon a successful call, @p enabled_blocks can then be\n  AND'd with elements of the ::amdsmi_gpu_block_t ennumeration to determine if\n  the corresponding block has ECC enabled. Note that whether a block has ECC\n  enabled or not in the device is independent of whether there is kernel\n  support for error counting for that block. Although a block may be enabled,\n  but there may not be kernel support for reading error counters for that\n  block.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] enabled_blocks A pointer to a uint64_t to which the enabled\n  blocks bits will be written.\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_ecc_enabled(
        processor_handle: amdsmi_processor_handle,
        enabled_blocks: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Retrieve the ECC status for a GPU block. It is not supported on virtual machine\n  guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, an ::amdsmi_gpu_block_t @p block and\n  a pointer to an ::amdsmi_ras_err_state_t @p state, this function will write\n  the current state for the GPU block indicated by @p block to memory pointed\n  to by @p state.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] block The block for which error counts should be retrieved\n\n  @param[in,out] state A pointer to an ::amdsmi_ras_err_state_t to which the\n  ECC state should be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_ecc_status(
        processor_handle: amdsmi_processor_handle,
        block: amdsmi_gpu_block_t,
        state: *mut amdsmi_ras_err_state_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get a description of a provided AMDSMI error status\n\n @platform{gpu_bm_linux}  @platform{host} @platform{cpu_bm}  @platform{guest_1vf}  @platform{guest_mvf}\n\n  @details Set the provided pointer to a const char *, @p status_string, to\n  a string containing a description of the provided error code @p status.\n\n  @param[in] status The error status for which a description is desired\n\n  @param[in,out] status_string A pointer to a const char * which will be made\n  to point to a description of the provided error code\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_status_code_to_string(
        status: amdsmi_status_t,
        status_string: *mut *const ::std::os::raw::c_char,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Tell if an event group is supported by a given device. It is not supported\n  on virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and an event group specifier @p\n  group, tell if @p group type events are supported by the device associated\n  with @p processor_handle\n\n  @param[in] processor_handle processor handle of device being queried\n\n  @param[in] group ::amdsmi_event_group_t identifier of group for which support\n  is being queried\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_gpu_counter_group_supported(
        processor_handle: amdsmi_processor_handle,
        group: amdsmi_event_group_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Create a performance counter object\n\n  @platform{gpu_bm_linux}\n\n  @details Create a performance counter object of type @p type for the device\n  with a processor handle of @p processor_handle, and write a handle to the object to the\n  memory location pointed to by @p evnt_handle. @p evnt_handle can be used\n  with other performance event operations. The handle should be deallocated\n  with ::amdsmi_gpu_destroy_counter() when no longer needed.\n\n  @note This function requires root access\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] type the ::amdsmi_event_type_t of performance event to create\n\n  @param[in,out] evnt_handle A pointer to a ::amdsmi_event_handle_t which will be\n  associated with a newly allocated counter\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_gpu_create_counter(
        processor_handle: amdsmi_processor_handle,
        type_: amdsmi_event_type_t,
        evnt_handle: *mut amdsmi_event_handle_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Deallocate a performance counter object\n\n  @platform{gpu_bm_linux}\n\n  @details Deallocate the performance counter object with the provided\n  ::amdsmi_event_handle_t @p evnt_handle\n\n  @note This function requires root access\n\n  @param[in] evnt_handle handle to event object to be deallocated\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_gpu_destroy_counter(evnt_handle: amdsmi_event_handle_t) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Issue performance counter control commands. It is not supported on\n  virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Issue a command @p cmd on the event counter associated with the\n  provided handle @p evt_handle.\n\n  @note This function requires root access\n\n  @param[in] evt_handle an event handle\n\n  @param[in] cmd The event counter command to be issued\n\n  @param[in,out] cmd_args Currently not used. Should be set to NULL.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_gpu_control_counter(
        evt_handle: amdsmi_event_handle_t,
        cmd: amdsmi_counter_command_t,
        cmd_args: *mut ::std::os::raw::c_void,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Read the current value of a performance counter\n\n  @platform{gpu_bm_linux}\n\n  @details Read the current counter value of the counter associated with the\n  provided handle @p evt_handle and write the value to the location pointed\n  to by @p value.\n\n  @note This function requires root access\n\n  @param[in] evt_handle an event handle\n\n  @param[in,out] value pointer to memory of size of ::amdsmi_counter_value_t to\n  which the counter value will be written\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_gpu_read_counter(
        evt_handle: amdsmi_event_handle_t,
        value: *mut amdsmi_counter_value_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the number of currently available counters. It is not supported on\n  virtual machine guest\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, a performance event group @p grp,\n  and a pointer to a uint32_t @p available, this function will write the\n  number of @p grp type counters that are available on the device with handle\n  @p processor_handle to the memory that @p available points to.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in] grp an event device group\n\n  @param[in,out] available A pointer to a uint32_t to which the number of\n  available counters will be written\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_available_counters(
        processor_handle: amdsmi_processor_handle,
        grp: amdsmi_event_group_t,
        available: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get process information about processes currently using GPU\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}\n\n  @details Given a non-NULL pointer to an array @p procs of\n  ::amdsmi_process_info_t's, of length *@p num_items, this function will write\n  up to *@p num_items instances of ::amdsmi_process_info_t to the memory pointed\n  to by @p procs. These instances contain information about each process\n  utilizing a GPU. If @p procs is not NULL, @p num_items will be updated with\n  the number of processes actually written. If @p procs is NULL, @p num_items\n  will be updated with the number of processes for which there is current\n  process information. Calling this function with @p procs being NULL is a way\n  to determine how much memory should be allocated for when @p procs is not\n  NULL.\n\n  @param[in,out] procs a pointer to memory provided by the caller to which\n  process information will be written. This may be NULL in which case only @p\n  num_items will be updated with the number of processes found.\n\n  @param[in,out] num_items A pointer to a uint32_t, which on input, should\n  contain the amount of memory in ::amdsmi_process_info_t's which have been\n  provided by the @p procs argument. On output, if @p procs is non-NULL, this\n  will be updated with the number ::amdsmi_process_info_t structs actually\n  written. If @p procs is NULL, this argument will be updated with the number\n  processes for which there is information.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_compute_process_info(
        procs: *mut amdsmi_process_info_t,
        num_items: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get process information about a specific process\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}\n\n  @details Given a pointer to an ::amdsmi_process_info_t @p proc and a process\n  id\n  @p pid, this function will write the process information for @p pid, if\n  available, to the memory pointed to by @p proc.\n\n  @param[in] pid The process ID for which process information is being\n  requested\n\n  @param[in,out] proc a pointer to a ::amdsmi_process_info_t to which\n  process information for @p pid will be written if it is found.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_compute_process_info_by_pid(
        pid: u32,
        proc_: *mut amdsmi_process_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the device indices currently being used by a process\n\n   @platform{gpu_bm_linux}  @platform{guest_1vf}\n\n  @details Given a process id @p pid, a non-NULL pointer to an array of\n  uint32_t's @p processor_handleices of length *@p num_devices, this function will\n  write up to @p num_devices device indices to the memory pointed to by\n  @p processor_handleices. If @p processor_handleices is not NULL, @p num_devices will be\n  updated with the number of gpu's currently being used by process @p pid.\n  If @p processor_handleices is NULL, @p processor_handleices will be updated with the number of\n  gpus currently being used by @p pid. Calling this function with @p\n  dv_indices being NULL is a way to determine how much memory is required\n  for when @p processor_handleices is not NULL.\n\n  @param[in] pid The process id of the process for which the number of gpus\n  currently being used is requested\n\n  @param[in,out] dv_indices a pointer to memory provided by the caller to\n  which indices of devices currently being used by the process will be\n  written. This may be NULL in which case only @p num_devices will be\n  updated with the number of devices being used.\n\n  @param[in,out] num_devices A pointer to a uint32_t, which on input, should\n  contain the amount of memory in uint32_t's which have been provided by the\n  @p processor_handleices argument. On output, if @p processor_handleices is non-NULL, this will\n  be updated with the number uint32_t's actually written. If @p processor_handleices is\n  NULL, this argument will be updated with the number devices being used.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_compute_process_gpus(
        pid: u32,
        dv_indices: *mut u32,
        num_devices: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Retrieve the XGMI error status for a device. It is not supported on\n  virtual machine guest\n\n   @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, and a pointer to an\n  ::amdsmi_xgmi_status_t @p status, this function will write the current XGMI\n  error state ::amdsmi_xgmi_status_t for the device @p processor_handle to the memory\n  pointed to by @p status.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] status A pointer to an ::amdsmi_xgmi_status_t to which the\n  XGMI error state should be written\n  If this parameter is nullptr, this function will return\n  ::AMDSMI_STATUS_INVAL if the function is supported with the provided,\n  arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the\n  provided arguments.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_gpu_xgmi_error_status(
        processor_handle: amdsmi_processor_handle,
        status: *mut amdsmi_xgmi_status_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Reset the XGMI error status for a device. It is not supported on virtual\n machine guest\n\n @platform{gpu_bm_linux}\n\n @details Given a processor handle @p processor_handle, this function will reset the\n current XGMI error state ::amdsmi_xgmi_status_t for the device @p processor_handle to\n amdsmi_xgmi_status_t::AMDSMI_XGMI_STATUS_NO_ERRORS\n\n @param[in] processor_handle a processor handle\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_reset_gpu_xgmi_error(
        processor_handle: amdsmi_processor_handle,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Return link metric information\n\n  @platform{gpu_bm_linux} @platform{host}\n\n  @param[in] processor_handle PF of a processor for which to query\n\n  @param[out] link_metrics reference to the link metrics struct.\n  Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_link_metrics(
        processor_handle: amdsmi_processor_handle,
        link_metrics: *mut amdsmi_link_metrics_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Retrieve the NUMA CPU node number for a device\n\n   @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, and a pointer to an\n  uint32_t @p numa_node, this function will write the\n  node number of NUMA CPU for the device @p processor_handle to the memory\n  pointed to by @p numa_node.\n\n  @param[in] processor_handle a processor handle\n\n  @param[in,out] numa_node A pointer to an uint32_t to which the\n  numa node number should be written.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_topo_get_numa_node_number(
        processor_handle: amdsmi_processor_handle,
        numa_node: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Retrieve the weight for a connection between 2 GPUs\n\n  @platform{gpu_bm_linux}\n\n  @details Given a source processor handle @p processor_handle_src and\n  a destination processor handle @p processor_handle_dst, and a pointer to an\n  uint64_t @p weight, this function will write the\n  weight for the connection between the device @p processor_handle_src\n  and @p processor_handle_dst to the memory pointed to by @p weight.\n\n  @param[in] processor_handle_src the source processor handle\n\n  @param[in] processor_handle_dst the destination processor handle\n\n  @param[in,out] weight A pointer to an uint64_t to which the\n  weight for the connection should be written.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_topo_get_link_weight(
        processor_handle_src: amdsmi_processor_handle,
        processor_handle_dst: amdsmi_processor_handle,
        weight: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Retreive minimal and maximal io link bandwidth between 2 GPUs\n\n  @platform{gpu_bm_linux}\n\n  @details Given a source processor handle @p processor_handle_src and\n  a destination processor handle @p processor_handle_dst,  pointer to an\n  uint64_t @p min_bandwidth, and a pointer to uint64_t @p max_bandiwidth,\n  this function will write theoretical minimal and maximal bandwidth limits.\n  API works if src and dst are connected via xgmi and have 1 hop distance.\n\n  @param[in] processor_handle_src the source processor handle\n\n  @param[in] processor_handle_dst the destination processor handle\n\n  @param[in,out] min_bandwidth A pointer to an uint64_t to which the\n  minimal bandwidth for the connection should be written.\n\n  @param[in,out] max_bandwidth A pointer to an uint64_t to which the\n  maximal bandwidth for the connection should be written.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_minmax_bandwidth_between_processors(
        processor_handle_src: amdsmi_processor_handle,
        processor_handle_dst: amdsmi_processor_handle,
        min_bandwidth: *mut u64,
        max_bandwidth: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Retrieve the hops and the connection type between 2 GPUs\n\n  @platform{gpu_bm_linux}\n\n  @details Given a source processor handle @p processor_handle_src and\n  a destination processor handle @p processor_handle_dst, and a pointer to an\n  uint64_t @p hops and a pointer to an AMDSMI_IO_LINK_TYPE @p type,\n  this function will write the number of hops and the connection type\n  between the device @p processor_handle_src and @p processor_handle_dst to the memory\n  pointed to by @p hops and @p type.\n\n  @param[in] processor_handle_src the source processor handle\n\n  @param[in] processor_handle_dst the destination processor handle\n\n  @param[in,out] hops A pointer to an uint64_t to which the\n  hops for the connection should be written.\n\n  @param[in,out] type A pointer to an ::AMDSMI_IO_LINK_TYPE to which the\n  type for the connection should be written.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_topo_get_link_type(
        processor_handle_src: amdsmi_processor_handle,
        processor_handle_dst: amdsmi_processor_handle,
        hops: *mut u64,
        type_: *mut amdsmi_io_link_type_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Return P2P availability status between 2 GPUs\n\n  @platform{gpu_bm_linux}\n\n  @details Given a source processor handle @p processor_handle_src and\n  a destination processor handle @p processor_handle_dst, and a pointer to a\n  bool @p accessible, this function will write the P2P connection status\n  between the device @p processor_handle_src and @p processor_handle_dst to the memory\n  pointed to by @p accessible.\n\n  @param[in] processor_handle_src the source processor handle\n\n  @param[in] processor_handle_dst the destination processor handle\n\n  @param[in,out] accessible A pointer to a bool to which the status for\n  the P2P connection availablity should be written.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_is_P2P_accessible(
        processor_handle_src: amdsmi_processor_handle,
        processor_handle_dst: amdsmi_processor_handle,
        accessible: *mut bool,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Retrieve connection type and P2P capabilities between 2 GPUs\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_1vf}  @platform{guest_mvf}\n\n  @details Given a source processor handle @p processor_handle_src and\n  a destination processor handle @p processor_handle_dst, a pointer to an amdsmi_io_link_type_t @p type,\n  and a pointer to amdsmi_p2p_capability_t @p cap. This function will write the connection type,\n  and io link capabilities between the device\n  @p processor_handle_src and @p processor_handle_dst to the memory\n  pointed to by @p cap and @p type.\n\n  @param[in] processor_handle_src the source processor handle\n\n  @param[in] processor_handle_dst the destination processor handle\n\n  @param[in,out] type A pointer to an ::amdsmi_io_link_type_t to which the\n  type for the connection should be written.\n\n  @param[in,out] type A pointer to an ::amdsmi_p2p_capability_t to which the\n  io link capabilities should be written.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_topo_get_p2p_status(
        processor_handle_src: amdsmi_processor_handle,
        processor_handle_dst: amdsmi_processor_handle,
        type_: *mut amdsmi_io_link_type_t,
        cap: *mut amdsmi_p2p_capability_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Retrieves the current compute partitioning for a desired device\n\n  @platform{gpu_bm_linux}\n\n  @details\n  Given a processor handle @p processor_handle and a string @p compute_partition ,\n  and uint32 @p len , this function will attempt to obtain the device's\n  current compute partition setting string. Upon successful retreival,\n  the obtained device's compute partition settings string shall be stored in\n  the passed @p compute_partition char string variable.\n\n  @param[in] processor_handle Device which to query\n\n  @param[inout] compute_partition a pointer to a char string variable,\n  which the device's current compute partition will be written to.\n\n  @param[in] len the length of the caller provided buffer @p compute_partition\n  , suggested length is 4 or greater.\n\n  @retval ::AMDSMI_STATUS_SUCCESS call was successful\n  @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid\n  @retval ::AMDSMI_STATUS_UNEXPECTED_DATA data provided to function is not valid\n  @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not\n  support this function\n  @retval ::AMDSMI_STATUS_INSUFFICIENT_SIZE is returned if @p len bytes is not\n  large enough to hold the entire compute partition value. In this case,\n  only @p len bytes will be written.\n"]
    pub fn amdsmi_get_gpu_compute_partition(
        processor_handle: amdsmi_processor_handle,
        compute_partition: *mut ::std::os::raw::c_char,
        len: u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Modifies a selected device's compute partition setting.\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle, a type of compute partition\n  @p compute_partition, this function will attempt to update the selected\n  device's compute partition setting.\n\n  @param[in] processor_handle Device which to query\n\n  @param[in] compute_partition using enum ::amdsmi_compute_partition_type_t,\n  define what the selected device's compute partition setting should be\n  updated to.\n\n  @retval ::AMDSMI_STATUS_SUCCESS call was successful\n  @retval ::AMDSMI_STATUS_PERMISSION function requires root access\n  @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid\n  @retval ::AMDSMI_STATUS_SETTING_UNAVAILABLE the provided setting is\n  unavailable for current device\n  @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not\n  support this function\n"]
    pub fn amdsmi_set_gpu_compute_partition(
        processor_handle: amdsmi_processor_handle,
        compute_partition: amdsmi_compute_partition_type_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Retrieves the current memory partition for a desired device\n\n  @platform{gpu_bm_linux}\n\n  @details\n  Given a processor handle @p processor_handle and a string @p memory_partition ,\n  and uint32 @p len , this function will attempt to obtain the device's\n  memory partition string. Upon successful retreival, the obtained device's\n  memory partition string shall be stored in the passed @p memory_partition\n  char string variable.\n\n  @param[in] processor_handle Device which to query\n\n  @param[inout] memory_partition a pointer to a char string variable,\n  which the device's memory partition will be written to.\n\n  @param[in] len the length of the caller provided buffer @p memory_partition ,\n  suggested length is 5 or greater.\n\n  @retval ::AMDSMI_STATUS_SUCCESS call was successful\n  @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid\n  @retval ::AMDSMI_STATUS_UNEXPECTED_DATA data provided to function is not valid\n  @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not\n  support this function\n  @retval ::AMDSMI_STATUS_INSUFFICIENT_SIZE is returned if @p len bytes is not\n  large enough to hold the entire memory partition value. In this case,\n  only @p len bytes will be written.\n"]
    pub fn amdsmi_get_gpu_memory_partition(
        processor_handle: amdsmi_processor_handle,
        memory_partition: *mut ::std::os::raw::c_char,
        len: u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Modifies a selected device's current memory partition setting.\n\n  @platform{gpu_bm_linux}\n\n  @details Given a processor handle @p processor_handle and a type of memory partition\n  @p memory_partition, this function will attempt to update the selected\n  device's memory partition setting.\n\n  @param[in] processor_handle Device which to query\n\n  @param[in] memory_partition using enum ::amdsmi_memory_partition_type_t,\n  define what the selected device's current mode setting should be updated to.\n\n  @retval ::AMDSMI_STATUS_SUCCESS call was successful\n  @retval ::AMDSMI_STATUS_PERMISSION function requires root access\n  @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid\n  @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not\n  support this function\n  @retval ::AMDSMI_STATUS_AMDGPU_RESTART_ERR could not successfully restart\n  the amdgpu driver\n"]
    pub fn amdsmi_set_gpu_memory_partition(
        processor_handle: amdsmi_processor_handle,
        memory_partition: amdsmi_memory_partition_type_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "/\n/** @defgroup accelerator_partition_profile Accelerator Partition Profile Functions\n  These functions are used to configure and query the device's\n  accelerator parition profile setting.\n  @{"]
    pub fn amdsmi_get_gpu_accelerator_partition_profile(
        processor_handle: amdsmi_processor_handle,
        profile: *mut amdsmi_accelerator_partition_profile_t,
        partition_id: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Prepare to collect event notifications for a GPU\n\n  @platform{gpu_bm_linux}\n\n @details This function prepares to collect events for the GPU with device\n ID @p processor_handle, by initializing any required system parameters. This call\n may open files which will remain open until ::amdsmi_stop_gpu_event_notification()\n is called.\n\n @param processor_handle a processor handle corresponding to the device on which to\n listen for events\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_init_gpu_event_notification(
        processor_handle: amdsmi_processor_handle,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Specify which events to collect for a device\n\n @platform{gpu_bm_linux}\n\n @details Given a processor handle @p processor_handle and a @p mask consisting of\n elements of ::amdsmi_evt_notification_type_t OR'd together, this function\n will listen for the events specified in @p mask on the device\n corresponding to @p processor_handle.\n\n @param processor_handle a processor handle corresponding to the device on which to\n listen for events\n\n @param mask Bitmask generated by OR'ing 1 or more elements of\n ::amdsmi_evt_notification_type_t indicating which event types to listen for,\n where the amdsmi_evt_notification_type_t value indicates the bit field, with\n bit position starting from 1.\n For example, if the mask field is 0x0000000000000003, which means first bit,\n bit 1 (bit position start from 1) and bit 2 are set, which indicate interest\n in receiving AMDSMI_EVT_NOTIF_VMFAULT (which has a value of 1) and\n AMDSMI_EVT_NOTIF_THERMAL_THROTTLE event (which has a value of 2).\n\n @note ::AMDSMI_STATUS_INIT_ERROR is returned if\n ::amdsmi_init_gpu_event_notification() has not been called before a call to this\n function\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_gpu_event_notification_mask(
        processor_handle: amdsmi_processor_handle,
        mask: u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Collect event notifications, waiting a specified amount of time\n\n @platform{gpu_bm_linux}\n\n @details Given a time period @p timeout_ms in milliseconds and a caller-\n provided buffer of ::amdsmi_evt_notification_data_t's @p data with a length\n (in ::amdsmi_evt_notification_data_t's, also specified by the caller) in the\n memory location pointed to by @p num_elem, this function will collect\n ::amdsmi_evt_notification_type_t events for up to @p timeout_ms milliseconds,\n and write up to *@p num_elem event items to @p data. Upon return @p num_elem\n is updated with the number of events that were actually written. If events\n are already present when this function is called, it will write the events\n to the buffer then poll for new events if there is still caller-provided\n buffer available to write any new events that would be found.\n\n This function requires prior calls to ::amdsmi_init_gpu_event_notification() and\n :: amdsmi_set_gpu_event_notification_mask(). This function polls for the\n occurrance of the events on the respective devices that were previously\n specified by :: amdsmi_set_gpu_event_notification_mask().\n\n @param[in] timeout_ms number of milliseconds to wait for an event\n to occur\n\n @param[in,out] num_elem pointer to uint32_t, provided by the caller. On\n input, this value tells how many ::amdsmi_evt_notification_data_t elements\n are being provided by the caller with @p data. On output, the location\n pointed to by @p num_elem will contain the number of items written to\n the provided buffer.\n\n @param[out] data pointer to a caller-provided memory buffer of size\n @p num_elem ::amdsmi_evt_notification_data_t to which this function may safely\n write. If there are events found, up to @p num_elem event items will be\n written to @p data.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_event_notification(
        timeout_ms: ::std::os::raw::c_int,
        num_elem: *mut u32,
        data: *mut amdsmi_evt_notification_data_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = " @brief Close any file handles and free any resources used by event\n notification for a GPU\n\n @platform{gpu_bm_linux}\n\n @details Any resources used by event notification for the GPU with\n processor handle @p processor_handle will be free with this\n function. This includes freeing any memory and closing file handles. This\n should be called for every call to ::amdsmi_init_gpu_event_notification()\n\n @param[in] processor_handle The processor handle of the GPU for which event\n notification resources will be free\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_stop_gpu_event_notification(
        processor_handle: amdsmi_processor_handle,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns BDF of the given device\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_1vf}  @platform{guest_mvf}\n  @platform{guest_windows}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[out]     bdf Reference to BDF. Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_device_bdf(
        processor_handle: amdsmi_processor_handle,
        bdf: *mut amdsmi_bdf_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the UUID of the device\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_1vf}  @platform{guest_mvf}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[in,out]  uuid_length Length of the uuid string. As input, must be\n                  equal or greater than SMI_GPU_UUID_SIZE and be allocated by\n                  user. As output it is the length of the uuid string.\n\n  @param[out]     uuid Pointer to string to store the UUID. Must be\n                  allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_device_uuid(
        processor_handle: amdsmi_processor_handle,
        uuid_length: *mut ::std::os::raw::c_uint,
        uuid: *mut ::std::os::raw::c_char,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the driver version information\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf}\n  @platform{guest_windows}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[in,out]  length As input parameter length of the user allocated\n                  string buffer. As output parameter length of the returned\n                  string buffer.\n\n  @param[out]     info Reference to driver information structure. Must be\n                  allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_driver_info(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_driver_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the ASIC information for the device\n\n  @platform{gpu_bm_linux}  @platform{host} @platform{guest_1vf}  @platform{guest_mvf}\n  @platform{guest_windows}\n\n  @details        This function returns ASIC information such as the product name,\n                  the vendor ID, the subvendor ID, the device ID,\n                  the revision ID and the serial number.\n\n  @param[in]      processor_handle Device which to query\n\n  @param[out]     info Reference to static asic information structure.\n                  Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_asic_info(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_asic_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the KFD (Kernel Fusion Driver) information for the device\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}  @platform{guest_mvf}\n\n  @details        This function returns KFD information populated into the amdsmi_kfd_info_t.\n                  This contains the kfd_id and node_id which allow for the ID and\n                  index of this device in the KFD.\n\n  @param[in]      processor_handle Device which to query\n\n  @param[out]     info Reference to kfd information structure.\n                  Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_kfd_info(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_kfd_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Returns vram info\n\n  @platform{gpu_bm_linux}  @platform{host} @platform{guest_1vf}  @platform{guest_mvf}\n\n  @param[in] processor_handle PF of a processor for which to query\n\n  @param[out] info Reference to vram info structure\n  Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_vram_info(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_vram_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the board part number and board information for the requested device\n\n   @platform{gpu_bm_linux}  @platform{host} @platform{guest_1vf}  @platform{guest_mvf}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[out]     info Reference to board info structure.\n                  Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_board_info(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_board_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the power caps as currently configured in the\n                  system. Power in units of uW.\n                  It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}  @platform{host}\n\n  @param[in]      processor_handle Device which to query\n  @param[in]      sensor_ind A 0-based sensor index. Normally, this will be 0.\n                  If a device has more than one sensor, it could be greater than 0.\n  @param[out]     info Reference to power caps information structure. Must be\n                  allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_power_cap_info(
        processor_handle: amdsmi_processor_handle,
        sensor_ind: u32,
        info: *mut amdsmi_power_cap_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Returns the PCIe info for the GPU.\n\n  @platform{gpu_bm_linux}  @platform{host} @platform{guest_1vf} @platform{guest_windows}\n\n  @param[in] processor_handle Device which to query\n\n  @param[out] info Reference to the PCIe information\n  returned by the library. Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_pcie_info(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_pcie_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns XGMI information for the GPU.\n\n  @platform{gpu_bm_linux}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[out]     info Reference to xgmi information structure. Must be\n                  allocated by user.\n\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_xgmi_info(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_xgmi_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the firmware versions running on the device.\n\n  @platform{gpu_bm_linux}  @platform{host} @platform{guest_1vf}  @platform{guest_mvf}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[out]     info Reference to the fw info. Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_fw_info(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_fw_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the static information for the vBIOS on the device.\n\n  @platform{gpu_bm_linux}  @platform{host} @platform{guest_1vf}  @platform{guest_mvf}\n  @platform{guest_windows}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[out]     info Reference to static vBIOS information.\n                  Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_vbios_info(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_vbios_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the current usage of the GPU engines (GFX, MM and MEM).\n                  Each usage is reported as a percentage from 0-100%. It is not\n                  supported on virtual machine guest\n\n  @platform{gpu_bm_linux} @platform{host} @platform{guest_windows}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[out]     info Reference to the gpu engine usage structure. Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_activity(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_engine_usage_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the current power and voltage of the GPU.\n                  The voltage is in units of mV and the power in units of W.\n                  It is not supported on virtual machine guest\n\n  @platform{gpu_bm_linux}  @platform{host}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[out]     info Reference to the gpu power structure. Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_power_info(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_power_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Returns is power management enabled\n\n  @platform{gpu_bm_linux}  @platform{host}\n\n  @param[in] processor_handle PF of a processor for which to query\n\n  @param[out] enabled Reference to bool. Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_is_gpu_power_management_enabled(
        processor_handle: amdsmi_processor_handle,
        enabled: *mut bool,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the measurements of the clocks in the GPU\n                  for the GFX and multimedia engines and Memory. This call\n                  reports the averages over 1s in MHz. It is not supported\n                  on virtual machine guest\n\n  @platform{gpu_bm_linux}  @platform{host}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[in]      clk_type Enum representing the clock type to query.\n\n  @param[out]     info Reference to the gpu clock structure.\n                  Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_clock_info(
        processor_handle: amdsmi_processor_handle,
        clk_type: amdsmi_clk_type_t,
        info: *mut amdsmi_clk_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the VRAM usage (both total and used memory)\n                  in MegaBytes.\n\n  @platform{gpu_bm_linux} @platform{guest_1vf}  @platform{guest_mvf} @platform{guest_windows}\n\n  @param[in]      processor_handle Device which to query\n\n\n  @param[out]     info Reference to vram information.\n                  Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_vram_usage(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_vram_usage_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the violations for a processor\n\n  Warning: API will be slow due to polling driver for 2 samples. Require\n  a minimum wait of 100ms between the 2 samples in order to calculate. Otherwise\n  users would need to use amdsmi_get_gpu_metrics_info for BM. See that API's struct\n  for calculations.\n\n  @platform{gpu_bm_linux} @platform{host}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[out]     info Reference to all violation status details available.\n                  Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_violation_status(
        processor_handle: amdsmi_processor_handle,
        info: *mut amdsmi_violation_status_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the list of processes running on a given GPU including itself.\n\n  @platform{gpu_bm_linux}  @platform{guest_1vf}  @platform{guest_mvf} @platform{guest_windows}\n\n  @note           The user provides a buffer to store the list and the maximum\n                  number of processes that can be returned. If the user sets\n                  max_processes to 0, the current total number of processes will\n                  replace max_processes param. After that, the function needs to be\n                  called again, with updated max_processes, to successfully fill the\n                  process list, which was previously allocated with max_processes\n\n  @param[in]      processor_handle Device which to query\n\n  @param[in,out]  max_processes Reference to the size of the list buffer in\n                  number of elements. Returns the return number of elements\n                  in list or the number of running processes if equal to 0,\n                  and if given value in param max_processes is less than\n                  number of processes currently running,\n                  AMDSMI_STATUS_OUT_OF_RESOURCES will be returned.\n\n                  For cases where max_process is not zero (0), it specifies the list's size limit.\n                  That is, the maximum size this list will be able to hold. After the list is built\n                  internally, as a return status, we will have AMDSMI_STATUS_OUT_OF_RESOURCES when\n                  the original size limit is smaller than the actual list of processes running.\n                  Hence, the caller is aware the list size needs to be resized, or\n                  AMDSMI_STATUS_SUCCESS otherwise.\n                  Holding a copy of max_process before it is passed in will be helpful for monitoring\n                  the allocations done upon each call since the max_process will permanently be changed\n                  to reflect the actual number of processes running.\n\n  @param[out]     list Reference to a user-provided buffer where the process\n                  list will be returned. This buffer must contain at least\n                  max_processes entries of type amd_proc_info_list_t. Must be allocated\n                  by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success,\n                            | ::AMDSMI_STATUS_OUT_OF_RESOURCES, filled list buffer with data, but number of\n                                actual running processes is larger than the size provided.\n"]
    pub fn amdsmi_get_gpu_process_list(
        processor_handle: amdsmi_processor_handle,
        max_processes: *mut u32,
        list: *mut amdsmi_proc_info_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Returns the total number of ECC errors (correctable,\n                  uncorrectable and deferred) in the given GPU. It is not supported on\n                  virtual machine guest\n\n  @platform{gpu_bm_linux}  @platform{host}\n\n  @param[in]      processor_handle Device which to query\n\n  @param[out]     ec Reference to ecc error count structure.\n                  Must be allocated by user.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_gpu_total_ecc_count(
        processor_handle: amdsmi_processor_handle,
        ec: *mut amdsmi_error_count_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief          Retrieve the set of GPUs that are nearest to a given device\n                  at a specific interconnectivity level.\n\n  @platform{gpu_bm_linux}  @platform{host}\n\n  @details        Once called topology_nearest_info will get populated with a list of\n                  all nearest devices for a given link_type. The list has a count of\n                  the number of devices found and their respective handles/identifiers.\n\n  @param[in]      processor_handle The identifier of the given device.\n\n  @param[in]      link_type The amdsmi_link_type_t level to search for nearest GPUs.\n\n  @param[in,out]  topology_nearest_info\n                  .count;\n                    - When zero, is set to the number of matching GPUs such that .device_list can\n                    be malloc'd.\n                    - When non-zero, .device_list will be filled with count number of processor_handle.\n\n  @param[out]     .device_list An array of processor_handle for GPUs found at level.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail."]
    pub fn amdsmi_get_link_topology_nearest(
        processor_handle: amdsmi_processor_handle,
        link_type: amdsmi_link_type_t,
        topology_nearest_info: *mut amdsmi_topology_nearest_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the core energy for a given core.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu core which to query\n\n  @param[in,out]    penergy - Input buffer to return the core energy\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_core_energy(
        processor_handle: amdsmi_processor_handle,
        penergy: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the socket energy for a given socket.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]    penergy - Input buffer to return the socket energy\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_socket_energy(
        processor_handle: amdsmi_processor_handle,
        penergy: *mut u64,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get Number of threads Per Core.\n\n  @platform{cpu_bm}\n\n  @param[in,out]    threads_per_core - Input buffer to return the Number of threads Per Core\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_threads_per_core(threads_per_core: *mut u32) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get SMU Firmware Version.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in,out]    amdsmi_smu_fw - Input buffer to return the firmware version\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_smu_fw_version(
        processor_handle: amdsmi_processor_handle,
        amdsmi_smu_fw: *mut amdsmi_smu_fw_version_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get HSMP protocol Version.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in,out]    proto_ver - Input buffer to return the protocol version\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_hsmp_proto_ver(
        processor_handle: amdsmi_processor_handle,
        proto_ver: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get normalized status of the processor's PROCHOT status.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]    prochot - Input buffer to return the procohot status.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_prochot_status(
        processor_handle: amdsmi_processor_handle,
        prochot: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get Data fabric clock and Memory clock in MHz.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]    fclk - Input buffer to return fclk\n\n  @param[in,out]    mclk - Input buffer to return mclk\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_fclk_mclk(
        processor_handle: amdsmi_processor_handle,
        fclk: *mut u32,
        mclk: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get core clock in MHz.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]    cclk - Input buffer to return core clock\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_cclk_limit(
        processor_handle: amdsmi_processor_handle,
        cclk: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get current active frequency limit of the socket.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]    freq - Input buffer to return frequency value in MHz\n\n  @param[in,out]    src_type - Input buffer to return frequency source name\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_socket_current_active_freq_limit(
        processor_handle: amdsmi_processor_handle,
        freq: *mut u16,
        src_type: *mut *mut ::std::os::raw::c_char,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get socket frequency range.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]    fmax - Input buffer to return maximum frequency\n\n  @param[in,out]    fmin - Input buffer to return minimum frequency\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_socket_freq_range(
        processor_handle: amdsmi_processor_handle,
        fmax: *mut u16,
        fmin: *mut u16,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get socket frequency limit of the core.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu core which to query\n\n  @param[in,out]    freq - Input buffer to return frequency.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_core_current_freq_limit(
        processor_handle: amdsmi_processor_handle,
        freq: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the socket power.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]    ppower - Input buffer to return socket power\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_socket_power(
        processor_handle: amdsmi_processor_handle,
        ppower: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the socket power cap.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]    pcap - Input buffer to return power cap.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_socket_power_cap(
        processor_handle: amdsmi_processor_handle,
        pcap: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the maximum power cap value for a given socket.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]    pmax - Input buffer to return maximum power limit value\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_socket_power_cap_max(
        processor_handle: amdsmi_processor_handle,
        pmax: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the SVI based power telemetry for all rails.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]    power - Input buffer to return svi based power value\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_pwr_svi_telemetry_all_rails(
        processor_handle: amdsmi_processor_handle,
        power: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set the power cap value for a given socket.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in]\t\tpower - Input power limit value\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_cpu_socket_power_cap(
        processor_handle: amdsmi_processor_handle,
        pcap: u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set the power efficiency profile policy.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in]\t\tmode - mode to be set\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_cpu_pwr_efficiency_mode(
        processor_handle: amdsmi_processor_handle,
        mode: u8,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the core boost limit.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu core which to query\n\n  @param[in,out]\tpboostlimit - Input buffer to fill the boostlimit value\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_core_boostlimit(
        processor_handle: amdsmi_processor_handle,
        pboostlimit: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the socket c0 residency.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]\tpc0_residency - Input buffer to fill the c0 residency value\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_socket_c0_residency(
        processor_handle: amdsmi_processor_handle,
        pc0_residency: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set the core boostlimit value.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu core which to query\n\n  @param[in]\t\tboostlimit - boostlimit value to be set\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_cpu_core_boostlimit(
        processor_handle: amdsmi_processor_handle,
        boostlimit: u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set the socket boostlimit value.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in]\t\tboostlimit - boostlimit value to be set\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_cpu_socket_boostlimit(
        processor_handle: amdsmi_processor_handle,
        boostlimit: u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get the DDR bandwidth data.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in,out]\tddr_bw - Input buffer to fill ddr bandwidth data\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_ddr_bw(
        processor_handle: amdsmi_processor_handle,
        ddr_bw: *mut amdsmi_ddr_bw_metrics_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get socket temperature.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]\tptmon - Input buffer to fill temperature value\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_socket_temperature(
        processor_handle: amdsmi_processor_handle,
        ptmon: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get DIMM temperature range and refresh rate.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in]\t\tdimm_addr - DIMM address\n  @param[in,out]\trate - Input buffer to fill temperature range and refresh rate value\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_dimm_temp_range_and_refresh_rate(
        processor_handle: amdsmi_processor_handle,
        dimm_addr: u8,
        rate: *mut amdsmi_temp_range_refresh_rate_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get DIMM power consumption.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in]\t\tdimm_addr - DIMM address\n  @param[in,out]\trate - Input buffer to fill power consumption value\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_dimm_power_consumption(
        processor_handle: amdsmi_processor_handle,
        dimm_addr: u8,
        dimm_pow: *mut amdsmi_dimm_power_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get DIMM thermal sensor value.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in]\t\tdimm_addr - DIMM address\n  @param[in,out]\tdimm_temp - Input buffer to fill temperature value\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_dimm_thermal_sensor(
        processor_handle: amdsmi_processor_handle,
        dimm_addr: u8,
        dimm_temp: *mut amdsmi_dimm_thermal_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set xgmi width.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in]\t\tmin - Minimum xgmi width to be set\n  @param[in]\t\tmax - maximum xgmi width to be set\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_cpu_xgmi_width(
        processor_handle: amdsmi_processor_handle,
        min: u8,
        max: u8,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set gmi3 link width range.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in]\t\tmin_link_width - minimum link width to be set.\n  @param[in]\t\tmax_link_width - maximum link width to be set.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_cpu_gmi3_link_width_range(
        processor_handle: amdsmi_processor_handle,
        min_link_width: u8,
        max_link_width: u8,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Enable APB.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_cpu_apb_enable(processor_handle: amdsmi_processor_handle) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Disable APB.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in]\t\tpstate - pstate value to be set\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_cpu_apb_disable(
        processor_handle: amdsmi_processor_handle,
        pstate: u8,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set NBIO lclk dpm level value.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in]\t\tnbio_id - nbio index\n  @param[in]\t\tmin - minimum value to be set\n  @param[in]\t\tmax - maximum value to be set\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_cpu_socket_lclk_dpm_level(
        processor_handle: amdsmi_processor_handle,
        nbio_id: u8,
        min: u8,
        max: u8,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get NBIO LCLK dpm level.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in]\t\tnbio_id - nbio index\n  @param[in,out]\tnbio - Input buffer to fill lclk dpm level\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_socket_lclk_dpm_level(
        processor_handle: amdsmi_processor_handle,
        nbio_id: u8,
        nbio: *mut amdsmi_dpm_level_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set pcie link rate.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in]\t\trate_ctrl - rate control value to be set.\n  @param[in,out]\tprev_mode - Input buffer to fill previous rate control value.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_cpu_pcie_link_rate(
        processor_handle: amdsmi_processor_handle,
        rate_ctrl: u8,
        prev_mode: *mut u8,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Set df pstate range.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in]\t\tmax_pstate - maximum pstate value to be set\n  @param[in]\t\tmin_pstate - minimum pstate value to be set\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_set_cpu_df_pstate_range(
        processor_handle: amdsmi_processor_handle,
        max_pstate: u8,
        min_pstate: u8,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get current input output bandwidth.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in]\t\tlink - link id and bw type to which io bandwidth to be obtained\n  @param[in,out]\tio_bw - Input buffer to fill bandwidth data\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_current_io_bandwidth(
        processor_handle: amdsmi_processor_handle,
        link: amdsmi_link_id_bw_type_t,
        io_bw: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get current input output bandwidth.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in]\t\tlink - link id and bw type to which xgmi bandwidth to be obtained\n  @param[in,out]\txgmi_bw - Input buffer to fill bandwidth data\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_current_xgmi_bw(
        processor_handle: amdsmi_processor_handle,
        link: amdsmi_link_id_bw_type_t,
        xgmi_bw: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get HSMP metrics table version\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in,out]  metrics_version input buffer to return the HSMP metrics table version.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_hsmp_metrics_table_version(
        processor_handle: amdsmi_processor_handle,
        metrics_version: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get HSMP metrics table\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n  @param[in,out]  metrics_table input buffer to return the HSMP metrics table.\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_hsmp_metrics_table(
        processor_handle: amdsmi_processor_handle,
        metrics_table: *mut amdsmi_hsmp_metrics_table_t,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get first online core on socket.\n\n  @platform{cpu_bm}\n\n  @param[in]      processor_handle Cpu socket which to query\n\n  @param[in,out]\tpcore_ind - Input buffer to fill first online core on socket data\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_first_online_core_on_cpu_socket(
        processor_handle: amdsmi_processor_handle,
        pcore_ind: *mut u32,
    ) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get CPU family.\n\n  @param[in,out]\tcpu_family - Input buffer to return the cpu family\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_family(cpu_family: *mut u32) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get CPU model.\n\n  @param[in,out]\tcpu_model - Input buffer to return the cpu model\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_cpu_model(cpu_model: *mut u32) -> amdsmi_status_t;
}
unsafe extern "C" {
    #[doc = "  @brief Get a description of provided AMDSMI error status for esmi errors.\n\n  @platform{cpu_bm}\n\n  @details Set the provided pointer to a const char *, @p status_string, to\n  a string containing a description of the provided error code @p status.\n\n  @param[in]    status - The error status for which a description is desired.\n\n  @param[in,out]    status_string - A pointer to a const char * which will be made\n  to point to a description of the provided error code\n\n  @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail"]
    pub fn amdsmi_get_esmi_err_msg(
        status: amdsmi_status_t,
        status_string: *mut *const ::std::os::raw::c_char,
    ) -> amdsmi_status_t;
}