singe-cuda-sys 0.1.0

Low-level FFI bindings for the CUDA driver and runtime APIs and the CUDA libraries that ship with them, such as NVRTC.
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
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
/* automatically generated by rust-bindgen 0.72.1 */

/// CUDA API version number.
pub const CUDA_VERSION: u32 = 13040;
/// CUDA IPC handle size.
pub const CU_IPC_HANDLE_SIZE: u32 = 64;
/// Indicates that compute device class supports accelerated features.
pub const CU_COMPUTE_ACCELERATED_TARGET_BASE: u32 = 65536;
/// Indicates that compute device class supports family features.
pub const CU_COMPUTE_FAMILY_TARGET_BASE: u32 = 131072;
/// Conditional node handle flags.
///
/// Default value is applied when graph is launched.
pub const CU_GRAPH_COND_ASSIGN_DEFAULT: u32 = 1;
/// This port activates when the kernel has finished executing.
pub const CU_GRAPH_KERNEL_NODE_PORT_DEFAULT: u32 = 0;
/// This port activates when all blocks of the kernel have performed cudaTriggerProgrammaticLaunchCompletion() or have terminated.
///
/// It must be used with edge type [`CUgraphDependencyType_enum::CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC`]. See also [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT`].
pub const CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC: u32 = 1;
/// This port activates when all blocks of the kernel have begun execution.
///
/// See also [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT`].
pub const CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER: u32 = 2;
/// If set, host memory is portable between CUDA contexts.
///
/// Flag for [`cuMemHostAlloc`].
pub const CU_MEMHOSTALLOC_PORTABLE: u32 = 1;
/// If set, host memory is mapped into CUDA address space and cuMemHostGetDevicePointer() may be called on the host pointer.
///
/// Flag for [`cuMemHostAlloc`].
pub const CU_MEMHOSTALLOC_DEVICEMAP: u32 = 2;
/// If set, host memory is allocated as write-combined - fast to write, faster to DMA, slow to read except via SSE4 streaming load instruction (MOVNTDQA).
///
/// Flag for [`cuMemHostAlloc`].
pub const CU_MEMHOSTALLOC_WRITECOMBINED: u32 = 4;
/// If set, host memory is portable between CUDA contexts.
///
/// Flag for cuMemHostRegister().
pub const CU_MEMHOSTREGISTER_PORTABLE: u32 = 1;
/// If set, host memory is mapped into CUDA address space and cuMemHostGetDevicePointer() may be called on the host pointer.
///
/// Flag for cuMemHostRegister().
pub const CU_MEMHOSTREGISTER_DEVICEMAP: u32 = 2;
/// If set, the passed memory pointer is treated as pointing to some memory-mapped I/O space, e.g.
///
/// belonging to a third-party PCIe device. On Windows the flag is a no-op. On Linux that memory is marked as non cache-coherent for the GPU and is expected to be physically contiguous. It may return [`cudaError_enum::CUDA_ERROR_NOT_PERMITTED`] if run as an unprivileged user, [`cudaError_enum::CUDA_ERROR_NOT_SUPPORTED`] on older Linux kernel versions. On all other platforms, it is not supported and [`cudaError_enum::CUDA_ERROR_NOT_SUPPORTED`] is returned. Flag for cuMemHostRegister().
pub const CU_MEMHOSTREGISTER_IOMEMORY: u32 = 4;
/// If set, the passed memory pointer is treated as pointing to memory that is considered read-only by the device.
///
/// On platforms without [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`], this flag is required in order to register memory mapped to the CPU as read-only. Support for the use of this flag can be queried from the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED`]. Using this flag with a current context associated with a device that does not have this attribute set will cause cuMemHostRegister to error with [`cudaError_enum::CUDA_ERROR_NOT_SUPPORTED`].
pub const CU_MEMHOSTREGISTER_READ_ONLY: u32 = 8;
/// Indicates that the layered sparse CUDA array or CUDA mipmapped array has a single mip tail region for all layers.
pub const CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL: u32 = 1;
/// Size of tensor map descriptor.
pub const CU_TENSOR_MAP_NUM_QWORDS: u32 = 16;
/// Indicates that the external memory object is a dedicated resource.
pub const CUDA_EXTERNAL_MEMORY_DEDICATED: u32 = 1;
/// When the `flags` parameter of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS contains this flag, it indicates that signaling an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`], which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects.
pub const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC: u32 = 1;
/// When the `flags` parameter of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS contains this flag, it indicates that waiting on an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`], which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects.
pub const CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC: u32 = 2;
/// When `flags` of [`cuDeviceGetNvSciSyncAttributes`] is set to this, it indicates that application needs signaler specific NvSciSyncAttr to be filled by [`cuDeviceGetNvSciSyncAttributes`].
pub const CUDA_NVSCISYNC_ATTR_SIGNAL: u32 = 1;
/// When `flags` of [`cuDeviceGetNvSciSyncAttributes`] is set to this, it indicates that application needs waiter specific NvSciSyncAttr to be filled by [`cuDeviceGetNvSciSyncAttributes`].
pub const CUDA_NVSCISYNC_ATTR_WAIT: u32 = 2;
/// This flag if set indicates that the memory will be used as a tile pool.
pub const CU_MEM_CREATE_USAGE_TILE_POOL: u32 = 1;
/// This flag, if set, indicates that the memory will be used as a buffer for hardware accelerated decompression.
pub const CU_MEM_CREATE_USAGE_HW_DECOMPRESS: u32 = 2;
/// Setting this flag forces GPUDirect RDMA on a locality-domain-localized allocation to use the PCIe (BAR1) path, allowing the allocation to remain locality-domain localized on platforms where the platform-coherent RDMA path does not support localized allocations.
///
/// Because on some platforms the PCIe bandwidth is limited, using this flag may result in lower RDMA bandwidth than the default RDMA mapping link. Note that this flag does not itself force PCIe to be used, and that this must be done when creating the RDMA export. [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_LOCALIZED_MEMORY_SUPPORTED`] indicates whether this flag is needed to create GPUDirect RDMA capable localized memory allocations. This flag is only valid if gpuDirectRDMACapable is set.
pub const CU_MEM_CREATE_USAGE_GPU_DIRECT_RDMA_OVER_PCIE: u32 = 4;
/// This flag, if set, indicates that the memory will be used as a buffer for hardware accelerated decompression.
pub const CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS: u32 = 2;
/// If set, each kernel launched as part of [`cuLaunchCooperativeKernelMultiDevice`] only waits for prior work in the stream corresponding to that GPU to complete before the kernel begins execution.
pub const CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC: u32 = 1;
/// If set, any subsequent work pushed in a stream that participated in a call to [`cuLaunchCooperativeKernelMultiDevice`] will only wait for the kernel launched on the GPU corresponding to that stream to complete before it begins execution.
pub const CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC: u32 = 2;
/// If set, the CUDA array is a collection of layers, where each layer is either a 1D or a 2D array and the Depth member of CUDA_ARRAY3D_DESCRIPTOR specifies the number of layers, not the depth of a 3D array.
pub const CUDA_ARRAY3D_LAYERED: u32 = 1;
/// use [`CUDA_ARRAY3D_LAYERED`].
#[deprecated]
pub const CUDA_ARRAY3D_2DARRAY: u32 = 1;
/// This flag must be set in order to bind a surface reference to the CUDA array.
pub const CUDA_ARRAY3D_SURFACE_LDST: u32 = 2;
/// If set, the CUDA array is a collection of six 2D arrays, representing faces of a cube.
///
/// The width of such a CUDA array must be equal to its height, and Depth must be six. If [`CUDA_ARRAY3D_LAYERED`] flag is also set, then the CUDA array is a collection of cubemaps and Depth must be a multiple of six.
pub const CUDA_ARRAY3D_CUBEMAP: u32 = 4;
/// This flag must be set in order to perform texture gather operations on a CUDA array.
pub const CUDA_ARRAY3D_TEXTURE_GATHER: u32 = 8;
/// This flag if set indicates that the CUDA array is a DEPTH_TEXTURE.
pub const CUDA_ARRAY3D_DEPTH_TEXTURE: u32 = 16;
/// This flag indicates that the CUDA array may be bound as a color target in an external graphics API.
pub const CUDA_ARRAY3D_COLOR_ATTACHMENT: u32 = 32;
/// This flag if set indicates that the CUDA array or CUDA mipmapped array is a sparse CUDA array or CUDA mipmapped array respectively.
pub const CUDA_ARRAY3D_SPARSE: u32 = 64;
/// This flag if set indicates that the CUDA array or CUDA mipmapped array will allow deferred memory mapping.
pub const CUDA_ARRAY3D_DEFERRED_MAPPING: u32 = 128;
/// This flag indicates that the CUDA array will be used for hardware accelerated video encode/decode operations.
pub const CUDA_ARRAY3D_VIDEO_ENCODE_DECODE: u32 = 256;
/// Override the texref format with a format inferred from the array.
///
/// Flag for [`cuTexRefSetArray`].
pub const CU_TRSA_OVERRIDE_FORMAT: u32 = 1;
/// Read the texture as integers rather than promoting the values to floats in the range \[0,1\].
///
/// Flag for [`cuTexRefSetFlags`] and [`cuTexObjectCreate`].
pub const CU_TRSF_READ_AS_INTEGER: u32 = 1;
/// Use normalized texture coordinates in the range [0,1) instead of [0,dim).
///
/// Flag for [cuTexRefSetFlags()](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TEXREF__DEPRECATED.html#group__cuda__texref__deprecated_1ga554ffd896487533c36810f2e45bb7a28) and [`cuTexObjectCreate`].
pub const CU_TRSF_NORMALIZED_COORDINATES: u32 = 2;
/// Perform sRGB->linear conversion during texture read.
///
/// Flag for [`cuTexRefSetFlags`] and [`cuTexObjectCreate`].
pub const CU_TRSF_SRGB: u32 = 16;
/// Disable any trilinear filtering optimizations.
///
/// Flag for [`cuTexRefSetFlags`] and [`cuTexObjectCreate`].
pub const CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION: u32 = 32;
/// Enable seamless cube map filtering.
///
/// Flag for [`cuTexObjectCreate`].
pub const CU_TRSF_SEAMLESS_CUBEMAP: u32 = 64;
/// Launch with the required block dimension.
pub const CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM: u32 = 1;
/// C++ compile time constant for CU_LAUNCH_PARAM_END.
pub const CU_LAUNCH_PARAM_END_AS_INT: u32 = 0;
/// C++ compile time constant for CU_LAUNCH_PARAM_BUFFER_POINTER.
pub const CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT: u32 = 1;
/// C++ compile time constant for CU_LAUNCH_PARAM_BUFFER_SIZE.
pub const CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT: u32 = 2;
/// For texture references loaded into the module, use default texunit from texture reference.
pub const CU_PARAM_TR_DEFAULT: i32 = -1;
/// Unsigned C `size_t`, used for byte counts and object sizes in the native ABI.
pub type size_t = ::core::ffi::c_ulong;
/// Unsigned 32-bit integer in the CUDA driver ABI.
pub type cuuint32_t = u32;
/// Unsigned 64-bit integer in the CUDA driver ABI.
pub type cuuint64_t = u64;
/// CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform.
pub type CUdeviceptr_v2 = ::core::ffi::c_ulonglong;
/// CUDA device pointer.
pub type CUdeviceptr = CUdeviceptr_v2;
/// CUDA device.
pub type CUdevice_v1 = ::core::ffi::c_int;
/// CUDA device.
pub type CUdevice = CUdevice_v1;
/// Incomplete native type used by [`CUcontext`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUctx_st {
    _unused: [u8; 0],
}
/// A regular context handle.
pub type CUcontext = *mut CUctx_st;
/// Incomplete native type used by [`CUmodule`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUmod_st {
    _unused: [u8; 0],
}
/// CUDA module.
pub type CUmodule = *mut CUmod_st;
/// Incomplete native type used by [`CUfunction`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUfunc_st {
    _unused: [u8; 0],
}
/// CUDA function.
pub type CUfunction = *mut CUfunc_st;
/// Incomplete native type used by [`CUlibrary`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUlib_st {
    _unused: [u8; 0],
}
/// CUDA library.
pub type CUlibrary = *mut CUlib_st;
/// Incomplete native type used by [`CUkernel`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUkern_st {
    _unused: [u8; 0],
}
/// CUDA kernel.
pub type CUkernel = *mut CUkern_st;
/// Incomplete native type used by [`CUarray`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUarray_st {
    _unused: [u8; 0],
}
/// CUDA array.
pub type CUarray = *mut CUarray_st;
/// Incomplete native type used by [`CUmipmappedArray`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUmipmappedArray_st {
    _unused: [u8; 0],
}
/// CUDA mipmapped array.
pub type CUmipmappedArray = *mut CUmipmappedArray_st;
/// Incomplete native type used by [`CUtexref`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUtexref_st {
    _unused: [u8; 0],
}
/// CUDA texture reference.
pub type CUtexref = *mut CUtexref_st;
/// Incomplete native type used by [`CUsurfref`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUsurfref_st {
    _unused: [u8; 0],
}
/// CUDA surface reference.
pub type CUsurfref = *mut CUsurfref_st;
/// Incomplete CUDA event object. CUDA owns its native representation; use a CUDA event handle to access it.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUevent_st {
    _unused: [u8; 0],
}
/// CUDA event.
pub type CUevent = *mut CUevent_st;
/// Incomplete CUDA driver stream type. Use a native stream handle; its layout is owned by the CUDA driver.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUstream_st {
    _unused: [u8; 0],
}
/// CUDA stream.
pub type CUstream = *mut CUstream_st;
/// Incomplete native type used by [`CUgraphicsResource`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUgraphicsResource_st {
    _unused: [u8; 0],
}
/// CUDA graphics interop resource.
pub type CUgraphicsResource = *mut CUgraphicsResource_st;
/// An opaque value that represents a CUDA texture object.
pub type CUtexObject_v1 = ::core::ffi::c_ulonglong;
/// An opaque value that represents a CUDA texture object.
pub type CUtexObject = CUtexObject_v1;
/// An opaque value that represents a CUDA surface object.
pub type CUsurfObject_v1 = ::core::ffi::c_ulonglong;
/// An opaque value that represents a CUDA surface object.
pub type CUsurfObject = CUsurfObject_v1;
/// Incomplete native type used by [`CUexternalMemory`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUextMemory_st {
    _unused: [u8; 0],
}
/// CUDA external memory.
pub type CUexternalMemory = *mut CUextMemory_st;
/// Incomplete native type used by [`CUexternalSemaphore`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUextSemaphore_st {
    _unused: [u8; 0],
}
/// CUDA external semaphore.
pub type CUexternalSemaphore = *mut CUextSemaphore_st;
/// Incomplete CUDA graph type. Graph creation and destruction are provided by the CUDA API.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUgraph_st {
    _unused: [u8; 0],
}
/// CUDA graph.
pub type CUgraph = *mut CUgraph_st;
/// Incomplete native type used by [`CUgraphNode`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUgraphNode_st {
    _unused: [u8; 0],
}
/// CUDA graph node.
pub type CUgraphNode = *mut CUgraphNode_st;
/// Incomplete native type used by [`CUgraphExec`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUgraphExec_st {
    _unused: [u8; 0],
}
/// CUDA executable graph.
pub type CUgraphExec = *mut CUgraphExec_st;
/// Incomplete native type used by [`CUmemoryPool`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUmemPoolHandle_st {
    _unused: [u8; 0],
}
/// CUDA memory pool.
pub type CUmemoryPool = *mut CUmemPoolHandle_st;
/// Incomplete native type used by [`CUuserObject`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUuserObject_st {
    _unused: [u8; 0],
}
/// CUDA user object for graphs.
pub type CUuserObject = *mut CUuserObject_st;
/// CUDA graph conditional handle.
pub type CUgraphConditionalHandle = cuuint64_t;
/// Incomplete native type used by [`CUgraphDeviceNode`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUgraphDeviceUpdatableNode_st {
    _unused: [u8; 0],
}
/// CUDA graph device node handle.
pub type CUgraphDeviceNode = *mut CUgraphDeviceUpdatableNode_st;
/// Incomplete native type used by [`CUasyncCallbackHandle`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUasyncCallbackEntry_st {
    _unused: [u8; 0],
}
/// CUDA async notification callback handle.
pub type CUasyncCallbackHandle = *mut CUasyncCallbackEntry_st;
/// Incomplete native type used by [`CUgreenCtx`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUgreenCtx_st {
    _unused: [u8; 0],
}
/// A green context handle. This handle can be used safely from only one CPU thread at a time. Created via [`cuGreenCtxCreate`].
pub type CUgreenCtx = *mut CUgreenCtx_st;
/// CUDA UUID stored as 16 bytes. The bytes are an identifier, not a null-terminated string.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUuuid_st {
    /// < CUDA definition of UUID.
    pub bytes: [::core::ffi::c_char; 16usize],
}
/// CUDA UUID stored as 16 bytes. The bytes are an identifier, not a null-terminated string.
pub type CUuuid = CUuuid_st;
/// Fabric handle - An opaque handle representing a memory allocation that can be exported to processes in same or different nodes. For IPC between processes on different nodes they must be connected via the NVSwitch fabric.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemFabricHandle_st {
    /// Opaque fabric-handle bytes produced by CUDA and passed unchanged when importing the allocation.
    pub data: [::core::ffi::c_uchar; 64usize],
}
impl Default for CUmemFabricHandle_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Fabric handle - An opaque handle representing a memory allocation that can be exported to processes in same or different nodes.
///
/// For IPC between processes on different nodes they must be connected via the NVSwitch fabric.
pub type CUmemFabricHandle_v1 = CUmemFabricHandle_st;
/// Fabric handle - An opaque handle representing a memory allocation that can be exported to processes in same or different nodes. For IPC between processes on different nodes they must be connected via the NVSwitch fabric.
pub type CUmemFabricHandle = CUmemFabricHandle_v1;
/// CUDA IPC event handle
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUipcEventHandle_st {
    /// Opaque event-handle bytes produced by CUDA and passed unchanged when opening the handle in another process.
    pub reserved: [::core::ffi::c_char; 64usize],
}
impl Default for CUipcEventHandle_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// CUDA IPC event handle.
pub type CUipcEventHandle_v1 = CUipcEventHandle_st;
/// CUDA IPC event handle
pub type CUipcEventHandle = CUipcEventHandle_v1;
/// CUDA IPC mem handle
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUipcMemHandle_st {
    /// Opaque memory-handle bytes produced by CUDA and passed unchanged when opening the handle in another process.
    pub reserved: [::core::ffi::c_char; 64usize],
}
impl Default for CUipcMemHandle_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// CUDA IPC mem handle.
pub type CUipcMemHandle_v1 = CUipcMemHandle_st;
/// CUDA IPC mem handle
pub type CUipcMemHandle = CUipcMemHandle_v1;
impl CUipcMem_flags_enum {
    /// Automatically enable peer access between remote devices as needed.
    pub const CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS: CUipcMem_flags_enum = CUipcMem_flags_enum(
        1,
    );
}
/// CUDA Ipc Mem Flags
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUipcMem_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUipcMem_flags_enum as CUipcMem_flags;
impl CUmemAttach_flags_enum {
    /// Memory can be accessed by any stream on any device.
    pub const CU_MEM_ATTACH_GLOBAL: CUmemAttach_flags_enum = CUmemAttach_flags_enum(1);
    /// Memory cannot be accessed by any stream on any device.
    pub const CU_MEM_ATTACH_HOST: CUmemAttach_flags_enum = CUmemAttach_flags_enum(2);
    /// Memory can only be accessed by a single stream on the associated device.
    pub const CU_MEM_ATTACH_SINGLE: CUmemAttach_flags_enum = CUmemAttach_flags_enum(4);
}
/// CUDA Mem Attach Flags
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemAttach_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUmemAttach_flags_enum as CUmemAttach_flags;
impl CUctx_flags_enum {
    /// Automatic scheduling.
    pub const CU_CTX_SCHED_AUTO: CUctx_flags_enum = CUctx_flags_enum(0);
    /// Set spin as default scheduling.
    pub const CU_CTX_SCHED_SPIN: CUctx_flags_enum = CUctx_flags_enum(1);
    /// Set yield as default scheduling.
    pub const CU_CTX_SCHED_YIELD: CUctx_flags_enum = CUctx_flags_enum(2);
    /// Set blocking synchronization as default scheduling.
    pub const CU_CTX_SCHED_BLOCKING_SYNC: CUctx_flags_enum = CUctx_flags_enum(4);
    /// Set blocking synchronization as default scheduling.
    pub const CU_CTX_BLOCKING_SYNC: CUctx_flags_enum = CUctx_flags_enum(4);
    /// Mask of the context scheduling-policy bits.
    pub const CU_CTX_SCHED_MASK: CUctx_flags_enum = CUctx_flags_enum(7);
    /// Deprecated: This flag was deprecated as of CUDA 11.0 and it no longer has any effect. All contexts as of CUDA 3.2 behave as though the flag is enabled.
    pub const CU_CTX_MAP_HOST: CUctx_flags_enum = CUctx_flags_enum(8);
    /// Keep local memory allocation after launch.
    pub const CU_CTX_LMEM_RESIZE_TO_MAX: CUctx_flags_enum = CUctx_flags_enum(16);
    /// Trigger coredumps from exceptions in this context.
    pub const CU_CTX_COREDUMP_ENABLE: CUctx_flags_enum = CUctx_flags_enum(32);
    /// Enable user pipe to trigger coredumps in this context.
    pub const CU_CTX_USER_COREDUMP_ENABLE: CUctx_flags_enum = CUctx_flags_enum(64);
    /// Ensure synchronous memory operations on this context will synchronize.
    pub const CU_CTX_SYNC_MEMOPS: CUctx_flags_enum = CUctx_flags_enum(128);
    /// Mask of the context flag bits defined by this ABI.
    pub const CU_CTX_FLAGS_MASK: CUctx_flags_enum = CUctx_flags_enum(255);
}
/// Context creation flags
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUctx_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUctx_flags_enum as CUctx_flags;
impl CUevent_sched_flags_enum {
    /// Automatic scheduling.
    pub const CU_EVENT_SCHED_AUTO: CUevent_sched_flags_enum = CUevent_sched_flags_enum(
        0,
    );
    /// Set spin as default scheduling.
    pub const CU_EVENT_SCHED_SPIN: CUevent_sched_flags_enum = CUevent_sched_flags_enum(
        1,
    );
    /// Set yield as default scheduling.
    pub const CU_EVENT_SCHED_YIELD: CUevent_sched_flags_enum = CUevent_sched_flags_enum(
        2,
    );
    /// Set blocking synchronization as default scheduling.
    pub const CU_EVENT_SCHED_BLOCKING_SYNC: CUevent_sched_flags_enum = CUevent_sched_flags_enum(
        4,
    );
}
/// Event sched flags
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUevent_sched_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUevent_sched_flags_enum as CUevent_sched_flags;
impl CUhostTaskSyncMode_enum {
    /// The execution thread will block until new host tasks are ready to run.
    pub const CU_HOST_TASK_BLOCKING: CUhostTaskSyncMode_enum = CUhostTaskSyncMode_enum(
        0,
    );
    /// The execution thread will spin wait until new host tasks are ready to run.
    pub const CU_HOST_TASK_SPINWAIT: CUhostTaskSyncMode_enum = CUhostTaskSyncMode_enum(
        1,
    );
}
/// Host task synchronization mode
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUhostTaskSyncMode_enum(pub ::core::ffi::c_uint);
pub use self::CUhostTaskSyncMode_enum as CUhostTaskSyncMode;
impl CUstream_flags_enum {
    /// Default stream flag.
    pub const CU_STREAM_DEFAULT: CUstream_flags_enum = CUstream_flags_enum(0);
    /// Stream does not synchronize with stream 0 (the NULL stream).
    pub const CU_STREAM_NON_BLOCKING: CUstream_flags_enum = CUstream_flags_enum(1);
}
/// Stream creation flags
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstream_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUstream_flags_enum as CUstream_flags;
impl CUevent_flags_enum {
    /// Default event flag.
    pub const CU_EVENT_DEFAULT: CUevent_flags_enum = CUevent_flags_enum(0);
    /// Event uses blocking synchronization.
    pub const CU_EVENT_BLOCKING_SYNC: CUevent_flags_enum = CUevent_flags_enum(1);
    /// Event will not record timing data.
    pub const CU_EVENT_DISABLE_TIMING: CUevent_flags_enum = CUevent_flags_enum(2);
    /// Event is suitable for interprocess use.
    ///
    /// [`CUevent_flags::CU_EVENT_DISABLE_TIMING`] must be set.
    pub const CU_EVENT_INTERPROCESS: CUevent_flags_enum = CUevent_flags_enum(4);
}
/// Event creation flags
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUevent_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUevent_flags_enum as CUevent_flags;
impl CUevent_record_flags_enum {
    /// Default event record flag.
    pub const CU_EVENT_RECORD_DEFAULT: CUevent_record_flags_enum = CUevent_record_flags_enum(
        0,
    );
    /// When using stream capture, create an event record node instead of the default behavior.
    ///
    /// This flag is invalid when used outside of capture.
    pub const CU_EVENT_RECORD_EXTERNAL: CUevent_record_flags_enum = CUevent_record_flags_enum(
        1,
    );
}
/// Event record flags
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUevent_record_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUevent_record_flags_enum as CUevent_record_flags;
impl CUevent_wait_flags_enum {
    /// Default event wait flag.
    pub const CU_EVENT_WAIT_DEFAULT: CUevent_wait_flags_enum = CUevent_wait_flags_enum(
        0,
    );
    /// When using stream capture, create an event wait node instead of the default behavior.
    ///
    /// This flag is invalid when used outside of capture.
    pub const CU_EVENT_WAIT_EXTERNAL: CUevent_wait_flags_enum = CUevent_wait_flags_enum(
        1,
    );
}
/// Event wait flags
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUevent_wait_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUevent_wait_flags_enum as CUevent_wait_flags;
impl CUatomicOperation_enum {
    /// Atomic integer addition.
    pub const CU_ATOMIC_OPERATION_INTEGER_ADD: CUatomicOperation_enum = CUatomicOperation_enum(
        0,
    );
    /// Atomic integer minimum.
    pub const CU_ATOMIC_OPERATION_INTEGER_MIN: CUatomicOperation_enum = CUatomicOperation_enum(
        1,
    );
    /// Atomic integer maximum.
    pub const CU_ATOMIC_OPERATION_INTEGER_MAX: CUatomicOperation_enum = CUatomicOperation_enum(
        2,
    );
    /// Atomic integer increment.
    pub const CU_ATOMIC_OPERATION_INTEGER_INCREMENT: CUatomicOperation_enum = CUatomicOperation_enum(
        3,
    );
    /// Atomic integer decrement.
    pub const CU_ATOMIC_OPERATION_INTEGER_DECREMENT: CUatomicOperation_enum = CUatomicOperation_enum(
        4,
    );
    /// Atomic bitwise AND.
    pub const CU_ATOMIC_OPERATION_AND: CUatomicOperation_enum = CUatomicOperation_enum(
        5,
    );
    /// Atomic bitwise OR.
    pub const CU_ATOMIC_OPERATION_OR: CUatomicOperation_enum = CUatomicOperation_enum(6);
    /// Atomic bitwise exclusive OR.
    pub const CU_ATOMIC_OPERATION_XOR: CUatomicOperation_enum = CUatomicOperation_enum(
        7,
    );
    /// Atomic exchange of the stored value.
    pub const CU_ATOMIC_OPERATION_EXCHANGE: CUatomicOperation_enum = CUatomicOperation_enum(
        8,
    );
    /// Atomic compare-and-swap.
    pub const CU_ATOMIC_OPERATION_CAS: CUatomicOperation_enum = CUatomicOperation_enum(
        9,
    );
    /// Atomic floating-point addition.
    pub const CU_ATOMIC_OPERATION_FLOAT_ADD: CUatomicOperation_enum = CUatomicOperation_enum(
        10,
    );
    /// Atomic floating-point minimum.
    pub const CU_ATOMIC_OPERATION_FLOAT_MIN: CUatomicOperation_enum = CUatomicOperation_enum(
        11,
    );
    /// Atomic floating-point maximum.
    pub const CU_ATOMIC_OPERATION_FLOAT_MAX: CUatomicOperation_enum = CUatomicOperation_enum(
        12,
    );
    /// End marker for the native atomic-operation identifiers.
    pub const CU_ATOMIC_OPERATION_MAX: CUatomicOperation_enum = CUatomicOperation_enum(
        13,
    );
}
/// CUDA-valid Atomic Operations
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUatomicOperation_enum(pub ::core::ffi::c_uint);
pub use self::CUatomicOperation_enum as CUatomicOperation;
impl CUatomicOperationCapability_enum {
    /// Supports signed integer operands.
    pub const CU_ATOMIC_CAPABILITY_SIGNED: CUatomicOperationCapability_enum = CUatomicOperationCapability_enum(
        1,
    );
    /// Supports unsigned integer operands.
    pub const CU_ATOMIC_CAPABILITY_UNSIGNED: CUatomicOperationCapability_enum = CUatomicOperationCapability_enum(
        2,
    );
    /// Supports reduction operations.
    pub const CU_ATOMIC_CAPABILITY_REDUCTION: CUatomicOperationCapability_enum = CUatomicOperationCapability_enum(
        4,
    );
    /// Supports 32-bit scalar operands.
    pub const CU_ATOMIC_CAPABILITY_SCALAR_32: CUatomicOperationCapability_enum = CUatomicOperationCapability_enum(
        8,
    );
    /// Supports 64-bit scalar operands.
    pub const CU_ATOMIC_CAPABILITY_SCALAR_64: CUatomicOperationCapability_enum = CUatomicOperationCapability_enum(
        16,
    );
    /// Supports 128-bit scalar operands.
    pub const CU_ATOMIC_CAPABILITY_SCALAR_128: CUatomicOperationCapability_enum = CUatomicOperationCapability_enum(
        32,
    );
    /// Supports vectors of four 32-bit components.
    pub const CU_ATOMIC_CAPABILITY_VECTOR_32x4: CUatomicOperationCapability_enum = CUatomicOperationCapability_enum(
        64,
    );
}
/// CUDA-valid Atomic Operation capabilities
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUatomicOperationCapability_enum(pub ::core::ffi::c_uint);
pub use self::CUatomicOperationCapability_enum as CUatomicOperationCapability;
impl CUstreamWaitValue_flags_enum {
    /// Wait until (int32_t)(\*addr - value) >= 0 (or int64_t for 64 bit values).
    ///
    /// Note this is a cyclic comparison which ignores wraparound. (Default behavior.)
    pub const CU_STREAM_WAIT_VALUE_GEQ: CUstreamWaitValue_flags_enum = CUstreamWaitValue_flags_enum(
        0,
    );
    /// Wait until \*addr == value.
    pub const CU_STREAM_WAIT_VALUE_EQ: CUstreamWaitValue_flags_enum = CUstreamWaitValue_flags_enum(
        1,
    );
    /// Wait until (\*addr & value) != 0.
    pub const CU_STREAM_WAIT_VALUE_AND: CUstreamWaitValue_flags_enum = CUstreamWaitValue_flags_enum(
        2,
    );
    /// Wait until ~(\*addr | value) != 0.
    ///
    /// Support for this operation can be queried with [`cuDeviceGetAttribute`] and [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR`].
    pub const CU_STREAM_WAIT_VALUE_NOR: CUstreamWaitValue_flags_enum = CUstreamWaitValue_flags_enum(
        3,
    );
    /// Follow the wait operation with a flush of outstanding remote writes.
    ///
    /// This means that, if a remote write operation is guaranteed to have reached the device before the wait can be satisfied, that write is guaranteed to be visible to downstream device work. The device is permitted to reorder remote writes internally. For example, this flag would be required if two remote writes arrive in a defined order, the wait is satisfied by the second write, and downstream work needs to observe the first write. Support for this operation is restricted to selected platforms and can be queried with [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES`].
    pub const CU_STREAM_WAIT_VALUE_FLUSH: CUstreamWaitValue_flags_enum = CUstreamWaitValue_flags_enum(
        1073741824,
    );
}
/// Flags for ::cuStreamWaitValue32 and ::cuStreamWaitValue64
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamWaitValue_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUstreamWaitValue_flags_enum as CUstreamWaitValue_flags;
impl CUstreamWriteValue_flags_enum {
    /// Default behavior.
    pub const CU_STREAM_WRITE_VALUE_DEFAULT: CUstreamWriteValue_flags_enum = CUstreamWriteValue_flags_enum(
        0,
    );
    /// Permits the write to be reordered with writes which were issued before it, as a performance optimization.
    ///
    /// Normally, cuStreamWriteValue32 will provide a memory fence before the write, which has similar semantics to __threadfence_system() but is scoped to the stream rather than a CUDA thread. This flag is not supported in the v2 API.
    pub const CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER: CUstreamWriteValue_flags_enum = CUstreamWriteValue_flags_enum(
        1,
    );
}
/// Flags for ::cuStreamWriteValue32
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamWriteValue_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUstreamWriteValue_flags_enum as CUstreamWriteValue_flags;
impl CUstreamBatchMemOpType_enum {
    /// Represents a cuStreamWaitValue32 operation.
    pub const CU_STREAM_MEM_OP_WAIT_VALUE_32: CUstreamBatchMemOpType_enum = CUstreamBatchMemOpType_enum(
        1,
    );
    /// Represents a cuStreamWriteValue32 operation.
    pub const CU_STREAM_MEM_OP_WRITE_VALUE_32: CUstreamBatchMemOpType_enum = CUstreamBatchMemOpType_enum(
        2,
    );
    /// Represents a cuStreamWaitValue64 operation.
    pub const CU_STREAM_MEM_OP_WAIT_VALUE_64: CUstreamBatchMemOpType_enum = CUstreamBatchMemOpType_enum(
        4,
    );
    /// Represents a cuStreamWriteValue64 operation.
    pub const CU_STREAM_MEM_OP_WRITE_VALUE_64: CUstreamBatchMemOpType_enum = CUstreamBatchMemOpType_enum(
        5,
    );
    /// Insert a memory barrier of the specified type.
    pub const CU_STREAM_MEM_OP_BARRIER: CUstreamBatchMemOpType_enum = CUstreamBatchMemOpType_enum(
        6,
    );
    /// Perform a atomic reduction.
    ///
    /// See CUstreamBatchMemOpParams::atomicReduction.
    pub const CU_STREAM_MEM_OP_ATOMIC_REDUCTION: CUstreamBatchMemOpType_enum = CUstreamBatchMemOpType_enum(
        8,
    );
    /// This has the same effect as [`CUstreamWaitValue_flags_enum::CU_STREAM_WAIT_VALUE_FLUSH`], but as a standalone operation.
    pub const CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES: CUstreamBatchMemOpType_enum = CUstreamBatchMemOpType_enum(
        3,
    );
}
/// Operations for ::cuStreamBatchMemOp
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamBatchMemOpType_enum(pub ::core::ffi::c_uint);
pub use self::CUstreamBatchMemOpType_enum as CUstreamBatchMemOpType;
impl CUstreamMemoryBarrier_flags_enum {
    /// System-wide memory barrier.
    pub const CU_STREAM_MEMORY_BARRIER_TYPE_SYS: CUstreamMemoryBarrier_flags_enum = CUstreamMemoryBarrier_flags_enum(
        0,
    );
    /// Limit memory barrier scope to the GPU.
    pub const CU_STREAM_MEMORY_BARRIER_TYPE_GPU: CUstreamMemoryBarrier_flags_enum = CUstreamMemoryBarrier_flags_enum(
        1,
    );
}
/// Flags for ::CUstreamBatchMemOpParams::memoryBarrier
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamMemoryBarrier_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUstreamMemoryBarrier_flags_enum as CUstreamMemoryBarrier_flags;
impl CUstreamAtomicReductionOpType_enum {
    /// Performs an atomic OR: \*(address) = \*(address) | value.
    pub const CU_STREAM_ATOMIC_REDUCTION_OP_OR: CUstreamAtomicReductionOpType_enum = CUstreamAtomicReductionOpType_enum(
        6,
    );
    /// Performs an atomic AND: \*(address) = \*(address) & value.
    pub const CU_STREAM_ATOMIC_REDUCTION_OP_AND: CUstreamAtomicReductionOpType_enum = CUstreamAtomicReductionOpType_enum(
        5,
    );
    /// Performs an atomic ADD: \*(address) = \*(address) + value.
    pub const CU_STREAM_ATOMIC_REDUCTION_OP_ADD: CUstreamAtomicReductionOpType_enum = CUstreamAtomicReductionOpType_enum(
        0,
    );
}
/// Atomic reduction operation types for ::CUstreamBatchMemOpParams::atomicReduction::reductionOp
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamAtomicReductionOpType_enum(pub ::core::ffi::c_uint);
pub use self::CUstreamAtomicReductionOpType_enum as CUstreamAtomicReductionOpType;
impl CUstreamAtomicReductionDataType_enum {
    /// Unsigned 32-bit scalar reduction operands.
    pub const CU_STREAM_ATOMIC_REDUCTION_UNSIGNED_32: CUstreamAtomicReductionDataType_enum = CUstreamAtomicReductionDataType_enum(
        14,
    );
    /// Unsigned 64-bit scalar reduction operands.
    pub const CU_STREAM_ATOMIC_REDUCTION_UNSIGNED_64: CUstreamAtomicReductionDataType_enum = CUstreamAtomicReductionDataType_enum(
        22,
    );
}
/// Atomic reduction data types for ::CUstreamBatchMemOpParams::atomicReduction::dataType
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamAtomicReductionDataType_enum(pub ::core::ffi::c_uint);
pub use self::CUstreamAtomicReductionDataType_enum as CUstreamAtomicReductionDataType;
/// Per-operation parameters for ::cuStreamBatchMemOp
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUstreamBatchMemOpParams_union {
    /// Operation. This is the first field of all the union elemets and acts as a TAG to determine which union member is valid.
    pub operation: CUstreamBatchMemOpType,
    /// Params for ::CU_STREAM_MEM_OP_WAIT_VALUE_32 and ::CU_STREAM_MEM_OP_WAIT_VALUE_64 operations.
    pub waitValue: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st,
    /// Params for ::CU_STREAM_MEM_OP_WRITE_VALUE_32 and ::CU_STREAM_MEM_OP_WRITE_VALUE_64 operations.
    pub writeValue: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st,
    /// Params for ::CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES operations.
    pub flushRemoteWrites: CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st,
    /// Params for ::CU_STREAM_MEM_OP_BARRIER operations.
    pub memoryBarrier: CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st,
    /// Parameters of a stream-ordered atomic reduction.
    pub atomicReduction: CUstreamBatchMemOpParams_union_CUstreamMemOpAtomicReductionParams_st,
    /// Storage that fixes the native batch-operation union to six 64-bit words.
    pub pad: [cuuint64_t; 6usize],
}
/// Native layout of the `waitValue` member of [`CUstreamBatchMemOpParams_union`].
///
/// Params for ::CU_STREAM_MEM_OP_WAIT_VALUE_32 and ::CU_STREAM_MEM_OP_WAIT_VALUE_64 operations.
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st {
    /// Selects [`CUstreamBatchMemOpType_enum::CU_STREAM_MEM_OP_WAIT_VALUE_32`] or [`CUstreamBatchMemOpType_enum::CU_STREAM_MEM_OP_WAIT_VALUE_64`].
    pub operation: CUstreamBatchMemOpType,
    /// Device address of the memory word used by this stream operation.
    pub address: CUdeviceptr,
    /// Anonymous native member. See [`CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1`] for its fields.
    pub __bindgen_anon_1: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1,
    /// See ::CUstreamWaitValue_flags.
    pub flags: ::core::ffi::c_uint,
    /// For driver internal use. Initial value is unimportant.
    pub alias: CUdeviceptr,
}
/// Anonymous native union in [`CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st`]. Its members share the same storage.
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 {
    /// 32-bit operand compared against memory while the stream waits.
    pub value: cuuint32_t,
    /// 64-bit operand compared against memory while the stream waits.
    pub value64: cuuint64_t,
}
impl Default
for CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Native layout of the `writeValue` member of [`CUstreamBatchMemOpParams_union`].
///
/// Params for ::CU_STREAM_MEM_OP_WRITE_VALUE_32 and ::CU_STREAM_MEM_OP_WRITE_VALUE_64 operations.
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st {
    /// Selects [`CUstreamBatchMemOpType_enum::CU_STREAM_MEM_OP_WRITE_VALUE_32`] or [`CUstreamBatchMemOpType_enum::CU_STREAM_MEM_OP_WRITE_VALUE_64`].
    pub operation: CUstreamBatchMemOpType,
    /// Device address of the memory word used by this stream operation.
    pub address: CUdeviceptr,
    /// Anonymous native member. See [`CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1`] for its fields.
    pub __bindgen_anon_1: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1,
    /// See ::CUstreamWriteValue_flags.
    pub flags: ::core::ffi::c_uint,
    /// For driver internal use. Initial value is unimportant.
    pub alias: CUdeviceptr,
}
/// Anonymous native union in [`CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st`]. Its members share the same storage.
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 {
    /// 32-bit operand written to memory in stream order.
    pub value: cuuint32_t,
    /// 64-bit operand written to memory in stream order.
    pub value64: cuuint64_t,
}
impl Default
for CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Native layout of the `flushRemoteWrites` member of [`CUstreamBatchMemOpParams_union`].
///
/// Params for ::CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES operations.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st {
    /// Operation tag selecting [`CUstreamBatchMemOpType_enum::CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES`].
    pub operation: CUstreamBatchMemOpType,
    /// Must be 0.
    pub flags: ::core::ffi::c_uint,
}
impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Native layout of the `memoryBarrier` member of [`CUstreamBatchMemOpParams_union`].
///
/// Params for ::CU_STREAM_MEM_OP_BARRIER operations.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st {
    /// Operation tag selecting [`CUstreamBatchMemOpType_enum::CU_STREAM_MEM_OP_BARRIER`].
    pub operation: CUstreamBatchMemOpType,
    /// See ::CUstreamMemoryBarrier_flags
    pub flags: ::core::ffi::c_uint,
}
impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Native layout of the `atomicReduction` member of [`CUstreamBatchMemOpParams_union`].
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpAtomicReductionParams_st {
    /// Operation tag selecting [`CUstreamBatchMemOpType_enum::CU_STREAM_MEM_OP_ATOMIC_REDUCTION`].
    pub operation: CUstreamBatchMemOpType,
    /// Must be 0
    pub flags: ::core::ffi::c_uint,
    /// See ::CUstreamAtomicReductionOpType
    pub reductionOp: CUstreamAtomicReductionOpType,
    /// See ::CUstreamAtomicReductionDataType
    pub dataType: CUstreamAtomicReductionDataType,
    /// The address the atomic operation will be operated on
    pub address: CUdeviceptr,
    /// The operand value the atomic operation will operate with
    pub value: cuuint64_t,
    /// For driver internal use. Initial value is unimportant.
    pub alias: CUdeviceptr,
}
impl Default for CUstreamBatchMemOpParams_union_CUstreamMemOpAtomicReductionParams_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUstreamBatchMemOpParams_union {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Per-operation parameters for cuStreamBatchMemOp.
pub type CUstreamBatchMemOpParams_v1 = CUstreamBatchMemOpParams_union;
/// Per-operation parameters for ::cuStreamBatchMemOp
pub type CUstreamBatchMemOpParams = CUstreamBatchMemOpParams_v1;
/// Batch memory operation node parameters
///
/// Used in the legacy ::cuGraphAddBatchMemOpNode api. New code should use ::cuGraphAddNode()
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st {
    /// CUDA context used for the batch of stream memory operations.
    pub ctx: CUcontext,
    /// Number of entries in `paramArray`.
    pub count: ::core::ffi::c_uint,
    /// Array of `count` batch memory-operation descriptions.
    pub paramArray: *mut CUstreamBatchMemOpParams,
    /// Node behavior flags passed to the native batch-memory-operation API.
    pub flags: ::core::ffi::c_uint,
}
impl Default for CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Batch memory operation node parameters.
///
/// Used in the legacy [`cuGraphAddBatchMemOpNode`] api. New code should use cuGraphAddNode().
pub type CUDA_BATCH_MEM_OP_NODE_PARAMS_v1 = CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st;
/// Batch memory operation node parameters
///
/// Used in the legacy ::cuGraphAddBatchMemOpNode api. New code should use ::cuGraphAddNode()
pub type CUDA_BATCH_MEM_OP_NODE_PARAMS = CUDA_BATCH_MEM_OP_NODE_PARAMS_v1;
/// Batch memory operation node parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st {
    /// Context to use for the operations.
    pub ctx: CUcontext,
    /// Number of operations in paramArray.
    pub count: ::core::ffi::c_uint,
    /// Array of batch memory operations.
    pub paramArray: *mut CUstreamBatchMemOpParams,
    /// Flags to control the node.
    pub flags: ::core::ffi::c_uint,
}
impl Default for CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Batch memory operation node parameters.
pub type CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 = CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st;
impl CUoccupancy_flags_enum {
    /// Default behavior.
    pub const CU_OCCUPANCY_DEFAULT: CUoccupancy_flags_enum = CUoccupancy_flags_enum(0);
    /// Assume global caching is enabled and cannot be automatically turned off.
    pub const CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE: CUoccupancy_flags_enum = CUoccupancy_flags_enum(
        1,
    );
}
/// Occupancy calculator flag
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUoccupancy_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUoccupancy_flags_enum as CUoccupancy_flags;
impl CUstreamUpdateCaptureDependencies_flags_enum {
    /// Add new nodes to the dependency set.
    pub const CU_STREAM_ADD_CAPTURE_DEPENDENCIES: CUstreamUpdateCaptureDependencies_flags_enum = CUstreamUpdateCaptureDependencies_flags_enum(
        0,
    );
    /// Replace the dependency set with the new nodes.
    pub const CU_STREAM_SET_CAPTURE_DEPENDENCIES: CUstreamUpdateCaptureDependencies_flags_enum = CUstreamUpdateCaptureDependencies_flags_enum(
        1,
    );
}
/// Flags for ::cuStreamUpdateCaptureDependencies
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamUpdateCaptureDependencies_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUstreamUpdateCaptureDependencies_flags_enum as CUstreamUpdateCaptureDependencies_flags;
impl CUasyncNotificationType_enum {
    /// Sent when the process has exceeded its device memory budget.
    pub const CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET: CUasyncNotificationType_enum = CUasyncNotificationType_enum(
        1,
    );
}
/// Types of async notification that can be sent
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUasyncNotificationType_enum(pub ::core::ffi::c_uint);
pub use self::CUasyncNotificationType_enum as CUasyncNotificationType;
/// Information passed to the user via the async notification callback
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUasyncNotificationInfo_st {
    /// The type of notification being sent
    pub type_: CUasyncNotificationType,
    /// Information about the notification. `type` must be checked in order to interpret this field.
    pub info: CUasyncNotificationInfo_st__bindgen_ty_1,
}
/// Native layout of the `info` member of [`CUasyncNotificationInfo_st`].
///
/// Information about the notification. `type` must be checked in order to interpret this field.
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUasyncNotificationInfo_st__bindgen_ty_1 {
    /// Information about notifications of type [`CUasyncNotificationType_enum::CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET`]
    pub overBudget: CUasyncNotificationInfo_st__bindgen_ty_1__bindgen_ty_1,
}
/// Native layout of the `overBudget` member of [`CUasyncNotificationInfo_st__bindgen_ty_1`].
///
/// Information about notifications of type [`CUasyncNotificationType_enum::CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET`]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUasyncNotificationInfo_st__bindgen_ty_1__bindgen_ty_1 {
    /// The number of bytes that the process has allocated above its device memory budget
    pub bytesOverBudget: ::core::ffi::c_ulonglong,
}
impl Default for CUasyncNotificationInfo_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUasyncNotificationInfo_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Information passed to the user via the async notification callback.
pub type CUasyncNotificationInfo = CUasyncNotificationInfo_st;
/// CUDA async notification callback.
pub type CUasyncCallback = ::core::option::Option<
    unsafe extern "C" fn(
        info: *mut CUasyncNotificationInfo,
        userData: *mut ::core::ffi::c_void,
        callback: CUasyncCallbackHandle,
    ),
>;
impl CUarray_format_enum {
    /// Unsigned 8-bit integers.
    pub const CU_AD_FORMAT_UNSIGNED_INT8: CUarray_format_enum = CUarray_format_enum(1);
    /// Unsigned 16-bit integers.
    pub const CU_AD_FORMAT_UNSIGNED_INT16: CUarray_format_enum = CUarray_format_enum(2);
    /// Unsigned 32-bit integers.
    pub const CU_AD_FORMAT_UNSIGNED_INT32: CUarray_format_enum = CUarray_format_enum(3);
    /// Signed 8-bit integers.
    pub const CU_AD_FORMAT_SIGNED_INT8: CUarray_format_enum = CUarray_format_enum(8);
    /// Signed 16-bit integers.
    pub const CU_AD_FORMAT_SIGNED_INT16: CUarray_format_enum = CUarray_format_enum(9);
    /// Signed 32-bit integers.
    pub const CU_AD_FORMAT_SIGNED_INT32: CUarray_format_enum = CUarray_format_enum(10);
    /// 16-bit floating point.
    pub const CU_AD_FORMAT_HALF: CUarray_format_enum = CUarray_format_enum(16);
    /// 32-bit floating point.
    pub const CU_AD_FORMAT_FLOAT: CUarray_format_enum = CUarray_format_enum(32);
    /// 8-bit YUV planar format, with 4:2:0 sampling.
    pub const CU_AD_FORMAT_NV12: CUarray_format_enum = CUarray_format_enum(176);
    /// 1 channel unsigned 8-bit normalized integer.
    pub const CU_AD_FORMAT_UNORM_INT8X1: CUarray_format_enum = CUarray_format_enum(192);
    /// 2 channel unsigned 8-bit normalized integer.
    pub const CU_AD_FORMAT_UNORM_INT8X2: CUarray_format_enum = CUarray_format_enum(193);
    /// 4 channel unsigned 8-bit normalized integer.
    pub const CU_AD_FORMAT_UNORM_INT8X4: CUarray_format_enum = CUarray_format_enum(194);
    /// 1 channel unsigned 16-bit normalized integer.
    pub const CU_AD_FORMAT_UNORM_INT16X1: CUarray_format_enum = CUarray_format_enum(195);
    /// 2 channel unsigned 16-bit normalized integer.
    pub const CU_AD_FORMAT_UNORM_INT16X2: CUarray_format_enum = CUarray_format_enum(196);
    /// 4 channel unsigned 16-bit normalized integer.
    pub const CU_AD_FORMAT_UNORM_INT16X4: CUarray_format_enum = CUarray_format_enum(197);
    /// 1 channel signed 8-bit normalized integer.
    pub const CU_AD_FORMAT_SNORM_INT8X1: CUarray_format_enum = CUarray_format_enum(198);
    /// 2 channel signed 8-bit normalized integer.
    pub const CU_AD_FORMAT_SNORM_INT8X2: CUarray_format_enum = CUarray_format_enum(199);
    /// 4 channel signed 8-bit normalized integer.
    pub const CU_AD_FORMAT_SNORM_INT8X4: CUarray_format_enum = CUarray_format_enum(200);
    /// 1 channel signed 16-bit normalized integer.
    pub const CU_AD_FORMAT_SNORM_INT16X1: CUarray_format_enum = CUarray_format_enum(201);
    /// 2 channel signed 16-bit normalized integer.
    pub const CU_AD_FORMAT_SNORM_INT16X2: CUarray_format_enum = CUarray_format_enum(202);
    /// 4 channel signed 16-bit normalized integer.
    pub const CU_AD_FORMAT_SNORM_INT16X4: CUarray_format_enum = CUarray_format_enum(203);
    /// 4 channel unsigned normalized block-compressed (BC1 compression) format.
    pub const CU_AD_FORMAT_BC1_UNORM: CUarray_format_enum = CUarray_format_enum(145);
    /// 4 channel unsigned normalized block-compressed (BC1 compression) format with sRGB encoding.
    pub const CU_AD_FORMAT_BC1_UNORM_SRGB: CUarray_format_enum = CUarray_format_enum(
        146,
    );
    /// 4 channel unsigned normalized block-compressed (BC2 compression) format.
    pub const CU_AD_FORMAT_BC2_UNORM: CUarray_format_enum = CUarray_format_enum(147);
    /// 4 channel unsigned normalized block-compressed (BC2 compression) format with sRGB encoding.
    pub const CU_AD_FORMAT_BC2_UNORM_SRGB: CUarray_format_enum = CUarray_format_enum(
        148,
    );
    /// 4 channel unsigned normalized block-compressed (BC3 compression) format.
    pub const CU_AD_FORMAT_BC3_UNORM: CUarray_format_enum = CUarray_format_enum(149);
    /// 4 channel unsigned normalized block-compressed (BC3 compression) format with sRGB encoding.
    pub const CU_AD_FORMAT_BC3_UNORM_SRGB: CUarray_format_enum = CUarray_format_enum(
        150,
    );
    /// 1 channel unsigned normalized block-compressed (BC4 compression) format.
    pub const CU_AD_FORMAT_BC4_UNORM: CUarray_format_enum = CUarray_format_enum(151);
    /// 1 channel signed normalized block-compressed (BC4 compression) format.
    pub const CU_AD_FORMAT_BC4_SNORM: CUarray_format_enum = CUarray_format_enum(152);
    /// 2 channel unsigned normalized block-compressed (BC5 compression) format.
    pub const CU_AD_FORMAT_BC5_UNORM: CUarray_format_enum = CUarray_format_enum(153);
    /// 2 channel signed normalized block-compressed (BC5 compression) format.
    pub const CU_AD_FORMAT_BC5_SNORM: CUarray_format_enum = CUarray_format_enum(154);
    /// 3 channel unsigned half-float block-compressed (BC6H compression) format.
    pub const CU_AD_FORMAT_BC6H_UF16: CUarray_format_enum = CUarray_format_enum(155);
    /// 3 channel signed half-float block-compressed (BC6H compression) format.
    pub const CU_AD_FORMAT_BC6H_SF16: CUarray_format_enum = CUarray_format_enum(156);
    /// 4 channel unsigned normalized block-compressed (BC7 compression) format.
    pub const CU_AD_FORMAT_BC7_UNORM: CUarray_format_enum = CUarray_format_enum(157);
    /// 4 channel unsigned normalized block-compressed (BC7 compression) format with sRGB encoding.
    pub const CU_AD_FORMAT_BC7_UNORM_SRGB: CUarray_format_enum = CUarray_format_enum(
        158,
    );
    /// 10-bit YUV planar format, with 4:2:0 sampling.
    pub const CU_AD_FORMAT_P010: CUarray_format_enum = CUarray_format_enum(159);
    /// 16-bit YUV planar format, with 4:2:0 sampling.
    pub const CU_AD_FORMAT_P016: CUarray_format_enum = CUarray_format_enum(161);
    /// 8-bit YUV planar format, with 4:2:2 sampling.
    pub const CU_AD_FORMAT_NV16: CUarray_format_enum = CUarray_format_enum(162);
    /// 10-bit YUV planar format, with 4:2:2 sampling.
    pub const CU_AD_FORMAT_P210: CUarray_format_enum = CUarray_format_enum(163);
    /// 16-bit YUV planar format, with 4:2:2 sampling.
    pub const CU_AD_FORMAT_P216: CUarray_format_enum = CUarray_format_enum(164);
    /// 2 channel, 8-bit YUV packed planar format, with 4:2:2 sampling.
    pub const CU_AD_FORMAT_YUY2: CUarray_format_enum = CUarray_format_enum(165);
    /// 2 channel, 10-bit YUV packed planar format, with 4:2:2 sampling.
    pub const CU_AD_FORMAT_Y210: CUarray_format_enum = CUarray_format_enum(166);
    /// 2 channel, 16-bit YUV packed planar format, with 4:2:2 sampling.
    pub const CU_AD_FORMAT_Y216: CUarray_format_enum = CUarray_format_enum(167);
    /// 4 channel, 8-bit YUV packed planar format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_AYUV: CUarray_format_enum = CUarray_format_enum(168);
    /// 10-bit YUV packed planar format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_Y410: CUarray_format_enum = CUarray_format_enum(169);
    /// 4 channel, 12-bit YUV packed planar format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_Y416: CUarray_format_enum = CUarray_format_enum(177);
    /// 3 channel 8-bit YUV planar format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_Y444_PLANAR8: CUarray_format_enum = CUarray_format_enum(178);
    /// 3 channel 10-bit YUV planar format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_Y444_PLANAR10: CUarray_format_enum = CUarray_format_enum(179);
    /// 3 channel 8-bit YUV semi-planar format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_YUV444_8bit_SemiPlanar: CUarray_format_enum = CUarray_format_enum(
        180,
    );
    /// 3 channel 16-bit YUV semi-planar format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_YUV444_16bit_SemiPlanar: CUarray_format_enum = CUarray_format_enum(
        181,
    );
    /// 4 channel unorm R10G10B10A2 RGB format.
    pub const CU_AD_FORMAT_UNORM_INT_101010_2: CUarray_format_enum = CUarray_format_enum(
        80,
    );
    /// 4 channel unsigned 8-bit YUV packed format, with 4:2:2 sampling.
    pub const CU_AD_FORMAT_UINT8_PACKED_422: CUarray_format_enum = CUarray_format_enum(
        81,
    );
    /// 4 channel unsigned 8-bit YUV packed format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_UINT8_PACKED_444: CUarray_format_enum = CUarray_format_enum(
        82,
    );
    /// 3 channel unsigned 8-bit YUV semi-planar format, with 4:2:0 sampling.
    pub const CU_AD_FORMAT_UINT8_SEMIPLANAR_420: CUarray_format_enum = CUarray_format_enum(
        83,
    );
    /// 3 channel unsigned 16-bit YUV semi-planar format, with 4:2:0 sampling.
    pub const CU_AD_FORMAT_UINT16_SEMIPLANAR_420: CUarray_format_enum = CUarray_format_enum(
        84,
    );
    /// 3 channel unsigned 8-bit YUV semi-planar format, with 4:2:2 sampling.
    pub const CU_AD_FORMAT_UINT8_SEMIPLANAR_422: CUarray_format_enum = CUarray_format_enum(
        85,
    );
    /// 3 channel unsigned 16-bit YUV semi-planar format, with 4:2:2 sampling.
    pub const CU_AD_FORMAT_UINT16_SEMIPLANAR_422: CUarray_format_enum = CUarray_format_enum(
        86,
    );
    /// 3 channel unsigned 8-bit YUV semi-planar format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_UINT8_SEMIPLANAR_444: CUarray_format_enum = CUarray_format_enum(
        87,
    );
    /// 3 channel unsigned 16-bit YUV semi-planar format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_UINT16_SEMIPLANAR_444: CUarray_format_enum = CUarray_format_enum(
        88,
    );
    /// 3 channel unsigned 8-bit YUV planar format, with 4:2:0 sampling.
    pub const CU_AD_FORMAT_UINT8_PLANAR_420: CUarray_format_enum = CUarray_format_enum(
        89,
    );
    /// 3 channel unsigned 16-bit YUV planar format, with 4:2:0 sampling.
    pub const CU_AD_FORMAT_UINT16_PLANAR_420: CUarray_format_enum = CUarray_format_enum(
        90,
    );
    /// 3 channel unsigned 8-bit YUV planar format, with 4:2:2 sampling.
    pub const CU_AD_FORMAT_UINT8_PLANAR_422: CUarray_format_enum = CUarray_format_enum(
        91,
    );
    /// 3 channel unsigned 16-bit YUV planar format, with 4:2:2 sampling.
    pub const CU_AD_FORMAT_UINT16_PLANAR_422: CUarray_format_enum = CUarray_format_enum(
        92,
    );
    /// 3 channel unsigned 8-bit YUV planar format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_UINT8_PLANAR_444: CUarray_format_enum = CUarray_format_enum(
        93,
    );
    /// 3 channel unsigned 16-bit YUV planar format, with 4:4:4 sampling.
    pub const CU_AD_FORMAT_UINT16_PLANAR_444: CUarray_format_enum = CUarray_format_enum(
        94,
    );
    /// Reserved upper-bound sentinel for native array formats.
    pub const CU_AD_FORMAT_MAX: CUarray_format_enum = CUarray_format_enum(2147483647);
}
/// Array formats
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUarray_format_enum(pub ::core::ffi::c_uint);
pub use self::CUarray_format_enum as CUarray_format;
impl CUaddress_mode_enum {
    /// Wrapping address mode.
    pub const CU_TR_ADDRESS_MODE_WRAP: CUaddress_mode_enum = CUaddress_mode_enum(0);
    /// Clamp to edge address mode.
    pub const CU_TR_ADDRESS_MODE_CLAMP: CUaddress_mode_enum = CUaddress_mode_enum(1);
    /// Mirror address mode.
    pub const CU_TR_ADDRESS_MODE_MIRROR: CUaddress_mode_enum = CUaddress_mode_enum(2);
    /// Border address mode.
    pub const CU_TR_ADDRESS_MODE_BORDER: CUaddress_mode_enum = CUaddress_mode_enum(3);
}
/// Texture reference addressing modes
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUaddress_mode_enum(pub ::core::ffi::c_uint);
pub use self::CUaddress_mode_enum as CUaddress_mode;
impl CUfilter_mode_enum {
    /// Point filter mode.
    pub const CU_TR_FILTER_MODE_POINT: CUfilter_mode_enum = CUfilter_mode_enum(0);
    /// Linear filter mode.
    pub const CU_TR_FILTER_MODE_LINEAR: CUfilter_mode_enum = CUfilter_mode_enum(1);
}
/// Texture reference filtering modes
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUfilter_mode_enum(pub ::core::ffi::c_uint);
pub use self::CUfilter_mode_enum as CUfilter_mode;
impl CUdevice_attribute_enum {
    /// Maximum number of threads per block.
    pub const CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK: CUdevice_attribute_enum = CUdevice_attribute_enum(
        1,
    );
    /// Maximum block dimension X.
    pub const CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X: CUdevice_attribute_enum = CUdevice_attribute_enum(
        2,
    );
    /// Maximum block dimension Y.
    pub const CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y: CUdevice_attribute_enum = CUdevice_attribute_enum(
        3,
    );
    /// Maximum block dimension Z.
    pub const CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z: CUdevice_attribute_enum = CUdevice_attribute_enum(
        4,
    );
    /// Maximum grid dimension X.
    pub const CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X: CUdevice_attribute_enum = CUdevice_attribute_enum(
        5,
    );
    /// Maximum grid dimension Y.
    pub const CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y: CUdevice_attribute_enum = CUdevice_attribute_enum(
        6,
    );
    /// Maximum grid dimension Z.
    pub const CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z: CUdevice_attribute_enum = CUdevice_attribute_enum(
        7,
    );
    /// Maximum shared memory available per block in bytes.
    pub const CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK: CUdevice_attribute_enum = CUdevice_attribute_enum(
        8,
    );
    /// use [`CUdevice_attribute::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK`].
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK: CUdevice_attribute_enum = CUdevice_attribute_enum(
        8,
    );
    /// Memory available on device for **constant** variables in a CUDA C kernel in bytes.
    pub const CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY: CUdevice_attribute_enum = CUdevice_attribute_enum(
        9,
    );
    /// Warp size in threads.
    pub const CU_DEVICE_ATTRIBUTE_WARP_SIZE: CUdevice_attribute_enum = CUdevice_attribute_enum(
        10,
    );
    /// Maximum pitch in bytes allowed by memory copies.
    pub const CU_DEVICE_ATTRIBUTE_MAX_PITCH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        11,
    );
    /// Maximum number of 32-bit registers available per block.
    pub const CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK: CUdevice_attribute_enum = CUdevice_attribute_enum(
        12,
    );
    /// use [`CUdevice_attribute::CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK`].
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK: CUdevice_attribute_enum = CUdevice_attribute_enum(
        12,
    );
    /// Typical clock frequency in kilohertz.
    pub const CU_DEVICE_ATTRIBUTE_CLOCK_RATE: CUdevice_attribute_enum = CUdevice_attribute_enum(
        13,
    );
    /// Alignment requirement for textures.
    pub const CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        14,
    );
    /// Device can possibly copy memory and execute a kernel concurrently.
    ///
    /// Deprecated. Use instead [`CUdevice_attribute::CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT`].
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_GPU_OVERLAP: CUdevice_attribute_enum = CUdevice_attribute_enum(
        15,
    );
    /// Number of multiprocessors on device.
    pub const CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        16,
    );
    /// Specifies whether there is a run time limit on kernels.
    pub const CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        17,
    );
    /// Device is integrated with host memory.
    pub const CU_DEVICE_ATTRIBUTE_INTEGRATED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        18,
    );
    /// Device can map host memory into CUDA address space.
    pub const CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY: CUdevice_attribute_enum = CUdevice_attribute_enum(
        19,
    );
    /// Compute mode (See [CUcomputemode](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga637aab2eadb52e1c1c048b8bad9592d1) for details).
    pub const CU_DEVICE_ATTRIBUTE_COMPUTE_MODE: CUdevice_attribute_enum = CUdevice_attribute_enum(
        20,
    );
    /// Maximum 1D texture width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        21,
    );
    /// Maximum 2D texture width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        22,
    );
    /// Maximum 2D texture height.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        23,
    );
    /// Maximum 3D texture width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        24,
    );
    /// Maximum 3D texture height.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        25,
    );
    /// Maximum 3D texture depth.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        26,
    );
    /// Maximum 2D layered texture width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        27,
    );
    /// Maximum 2D layered texture height.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        28,
    );
    /// Maximum layers in a 2D layered texture.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        29,
    );
    /// use [`CUdevice_attribute::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH`].
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        27,
    );
    /// use [`CUdevice_attribute::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT`].
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        28,
    );
    /// use [`CUdevice_attribute::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS`].
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES: CUdevice_attribute_enum = CUdevice_attribute_enum(
        29,
    );
    /// Alignment requirement for surfaces.
    pub const CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        30,
    );
    /// Device can possibly execute multiple kernels concurrently.
    pub const CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        31,
    );
    /// Device has ECC support enabled.
    pub const CU_DEVICE_ATTRIBUTE_ECC_ENABLED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        32,
    );
    /// PCI bus ID of the device.
    pub const CU_DEVICE_ATTRIBUTE_PCI_BUS_ID: CUdevice_attribute_enum = CUdevice_attribute_enum(
        33,
    );
    /// PCI device ID of the device.
    pub const CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID: CUdevice_attribute_enum = CUdevice_attribute_enum(
        34,
    );
    /// Device is using TCC driver model.
    pub const CU_DEVICE_ATTRIBUTE_TCC_DRIVER: CUdevice_attribute_enum = CUdevice_attribute_enum(
        35,
    );
    /// Peak memory clock frequency in kilohertz.
    pub const CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE: CUdevice_attribute_enum = CUdevice_attribute_enum(
        36,
    );
    /// Global memory bus width in bits.
    pub const CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        37,
    );
    /// Size of L2 cache in bytes.
    pub const CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE: CUdevice_attribute_enum = CUdevice_attribute_enum(
        38,
    );
    /// Maximum resident threads per multiprocessor.
    pub const CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR: CUdevice_attribute_enum = CUdevice_attribute_enum(
        39,
    );
    /// Number of asynchronous engines.
    pub const CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        40,
    );
    /// Device shares a unified address space with the host.
    pub const CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING: CUdevice_attribute_enum = CUdevice_attribute_enum(
        41,
    );
    /// Maximum 1D layered texture width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        42,
    );
    /// Maximum layers in a 1D layered texture.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        43,
    );
    /// do not use.
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER: CUdevice_attribute_enum = CUdevice_attribute_enum(
        44,
    );
    /// Maximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        45,
    );
    /// Maximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        46,
    );
    /// Alternate maximum 3D texture width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE: CUdevice_attribute_enum = CUdevice_attribute_enum(
        47,
    );
    /// Alternate maximum 3D texture height.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE: CUdevice_attribute_enum = CUdevice_attribute_enum(
        48,
    );
    /// Alternate maximum 3D texture depth.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE: CUdevice_attribute_enum = CUdevice_attribute_enum(
        49,
    );
    /// PCI domain ID of the device.
    pub const CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID: CUdevice_attribute_enum = CUdevice_attribute_enum(
        50,
    );
    /// Pitch alignment requirement for textures.
    pub const CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        51,
    );
    /// Maximum cubemap texture width/height.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        52,
    );
    /// Maximum cubemap layered texture width/height.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        53,
    );
    /// Maximum layers in a cubemap layered texture.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        54,
    );
    /// Maximum 1D surface width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        55,
    );
    /// Maximum 2D surface width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        56,
    );
    /// Maximum 2D surface height.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        57,
    );
    /// Maximum 3D surface width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        58,
    );
    /// Maximum 3D surface height.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        59,
    );
    /// Maximum 3D surface depth.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        60,
    );
    /// Maximum 1D layered surface width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        61,
    );
    /// Maximum layers in a 1D layered surface.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        62,
    );
    /// Maximum 2D layered surface width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        63,
    );
    /// Maximum 2D layered surface height.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        64,
    );
    /// Maximum layers in a 2D layered surface.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        65,
    );
    /// Maximum cubemap surface width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        66,
    );
    /// Maximum cubemap layered surface width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        67,
    );
    /// Maximum layers in a cubemap layered surface.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        68,
    );
    /// do not use.
    ///
    /// Use cudaDeviceGetTexture1DLinearMaxWidth() or [`cuDeviceGetTexture1DLinearMaxWidth`] instead.
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        69,
    );
    /// Maximum 2D linear texture width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        70,
    );
    /// Maximum 2D linear texture height.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        71,
    );
    /// Maximum 2D linear texture pitch in bytes.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        72,
    );
    /// Maximum mipmapped 2D texture width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        73,
    );
    /// Maximum mipmapped 2D texture height.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        74,
    );
    /// Major compute capability version number.
    pub const CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR: CUdevice_attribute_enum = CUdevice_attribute_enum(
        75,
    );
    /// Minor compute capability version number.
    pub const CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR: CUdevice_attribute_enum = CUdevice_attribute_enum(
        76,
    );
    /// Maximum mipmapped 1D texture width.
    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        77,
    );
    /// Device supports stream priorities.
    pub const CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        78,
    );
    /// Device supports caching globals in L1.
    pub const CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        79,
    );
    /// Device supports caching locals in L1.
    pub const CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        80,
    );
    /// Maximum shared memory available per multiprocessor in bytes.
    pub const CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR: CUdevice_attribute_enum = CUdevice_attribute_enum(
        81,
    );
    /// Maximum number of 32-bit registers available per multiprocessor.
    pub const CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR: CUdevice_attribute_enum = CUdevice_attribute_enum(
        82,
    );
    /// Device can allocate managed memory on this system.
    pub const CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY: CUdevice_attribute_enum = CUdevice_attribute_enum(
        83,
    );
    /// Device is on a multi-GPU board.
    pub const CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD: CUdevice_attribute_enum = CUdevice_attribute_enum(
        84,
    );
    /// Unique id for a group of devices on the same multi-GPU board.
    pub const CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID: CUdevice_attribute_enum = CUdevice_attribute_enum(
        85,
    );
    /// Link between the device and the host supports all native atomic operations.
    pub const CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        86,
    );
    /// Ratio of single precision performance (in floating-point operations per second) to double precision performance.
    pub const CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO: CUdevice_attribute_enum = CUdevice_attribute_enum(
        87,
    );
    /// Device supports coherently accessing pageable memory without calling cudaHostRegister on it.
    pub const CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        88,
    );
    /// Device can coherently access managed memory concurrently with the CPU.
    pub const CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        89,
    );
    /// Device supports compute preemption.
    pub const CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        90,
    );
    /// Device can access host registered memory at the same virtual address as the CPU.
    pub const CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM: CUdevice_attribute_enum = CUdevice_attribute_enum(
        91,
    );
    /// along with v1 MemOps API, cuStreamBatchMemOp and related APIs are supported.
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1: CUdevice_attribute_enum = CUdevice_attribute_enum(
        92,
    );
    /// along with v1 MemOps API, 64-bit operations are supported in cuStreamBatchMemOp and related APIs.
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1: CUdevice_attribute_enum = CUdevice_attribute_enum(
        93,
    );
    /// along with v1 MemOps API, [`CUstreamWaitValue_flags_enum::CU_STREAM_WAIT_VALUE_NOR`] is supported.
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1: CUdevice_attribute_enum = CUdevice_attribute_enum(
        94,
    );
    /// Device supports launching cooperative kernels via [`cuLaunchCooperativeKernel`].
    pub const CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        95,
    );
    /// [`cuLaunchCooperativeKernelMultiDevice`] is deprecated.
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        96,
    );
    /// Maximum optin shared memory per block.
    ///
    /// That is shared memory that is available for dynamic allocation or static allocation (including architecture specific static shared memory) on this device but is not guaranteed to be portable.
    pub const CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN: CUdevice_attribute_enum = CUdevice_attribute_enum(
        97,
    );
    /// The [`CUstreamWaitValue_flags_enum::CU_STREAM_WAIT_VALUE_FLUSH`] flag and the [`CUstreamBatchMemOpType_enum::CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES`] MemOp are supported on the device.
    ///
    /// See [Stream Memory Operations](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__MEMOP.html#group__cuda__memop) for additional details.
    pub const CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES: CUdevice_attribute_enum = CUdevice_attribute_enum(
        98,
    );
    /// Device supports host memory registration via ::cudaHostRegister.
    pub const CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        99,
    );
    /// Device accesses pageable memory via the host’s page tables.
    pub const CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES: CUdevice_attribute_enum = CUdevice_attribute_enum(
        100,
    );
    /// The host can directly access managed memory on the device without migration.
    pub const CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST: CUdevice_attribute_enum = CUdevice_attribute_enum(
        101,
    );
    /// Use [`CUdevice_attribute::CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED`].
    #[deprecated]
    pub const CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        102,
    );
    /// Device supports virtual memory management APIs like [`cuMemAddressReserve`], [`cuMemCreate`], [`cuMemMap`] and related APIs.
    pub const CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        102,
    );
    /// Device supports exporting memory to a posix file descriptor with [`cuMemExportToShareableHandle`], if requested via [`cuMemCreate`].
    pub const CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        103,
    );
    /// Device supports exporting memory to a Win32 NT handle with [`cuMemExportToShareableHandle`], if requested via [`cuMemCreate`].
    pub const CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        104,
    );
    /// Device supports exporting memory to a Win32 KMT handle with [`cuMemExportToShareableHandle`], if requested via [`cuMemCreate`].
    pub const CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        105,
    );
    /// Maximum number of blocks per multiprocessor.
    pub const CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR: CUdevice_attribute_enum = CUdevice_attribute_enum(
        106,
    );
    /// Device supports compression of memory.
    pub const CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        107,
    );
    /// Maximum L2 persisting lines capacity setting in bytes.
    pub const CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE: CUdevice_attribute_enum = CUdevice_attribute_enum(
        108,
    );
    /// Maximum value of [CUaccessPolicyWindow::num_bytes](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUaccessPolicyWindow__v1.html#structcuaccesspolicywindow__v1_1a79ee4c983788bc68605d42aee2701eec).
    pub const CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE: CUdevice_attribute_enum = CUdevice_attribute_enum(
        109,
    );
    /// Device supports specifying the GPUDirect RDMA flag with [`cuMemCreate`].
    pub const CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        110,
    );
    /// Shared memory reserved by CUDA driver per block in bytes.
    pub const CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK: CUdevice_attribute_enum = CUdevice_attribute_enum(
        111,
    );
    /// Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays.
    pub const CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        112,
    );
    /// Device supports using the cuMemHostRegister flag ::CU_MEMHOSTERGISTER_READ_ONLY to register memory that must be mapped as read-only to the GPU.
    pub const CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        113,
    );
    /// External timeline semaphore interop is supported on the device.
    pub const CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        114,
    );
    /// Device supports using the [`cuMemAllocAsync`] and ::cuMemPool family of APIs.
    pub const CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        115,
    );
    /// Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see <https://docs.nvidia.com/cuda/gpudirect-rdma> for more information).
    pub const CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        116,
    );
    /// The returned attribute shall be interpreted as a bitmask, where the individual bits are described by the [CUflushGPUDirectRDMAWritesOptions](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gaf34334d1d6892847a5d05be7ca8db3c6) enum.
    pub const CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        117,
    );
    /// GPUDirect RDMA writes to the device do not need to be flushed for consumers within the scope indicated by the returned attribute.
    ///
    /// See [CUGPUDirectRDMAWritesOrdering](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga8d647023012ffc318ce86814fec05376) for the numerical values returned here.
    pub const CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING: CUdevice_attribute_enum = CUdevice_attribute_enum(
        118,
    );
    /// Handle types supported with mempool based IPC.
    pub const CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES: CUdevice_attribute_enum = CUdevice_attribute_enum(
        119,
    );
    /// Indicates device supports cluster launch.
    pub const CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        120,
    );
    /// Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays.
    pub const CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        121,
    );
    /// 64-bit operations are supported in cuStreamBatchMemOp and related MemOp APIs.
    pub const CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        122,
    );
    /// [`CUstreamWaitValue_flags_enum::CU_STREAM_WAIT_VALUE_NOR`] is supported by MemOp APIs.
    pub const CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR: CUdevice_attribute_enum = CUdevice_attribute_enum(
        123,
    );
    /// Device supports buffer sharing with dma_buf mechanism.
    pub const CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        124,
    );
    /// Device supports IPC Events.
    pub const CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        125,
    );
    /// Number of memory domains the device supports.
    pub const CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        126,
    );
    /// Device supports accessing memory using Tensor Map.
    pub const CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        127,
    );
    /// Device supports exporting memory to a fabric handle with [`cuMemExportToShareableHandle`] or requested with [`cuMemCreate`].
    pub const CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        128,
    );
    /// Device supports unified function pointers.
    pub const CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS: CUdevice_attribute_enum = CUdevice_attribute_enum(
        129,
    );
    /// NUMA configuration of a device: value is of type [CUdeviceNumaConfig](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gabd735e21702c410355167e04d3362eab) enum.
    pub const CU_DEVICE_ATTRIBUTE_NUMA_CONFIG: CUdevice_attribute_enum = CUdevice_attribute_enum(
        130,
    );
    /// NUMA node ID of the GPU memory.
    pub const CU_DEVICE_ATTRIBUTE_NUMA_ID: CUdevice_attribute_enum = CUdevice_attribute_enum(
        131,
    );
    /// Device supports switch multicast and reduction operations.
    pub const CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        132,
    );
    /// Indicates if contexts created on this device will be shared via MPS.
    pub const CU_DEVICE_ATTRIBUTE_MPS_ENABLED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        133,
    );
    /// NUMA ID of the host node closest to the device.
    ///
    /// Returns -1 when system does not support NUMA.
    pub const CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID: CUdevice_attribute_enum = CUdevice_attribute_enum(
        134,
    );
    /// Device supports CIG with D3D12.
    pub const CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        135,
    );
    /// The returned valued shall be interpreted as a bitmask, where the individual bits are described by the [CUmemDecompressAlgorithm](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__MEM.html#group__cuda__mem_1ga6c015495b909c100e19cd4ddafceee91) enum.
    pub const CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK: CUdevice_attribute_enum = CUdevice_attribute_enum(
        136,
    );
    /// The returned valued is the maximum length in bytes of a single decompress operation that is allowed.
    pub const CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH: CUdevice_attribute_enum = CUdevice_attribute_enum(
        137,
    );
    /// Device supports CIG with Vulkan.
    pub const CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        138,
    );
    /// The combined 16-bit PCI device ID and 16-bit PCI vendor ID.
    pub const CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID: CUdevice_attribute_enum = CUdevice_attribute_enum(
        139,
    );
    /// The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor ID.
    pub const CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID: CUdevice_attribute_enum = CUdevice_attribute_enum(
        140,
    );
    /// Device supports HOST_NUMA location with the virtual memory management APIs like [`cuMemCreate`], [`cuMemMap`] and related APIs.
    pub const CU_DEVICE_ATTRIBUTE_HOST_NUMA_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        141,
    );
    /// Device supports HOST_NUMA location with the [`cuMemAllocAsync`] and ::cuMemPool family of APIs.
    pub const CU_DEVICE_ATTRIBUTE_HOST_NUMA_MEMORY_POOLS_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        142,
    );
    /// Device supports HOST_NUMA location IPC between nodes in a multi-node system.
    pub const CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        143,
    );
    /// Device suports HOST location with the [`cuMemAllocAsync`] and ::cuMemPool family of APIs.
    pub const CU_DEVICE_ATTRIBUTE_HOST_MEMORY_POOLS_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        144,
    );
    /// Device supports HOST location with the virtual memory management APIs like [`cuMemCreate`], [`cuMemMap`] and related APIs.
    pub const CU_DEVICE_ATTRIBUTE_HOST_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        145,
    );
    /// Device supports page-locked host memory buffer sharing with dma_buf mechanism.
    pub const CU_DEVICE_ATTRIBUTE_HOST_ALLOC_DMA_BUF_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        146,
    );
    /// Link between the device and the host supports only some native atomic operations.
    pub const CU_DEVICE_ATTRIBUTE_ONLY_PARTIAL_HOST_NATIVE_ATOMIC_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        147,
    );
    /// Device supports atomic reduction operations in stream batch memory operations.
    pub const CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        148,
    );
    /// Number of locality domains.
    pub const CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_COUNT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        149,
    );
    /// Maximum oversized shared memory per block.
    pub const CU_DEVICE_ATTRIBUTE_MAX_OVERSIZED_SHARED_MEMORY_PER_BLOCK: CUdevice_attribute_enum = CUdevice_attribute_enum(
        150,
    );
    /// Device supports CIG streams with D3D12.
    pub const CU_DEVICE_ATTRIBUTE_D3D12_CIG_STREAMS_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        151,
    );
    /// Device supports mmap() of dmabuf file descriptors for CUDA device memory allocations.
    pub const CU_DEVICE_ATTRIBUTE_DMA_BUF_MMAP_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        152,
    );
    /// Device supports unicast logical endpoints.
    pub const CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_UNICAST_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        153,
    );
    /// Device supports multicast logical endpoints.
    pub const CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_MULTICAST_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        154,
    );
    /// Device supports counted operations via logical endpoints.
    pub const CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_COUNTED_OPS_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        155,
    );
    /// Device supports unicast logical endpoint access on the owner device.
    pub const CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_UNICAST_ACCESS_ON_OWNER_DEVICE_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        156,
    );
    /// Number of multiprocessors on each locality domain.
    pub const CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_MULTIPROCESSOR_COUNT: CUdevice_attribute_enum = CUdevice_attribute_enum(
        157,
    );
    /// Handle types supported with logical endpoint IPC.
    pub const CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_SUPPORTED_HANDLE_TYPES: CUdevice_attribute_enum = CUdevice_attribute_enum(
        158,
    );
    /// Device supports GPUDirect RDMA with localized memory using the default RDMA mapping link.
    pub const CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_LOCALIZED_MEMORY_SUPPORTED: CUdevice_attribute_enum = CUdevice_attribute_enum(
        161,
    );
    /// End marker for the native device-attribute identifiers.
    pub const CU_DEVICE_ATTRIBUTE_MAX: CUdevice_attribute_enum = CUdevice_attribute_enum(
        162,
    );
}
/// Device properties
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdevice_attribute_enum(pub ::core::ffi::c_uint);
pub use self::CUdevice_attribute_enum as CUdevice_attribute;
/// Legacy device properties
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdevprop_st {
    /// Maximum number of threads per block
    pub maxThreadsPerBlock: ::core::ffi::c_int,
    /// Maximum size of each dimension of a block
    pub maxThreadsDim: [::core::ffi::c_int; 3usize],
    /// Maximum size of each dimension of a grid
    pub maxGridSize: [::core::ffi::c_int; 3usize],
    /// Shared memory available per block in bytes
    pub sharedMemPerBlock: ::core::ffi::c_int,
    /// Constant memory available on device in bytes
    pub totalConstantMemory: ::core::ffi::c_int,
    /// Warp size in threads
    pub SIMDWidth: ::core::ffi::c_int,
    /// Maximum pitch in bytes allowed by memory copies
    pub memPitch: ::core::ffi::c_int,
    /// 32-bit registers available per block
    pub regsPerBlock: ::core::ffi::c_int,
    /// Clock frequency in kilohertz
    pub clockRate: ::core::ffi::c_int,
    /// Alignment requirement for textures
    pub textureAlign: ::core::ffi::c_int,
}
/// Legacy device properties.
pub type CUdevprop_v1 = CUdevprop_st;
/// Legacy device properties
pub type CUdevprop = CUdevprop_v1;
impl CUpointer_attribute_enum {
    /// The [`CUcontext`] on which a pointer was allocated or registered.
    pub const CU_POINTER_ATTRIBUTE_CONTEXT: CUpointer_attribute_enum = CUpointer_attribute_enum(
        1,
    );
    /// The [CUmemorytype](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga8a114cc994ad2e865c44ef3838eaec72) describing the physical location of a pointer.
    pub const CU_POINTER_ATTRIBUTE_MEMORY_TYPE: CUpointer_attribute_enum = CUpointer_attribute_enum(
        2,
    );
    /// The address at which a pointer’s memory may be accessed on the device.
    pub const CU_POINTER_ATTRIBUTE_DEVICE_POINTER: CUpointer_attribute_enum = CUpointer_attribute_enum(
        3,
    );
    /// The address at which a pointer’s memory may be accessed on the host.
    pub const CU_POINTER_ATTRIBUTE_HOST_POINTER: CUpointer_attribute_enum = CUpointer_attribute_enum(
        4,
    );
    /// A pair of tokens for use with the nv-p2p.h Linux kernel interface.
    pub const CU_POINTER_ATTRIBUTE_P2P_TOKENS: CUpointer_attribute_enum = CUpointer_attribute_enum(
        5,
    );
    /// Synchronize every synchronous memory operation initiated on this region.
    pub const CU_POINTER_ATTRIBUTE_SYNC_MEMOPS: CUpointer_attribute_enum = CUpointer_attribute_enum(
        6,
    );
    /// A process-wide unique ID for an allocated memory region.
    pub const CU_POINTER_ATTRIBUTE_BUFFER_ID: CUpointer_attribute_enum = CUpointer_attribute_enum(
        7,
    );
    /// Indicates if the pointer points to managed memory.
    pub const CU_POINTER_ATTRIBUTE_IS_MANAGED: CUpointer_attribute_enum = CUpointer_attribute_enum(
        8,
    );
    /// A device ordinal of a device on which a pointer was allocated or registered.
    pub const CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL: CUpointer_attribute_enum = CUpointer_attribute_enum(
        9,
    );
    /// 1 if this pointer maps to an allocation that is suitable for ::cudaIpcGetMemHandle, 0 otherwise.
    pub const CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE: CUpointer_attribute_enum = CUpointer_attribute_enum(
        10,
    );
    /// Starting address for this requested pointer.
    pub const CU_POINTER_ATTRIBUTE_RANGE_START_ADDR: CUpointer_attribute_enum = CUpointer_attribute_enum(
        11,
    );
    /// Size of the address range for this requested pointer.
    pub const CU_POINTER_ATTRIBUTE_RANGE_SIZE: CUpointer_attribute_enum = CUpointer_attribute_enum(
        12,
    );
    /// 1 if this pointer is in a valid address range that is mapped to a backing allocation, 0 otherwise.
    pub const CU_POINTER_ATTRIBUTE_MAPPED: CUpointer_attribute_enum = CUpointer_attribute_enum(
        13,
    );
    /// Bitmask of allowed [CUmemAllocationHandleType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga450a23153d86fce0afe30e25d63caef9) for this allocation.
    pub const CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES: CUpointer_attribute_enum = CUpointer_attribute_enum(
        14,
    );
    /// 1 if the memory this pointer is referencing can be used with the GPUDirect RDMA API.
    pub const CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE: CUpointer_attribute_enum = CUpointer_attribute_enum(
        15,
    );
    /// Returns the access flags the device associated with the current context has on the corresponding memory referenced by the pointer given.
    pub const CU_POINTER_ATTRIBUTE_ACCESS_FLAGS: CUpointer_attribute_enum = CUpointer_attribute_enum(
        16,
    );
    /// Returns the mempool handle for the allocation if it was allocated from a mempool.
    ///
    /// Otherwise returns NULL.
    pub const CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE: CUpointer_attribute_enum = CUpointer_attribute_enum(
        17,
    );
    /// Size of the actual underlying mapping that the pointer belongs to.
    pub const CU_POINTER_ATTRIBUTE_MAPPING_SIZE: CUpointer_attribute_enum = CUpointer_attribute_enum(
        18,
    );
    /// The start address of the mapping that the pointer belongs to.
    pub const CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR: CUpointer_attribute_enum = CUpointer_attribute_enum(
        19,
    );
    /// A process-wide unique id corresponding to the physical allocation the pointer belongs to.
    pub const CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID: CUpointer_attribute_enum = CUpointer_attribute_enum(
        20,
    );
    /// Returns in `*data` a boolean that indicates whether the pointer points to memory that is capable to be used for hardware accelerated decompression.
    pub const CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE: CUpointer_attribute_enum = CUpointer_attribute_enum(
        21,
    );
    /// Returns in `*data` an integer representing the locality domain ordinal of the memory allocation, or -1 if the allocation is not localized to a locality domain.
    pub const CU_POINTER_ATTRIBUTE_LOCALITY_DOMAIN_ORDINAL: CUpointer_attribute_enum = CUpointer_attribute_enum(
        22,
    );
}
/// Pointer information
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUpointer_attribute_enum(pub ::core::ffi::c_uint);
pub use self::CUpointer_attribute_enum as CUpointer_attribute;
impl CUfunction_attribute_enum {
    /// The maximum number of threads per block, beyond which a launch of the function would fail.
    ///
    /// This number depends on both the function and the device on which the function is currently loaded.
    pub const CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: CUfunction_attribute_enum = CUfunction_attribute_enum(
        0,
    );
    /// The size in bytes of statically-allocated shared memory required by this function.
    ///
    /// This does not include dynamically-allocated shared memory requested by the user at runtime.
    pub const CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: CUfunction_attribute_enum = CUfunction_attribute_enum(
        1,
    );
    /// The size in bytes of user-allocated constant memory required by this function.
    pub const CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: CUfunction_attribute_enum = CUfunction_attribute_enum(
        2,
    );
    /// The size in bytes of local memory used by each thread of this function.
    pub const CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: CUfunction_attribute_enum = CUfunction_attribute_enum(
        3,
    );
    /// The number of registers used by each thread of this function.
    pub const CU_FUNC_ATTRIBUTE_NUM_REGS: CUfunction_attribute_enum = CUfunction_attribute_enum(
        4,
    );
    /// The PTX virtual architecture version for which the function was compiled.
    ///
    /// This value is the major PTX version \* 10 + the minor PTX version, so a PTX version 1.3 function would return the value 13. Note that this may return the undefined value of 0 for cubins compiled prior to CUDA 3.0.
    pub const CU_FUNC_ATTRIBUTE_PTX_VERSION: CUfunction_attribute_enum = CUfunction_attribute_enum(
        5,
    );
    /// The binary architecture version for which the function was compiled.
    ///
    /// This value is the major binary version \* 10 + the minor binary version, so a binary version 1.3 function would return the value 13. Note that this will return a value of 10 for legacy cubins that do not have a properly-encoded binary architecture version.
    pub const CU_FUNC_ATTRIBUTE_BINARY_VERSION: CUfunction_attribute_enum = CUfunction_attribute_enum(
        6,
    );
    /// The attribute to indicate whether the function has been compiled with user specified option “-Xptxas –dlcm=ca” set .
    pub const CU_FUNC_ATTRIBUTE_CACHE_MODE_CA: CUfunction_attribute_enum = CUfunction_attribute_enum(
        7,
    );
    /// The maximum size in bytes of dynamically-allocated shared memory that can be used by this function.
    ///
    /// If the user-specified dynamic shared memory size is larger than this value, the launch will fail.
    ///
    /// The default value of this attribute is [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK`] - [`CUfunction_attribute_enum::CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`], except when [`CUfunction_attribute_enum::CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`] is greater than [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK`], then the default value of this attribute is 0. The value can be increased to [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN`] - [`CUfunction_attribute_enum::CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`].
    ///
    /// This attribute is ignored if [`CUfunction_attribute_enum::CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE`] or [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE`] is set.
    ///
    /// This attribute cannot be used to access oversized shared memory. Oversized shared memory can only be accessed by setting [`CUfunction_attribute_enum::CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE`] or [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE`].
    ///
    /// See [`cuFuncSetAttribute`], [`cuKernelSetAttribute`].
    pub const CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: CUfunction_attribute_enum = CUfunction_attribute_enum(
        8,
    );
    /// On devices where the L1 cache and shared memory use the same hardware resources, this sets the shared memory carveout preference, in percent of the total shared memory.
    ///
    /// Refer to [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR`]. This is only a hint, and the driver can choose a different ratio if required to execute the function.
    ///
    /// See [`cuFuncSetAttribute`], [`cuKernelSetAttribute`].
    pub const CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: CUfunction_attribute_enum = CUfunction_attribute_enum(
        9,
    );
    /// If this attribute is set, the kernel must launch with a valid cluster size specified.
    ///
    /// See [`cuFuncSetAttribute`], [`cuKernelSetAttribute`].
    pub const CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET: CUfunction_attribute_enum = CUfunction_attribute_enum(
        10,
    );
    /// The required cluster width in blocks.
    ///
    /// The values must either all be 0 or all be positive. The validity of the cluster dimensions is otherwise checked at launch time.
    ///
    /// If the value is set during compile time, it cannot be set at runtime. Setting it at runtime will return [`CUresult::CUDA_ERROR_NOT_PERMITTED`].
    ///
    /// See [`cuFuncSetAttribute`], [`cuKernelSetAttribute`].
    pub const CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH: CUfunction_attribute_enum = CUfunction_attribute_enum(
        11,
    );
    /// The required cluster height in blocks.
    ///
    /// The values must either all be 0 or all be positive. The validity of the cluster dimensions is otherwise checked at launch time.
    ///
    /// If the value is set during compile time, it cannot be set at runtime. Setting it at runtime should return [`CUresult::CUDA_ERROR_NOT_PERMITTED`].
    ///
    /// See [`cuFuncSetAttribute`], [`cuKernelSetAttribute`].
    pub const CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT: CUfunction_attribute_enum = CUfunction_attribute_enum(
        12,
    );
    /// The required cluster depth in blocks.
    ///
    /// The values must either all be 0 or all be positive. The validity of the cluster dimensions is otherwise checked at launch time.
    ///
    /// If the value is set during compile time, it cannot be set at runtime. Setting it at runtime should return [`CUresult::CUDA_ERROR_NOT_PERMITTED`].
    ///
    /// See [`cuFuncSetAttribute`], [`cuKernelSetAttribute`].
    pub const CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH: CUfunction_attribute_enum = CUfunction_attribute_enum(
        13,
    );
    /// Whether the function can be launched with non-portable cluster size.
    ///
    /// 1 is allowed, 0 is disallowed. A non-portable cluster size may only function on the specific SKUs the program is tested on. The launch might fail if the program is run on a different hardware platform.
    ///
    /// CUDA API provides cudaOccupancyMaxActiveClusters to assist with checking whether the desired size can be launched on the current device.
    ///
    /// Portable Cluster Size
    ///
    /// A portable cluster size is guaranteed to be functional on all compute capabilities higher than the target compute capability. The portable cluster size for sm_90 is 8 blocks per cluster. This value may increase for future compute capabilities.
    ///
    /// The specific hardware unit may support higher cluster sizes that’s not guaranteed to be portable.
    ///
    /// See [`cuFuncSetAttribute`], [`cuKernelSetAttribute`].
    pub const CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED: CUfunction_attribute_enum = CUfunction_attribute_enum(
        14,
    );
    /// The block scheduling policy of a function.
    ///
    /// The value type is CUclusterSchedulingPolicy / cudaClusterSchedulingPolicy.
    ///
    /// See [`cuFuncSetAttribute`], [`cuKernelSetAttribute`].
    pub const CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE: CUfunction_attribute_enum = CUfunction_attribute_enum(
        15,
    );
    /// Whether the function can be updated on device.
    ///
    /// 1 means device node update is supported, 0 is unsupported.
    ///
    /// See [`cuFuncGetAttribute`].
    pub const CU_FUNC_ATTRIBUTE_DEVICE_NODE_UPDATE_SUPPORTED: CUfunction_attribute_enum = CUfunction_attribute_enum(
        16,
    );
    /// The shared memory mode of a function.
    ///
    /// The value type is CUsharedMemoryMode / cudaSharedMemoryMode.
    ///
    /// See [`cuFuncSetAttribute`], [`cuKernelSetAttribute`].
    pub const CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE: CUfunction_attribute_enum = CUfunction_attribute_enum(
        17,
    );
    /// Upper-bound sentinel for CUDA function attribute selectors.
    pub const CU_FUNC_ATTRIBUTE_MAX: CUfunction_attribute_enum = CUfunction_attribute_enum(
        18,
    );
}
/// Function properties
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUfunction_attribute_enum(pub ::core::ffi::c_uint);
pub use self::CUfunction_attribute_enum as CUfunction_attribute;
impl CUfunc_cache_enum {
    /// no preference for shared memory or L1 (default).
    pub const CU_FUNC_CACHE_PREFER_NONE: CUfunc_cache_enum = CUfunc_cache_enum(0);
    /// prefer larger shared memory and smaller L1 cache.
    pub const CU_FUNC_CACHE_PREFER_SHARED: CUfunc_cache_enum = CUfunc_cache_enum(1);
    /// prefer larger L1 cache and smaller shared memory.
    pub const CU_FUNC_CACHE_PREFER_L1: CUfunc_cache_enum = CUfunc_cache_enum(2);
    /// prefer equal sized L1 cache and shared memory.
    pub const CU_FUNC_CACHE_PREFER_EQUAL: CUfunc_cache_enum = CUfunc_cache_enum(3);
}
/// Function cache configurations
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUfunc_cache_enum(pub ::core::ffi::c_uint);
pub use self::CUfunc_cache_enum as CUfunc_cache;
impl CUsharedconfig_enum {
    /// set default shared memory bank size.
    pub const CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE: CUsharedconfig_enum = CUsharedconfig_enum(
        0,
    );
    /// set shared memory bank width to four bytes.
    pub const CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE: CUsharedconfig_enum = CUsharedconfig_enum(
        1,
    );
    /// set shared memory bank width to eight bytes.
    pub const CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE: CUsharedconfig_enum = CUsharedconfig_enum(
        2,
    );
}
/// Deprecated:
///
/// Shared memory configurations
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUsharedconfig_enum(pub ::core::ffi::c_uint);
pub use self::CUsharedconfig_enum as CUsharedconfig;
impl CUshared_carveout_enum {
    /// No preference for shared memory or L1 (default).
    pub const CU_SHAREDMEM_CARVEOUT_DEFAULT: CUshared_carveout_enum = CUshared_carveout_enum(
        -1,
    );
    /// Prefer maximum available shared memory, minimum L1 cache.
    pub const CU_SHAREDMEM_CARVEOUT_MAX_SHARED: CUshared_carveout_enum = CUshared_carveout_enum(
        100,
    );
    /// Prefer maximum available L1 cache, minimum shared memory.
    pub const CU_SHAREDMEM_CARVEOUT_MAX_L1: CUshared_carveout_enum = CUshared_carveout_enum(
        0,
    );
}
/// Shared memory carveout configurations. These may be passed to ::cuFuncSetAttribute or ::cuKernelSetAttribute
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUshared_carveout_enum(pub ::core::ffi::c_int);
pub use self::CUshared_carveout_enum as CUshared_carveout;
impl CUmemorytype_enum {
    /// Host memory.
    pub const CU_MEMORYTYPE_HOST: CUmemorytype_enum = CUmemorytype_enum(1);
    /// Device memory.
    pub const CU_MEMORYTYPE_DEVICE: CUmemorytype_enum = CUmemorytype_enum(2);
    /// Array memory.
    pub const CU_MEMORYTYPE_ARRAY: CUmemorytype_enum = CUmemorytype_enum(3);
    /// Unified device or host memory.
    pub const CU_MEMORYTYPE_UNIFIED: CUmemorytype_enum = CUmemorytype_enum(4);
}
/// Memory types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemorytype_enum(pub ::core::ffi::c_uint);
pub use self::CUmemorytype_enum as CUmemorytype;
impl CUcomputemode_enum {
    /// Default compute mode (Multiple contexts allowed per device).
    pub const CU_COMPUTEMODE_DEFAULT: CUcomputemode_enum = CUcomputemode_enum(0);
    /// Compute-prohibited mode (No contexts can be created on this device at this time).
    pub const CU_COMPUTEMODE_PROHIBITED: CUcomputemode_enum = CUcomputemode_enum(2);
    /// Compute-exclusive-process mode (Only one context used by a single process can be present on this device at a time).
    pub const CU_COMPUTEMODE_EXCLUSIVE_PROCESS: CUcomputemode_enum = CUcomputemode_enum(
        3,
    );
}
/// Compute Modes
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcomputemode_enum(pub ::core::ffi::c_uint);
pub use self::CUcomputemode_enum as CUcomputemode;
impl CUmem_advise_enum {
    /// Data will mostly be read and only occasionally be written to.
    pub const CU_MEM_ADVISE_SET_READ_MOSTLY: CUmem_advise_enum = CUmem_advise_enum(1);
    /// Undo the effect of [`CUmem_advise_enum::CU_MEM_ADVISE_SET_READ_MOSTLY`].
    pub const CU_MEM_ADVISE_UNSET_READ_MOSTLY: CUmem_advise_enum = CUmem_advise_enum(2);
    /// Set the preferred location for the data as the specified device.
    pub const CU_MEM_ADVISE_SET_PREFERRED_LOCATION: CUmem_advise_enum = CUmem_advise_enum(
        3,
    );
    /// Clear the preferred location for the data.
    pub const CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION: CUmem_advise_enum = CUmem_advise_enum(
        4,
    );
    /// Data will be accessed by the specified device, so prevent page faults as much as possible.
    pub const CU_MEM_ADVISE_SET_ACCESSED_BY: CUmem_advise_enum = CUmem_advise_enum(5);
    /// Let the Unified Memory subsystem decide on the page faulting policy for the specified device.
    pub const CU_MEM_ADVISE_UNSET_ACCESSED_BY: CUmem_advise_enum = CUmem_advise_enum(6);
}
/// Memory advise values
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmem_advise_enum(pub ::core::ffi::c_uint);
pub use self::CUmem_advise_enum as CUmem_advise;
impl CUmem_range_attribute_enum {
    /// Whether the range will mostly be read and only occasionally be written to.
    pub const CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY: CUmem_range_attribute_enum = CUmem_range_attribute_enum(
        1,
    );
    /// The preferred location of the range.
    pub const CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION: CUmem_range_attribute_enum = CUmem_range_attribute_enum(
        2,
    );
    /// Memory range has [`CUmem_advise_enum::CU_MEM_ADVISE_SET_ACCESSED_BY`] set for specified device.
    pub const CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY: CUmem_range_attribute_enum = CUmem_range_attribute_enum(
        3,
    );
    /// The last location to which the range was prefetched.
    pub const CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION: CUmem_range_attribute_enum = CUmem_range_attribute_enum(
        4,
    );
    /// The preferred location type of the range.
    pub const CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE: CUmem_range_attribute_enum = CUmem_range_attribute_enum(
        5,
    );
    /// The preferred location id of the range.
    pub const CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID: CUmem_range_attribute_enum = CUmem_range_attribute_enum(
        6,
    );
    /// The last location type to which the range was prefetched.
    pub const CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE: CUmem_range_attribute_enum = CUmem_range_attribute_enum(
        7,
    );
    /// The last location id to which the range was prefetched.
    pub const CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID: CUmem_range_attribute_enum = CUmem_range_attribute_enum(
        8,
    );
}
/// Attribute queried for a managed-memory address range.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmem_range_attribute_enum(pub ::core::ffi::c_uint);
pub use self::CUmem_range_attribute_enum as CUmem_range_attribute;
impl CUjit_option_enum {
    /// Max number of registers that a thread may use.
    ///
    /// Option type: unsigned int
    ///
    /// Applies to: compiler only.
    pub const CU_JIT_MAX_REGISTERS: CUjit_option_enum = CUjit_option_enum(0);
    /// IN: Specifies minimum number of threads per block to target compilation for
    ///
    /// OUT: Returns the number of threads the compiler actually targeted.
    ///
    /// This restricts the resource utilization of the compiler (e.g. max registers) such that a block with the given number of threads should be able to launch based on register limitations. Note, this option does not currently take into account any other resource limitations, such as shared memory utilization.
    ///
    /// Cannot be combined with
    ///
    /// .
    ///
    /// Option type: unsigned int.
    pub const CU_JIT_THREADS_PER_BLOCK: CUjit_option_enum = CUjit_option_enum(1);
    /// Overwrites the option value with the total wall clock time, in milliseconds, spent in the compiler and linker
    ///
    /// Option type: float.
    pub const CU_JIT_WALL_TIME: CUjit_option_enum = CUjit_option_enum(2);
    /// Pointer to a buffer in which to print any log messages that are informational in nature (the buffer size is specified via option [`CUjit_option_enum::CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES`]
    ///
    /// )
    ///
    /// Option type: char \*.
    pub const CU_JIT_INFO_LOG_BUFFER: CUjit_option_enum = CUjit_option_enum(3);
    /// IN: Log buffer size in bytes.
    ///
    /// Log messages will be capped at this size (including null terminator)
    ///
    /// OUT: Amount of log buffer filled with messages
    ///
    /// Option type: unsigned int
    ///
    /// Applies to: compiler and linker.
    pub const CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES: CUjit_option_enum = CUjit_option_enum(
        4,
    );
    /// Pointer to a buffer in which to print any log messages that reflect errors (the buffer size is specified via option [`CUjit_option_enum::CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES`]
    ///
    /// )
    ///
    /// Option type: char \*.
    pub const CU_JIT_ERROR_LOG_BUFFER: CUjit_option_enum = CUjit_option_enum(5);
    /// IN: Log buffer size in bytes.
    ///
    /// Log messages will be capped at this size (including null terminator)
    ///
    /// OUT: Amount of log buffer filled with messages
    ///
    /// Option type: unsigned int
    ///
    /// Applies to: compiler and linker.
    pub const CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES: CUjit_option_enum = CUjit_option_enum(
        6,
    );
    /// Level of optimizations to apply to generated code (0 - 4), with 4 being the default and highest level of optimizations.
    ///
    /// Option type: unsigned int
    ///
    /// Applies to: compiler only.
    pub const CU_JIT_OPTIMIZATION_LEVEL: CUjit_option_enum = CUjit_option_enum(7);
    /// No option value required.
    ///
    /// Determines the target based on the current attached context (default)
    ///
    /// Option type: No option value needed.
    pub const CU_JIT_TARGET_FROM_CUCONTEXT: CUjit_option_enum = CUjit_option_enum(8);
    /// Target is chosen based on supplied [CUjit_target](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gae443308cb7ed1d52b85b487305779184).
    ///
    /// Cannot be combined with [`CUjit_option_enum::CU_JIT_THREADS_PER_BLOCK`]
    ///
    /// .
    ///
    /// Option type: unsigned int for enumerated type.
    pub const CU_JIT_TARGET: CUjit_option_enum = CUjit_option_enum(9);
    /// Specifies choice of fallback strategy if matching cubin is not found.
    ///
    /// Choice is based on supplied [CUjit_fallback](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga4a1a92ea65e18b06907b981848c282f2)
    ///
    /// . This option cannot be used with cuLink\* APIs as the linker requires exact matches.
    ///
    /// Option type: unsigned int for enumerated type.
    pub const CU_JIT_FALLBACK_STRATEGY: CUjit_option_enum = CUjit_option_enum(10);
    /// Specifies whether to create debug information in output (-g) (0: false, default)
    ///
    /// Option type: int.
    pub const CU_JIT_GENERATE_DEBUG_INFO: CUjit_option_enum = CUjit_option_enum(11);
    /// Generate verbose log messages (0: false, default)
    ///
    /// Option type: int.
    pub const CU_JIT_LOG_VERBOSE: CUjit_option_enum = CUjit_option_enum(12);
    /// Generate line number information (-lineinfo) (0: false, default)
    ///
    /// Option type: int.
    pub const CU_JIT_GENERATE_LINE_INFO: CUjit_option_enum = CUjit_option_enum(13);
    /// Specifies whether to enable caching explicitly (-dlcm)
    ///
    /// Choice is based on supplied ::CUjit_cacheMode_enum.
    ///
    /// Option type: unsigned int for enumerated type ::CUjit_cacheMode_enum
    ///
    /// Applies to: compiler only.
    pub const CU_JIT_CACHE_MODE: CUjit_option_enum = CUjit_option_enum(14);
    /// Deprecated: This jit option is deprecated and should not be used.
    pub const CU_JIT_NEW_SM3X_OPT: CUjit_option_enum = CUjit_option_enum(15);
    /// This jit option is used for internal purpose only.
    pub const CU_JIT_FAST_COMPILE: CUjit_option_enum = CUjit_option_enum(16);
    /// Array of device symbol names that will be relocated to the corresponding host addresses stored in [`CUjit_option_enum::CU_JIT_GLOBAL_SYMBOL_ADDRESSES`].
    ///
    /// Must contain [`CUjit_option_enum::CU_JIT_GLOBAL_SYMBOL_COUNT`]
    ///
    /// entries.
    ///
    /// When loading a device module, driver will relocate all encountered unresolved symbols to the host addresses.
    ///
    /// It is only allowed to register symbols that correspond to unresolved global variables.
    ///
    /// It is illegal to register the same device symbol at multiple addresses.
    ///
    /// Option type: const char \*\*
    ///
    /// Applies to: dynamic linker only.
    pub const CU_JIT_GLOBAL_SYMBOL_NAMES: CUjit_option_enum = CUjit_option_enum(17);
    /// Array of host addresses that will be used to relocate corresponding device symbols stored in [`CUjit_option_enum::CU_JIT_GLOBAL_SYMBOL_NAMES`].
    ///
    /// Must contain [`CUjit_option_enum::CU_JIT_GLOBAL_SYMBOL_COUNT`]
    ///
    /// entries.
    ///
    /// Option type: void \*\*.
    pub const CU_JIT_GLOBAL_SYMBOL_ADDRESSES: CUjit_option_enum = CUjit_option_enum(18);
    /// Number of entries in [`CUjit_option_enum::CU_JIT_GLOBAL_SYMBOL_NAMES`] and [`CUjit_option_enum::CU_JIT_GLOBAL_SYMBOL_ADDRESSES`] arrays.
    ///
    /// Option type: unsigned int
    ///
    /// Applies to: dynamic linker only.
    pub const CU_JIT_GLOBAL_SYMBOL_COUNT: CUjit_option_enum = CUjit_option_enum(19);
    /// Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0.
    pub const CU_JIT_LTO: CUjit_option_enum = CUjit_option_enum(20);
    /// Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0.
    pub const CU_JIT_FTZ: CUjit_option_enum = CUjit_option_enum(21);
    /// Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0.
    pub const CU_JIT_PREC_DIV: CUjit_option_enum = CUjit_option_enum(22);
    /// Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0.
    pub const CU_JIT_PREC_SQRT: CUjit_option_enum = CUjit_option_enum(23);
    /// Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0.
    pub const CU_JIT_FMA: CUjit_option_enum = CUjit_option_enum(24);
    /// Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0.
    pub const CU_JIT_REFERENCED_KERNEL_NAMES: CUjit_option_enum = CUjit_option_enum(25);
    /// Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0.
    pub const CU_JIT_REFERENCED_KERNEL_COUNT: CUjit_option_enum = CUjit_option_enum(26);
    /// Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0.
    pub const CU_JIT_REFERENCED_VARIABLE_NAMES: CUjit_option_enum = CUjit_option_enum(
        27,
    );
    /// Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0.
    pub const CU_JIT_REFERENCED_VARIABLE_COUNT: CUjit_option_enum = CUjit_option_enum(
        28,
    );
    /// Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0.
    pub const CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES: CUjit_option_enum = CUjit_option_enum(
        29,
    );
    /// Generate position independent code (0: false)
    ///
    /// Option type: int.
    pub const CU_JIT_POSITION_INDEPENDENT_CODE: CUjit_option_enum = CUjit_option_enum(
        30,
    );
    /// This option hints to the JIT compiler the minimum number of CTAs from the kernel’s grid to be mapped to a SM.
    ///
    /// This option is ignored when used together with [`CUjit_option_enum::CU_JIT_MAX_REGISTERS`] or [`CUjit_option_enum::CU_JIT_THREADS_PER_BLOCK`]. Optimizations based on this option need [`CUjit_option_enum::CU_JIT_MAX_THREADS_PER_BLOCK`] to be specified as well. For kernels already using PTX directive .minnctapersm, this option will be ignored by default. Use [`CUjit_option_enum::CU_JIT_OVERRIDE_DIRECTIVE_VALUES`]
    ///
    /// to let this option take precedence over the PTX directive. Option type: unsigned int
    ///
    /// Applies to: compiler only.
    pub const CU_JIT_MIN_CTA_PER_SM: CUjit_option_enum = CUjit_option_enum(31);
    /// Maximum number threads in a thread block, computed as the product of the maximum extent specifed for each dimension of the block.
    ///
    /// This limit is guaranteed not to be exeeded in any invocation of the kernel. Exceeding the maximum number of threads results in runtime error or kernel launch failure. For kernels already using PTX directive .maxntid, this option will be ignored by default. Use [`CUjit_option_enum::CU_JIT_OVERRIDE_DIRECTIVE_VALUES`]
    ///
    /// to let this option take precedence over the PTX directive. Option type: int
    ///
    /// Applies to: compiler only.
    pub const CU_JIT_MAX_THREADS_PER_BLOCK: CUjit_option_enum = CUjit_option_enum(32);
    /// This option lets the values specified using [`CUjit_option_enum::CU_JIT_MAX_REGISTERS`], [`CUjit_option_enum::CU_JIT_THREADS_PER_BLOCK`], [`CUjit_option_enum::CU_JIT_MAX_THREADS_PER_BLOCK`] and [`CUjit_option_enum::CU_JIT_MIN_CTA_PER_SM`] take precedence over any PTX directives.
    ///
    /// (0: Disable, default; 1: Enable) Option type: int
    ///
    /// Applies to: compiler only.
    pub const CU_JIT_OVERRIDE_DIRECTIVE_VALUES: CUjit_option_enum = CUjit_option_enum(
        33,
    );
    /// This option specifies the maximum number of concurrent threads to use when running compiler optimizations.
    ///
    /// If the specified value is 1, the option will be ignored. If the specified value is 0, the number of threads will match the number of CPUs on the underlying machine. Otherwise, if the option is N, then up to N threads will be used. Option type: unsigned int
    ///
    /// Applies to: compiler only.
    pub const CU_JIT_SPLIT_COMPILE: CUjit_option_enum = CUjit_option_enum(34);
    /// This option specifies the maximum number of concurrent threads to use when compiling device code.
    ///
    /// If the specified value is 1, the option will be ignored. If the specified value is 0, the number of threads will match the number of CPUs on the underlying machine. Otherwise, if the option is N, then up to N threads will be used. This option is ignored if the env var CUDA_BINARY_LOADER_THREAD_COUNT is set. Option type: unsigned int
    ///
    /// Applies to: compiler and linker.
    pub const CU_JIT_BINARY_LOADER_THREAD_COUNT: CUjit_option_enum = CUjit_option_enum(
        35,
    );
    /// Upper-bound sentinel for CUDA JIT option selectors.
    pub const CU_JIT_NUM_OPTIONS: CUjit_option_enum = CUjit_option_enum(36);
}
/// Online compiler and linker options
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUjit_option_enum(pub ::core::ffi::c_uint);
pub use self::CUjit_option_enum as CUjit_option;
impl CUjit_target_enum {
    /// Compute device class 3.0.
    pub const CU_TARGET_COMPUTE_30: CUjit_target_enum = CUjit_target_enum(30);
    /// Compute device class 3.2.
    pub const CU_TARGET_COMPUTE_32: CUjit_target_enum = CUjit_target_enum(32);
    /// Compute device class 3.5.
    pub const CU_TARGET_COMPUTE_35: CUjit_target_enum = CUjit_target_enum(35);
    /// Compute device class 3.7.
    pub const CU_TARGET_COMPUTE_37: CUjit_target_enum = CUjit_target_enum(37);
    /// Compute device class 5.0.
    pub const CU_TARGET_COMPUTE_50: CUjit_target_enum = CUjit_target_enum(50);
    /// Compute device class 5.2.
    pub const CU_TARGET_COMPUTE_52: CUjit_target_enum = CUjit_target_enum(52);
    /// Compute device class 5.3.
    pub const CU_TARGET_COMPUTE_53: CUjit_target_enum = CUjit_target_enum(53);
    /// Compute device class 6.0.
    pub const CU_TARGET_COMPUTE_60: CUjit_target_enum = CUjit_target_enum(60);
    /// Compute device class 6.1.
    pub const CU_TARGET_COMPUTE_61: CUjit_target_enum = CUjit_target_enum(61);
    /// Compute device class 6.2.
    pub const CU_TARGET_COMPUTE_62: CUjit_target_enum = CUjit_target_enum(62);
    /// Compute device class 7.0.
    pub const CU_TARGET_COMPUTE_70: CUjit_target_enum = CUjit_target_enum(70);
    /// Compute device class 7.2.
    pub const CU_TARGET_COMPUTE_72: CUjit_target_enum = CUjit_target_enum(72);
    /// Compute device class 7.5.
    pub const CU_TARGET_COMPUTE_75: CUjit_target_enum = CUjit_target_enum(75);
    /// Compute device class 8.0.
    pub const CU_TARGET_COMPUTE_80: CUjit_target_enum = CUjit_target_enum(80);
    /// Compute device class 8.6.
    pub const CU_TARGET_COMPUTE_86: CUjit_target_enum = CUjit_target_enum(86);
    /// Compute device class 8.7.
    pub const CU_TARGET_COMPUTE_87: CUjit_target_enum = CUjit_target_enum(87);
    /// Compute device class 8.9.
    pub const CU_TARGET_COMPUTE_89: CUjit_target_enum = CUjit_target_enum(89);
    /// Compute device class 9.0.
    pub const CU_TARGET_COMPUTE_90: CUjit_target_enum = CUjit_target_enum(90);
    /// Compute device class 10.0.
    pub const CU_TARGET_COMPUTE_100: CUjit_target_enum = CUjit_target_enum(100);
    /// Compute device class 11.0.
    pub const CU_TARGET_COMPUTE_110: CUjit_target_enum = CUjit_target_enum(110);
    /// Compute device class 10.3.
    pub const CU_TARGET_COMPUTE_103: CUjit_target_enum = CUjit_target_enum(103);
    /// Compute device class 10.7.
    pub const CU_TARGET_COMPUTE_107: CUjit_target_enum = CUjit_target_enum(107);
    /// Compute device class 12.0.
    pub const CU_TARGET_COMPUTE_120: CUjit_target_enum = CUjit_target_enum(120);
    /// Compute device class 12.1.
    ///
    /// Compute device class 9.0. with accelerated features.
    pub const CU_TARGET_COMPUTE_121: CUjit_target_enum = CUjit_target_enum(121);
    /// Compute capability 9.0 target with architecture-specific accelerated features.
    pub const CU_TARGET_COMPUTE_90A: CUjit_target_enum = CUjit_target_enum(65626);
    /// Compute capability 10.0 target with architecture-specific accelerated features.
    pub const CU_TARGET_COMPUTE_100A: CUjit_target_enum = CUjit_target_enum(65636);
    /// Compute capability 11.0 target with architecture-specific accelerated features.
    pub const CU_TARGET_COMPUTE_110A: CUjit_target_enum = CUjit_target_enum(65646);
    /// Compute capability 10.3 target with architecture-specific accelerated features.
    pub const CU_TARGET_COMPUTE_103A: CUjit_target_enum = CUjit_target_enum(65639);
    /// Compute capability 10.7 target with architecture-specific accelerated features.
    pub const CU_TARGET_COMPUTE_107A: CUjit_target_enum = CUjit_target_enum(65643);
    /// Compute capability 12.0 target with architecture-specific accelerated features.
    pub const CU_TARGET_COMPUTE_120A: CUjit_target_enum = CUjit_target_enum(65656);
    /// Compute capability 12.1 target with architecture-specific accelerated features.
    pub const CU_TARGET_COMPUTE_121A: CUjit_target_enum = CUjit_target_enum(65657);
    /// Compute capability 10.0 target with architecture-family features.
    pub const CU_TARGET_COMPUTE_100F: CUjit_target_enum = CUjit_target_enum(131172);
    /// Compute capability 11.0 target with architecture-family features.
    pub const CU_TARGET_COMPUTE_110F: CUjit_target_enum = CUjit_target_enum(131182);
    /// Compute capability 10.3 target with architecture-family features.
    pub const CU_TARGET_COMPUTE_103F: CUjit_target_enum = CUjit_target_enum(131175);
    /// Compute capability 10.7 target with architecture-family features.
    pub const CU_TARGET_COMPUTE_107F: CUjit_target_enum = CUjit_target_enum(131179);
    /// Compute capability 12.0 target with architecture-family features.
    pub const CU_TARGET_COMPUTE_120F: CUjit_target_enum = CUjit_target_enum(131192);
    /// Compute capability 12.1 target with architecture-family features.
    pub const CU_TARGET_COMPUTE_121F: CUjit_target_enum = CUjit_target_enum(131193);
}
/// Online compilation targets
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUjit_target_enum(pub ::core::ffi::c_uint);
pub use self::CUjit_target_enum as CUjit_target;
impl CUjit_fallback_enum {
    /// Prefer to compile ptx if exact binary match not found.
    pub const CU_PREFER_PTX: CUjit_fallback_enum = CUjit_fallback_enum(0);
    /// Prefer to fall back to compatible binary code if exact match not found.
    pub const CU_PREFER_BINARY: CUjit_fallback_enum = CUjit_fallback_enum(1);
}
/// Cubin matching fallback strategies
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUjit_fallback_enum(pub ::core::ffi::c_uint);
pub use self::CUjit_fallback_enum as CUjit_fallback;
impl CUjit_cacheMode_enum {
    /// Compile with no -dlcm flag specified.
    pub const CU_JIT_CACHE_OPTION_NONE: CUjit_cacheMode_enum = CUjit_cacheMode_enum(0);
    /// Compile with L1 cache disabled.
    pub const CU_JIT_CACHE_OPTION_CG: CUjit_cacheMode_enum = CUjit_cacheMode_enum(1);
    /// Compile with L1 cache enabled.
    pub const CU_JIT_CACHE_OPTION_CA: CUjit_cacheMode_enum = CUjit_cacheMode_enum(2);
}
/// Caching modes for dlcm
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUjit_cacheMode_enum(pub ::core::ffi::c_uint);
pub use self::CUjit_cacheMode_enum as CUjit_cacheMode;
impl CUjitInputType_enum {
    /// Compiled device-class-specific device code
    ///
    /// Applicable options: none.
    pub const CU_JIT_INPUT_CUBIN: CUjitInputType_enum = CUjitInputType_enum(0);
    /// PTX source code
    ///
    /// Applicable options: PTX compiler options.
    pub const CU_JIT_INPUT_PTX: CUjitInputType_enum = CUjitInputType_enum(1);
    /// Bundle of multiple cubins and/or PTX of some device code
    ///
    /// Applicable options: PTX compiler options,.
    pub const CU_JIT_INPUT_FATBINARY: CUjitInputType_enum = CUjitInputType_enum(2);
    /// Host object with embedded device code
    ///
    /// Applicable options: PTX compiler options,.
    pub const CU_JIT_INPUT_OBJECT: CUjitInputType_enum = CUjitInputType_enum(3);
    /// Archive of host objects with embedded device code
    ///
    /// Applicable options: PTX compiler options,.
    pub const CU_JIT_INPUT_LIBRARY: CUjitInputType_enum = CUjitInputType_enum(4);
    /// Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0.
    pub const CU_JIT_INPUT_NVVM: CUjitInputType_enum = CUjitInputType_enum(5);
    /// Upper-bound sentinel for CUDA linker input formats.
    pub const CU_JIT_NUM_INPUT_TYPES: CUjitInputType_enum = CUjitInputType_enum(6);
}
/// Device code formats
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUjitInputType_enum(pub ::core::ffi::c_uint);
pub use self::CUjitInputType_enum as CUjitInputType;
/// Incomplete native type used by [`CUlinkState`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUlinkState_st {
    _unused: [u8; 0],
}
/// Opaque state of a CUDA driver JIT linking session, created by [`cuLinkCreate_v2`] and released by [`cuLinkDestroy`].
pub type CUlinkState = *mut CUlinkState_st;
impl CUgraphicsRegisterFlags_enum {
    /// Default registration behavior without additional access hints.
    pub const CU_GRAPHICS_REGISTER_FLAGS_NONE: CUgraphicsRegisterFlags_enum = CUgraphicsRegisterFlags_enum(
        0,
    );
    /// Hints that CUDA will only read the registered resource.
    pub const CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY: CUgraphicsRegisterFlags_enum = CUgraphicsRegisterFlags_enum(
        1,
    );
    /// Hints that CUDA will overwrite the registered resource without reading its previous contents.
    pub const CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD: CUgraphicsRegisterFlags_enum = CUgraphicsRegisterFlags_enum(
        2,
    );
    /// Allows binding the registered image to a CUDA surface for load and store operations.
    pub const CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST: CUgraphicsRegisterFlags_enum = CUgraphicsRegisterFlags_enum(
        4,
    );
    /// Allows texture-gather operations on the registered image.
    pub const CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER: CUgraphicsRegisterFlags_enum = CUgraphicsRegisterFlags_enum(
        8,
    );
}
/// Flags to register a graphics resource
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphicsRegisterFlags_enum(pub ::core::ffi::c_uint);
pub use self::CUgraphicsRegisterFlags_enum as CUgraphicsRegisterFlags;
impl CUgraphicsMapResourceFlags_enum {
    /// Specifies no hints about how this resource will be used. It is therefore assumed that this resource will be read from and written to by CUDA kernels.  This is the default value.
    pub const CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: CUgraphicsMapResourceFlags_enum = CUgraphicsMapResourceFlags_enum(
        0,
    );
    /// Hints that CUDA will only read the mapped resource.
    pub const CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY: CUgraphicsMapResourceFlags_enum = CUgraphicsMapResourceFlags_enum(
        1,
    );
    /// Hints that CUDA will overwrite the mapped resource without reading its previous contents.
    pub const CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD: CUgraphicsMapResourceFlags_enum = CUgraphicsMapResourceFlags_enum(
        2,
    );
}
/// Flags for mapping and unmapping interop resources
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphicsMapResourceFlags_enum(pub ::core::ffi::c_uint);
pub use self::CUgraphicsMapResourceFlags_enum as CUgraphicsMapResourceFlags;
impl CUarray_cubemap_face_enum {
    /// Positive X face of cubemap.
    pub const CU_CUBEMAP_FACE_POSITIVE_X: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(
        0,
    );
    /// Negative X face of cubemap.
    pub const CU_CUBEMAP_FACE_NEGATIVE_X: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(
        1,
    );
    /// Positive Y face of cubemap.
    pub const CU_CUBEMAP_FACE_POSITIVE_Y: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(
        2,
    );
    /// Negative Y face of cubemap.
    pub const CU_CUBEMAP_FACE_NEGATIVE_Y: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(
        3,
    );
    /// Positive Z face of cubemap.
    pub const CU_CUBEMAP_FACE_POSITIVE_Z: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(
        4,
    );
    /// Negative Z face of cubemap.
    pub const CU_CUBEMAP_FACE_NEGATIVE_Z: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(
        5,
    );
}
/// Array indices for cube faces
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUarray_cubemap_face_enum(pub ::core::ffi::c_uint);
pub use self::CUarray_cubemap_face_enum as CUarray_cubemap_face;
impl CUlimit_enum {
    /// GPU thread stack size.
    pub const CU_LIMIT_STACK_SIZE: CUlimit_enum = CUlimit_enum(0);
    /// GPU printf FIFO size.
    pub const CU_LIMIT_PRINTF_FIFO_SIZE: CUlimit_enum = CUlimit_enum(1);
    /// GPU malloc heap size.
    pub const CU_LIMIT_MALLOC_HEAP_SIZE: CUlimit_enum = CUlimit_enum(2);
    /// GPU device runtime launch synchronize depth.
    pub const CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH: CUlimit_enum = CUlimit_enum(3);
    /// GPU device runtime pending launch count.
    pub const CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT: CUlimit_enum = CUlimit_enum(4);
    /// A value between 0 and 128 that indicates the maximum fetch granularity of L2 (in Bytes).
    ///
    /// This is a hint.
    pub const CU_LIMIT_MAX_L2_FETCH_GRANULARITY: CUlimit_enum = CUlimit_enum(5);
    /// A size in bytes for L2 persisting lines cache size.
    pub const CU_LIMIT_PERSISTING_L2_CACHE_SIZE: CUlimit_enum = CUlimit_enum(6);
    /// A maximum size in bytes of shared memory available to CUDA kernels on a CIG context.
    ///
    /// Can only be queried, cannot be set.
    pub const CU_LIMIT_SHMEM_SIZE: CUlimit_enum = CUlimit_enum(7);
    /// A non-zero value indicates this CUDA context is a CIG-enabled context.
    ///
    /// Can only be queried, cannot be set.
    pub const CU_LIMIT_CIG_ENABLED: CUlimit_enum = CUlimit_enum(8);
    /// When set to zero, CUDA will fail to launch a kernel on a CIG context, instead of using the fallback path, if the kernel uses more shared memory than available.
    pub const CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED: CUlimit_enum = CUlimit_enum(9);
    /// Per-block memory size.
    pub const CU_LIMIT_PER_BLOCK_MEMORY_SIZE: CUlimit_enum = CUlimit_enum(10);
    /// Reserved upper-bound sentinel for native device limits.
    pub const CU_LIMIT_MAX: CUlimit_enum = CUlimit_enum(11);
}
/// Limits
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlimit_enum(pub ::core::ffi::c_uint);
pub use self::CUlimit_enum as CUlimit;
impl CUresourcetype_enum {
    /// Array resource.
    pub const CU_RESOURCE_TYPE_ARRAY: CUresourcetype_enum = CUresourcetype_enum(0);
    /// Mipmapped array resource.
    pub const CU_RESOURCE_TYPE_MIPMAPPED_ARRAY: CUresourcetype_enum = CUresourcetype_enum(
        1,
    );
    /// Linear resource.
    pub const CU_RESOURCE_TYPE_LINEAR: CUresourcetype_enum = CUresourcetype_enum(2);
    /// Pitch 2D resource.
    pub const CU_RESOURCE_TYPE_PITCH2D: CUresourcetype_enum = CUresourcetype_enum(3);
}
/// Resource types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUresourcetype_enum(pub ::core::ffi::c_uint);
pub use self::CUresourcetype_enum as CUresourcetype;
/// CUDA host function.
pub type CUhostFn = ::core::option::Option<
    unsafe extern "C" fn(userData: *mut ::core::ffi::c_void),
>;
impl CUaccessProperty_enum {
    /// Normal cache persistence.
    pub const CU_ACCESS_PROPERTY_NORMAL: CUaccessProperty_enum = CUaccessProperty_enum(
        0,
    );
    /// Streaming access is less likely to persit from cache.
    pub const CU_ACCESS_PROPERTY_STREAMING: CUaccessProperty_enum = CUaccessProperty_enum(
        1,
    );
    /// Persisting access is more likely to persist in cache.
    pub const CU_ACCESS_PROPERTY_PERSISTING: CUaccessProperty_enum = CUaccessProperty_enum(
        2,
    );
}
/// Specifies performance hint with ::CUaccessPolicyWindow for hitProp and missProp members.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUaccessProperty_enum(pub ::core::ffi::c_uint);
pub use self::CUaccessProperty_enum as CUaccessProperty;
/// Specifies an access policy for a window, a contiguous extent of memory beginning at base_ptr and ending at base_ptr + num_bytes. num_bytes is limited by CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into many segments and assign segments such that: sum of "hit segments" / window == approx. ratio. sum of "miss segments" / window == approx 1-ratio. Segments and ratio specifications are fitted to the capabilities of the architecture. Accesses in a hit segment apply the hitProp access policy. Accesses in a miss segment apply the missProp access policy.
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
pub struct CUaccessPolicyWindow_st {
    /// Starting address of the access policy window. CUDA driver may align it.
    pub base_ptr: *mut ::core::ffi::c_void,
    /// Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment.
    pub num_bytes: size_t,
    /// hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp.
    pub hitRatio: f32,
    /// ::CUaccessProperty set for hit.
    pub hitProp: CUaccessProperty,
    /// ::CUaccessProperty set for miss. Must be either NORMAL or STREAMING
    pub missProp: CUaccessProperty,
}
impl Default for CUaccessPolicyWindow_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Specifies an access policy for a window, a contiguous extent of memory beginning at base_ptr and ending at base_ptr + num_bytes.
///
/// num_bytes is limited by [`CUdevice_attribute::CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE`]. Partition into many segments and assign segments such that: sum of “hit segments” / window == approx. ratio. sum of “miss segments” / window == approx 1-ratio. Segments and ratio specifications are fitted to the capabilities of the architecture. Accesses in a hit segment apply the hitProp access policy. Accesses in a miss segment apply the missProp access policy.
pub type CUaccessPolicyWindow_v1 = CUaccessPolicyWindow_st;
/// Access policy window.
pub type CUaccessPolicyWindow = CUaccessPolicyWindow_v1;
/// GPU kernel node parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_KERNEL_NODE_PARAMS_st {
    /// Kernel to launch
    pub func: CUfunction,
    /// Width of grid in blocks
    pub gridDimX: ::core::ffi::c_uint,
    /// Height of grid in blocks
    pub gridDimY: ::core::ffi::c_uint,
    /// Depth of grid in blocks
    pub gridDimZ: ::core::ffi::c_uint,
    /// X dimension of each thread block
    pub blockDimX: ::core::ffi::c_uint,
    /// Y dimension of each thread block
    pub blockDimY: ::core::ffi::c_uint,
    /// Z dimension of each thread block
    pub blockDimZ: ::core::ffi::c_uint,
    /// Dynamic shared-memory size per thread block in bytes
    pub sharedMemBytes: ::core::ffi::c_uint,
    /// Array of pointers to kernel parameters
    pub kernelParams: *mut *mut ::core::ffi::c_void,
    /// Extra options
    pub extra: *mut *mut ::core::ffi::c_void,
}
impl Default for CUDA_KERNEL_NODE_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// GPU kernel node parameters.
pub type CUDA_KERNEL_NODE_PARAMS_v1 = CUDA_KERNEL_NODE_PARAMS_st;
/// GPU kernel node parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_KERNEL_NODE_PARAMS_v2_st {
    /// Kernel to launch
    pub func: CUfunction,
    /// Width of grid in blocks
    pub gridDimX: ::core::ffi::c_uint,
    /// Height of grid in blocks
    pub gridDimY: ::core::ffi::c_uint,
    /// Depth of grid in blocks
    pub gridDimZ: ::core::ffi::c_uint,
    /// X dimension of each thread block
    pub blockDimX: ::core::ffi::c_uint,
    /// Y dimension of each thread block
    pub blockDimY: ::core::ffi::c_uint,
    /// Z dimension of each thread block
    pub blockDimZ: ::core::ffi::c_uint,
    /// Dynamic shared-memory size per thread block in bytes
    pub sharedMemBytes: ::core::ffi::c_uint,
    /// Array of pointers to kernel parameters
    pub kernelParams: *mut *mut ::core::ffi::c_void,
    /// Extra options
    pub extra: *mut *mut ::core::ffi::c_void,
    /// Kernel to launch, will only be referenced if func is NULL
    pub kern: CUkernel,
    /// Context for the kernel task to run in. The value NULL will indicate the current context should be used by the api. This field is ignored if func is set.
    pub ctx: CUcontext,
}
impl Default for CUDA_KERNEL_NODE_PARAMS_v2_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// GPU kernel node parameters.
pub type CUDA_KERNEL_NODE_PARAMS_v2 = CUDA_KERNEL_NODE_PARAMS_v2_st;
/// GPU kernel node parameters
pub type CUDA_KERNEL_NODE_PARAMS = CUDA_KERNEL_NODE_PARAMS_v2;
/// GPU kernel node parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_KERNEL_NODE_PARAMS_v3_st {
    /// Kernel to launch
    pub func: CUfunction,
    /// Width of grid in blocks
    pub gridDimX: ::core::ffi::c_uint,
    /// Height of grid in blocks
    pub gridDimY: ::core::ffi::c_uint,
    /// Depth of grid in blocks
    pub gridDimZ: ::core::ffi::c_uint,
    /// X dimension of each thread block
    pub blockDimX: ::core::ffi::c_uint,
    /// Y dimension of each thread block
    pub blockDimY: ::core::ffi::c_uint,
    /// Z dimension of each thread block
    pub blockDimZ: ::core::ffi::c_uint,
    /// Dynamic shared-memory size per thread block in bytes
    pub sharedMemBytes: ::core::ffi::c_uint,
    /// Array of pointers to kernel parameters
    pub kernelParams: *mut *mut ::core::ffi::c_void,
    /// Extra options
    pub extra: *mut *mut ::core::ffi::c_void,
    /// Kernel to launch, will only be referenced if func is NULL
    pub kern: CUkernel,
    /// Context for the kernel task to run in. The value NULL will indicate the current context should be used by the api. This field is ignored if func is set.
    pub ctx: CUcontext,
}
impl Default for CUDA_KERNEL_NODE_PARAMS_v3_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// GPU kernel node parameters.
pub type CUDA_KERNEL_NODE_PARAMS_v3 = CUDA_KERNEL_NODE_PARAMS_v3_st;
/// Memset node parameters
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_MEMSET_NODE_PARAMS_st {
    /// Destination device pointer
    pub dst: CUdeviceptr,
    /// Pitch of destination device pointer. Unused if height is 1
    pub pitch: size_t,
    /// Value to be set
    pub value: ::core::ffi::c_uint,
    /// Size of each element in bytes. Must be 1, 2, or 4.
    pub elementSize: ::core::ffi::c_uint,
    /// Width of the row in elements
    pub width: size_t,
    /// Number of rows
    pub height: size_t,
}
/// Memset node parameters.
pub type CUDA_MEMSET_NODE_PARAMS_v1 = CUDA_MEMSET_NODE_PARAMS_st;
/// Memset node parameters
pub type CUDA_MEMSET_NODE_PARAMS = CUDA_MEMSET_NODE_PARAMS_v1;
/// Memset node parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_MEMSET_NODE_PARAMS_v2_st {
    /// Destination device pointer
    pub dst: CUdeviceptr,
    /// Pitch of destination device pointer. Unused if height is 1
    pub pitch: size_t,
    /// Value to be set
    pub value: ::core::ffi::c_uint,
    /// Size of each element in bytes. Must be 1, 2, or 4.
    pub elementSize: ::core::ffi::c_uint,
    /// Width of the row in elements
    pub width: size_t,
    /// Number of rows
    pub height: size_t,
    /// Context on which to run the node
    pub ctx: CUcontext,
}
impl Default for CUDA_MEMSET_NODE_PARAMS_v2_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Memset node parameters.
pub type CUDA_MEMSET_NODE_PARAMS_v2 = CUDA_MEMSET_NODE_PARAMS_v2_st;
/// Host node parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_HOST_NODE_PARAMS_st {
    /// The function to call when the node executes
    pub fn_: CUhostFn,
    /// Argument to pass to the function
    pub userData: *mut ::core::ffi::c_void,
}
impl Default for CUDA_HOST_NODE_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Host node parameters.
pub type CUDA_HOST_NODE_PARAMS_v1 = CUDA_HOST_NODE_PARAMS_st;
/// Host node parameters
pub type CUDA_HOST_NODE_PARAMS = CUDA_HOST_NODE_PARAMS_v1;
/// Host node parameters
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_HOST_NODE_PARAMS_v2_st {
    /// The function to call when the node executes
    pub fn_: CUhostFn,
    /// Argument to pass to the function
    pub userData: *mut ::core::ffi::c_void,
    /// The sync mode to use for the host task
    pub syncMode: ::core::ffi::c_uint,
    /// Anonymous native member. See [`CUDA_HOST_NODE_PARAMS_v2_st__bindgen_ty_1`] for its fields.
    pub __bindgen_anon_1: CUDA_HOST_NODE_PARAMS_v2_st__bindgen_ty_1,
}
/// preferred context to use for the host task
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUDA_HOST_NODE_PARAMS_v2_st__bindgen_ty_1 {
    /// Preferred CUDA context for the host task.
    pub ctx: CUcontext,
    /// Preferred green context for the host task.
    pub gCtx: CUgreenCtx,
}
impl Default for CUDA_HOST_NODE_PARAMS_v2_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUDA_HOST_NODE_PARAMS_v2_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Host node parameters.
pub type CUDA_HOST_NODE_PARAMS_v2 = CUDA_HOST_NODE_PARAMS_v2_st;
impl CUgraphConditionalNodeType_enum {
    /// Conditional ‘if/else’ Node.
    ///
    /// Body\[0\] executed if condition is non-zero. If `size` == 2, an optional ELSE graph is created and this is executed if the condition is zero.
    pub const CU_GRAPH_COND_TYPE_IF: CUgraphConditionalNodeType_enum = CUgraphConditionalNodeType_enum(
        0,
    );
    /// Conditional ‘while’ Node.
    ///
    /// Body executed repeatedly while condition value is non-zero.
    pub const CU_GRAPH_COND_TYPE_WHILE: CUgraphConditionalNodeType_enum = CUgraphConditionalNodeType_enum(
        1,
    );
    /// Conditional ‘switch’ Node.
    ///
    /// Body\[n\] is executed once, where ‘n’ is the value of the condition. If the condition does not match a body index, no body is launched.
    pub const CU_GRAPH_COND_TYPE_SWITCH: CUgraphConditionalNodeType_enum = CUgraphConditionalNodeType_enum(
        2,
    );
}
/// Conditional node types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphConditionalNodeType_enum(pub ::core::ffi::c_uint);
pub use self::CUgraphConditionalNodeType_enum as CUgraphConditionalNodeType;
/// Conditional node parameters.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_CONDITIONAL_NODE_PARAMS {
    /// Conditional node handle.
    ///
    /// Handles must be created in advance of creating the node using [`cuGraphConditionalHandleCreate`].
    pub handle: CUgraphConditionalHandle,
    /// Type of conditional node.
    pub type_: CUgraphConditionalNodeType,
    /// Size of graph output array.
    ///
    /// Allowed values are 1 for [`CUgraphConditionalNodeType::CU_GRAPH_COND_TYPE_WHILE`], 1 or 2 for [`CUgraphConditionalNodeType::CU_GRAPH_COND_TYPE_IF`], or any value greater than zero for [`CUgraphConditionalNodeType::CU_GRAPH_COND_TYPE_SWITCH`].
    pub size: ::core::ffi::c_uint,
    /// CUDA-owned array populated with conditional node child graphs during creation of the node.
    ///
    /// Valid for the lifetime of the conditional node. The contents of the graph(s) are subject to the following constraints:
    ///
    /// These graphs may be populated using graph node creation APIs or [`cuStreamBeginCaptureToGraph`].
    ///
    /// [`CUgraphConditionalNodeType::CU_GRAPH_COND_TYPE_IF`]: phGraph_out\[0\] is executed when the condition is non-zero. If `size` == 2, phGraph_out\[1\] will be executed when the condition is zero. [`CUgraphConditionalNodeType::CU_GRAPH_COND_TYPE_WHILE`]: phGraph_out\[0\] is executed as long as the condition is non-zero. [`CUgraphConditionalNodeType::CU_GRAPH_COND_TYPE_SWITCH`]: phGraph_out\[n\] is executed when the condition is equal to n. If the condition >= `size`, no body graph is executed.
    pub phGraph_out: *mut CUgraph,
    /// Context on which to run the node.
    ///
    /// Must match context used to create the handle and all body nodes.
    pub ctx: CUcontext,
}
impl Default for CUDA_CONDITIONAL_NODE_PARAMS {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl CUgraphNodeType_enum {
    /// GPU kernel node.
    pub const CU_GRAPH_NODE_TYPE_KERNEL: CUgraphNodeType_enum = CUgraphNodeType_enum(0);
    /// Memcpy node.
    pub const CU_GRAPH_NODE_TYPE_MEMCPY: CUgraphNodeType_enum = CUgraphNodeType_enum(1);
    /// Memset node.
    pub const CU_GRAPH_NODE_TYPE_MEMSET: CUgraphNodeType_enum = CUgraphNodeType_enum(2);
    /// Host (executable) node.
    pub const CU_GRAPH_NODE_TYPE_HOST: CUgraphNodeType_enum = CUgraphNodeType_enum(3);
    /// Node which executes an embedded graph.
    pub const CU_GRAPH_NODE_TYPE_GRAPH: CUgraphNodeType_enum = CUgraphNodeType_enum(4);
    /// Empty (no-op) node.
    pub const CU_GRAPH_NODE_TYPE_EMPTY: CUgraphNodeType_enum = CUgraphNodeType_enum(5);
    /// External event wait node.
    pub const CU_GRAPH_NODE_TYPE_WAIT_EVENT: CUgraphNodeType_enum = CUgraphNodeType_enum(
        6,
    );
    /// External event record node.
    pub const CU_GRAPH_NODE_TYPE_EVENT_RECORD: CUgraphNodeType_enum = CUgraphNodeType_enum(
        7,
    );
    /// External semaphore signal node.
    pub const CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL: CUgraphNodeType_enum = CUgraphNodeType_enum(
        8,
    );
    /// External semaphore wait node.
    pub const CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT: CUgraphNodeType_enum = CUgraphNodeType_enum(
        9,
    );
    /// Memory Allocation Node.
    pub const CU_GRAPH_NODE_TYPE_MEM_ALLOC: CUgraphNodeType_enum = CUgraphNodeType_enum(
        10,
    );
    /// Memory Free Node.
    pub const CU_GRAPH_NODE_TYPE_MEM_FREE: CUgraphNodeType_enum = CUgraphNodeType_enum(
        11,
    );
    /// Batch MemOp Node See cuStreamBatchMemOp and [CUstreamBatchMemOpType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gab257b534afdb704b6ebdb99c16a5b292) for what these nodes can do.
    pub const CU_GRAPH_NODE_TYPE_BATCH_MEM_OP: CUgraphNodeType_enum = CUgraphNodeType_enum(
        12,
    );
    /// Conditional Node.
    pub const CU_GRAPH_NODE_TYPE_CONDITIONAL: CUgraphNodeType_enum = CUgraphNodeType_enum(
        13,
    );
    /// Reserved.
    pub const CU_GRAPH_NODE_TYPE_RESERVED_16: CUgraphNodeType_enum = CUgraphNodeType_enum(
        16,
    );
}
/// Graph node types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphNodeType_enum(pub ::core::ffi::c_uint);
pub use self::CUgraphNodeType_enum as CUgraphNodeType;
impl CUgraphDependencyType_enum {
    /// This is an ordinary dependency.
    pub const CU_GRAPH_DEPENDENCY_TYPE_DEFAULT: CUgraphDependencyType_enum = CUgraphDependencyType_enum(
        0,
    );
    /// This dependency type allows the downstream node to use cudaGridDependencySynchronize().
    ///
    /// It may only be used between kernel nodes, and must be used with either the [`CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC`] or [`CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER`] outgoing port.
    pub const CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC: CUgraphDependencyType_enum = CUgraphDependencyType_enum(
        1,
    );
}
/// Type annotations that can be applied to graph edges as part of ::CUgraphEdgeData.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphDependencyType_enum(pub ::core::ffi::c_uint);
pub use self::CUgraphDependencyType_enum as CUgraphDependencyType;
/// Optional annotation for edges in a CUDA graph. Note, all edges implicitly have annotations and default to a zero-initialized value if not specified. A zero-initialized struct indicates a standard full serialization of two nodes with memory visibility.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphEdgeData_st {
    /// This indicates when the dependency is triggered from the upstream node on the edge. The meaning is specfic to the node type. A value of 0 in all cases means full completion of the upstream node, with memory visibility to the downstream node or portion thereof (indicated by `to_port)`. &lt;br> Only kernel nodes define non-zero ports. A kernel node can use the following output port types: ::CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, ::CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC, or ::CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER.
    pub from_port: ::core::ffi::c_uchar,
    /// This indicates what portion of the downstream node is dependent on the upstream node or portion thereof (indicated by `from_port)`. The meaning is specific to the node type. A value of 0 in all cases means the entirety of the downstream node is dependent on the upstream work. &lt;br> Currently no node types define non-zero ports. Accordingly, this field must be set to zero.
    pub to_port: ::core::ffi::c_uchar,
    /// This should be populated with a value from ::CUgraphDependencyType. (It is typed as char due to compiler-specific layout of bitfields.) See ::CUgraphDependencyType.
    pub type_: ::core::ffi::c_uchar,
    /// These bytes are unused and must be zeroed. This ensures compatibility if additional fields are added in the future.
    pub reserved: [::core::ffi::c_uchar; 5usize],
}
/// Optional annotation for edges in a CUDA graph.
///
/// Note, all edges implicitly have annotations and default to a zero-initialized value if not specified. A zero-initialized struct indicates a standard full serialization of two nodes with memory visibility.
pub type CUgraphEdgeData = CUgraphEdgeData_st;
impl CUgraphInstantiateResult_enum {
    /// Instantiation succeeded.
    pub const CUDA_GRAPH_INSTANTIATE_SUCCESS: CUgraphInstantiateResult_enum = CUgraphInstantiateResult_enum(
        0,
    );
    /// Instantiation failed for an unexpected reason which is described in the return value of the function.
    pub const CUDA_GRAPH_INSTANTIATE_ERROR: CUgraphInstantiateResult_enum = CUgraphInstantiateResult_enum(
        1,
    );
    /// Instantiation failed due to invalid structure, such as cycles.
    pub const CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE: CUgraphInstantiateResult_enum = CUgraphInstantiateResult_enum(
        2,
    );
    /// Instantiation for device launch failed because the graph contained an unsupported operation.
    pub const CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED: CUgraphInstantiateResult_enum = CUgraphInstantiateResult_enum(
        3,
    );
    /// Instantiation for device launch failed due to the nodes belonging to different contexts.
    pub const CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED: CUgraphInstantiateResult_enum = CUgraphInstantiateResult_enum(
        4,
    );
    /// One or more conditional handles are not associated with conditional nodes.
    pub const CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED: CUgraphInstantiateResult_enum = CUgraphInstantiateResult_enum(
        5,
    );
}
/// Graph instantiation results
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphInstantiateResult_enum(pub ::core::ffi::c_uint);
pub use self::CUgraphInstantiateResult_enum as CUgraphInstantiateResult;
/// Graph instantiation parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_GRAPH_INSTANTIATE_PARAMS_st {
    /// Instantiation flags
    pub flags: cuuint64_t,
    /// Upload stream
    pub hUploadStream: CUstream,
    /// The node which caused instantiation to fail, if any
    pub hErrNode_out: CUgraphNode,
    /// Whether instantiation was successful.  If it failed, the reason why
    pub result_out: CUgraphInstantiateResult,
}
impl Default for CUDA_GRAPH_INSTANTIATE_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Graph instantiation parameters.
pub type CUDA_GRAPH_INSTANTIATE_PARAMS = CUDA_GRAPH_INSTANTIATE_PARAMS_st;
impl CUsynchronizationPolicy_enum {
    /// Selects the synchronization policy automatically.
    pub const CU_SYNC_POLICY_AUTO: CUsynchronizationPolicy_enum = CUsynchronizationPolicy_enum(
        1,
    );
    /// Spins while waiting for completion.
    pub const CU_SYNC_POLICY_SPIN: CUsynchronizationPolicy_enum = CUsynchronizationPolicy_enum(
        2,
    );
    /// Yields the waiting thread while waiting for completion.
    pub const CU_SYNC_POLICY_YIELD: CUsynchronizationPolicy_enum = CUsynchronizationPolicy_enum(
        3,
    );
    /// Blocks the waiting thread until completion.
    pub const CU_SYNC_POLICY_BLOCKING_SYNC: CUsynchronizationPolicy_enum = CUsynchronizationPolicy_enum(
        4,
    );
}
/// Policy used when synchronizing CUDA work.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUsynchronizationPolicy_enum(pub ::core::ffi::c_uint);
pub use self::CUsynchronizationPolicy_enum as CUsynchronizationPolicy;
impl CUclusterSchedulingPolicy_enum {
    /// the default policy.
    pub const CU_CLUSTER_SCHEDULING_POLICY_DEFAULT: CUclusterSchedulingPolicy_enum = CUclusterSchedulingPolicy_enum(
        0,
    );
    /// spread the blocks within a cluster to the SMs.
    pub const CU_CLUSTER_SCHEDULING_POLICY_SPREAD: CUclusterSchedulingPolicy_enum = CUclusterSchedulingPolicy_enum(
        1,
    );
    /// allow the hardware to load-balance the blocks in a cluster to the SMs.
    pub const CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING: CUclusterSchedulingPolicy_enum = CUclusterSchedulingPolicy_enum(
        2,
    );
    /// Spread the blocks within a cluster to the SMs, and prefer placement that prioritizes Distributed Shared Memory locality for Rubin-class GPUs.
    ///
    /// This is a preference only. The driver may ignore this request when the launch is not eligible, when the device does not support the requested placement behavior, or when other launch constraints take precedence.
    ///
    /// This policy is intended for clustered kernels whose performance depends on communication through Distributed Shared Memory among blocks in the same cluster.
    pub const CU_CLUSTER_SCHEDULING_POLICY_RUBIN_DSMEM_LOCALITY: CUclusterSchedulingPolicy_enum = CUclusterSchedulingPolicy_enum(
        3,
    );
}
/// Cluster scheduling policies. These may be passed to ::cuFuncSetAttribute or ::cuKernelSetAttribute
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUclusterSchedulingPolicy_enum(pub ::core::ffi::c_uint);
pub use self::CUclusterSchedulingPolicy_enum as CUclusterSchedulingPolicy;
impl CUlaunchMemSyncDomain_enum {
    /// Launch kernels in the default domain.
    pub const CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT: CUlaunchMemSyncDomain_enum = CUlaunchMemSyncDomain_enum(
        0,
    );
    /// Launch kernels in the remote domain.
    pub const CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE: CUlaunchMemSyncDomain_enum = CUlaunchMemSyncDomain_enum(
        1,
    );
}
/// Memory Synchronization Domain
///
/// A kernel can be launched in a specified memory synchronization domain that affects all memory operations issued by that kernel. A memory barrier issued in one domain will only order memory operations in that domain, thus eliminating latency increase from memory barriers ordering unrelated traffic.
///
/// By default, kernels are launched in domain 0. Kernel launched with ::CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a different domain ID. User may also alter the domain ID with ::CUlaunchMemSyncDomainMap for a specific stream / graph node / kernel launch. See ::CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN, ::cuStreamSetAttribute, ::cuLaunchKernelEx, ::cuGraphKernelNodeSetAttribute.
///
/// Memory operations done in kernels launched in different domains are considered system-scope distanced. In other words, a GPU scoped memory synchronization is not sufficient for memory order to be observed by kernels in another memory synchronization domain even if they are on the same GPU.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlaunchMemSyncDomain_enum(pub ::core::ffi::c_uint);
pub use self::CUlaunchMemSyncDomain_enum as CUlaunchMemSyncDomain;
/// Memory Synchronization Domain map
///
/// See ::cudaLaunchMemSyncDomain.
///
/// By default, kernels are launched in domain 0. Kernel launched with ::CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a different domain ID. User may also alter the domain ID with ::CUlaunchMemSyncDomainMap for a specific stream / graph node / kernel launch. See ::CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP.
///
/// Domain ID range is available through ::CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlaunchMemSyncDomainMap_st {
    /// The default domain ID to use for designated kernels
    pub default_: ::core::ffi::c_uchar,
    /// The remote domain ID to use for designated kernels
    pub remote: ::core::ffi::c_uchar,
}
/// Memory Synchronization Domain map.
///
/// See ::cudaLaunchMemSyncDomain.
///
/// By default, kernels are launched in domain 0. Kernel launched with [`CUlaunchMemSyncDomain_enum::CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE`] will have a different domain ID. User may also alter the domain ID with [CUlaunchMemSyncDomainMap](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUlaunchMemSyncDomainMap.html#structculaunchmemsyncdomainmap) for a specific stream / graph node / kernel launch. See [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP`].
///
/// Domain ID range is available through [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT`].
pub type CUlaunchMemSyncDomainMap = CUlaunchMemSyncDomainMap_st;
impl CUlaunchAttributePortableClusterMode_enum {
    /// The default to use for allowing non-portable cluster size on launch - uses current function attribute for [`CUfunction_attribute_enum::CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED`].
    pub const CU_LAUNCH_PORTABLE_CLUSTER_MODE_DEFAULT: CUlaunchAttributePortableClusterMode_enum = CUlaunchAttributePortableClusterMode_enum(
        0,
    );
    /// Specifies that the cluster size requested must be a portable size.
    pub const CU_LAUNCH_PORTABLE_CLUSTER_MODE_REQUIRE_PORTABLE: CUlaunchAttributePortableClusterMode_enum = CUlaunchAttributePortableClusterMode_enum(
        1,
    );
    /// Specifies that the cluster size requested may be a non-portable size.
    pub const CU_LAUNCH_PORTABLE_CLUSTER_MODE_ALLOW_NON_PORTABLE: CUlaunchAttributePortableClusterMode_enum = CUlaunchAttributePortableClusterMode_enum(
        2,
    );
}
/// Enum for defining applicability of portable cluster size, used with ::cuLaunchKernelEx
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlaunchAttributePortableClusterMode_enum(pub ::core::ffi::c_uint);
pub use self::CUlaunchAttributePortableClusterMode_enum as CUlaunchAttributePortableClusterMode;
impl CUsharedMemoryMode_enum {
    /// The default to use for shared memory on launch - uses current function attribute for [`CUfunction_attribute_enum::CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES`].
    pub const CU_SHARED_MEMORY_MODE_DEFAULT: CUsharedMemoryMode_enum = CUsharedMemoryMode_enum(
        0,
    );
    /// Specifies that the dynamic shared size bytes requested must be a portable size within the bounds of [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK`].
    pub const CU_SHARED_MEMORY_MODE_REQUIRE_PORTABLE: CUsharedMemoryMode_enum = CUsharedMemoryMode_enum(
        1,
    );
    /// Specifies that the dynamic shared size bytes requested may be a non-portable size but still within the bounds of [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN`].
    pub const CU_SHARED_MEMORY_MODE_ALLOW_NON_PORTABLE: CUsharedMemoryMode_enum = CUsharedMemoryMode_enum(
        2,
    );
    /// Specifies that oversized shared memory configurations may be used (with the limitation of only 8kB L1 cache).
    pub const CU_SHARED_MEMORY_MODE_ALLOW_OVERSIZED_SHARED_MEMORY: CUsharedMemoryMode_enum = CUsharedMemoryMode_enum(
        3,
    );
    /// Specifies that oversized shared memory configurations may be used (with the limitation of only 8kB L1 cache), and prefer an oversized shared memory configuration.
    pub const CU_SHARED_MEMORY_MODE_PREFER_OVERSIZED_SHARED_MEMORY: CUsharedMemoryMode_enum = CUsharedMemoryMode_enum(
        4,
    );
}
/// Shared memory related attributes for use with ::cuLaunchKernelEx
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUsharedMemoryMode_enum(pub ::core::ffi::c_uint);
pub use self::CUsharedMemoryMode_enum as CUsharedMemoryMode;
impl CUlaunchAttributeID_enum {
    /// Ignored entry, for convenient composition.
    pub const CU_LAUNCH_ATTRIBUTE_IGNORE: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        0,
    );
    /// Valid for streams, graph nodes, launches.
    ///
    /// See [CUlaunchAttributeValue::accessPolicyWindow](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1a154aa6110d2610fb68ec60bc9337073b).
    pub const CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        1,
    );
    /// Valid for graph nodes, launches.
    ///
    /// See [CUlaunchAttributeValue::cooperative](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1a3015f3dc785dce3a2c250b852457082a).
    pub const CU_LAUNCH_ATTRIBUTE_COOPERATIVE: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        2,
    );
    /// Valid for streams.
    ///
    /// See [CUlaunchAttributeValue::syncPolicy](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1abfc7b2566d09fbd679636513d5c07cd8).
    pub const CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        3,
    );
    /// Valid for graph nodes, launches.
    ///
    /// See [CUlaunchAttributeValue::clusterDim](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1a70d79310f04581a60df6069b7d7d432a).
    pub const CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        4,
    );
    /// Valid for graph nodes, launches.
    ///
    /// See [CUlaunchAttributeValue::clusterSchedulingPolicyPreference](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1a714fd4571d6ef99a53a20d378eebb2ba).
    pub const CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        5,
    );
    /// Valid for launches.
    ///
    /// Setting [CUlaunchAttributeValue::programmaticStreamSerializationAllowed](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1a21590ca9c3de21690d12d9c7f73917ab) to non-0 signals that the kernel will use programmatic means to resolve its stream dependency, so that the CUDA runtime should opportunistically allow the grid’s execution to overlap with the previous kernel in the stream, if that kernel requests the overlap. The dependent launches can choose to wait on the dependency using the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX instructions).
    pub const CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        6,
    );
    /// Valid for launches.
    ///
    /// Set [CUlaunchAttributeValue::programmaticEvent](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1ae1eb628b29c538c9fb1e5a3d829b0777) to record the event. Event recorded through this launch attribute is guaranteed to only trigger after all block in the associated kernel trigger the event. A block can trigger the event through PTX launchdep.release or CUDA builtin function cudaTriggerProgrammaticLaunchCompletion(). A trigger can also be inserted at the beginning of each block’s execution if triggerAtBlockStart is set to non-0. The dependent launches can choose to wait on the dependency using the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX instructions). Note that dependents (including the CPU thread calling [`cuEventSynchronize`]) are not guaranteed to observe the release precisely when it is released. For example, [`cuEventSynchronize`]
    ///
    /// may only observe the event trigger long after the associated kernel has completed. This recording type is primarily meant for establishing programmatic dependency between device tasks. Note also this type of dependency allows, but does not guarantee, concurrent execution of tasks.
    ///
    /// The event supplied must not be an interprocess or interop event. The event must disable timing (i.e. must be created with the.
    pub const CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        7,
    );
    /// Valid for streams, graph nodes, launches.
    ///
    /// See [CUlaunchAttributeValue::priority](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1a8b3a370124a50866fcdb1c9cb5580e96).
    pub const CU_LAUNCH_ATTRIBUTE_PRIORITY: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        8,
    );
    /// Valid for streams, graph nodes, launches.
    ///
    /// See [CUlaunchAttributeValue::memSyncDomainMap](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1a34552cdc66a0a5373d8515108d9c63d6).
    pub const CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        9,
    );
    /// Valid for streams, graph nodes, launches.
    ///
    /// See [CUlaunchAttributeValue::memSyncDomain](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1a68b8301d88ce5c6e69fc5f08734e55a8).
    pub const CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        10,
    );
    /// Valid for graph nodes, launches.
    ///
    /// Set [CUlaunchAttributeValue::preferredClusterDim](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1ad78976fd10fa7429385d312a34df8c5a) to allow the kernel launch to specify a preferred substitute cluster dimension. Blocks may be grouped according to either the dimensions specified with this attribute (grouped into a “preferred substitute cluster”), or the one specified with [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION`]
    ///
    /// attribute (grouped into a “regular cluster”). The cluster dimensions of a “preferred substitute cluster” shall be an integer multiple greater than zero of the regular cluster dimensions. The device will attempt - on a best-effort basis - to group thread blocks into preferred clusters over grouping them into regular clusters. When it deems necessary (primarily when the device temporarily runs out of physical resources to launch the larger preferred clusters), the device may switch to launch the regular clusters instead to attempt to utilize as much of the physical device resources as possible.
    ///
    /// Each type of cluster will have its enumeration / coordinate setup as if the grid consists solely of its type of cluster. For example, if the preferred substitute cluster dimensions double the regular cluster dimensions, there might be simultaneously a regular cluster indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and (3,0,0) and groups their blocks.
    pub const CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        11,
    );
    /// Valid for launches.
    ///
    /// Set [CUlaunchAttributeValue::launchCompletionEvent](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1acbf92a20afbb58ef233b0d9facfb8940)
    ///
    /// to record the event.
    ///
    /// Nominally, the event is triggered once all blocks of the kernel have begun execution. Currently this is a best effort. If a kernel B has a launch completion dependency on a kernel A, B may wait until A is complete. Alternatively, blocks of B may begin before all blocks of A have begun, for example if B can claim execution resources unavailable to A (e.g. they run on different GPUs) or if B is a higher priority than A. Exercise caution if such an ordering inversion could lead to deadlock.
    ///
    /// set except that it is not visible to cudaGridDependencySynchronize() and can be used with compute capability less than 9.0.
    ///
    /// The event supplied must not be an interprocess or interop event. The event must disable timing (i.e. must be created with the.
    pub const CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        12,
    );
    /// Valid for graph nodes, launches.
    ///
    /// This attribute is graphs-only, and passing it to a launch in a non-capturing stream will result in an error.
    ///
    /// ::CUlaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable can only be set to 0 or 1. Setting the field to 1 indicates that the corresponding kernel node should be device-updatable. On success, a handle will be returned via ::CUlaunchAttributeValue::deviceUpdatableKernelNode::devNode which can be passed to the various device-side update functions to update the node’s kernel parameters from within another kernel. For more information on the types of device updates that can be made, as well as the relevant limitations thereof, see ::cudaGraphKernelNodeUpdatesApply.
    ///
    /// . Graphs containing one or more device-updatable nodes also do not allow multiple instantiation, and neither the graph nor its instantiated version can be passed to cuGraphExecUpdate.
    ///
    /// If a graph contains device-updatable nodes and updates those nodes from the device from within the graph, the graph must be uploaded with.
    pub const CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        13,
    );
    /// Valid for launches.
    ///
    /// On devices where the L1 cache and shared memory use the same hardware resources, setting [CUlaunchAttributeValue::sharedMemCarveout](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1ab4890866538ded7d27e648d399caaff2) to a percentage between 0-100 signals the CUDA driver to set the shared memory carveout preference, in percent of the total shared memory for that kernel launch. This attribute takes precedence over [`CUfunction_attribute_enum::CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`]. This is only a hint, and the CUDA driver can choose a different configuration if required for the launch.
    pub const CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        14,
    );
    /// Valid for streams, graph nodes, launches.
    ///
    /// This attribute is a hint to the CUDA runtime that the launch should attempt to make the kernel maximize its NVLINK utilization.
    ///
    /// When possible to honor this hint, CUDA will assume each block in the grid launch will carry out an even amount of NVLINK traffic, and make a best-effort attempt to adjust the kernel launch based on that assumption.
    ///
    /// This attribute is a hint only. CUDA makes no functional or performance guarantee. Its applicability can be affected by many different factors, including driver version (i.e. CUDA doesn’t guarantee the performance characteristics will be maintained between driver versions or a driver update could alter or regress previously observed perf characteristics.) It also doesn’t guarantee a successful result, i.e. applying the attribute may not improve the performance of either the targeted kernel or the encapsulating application.
    ///
    /// Valid values for CUlaunchAttributeValue::nvlinkUtilCentricScheduling are 0 (disabled) and 1 (enabled).
    pub const CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        16,
    );
    /// Valid for graph nodes, launches.
    ///
    /// This controls whether the kernel launch is allowed to use a non-portable cluster size. Valid values for [CUlaunchAttributeValue::portableClusterSizeMode](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue_1ab59ceb6906a7de4ce07de5f2269d18b3) are described in [CUlaunchAttributePortableClusterMode](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gaeb6323dd92d20fdf48e4cf68122e77a1). Any other value will return [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`].
    pub const CU_LAUNCH_ATTRIBUTE_PORTABLE_CLUSTER_SIZE_MODE: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        17,
    );
    /// Valid for graph nodes, launches.
    ///
    /// This controls a kernel’s use of non-portable or oversized shared memory configurations.
    pub const CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(
        18,
    );
}
/// Launch attributes enum; used as id field of ::CUlaunchAttribute
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlaunchAttributeID_enum(pub ::core::ffi::c_uint);
pub use self::CUlaunchAttributeID_enum as CUlaunchAttributeID;
/// Launch attributes union; used as value field of ::CUlaunchAttribute
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUlaunchAttributeValue_union {
    /// Pad to 64 bytes
    pub pad: [::core::ffi::c_char; 64usize],
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW.
    pub accessPolicyWindow: CUaccessPolicyWindow,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero indicates a cooperative kernel (see ::cuLaunchCooperativeKernel).
    pub cooperative: ::core::ffi::c_int,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. ::CUsynchronizationPolicy for work queued up in this stream
    pub syncPolicy: CUsynchronizationPolicy,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION that represents the desired cluster dimensions for the kernel. Opaque type with the following fields:
    /// - `x` - The X dimension of the cluster, in blocks. Must be a divisor of the grid X dimension.
    /// - `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension.
    /// - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension.
    pub clusterDim: CUlaunchAttributeValue_union__bindgen_ty_1,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster scheduling policy preference for the kernel.
    pub clusterSchedulingPolicyPreference: CUclusterSchedulingPolicy,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION.
    pub programmaticStreamSerializationAllowed: ::core::ffi::c_int,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT with the following fields:
    /// - [`CUevent`] event - Event to fire when all blocks trigger it.
    /// - `Event` record flags, see ::cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL.
    /// - `triggerAtBlockStart` - If this is set to non-0, each block launch will automatically trigger the event.
    pub programmaticEvent: CUlaunchAttributeValue_union__bindgen_ty_2,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following fields:
    /// - [`CUevent`] event - Event to fire when the last block launches
    /// - `int` flags; - Event record flags, see ::cuEventRecordWithFlags. Does not accept ::CU_EVENT_RECORD_EXTERNAL.
    pub launchCompletionEvent: CUlaunchAttributeValue_union__bindgen_ty_3,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution priority of the kernel.
    pub priority: ::core::ffi::c_int,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. See ::CUlaunchMemSyncDomainMap.
    pub memSyncDomainMap: CUlaunchMemSyncDomainMap,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. See::CUlaunchMemSyncDomain
    pub memSyncDomain: CUlaunchMemSyncDomain,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the desired preferred cluster dimensions for the kernel. Opaque type with the following fields:
    /// - `x` - The X dimension of the preferred cluster, in blocks. Must be a divisor of the grid X dimension, and must be a multiple of the `x` field of ::CUlaunchAttributeValue::clusterDim.
    /// - `y` - The Y dimension of the preferred cluster, in blocks. Must be a divisor of the grid Y dimension, and must be a multiple of the `y` field of ::CUlaunchAttributeValue::clusterDim.
    /// - `z` - The Z dimension of the preferred cluster, in blocks. Must be equal to the `z` field of ::CUlaunchAttributeValue::clusterDim.
    pub preferredClusterDim: CUlaunchAttributeValue_union__bindgen_ty_4,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the following fields:
    /// - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable.
    /// - [`CUgraphDeviceNode`] devNode - Returns a handle to pass to the various device-side update functions.
    pub deviceUpdatableKernelNode: CUlaunchAttributeValue_union__bindgen_ty_5,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT.
    pub sharedMemCarveout: ::core::ffi::c_uint,
    /// Enables NVLink-utilization-centric scheduling when 1; 0 disables it.
    pub nvlinkUtilCentricScheduling: ::core::ffi::c_uint,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_PORTABLE_CLUSTER_SIZE_MODE.
    pub portableClusterSizeMode: CUlaunchAttributePortableClusterMode,
    /// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE. See ::CUsharedMemoryMode for acceptable values.
    pub sharedMemoryMode: CUsharedMemoryMode,
}
/// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION that represents the desired cluster dimensions for the kernel. Opaque type with the following fields:
/// - `x` - The X dimension of the cluster, in blocks. Must be a divisor of the grid X dimension.
/// - `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension.
/// - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlaunchAttributeValue_union__bindgen_ty_1 {
    /// The X dimension of the cluster, in blocks. Must be a divisor of the grid X dimension.
    pub x: ::core::ffi::c_uint,
    /// The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension.
    pub y: ::core::ffi::c_uint,
    /// The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension.
    pub z: ::core::ffi::c_uint,
}
/// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT with the following fields:
/// - [`CUevent`] event - Event to fire when all blocks trigger it.
/// - `Event` record flags, see ::cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL.
/// - `triggerAtBlockStart` - If this is set to non-0, each block launch will automatically trigger the event.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlaunchAttributeValue_union__bindgen_ty_2 {
    /// Event to fire when all blocks trigger it.
    pub event: CUevent,
    /// `triggerAtBlockStart` - If this is set to non-0, each block launch will automatically trigger the event.
    pub flags: ::core::ffi::c_int,
    /// Nonzero causes each block launch to trigger the programmatic event automatically.
    pub triggerAtBlockStart: ::core::ffi::c_int,
}
impl Default for CUlaunchAttributeValue_union__bindgen_ty_2 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following fields:
/// - [`CUevent`] event - Event to fire when the last block launches
/// - `int` flags; - Event record flags, see ::cuEventRecordWithFlags. Does not accept ::CU_EVENT_RECORD_EXTERNAL.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlaunchAttributeValue_union__bindgen_ty_3 {
    /// Event to fire when the last block launches
    pub event: CUevent,
    /// Event record flags, see ::cuEventRecordWithFlags. Does not accept ::CU_EVENT_RECORD_EXTERNAL.
    pub flags: ::core::ffi::c_int,
}
impl Default for CUlaunchAttributeValue_union__bindgen_ty_3 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the desired preferred cluster dimensions for the kernel. Opaque type with the following fields:
/// - `x` - The X dimension of the preferred cluster, in blocks. Must be a divisor of the grid X dimension, and must be a multiple of the `x` field of ::CUlaunchAttributeValue::clusterDim.
/// - `y` - The Y dimension of the preferred cluster, in blocks. Must be a divisor of the grid Y dimension, and must be a multiple of the `y` field of ::CUlaunchAttributeValue::clusterDim.
/// - `z` - The Z dimension of the preferred cluster, in blocks. Must be equal to the `z` field of ::CUlaunchAttributeValue::clusterDim.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlaunchAttributeValue_union__bindgen_ty_4 {
    /// The X dimension of the preferred cluster, in blocks. Must be a divisor of the grid X dimension, and must be a multiple of the `x` field of ::CUlaunchAttributeValue::clusterDim.
    pub x: ::core::ffi::c_uint,
    /// The Y dimension of the preferred cluster, in blocks. Must be a divisor of the grid Y dimension, and must be a multiple of the `y` field of ::CUlaunchAttributeValue::clusterDim.
    pub y: ::core::ffi::c_uint,
    /// The Z dimension of the preferred cluster, in blocks. Must be equal to the `z` field of ::CUlaunchAttributeValue::clusterDim.
    pub z: ::core::ffi::c_uint,
}
/// Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the following fields:
/// - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable.
/// - [`CUgraphDeviceNode`] devNode - Returns a handle to pass to the various device-side update functions.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlaunchAttributeValue_union__bindgen_ty_5 {
    /// Whether or not the resulting kernel node should be device-updatable.
    pub deviceUpdatable: ::core::ffi::c_int,
    /// Returns a handle to pass to the various device-side update functions.
    pub devNode: CUgraphDeviceNode,
}
impl Default for CUlaunchAttributeValue_union__bindgen_ty_5 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUlaunchAttributeValue_union {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Launch attributes union; used as value field of ::CUlaunchAttribute
pub type CUlaunchAttributeValue = CUlaunchAttributeValue_union;
/// Launch attribute
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUlaunchAttribute_st {
    /// Attribute to set
    pub id: CUlaunchAttributeID,
    /// Padding that preserves the native alignment of the launch-attribute value.
    pub pad: [::core::ffi::c_char; 4usize],
    /// Value of the attribute
    pub value: CUlaunchAttributeValue,
}
impl Default for CUlaunchAttribute_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Launch attribute.
pub type CUlaunchAttribute = CUlaunchAttribute_st;
/// CUDA extensible launch configuration
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlaunchConfig_st {
    /// Width of grid in blocks
    pub gridDimX: ::core::ffi::c_uint,
    /// Height of grid in blocks
    pub gridDimY: ::core::ffi::c_uint,
    /// Depth of grid in blocks
    pub gridDimZ: ::core::ffi::c_uint,
    /// X dimension of each thread block
    pub blockDimX: ::core::ffi::c_uint,
    /// Y dimension of each thread block
    pub blockDimY: ::core::ffi::c_uint,
    /// Z dimension of each thread block
    pub blockDimZ: ::core::ffi::c_uint,
    /// Dynamic shared-memory size per thread block in bytes
    pub sharedMemBytes: ::core::ffi::c_uint,
    /// Stream identifier
    pub hStream: CUstream,
    /// List of attributes; nullable if ::CUlaunchConfig::numAttrs == 0
    pub attrs: *mut CUlaunchAttribute,
    /// Number of attributes populated in ::CUlaunchConfig::attrs
    pub numAttrs: ::core::ffi::c_uint,
}
impl Default for CUlaunchConfig_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// CUDA extensible launch configuration.
pub type CUlaunchConfig = CUlaunchConfig_st;
pub use self::CUlaunchAttributeID as CUkernelNodeAttrID;
/// Launch attributes union; used as value field of ::CUlaunchAttribute
pub type CUkernelNodeAttrValue_v1 = CUlaunchAttributeValue;
/// Launch attributes union; used as value field of ::CUlaunchAttribute
pub type CUkernelNodeAttrValue = CUkernelNodeAttrValue_v1;
impl CUstreamCaptureStatus_enum {
    /// Stream is not capturing.
    pub const CU_STREAM_CAPTURE_STATUS_NONE: CUstreamCaptureStatus_enum = CUstreamCaptureStatus_enum(
        0,
    );
    /// Stream is actively capturing.
    pub const CU_STREAM_CAPTURE_STATUS_ACTIVE: CUstreamCaptureStatus_enum = CUstreamCaptureStatus_enum(
        1,
    );
    /// Stream is part of a capture sequence that has been invalidated, but not terminated.
    pub const CU_STREAM_CAPTURE_STATUS_INVALIDATED: CUstreamCaptureStatus_enum = CUstreamCaptureStatus_enum(
        2,
    );
}
/// Possible stream capture statuses returned by ::cuStreamIsCapturing
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamCaptureStatus_enum(pub ::core::ffi::c_uint);
pub use self::CUstreamCaptureStatus_enum as CUstreamCaptureStatus;
impl CUstreamCaptureMode_enum {
    /// This is the default mode. If the local thread has an ongoing capture sequence that was not initiated with [`CUstreamCaptureMode_enum::CU_STREAM_CAPTURE_MODE_RELAXED`] at [`cuStreamBeginCapture_v2`], or if any other thread has a concurrent capture sequence initiated with [`CUstreamCaptureMode_enum::CU_STREAM_CAPTURE_MODE_GLOBAL`], this thread is prohibited from potentially unsafe API calls.
    pub const CU_STREAM_CAPTURE_MODE_GLOBAL: CUstreamCaptureMode_enum = CUstreamCaptureMode_enum(
        0,
    );
    /// If the local thread has an ongoing capture sequence not initiated with [`CUstreamCaptureMode_enum::CU_STREAM_CAPTURE_MODE_RELAXED`], it is prohibited from potentially unsafe API calls. Concurrent capture sequences in other threads are ignored.
    pub const CU_STREAM_CAPTURE_MODE_THREAD_LOCAL: CUstreamCaptureMode_enum = CUstreamCaptureMode_enum(
        1,
    );
    /// The local thread is not prohibited from potentially unsafe API calls. Note that the thread is still prohibited from API calls which necessarily conflict with stream capture, for example, attempting ::cuEventQuery on an event that was last recorded inside a capture sequence.
    pub const CU_STREAM_CAPTURE_MODE_RELAXED: CUstreamCaptureMode_enum = CUstreamCaptureMode_enum(
        2,
    );
}
/// Possible modes for stream capture thread interactions. For more details see ::cuStreamBeginCapture and ::cuThreadExchangeStreamCaptureMode
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamCaptureMode_enum(pub ::core::ffi::c_uint);
pub use self::CUlaunchAttributeID as CUstreamAttrID;
pub use self::CUstreamCaptureMode_enum as CUstreamCaptureMode;
/// Launch attributes union; used as value field of ::CUlaunchAttribute
pub type CUstreamAttrValue_v1 = CUlaunchAttributeValue;
/// Launch attributes union; used as value field of ::CUlaunchAttribute
pub type CUstreamAttrValue = CUstreamAttrValue_v1;
impl CUdriverProcAddress_flags_enum {
    /// Default search mode for driver symbols.
    pub const CU_GET_PROC_ADDRESS_DEFAULT: CUdriverProcAddress_flags_enum = CUdriverProcAddress_flags_enum(
        0,
    );
    /// Search for legacy versions of driver symbols.
    pub const CU_GET_PROC_ADDRESS_LEGACY_STREAM: CUdriverProcAddress_flags_enum = CUdriverProcAddress_flags_enum(
        1,
    );
    /// Search for per-thread versions of driver symbols.
    pub const CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM: CUdriverProcAddress_flags_enum = CUdriverProcAddress_flags_enum(
        2,
    );
}
/// Flags to specify search options. For more details see ::cuGetProcAddress
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdriverProcAddress_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUdriverProcAddress_flags_enum as CUdriverProcAddress_flags;
impl CUdriverProcAddressQueryResult_enum {
    /// Symbol was succesfully found.
    pub const CU_GET_PROC_ADDRESS_SUCCESS: CUdriverProcAddressQueryResult_enum = CUdriverProcAddressQueryResult_enum(
        0,
    );
    /// Symbol was not found in search.
    pub const CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND: CUdriverProcAddressQueryResult_enum = CUdriverProcAddressQueryResult_enum(
        1,
    );
    /// Symbol was found but version supplied was not sufficient.
    pub const CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT: CUdriverProcAddressQueryResult_enum = CUdriverProcAddressQueryResult_enum(
        2,
    );
}
/// Flags to indicate search status. For more details see ::cuGetProcAddress
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdriverProcAddressQueryResult_enum(pub ::core::ffi::c_uint);
pub use self::CUdriverProcAddressQueryResult_enum as CUdriverProcAddressQueryResult;
impl CUexecAffinityType_enum {
    /// Create a context with limited SMs.
    pub const CU_EXEC_AFFINITY_TYPE_SM_COUNT: CUexecAffinityType_enum = CUexecAffinityType_enum(
        0,
    );
    /// Reserved upper-bound sentinel for native execution-affinity parameter kinds.
    pub const CU_EXEC_AFFINITY_TYPE_MAX: CUexecAffinityType_enum = CUexecAffinityType_enum(
        1,
    );
}
/// Execution Affinity Types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUexecAffinityType_enum(pub ::core::ffi::c_uint);
pub use self::CUexecAffinityType_enum as CUexecAffinityType;
/// Value for ::CU_EXEC_AFFINITY_TYPE_SM_COUNT
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUexecAffinitySmCount_st {
    /// The number of SMs the context is limited to use.
    pub val: ::core::ffi::c_uint,
}
/// Value for [`CUexecAffinityType_enum::CU_EXEC_AFFINITY_TYPE_SM_COUNT`].
pub type CUexecAffinitySmCount_v1 = CUexecAffinitySmCount_st;
/// Value for ::CU_EXEC_AFFINITY_TYPE_SM_COUNT
pub type CUexecAffinitySmCount = CUexecAffinitySmCount_v1;
/// Execution Affinity Parameters
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUexecAffinityParam_st {
    /// Type of execution affinity.
    pub type_: CUexecAffinityType,
    /// Execution-affinity value interpreted according to `type`.
    pub param: CUexecAffinityParam_st__bindgen_ty_1,
}
/// Native layout of the `param` member of [`CUexecAffinityParam_st`].
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUexecAffinityParam_st__bindgen_ty_1 {
    /// Value for ::CU_EXEC_AFFINITY_TYPE_SM_COUNT
    pub smCount: CUexecAffinitySmCount,
}
impl Default for CUexecAffinityParam_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUexecAffinityParam_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Execution Affinity Parameters.
pub type CUexecAffinityParam_v1 = CUexecAffinityParam_st;
/// Execution Affinity Parameters.
pub type CUexecAffinityParam = CUexecAffinityParam_v1;
impl CUcigDataType_enum {
    /// D3D12 Command Queue Handle.
    pub const CIG_DATA_TYPE_D3D12_COMMAND_QUEUE: CUcigDataType_enum = CUcigDataType_enum(
        1,
    );
    /// Nvidia specific data blob used for Vulkan and other NV clients.
    pub const CIG_DATA_TYPE_NV_BLOB: CUcigDataType_enum = CUcigDataType_enum(2);
}
/// Graphics-client handle representation supplied when creating a CUDA-in-Graphics context.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcigDataType_enum(pub ::core::ffi::c_uint);
pub use self::CUcigDataType_enum as CUcigDataType;
/// CIG Context Create Params
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUctxCigParam_st {
    /// Type of shared data from graphics client (D3D12 or Vulkan).
    pub sharedDataType: CUcigDataType,
    /// Graphics client data handle (ID3D12CommandQueue or Nvidia specific data blob).
    pub sharedData: *mut ::core::ffi::c_void,
}
impl Default for CUctxCigParam_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// CIG Context Create Params.
pub type CUctxCigParam = CUctxCigParam_st;
/// Params for creating CUDA context. Both execAffinityParams and cigParams cannot be non-NULL at the same time. If both are NULL, the context will be created as a regular CUDA context.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUctxCreateParams_st {
    /// Array of execution affinity parameters to limit context resources (e.g., SM count). Only supported Volta+ MPS. Mutually exclusive with cigParams.
    pub execAffinityParams: *mut CUexecAffinityParam,
    /// Number of elements in execAffinityParams array. Must be 0 if execAffinityParams is NULL.
    pub numExecAffinityParams: ::core::ffi::c_int,
    /// CIG (CUDA in Graphics) parameters for sharing data from D3D12/Vulkan graphics clients. Mutually exclusive with execAffinityParams.
    pub cigParams: *mut CUctxCigParam,
}
impl Default for CUctxCreateParams_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Params for creating CUDA context.
///
/// Both execAffinityParams and cigParams cannot be non-NULL at the same time. If both are NULL, the context will be created as a regular CUDA context.
pub type CUctxCreateParams = CUctxCreateParams_st;
impl CUstreamCigDataType_enum {
    /// D3D12 Command List Handle.
    pub const STREAM_CIG_DATA_TYPE_D3D12_COMMAND_LIST: CUstreamCigDataType_enum = CUstreamCigDataType_enum(
        1,
    );
}
/// Graphics-client command-list representation supplied for CUDA-in-Graphics stream capture.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamCigDataType_enum(pub ::core::ffi::c_uint);
pub use self::CUstreamCigDataType_enum as CUstreamCigDataType;
/// CIG Stream Capture Params
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamCigParam_st {
    /// Type of shared data from graphics client (D3D12).
    pub streamSharedDataType: CUstreamCigDataType,
    /// Graphics client data handle (ID3D12CommandList/ID3D12GraphicsCommandList).
    pub streamSharedData: *mut ::core::ffi::c_void,
}
impl Default for CUstreamCigParam_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// CIG Stream Capture Params.
pub type CUstreamCigParam = CUstreamCigParam_st;
/// Params for capturing CUDA stream to CIG streamCigParams must be non-NULL.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUstreamCigCaptureParams_st {
    /// CIG (CUDA in Graphics) parameters for sharing command list data from D3D12 graphics clients.
    pub streamCigParams: *mut CUstreamCigParam,
}
impl Default for CUstreamCigCaptureParams_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Params for capturing CUDA stream to CIG streamCigParams must be non-NULL.
pub type CUstreamCigCaptureParams = CUstreamCigCaptureParams_st;
impl CUlibraryOption_enum {
    /// Supplies the host universal-function and data tables when loading a CUDA library.
    pub const CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE: CUlibraryOption_enum = CUlibraryOption_enum(
        0,
    );
    /// Specifes that the argument `code` passed to [`cuLibraryLoadData`] will be preserved.
    ///
    /// Specifying this option will let the driver know that `code` can be accessed at any point until [`cuLibraryUnload`]. The default behavior is for the driver to allocate and maintain its own copy of `code`. Note that this is only a memory usage optimization hint and the driver can choose to ignore it if required. Specifying this option with [`cuLibraryLoadFromFile`] is invalid and will return [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`].
    pub const CU_LIBRARY_BINARY_IS_PRESERVED: CUlibraryOption_enum = CUlibraryOption_enum(
        1,
    );
    /// Upper-bound sentinel for CUDA library loading option selectors.
    pub const CU_LIBRARY_NUM_OPTIONS: CUlibraryOption_enum = CUlibraryOption_enum(2);
}
/// Library options to be specified with ::cuLibraryLoadData() or ::cuLibraryLoadFromFile()
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlibraryOption_enum(pub ::core::ffi::c_uint);
pub use self::CUlibraryOption_enum as CUlibraryOption;
/// Host-side function and data tables supplied through [`CUlibraryOption_enum::CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE`].
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlibraryHostUniversalFunctionAndDataTable_st {
    /// Address of the host universal-function table.
    pub functionTable: *mut ::core::ffi::c_void,
    /// Size of the native function-table window.
    pub functionWindowSize: size_t,
    /// Address of the host universal-data table.
    pub dataTable: *mut ::core::ffi::c_void,
    /// Size of the native data-table window.
    pub dataWindowSize: size_t,
}
impl Default for CUlibraryHostUniversalFunctionAndDataTable_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Host-side function and data tables supplied through [`CUlibraryOption_enum::CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE`].
pub type CUlibraryHostUniversalFunctionAndDataTable = CUlibraryHostUniversalFunctionAndDataTable_st;
impl cudaError_enum {
    /// The API call returned with no errors.
    ///
    /// In the case of query calls, this also means that the operation being queried is complete (see [`cuEventQuery`] and [`cuStreamQuery`]).
    pub const CUDA_SUCCESS: cudaError_enum = cudaError_enum(0);
    /// This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values.
    pub const CUDA_ERROR_INVALID_VALUE: cudaError_enum = cudaError_enum(1);
    /// The API call failed because it was unable to allocate enough memory or other resources to perform the requested operation.
    pub const CUDA_ERROR_OUT_OF_MEMORY: cudaError_enum = cudaError_enum(2);
    /// This indicates that the CUDA driver has not been initialized with [`cuInit`] or that initialization has failed.
    pub const CUDA_ERROR_NOT_INITIALIZED: cudaError_enum = cudaError_enum(3);
    /// This indicates that the CUDA driver is in the process of shutting down.
    pub const CUDA_ERROR_DEINITIALIZED: cudaError_enum = cudaError_enum(4);
    /// This indicates profiler is not initialized for this run.
    ///
    /// This can happen when the application is running with external profiling tools like visual profiler.
    pub const CUDA_ERROR_PROFILER_DISABLED: cudaError_enum = cudaError_enum(5);
    /// Deprecated: This error return is deprecated as of CUDA 5.0. It is no longer an error to attempt to enable/disable the profiling via ::cuProfilerStart or ::cuProfilerStop without initialization.
    pub const CUDA_ERROR_PROFILER_NOT_INITIALIZED: cudaError_enum = cudaError_enum(6);
    /// Deprecated: This error return is deprecated as of CUDA 5.0. It is no longer an error to call cuProfilerStart() when profiling is already enabled.
    pub const CUDA_ERROR_PROFILER_ALREADY_STARTED: cudaError_enum = cudaError_enum(7);
    /// Deprecated: This error return is deprecated as of CUDA 5.0. It is no longer an error to call cuProfilerStop() when profiling is already disabled.
    pub const CUDA_ERROR_PROFILER_ALREADY_STOPPED: cudaError_enum = cudaError_enum(8);
    /// This indicates that the CUDA driver that the application has loaded is a stub library.
    ///
    /// Applications that run with the stub rather than a real driver loaded will result in CUDA API returning this error.
    pub const CUDA_ERROR_STUB_LIBRARY: cudaError_enum = cudaError_enum(34);
    /// This indicates that the API call requires a newer CUDA driver than the one currently installed.
    ///
    /// Users should install an updated NVIDIA CUDA driver to allow the API call to succeed.
    pub const CUDA_ERROR_CALL_REQUIRES_NEWER_DRIVER: cudaError_enum = cudaError_enum(36);
    /// This indicates that requested CUDA device is unavailable at the current time.
    ///
    /// Devices are often unavailable due to use of [`CUcomputemode_enum::CU_COMPUTEMODE_EXCLUSIVE_PROCESS`] or [`CUcomputemode_enum::CU_COMPUTEMODE_PROHIBITED`].
    pub const CUDA_ERROR_DEVICE_UNAVAILABLE: cudaError_enum = cudaError_enum(46);
    /// The API call failed because of a hardware resource required to bind memory to a multicast object is unavailable.
    pub const CUDA_ERROR_MULTICAST_RESOURCE_FULL: cudaError_enum = cudaError_enum(47);
    /// This indicates that no CUDA-capable devices were detected by the installed CUDA driver.
    pub const CUDA_ERROR_NO_DEVICE: cudaError_enum = cudaError_enum(100);
    /// This indicates that the device ordinal supplied by the user does not correspond to a valid CUDA device or that the action requested is invalid for the specified device.
    pub const CUDA_ERROR_INVALID_DEVICE: cudaError_enum = cudaError_enum(101);
    /// This error indicates that the Grid license is not applied.
    pub const CUDA_ERROR_DEVICE_NOT_LICENSED: cudaError_enum = cudaError_enum(102);
    /// This indicates that the device kernel image is invalid.
    ///
    /// This can also indicate an invalid CUDA module.
    pub const CUDA_ERROR_INVALID_IMAGE: cudaError_enum = cudaError_enum(200);
    /// This most frequently indicates that there is no context bound to the current thread.
    ///
    /// This can also be returned if the context passed to an API call is not a valid handle (such as a context that has had cuCtxDestroy() invoked on it). This can also be returned if a user mixes different API versions (i.e. 3010 context with 3020 API calls). See [`cuCtxGetApiVersion`] for more details. This can also be returned if the green context passed to an API call was not converted to a [`CUcontext`] using [`cuCtxFromGreenCtx`] API.
    pub const CUDA_ERROR_INVALID_CONTEXT: cudaError_enum = cudaError_enum(201);
    /// This indicated that the context being supplied as a parameter to the API call was already the active context.
    pub const CUDA_ERROR_CONTEXT_ALREADY_CURRENT: cudaError_enum = cudaError_enum(202);
    /// This indicates that a map or register operation has failed.
    pub const CUDA_ERROR_MAP_FAILED: cudaError_enum = cudaError_enum(205);
    /// This indicates that an unmap or unregister operation has failed.
    pub const CUDA_ERROR_UNMAP_FAILED: cudaError_enum = cudaError_enum(206);
    /// This indicates that the specified array is currently mapped and thus cannot be destroyed.
    pub const CUDA_ERROR_ARRAY_IS_MAPPED: cudaError_enum = cudaError_enum(207);
    /// This indicates that the resource is already mapped.
    pub const CUDA_ERROR_ALREADY_MAPPED: cudaError_enum = cudaError_enum(208);
    /// This indicates that there is no kernel image available that is suitable for the device.
    ///
    /// This can occur when a user specifies code generation options for a particular CUDA source file that do not include the corresponding device configuration.
    pub const CUDA_ERROR_NO_BINARY_FOR_GPU: cudaError_enum = cudaError_enum(209);
    /// This indicates that a resource has already been acquired.
    pub const CUDA_ERROR_ALREADY_ACQUIRED: cudaError_enum = cudaError_enum(210);
    /// This indicates that a resource is not mapped.
    pub const CUDA_ERROR_NOT_MAPPED: cudaError_enum = cudaError_enum(211);
    /// This indicates that a mapped resource is not available for access as an array.
    pub const CUDA_ERROR_NOT_MAPPED_AS_ARRAY: cudaError_enum = cudaError_enum(212);
    /// This indicates that a mapped resource is not available for access as a pointer.
    pub const CUDA_ERROR_NOT_MAPPED_AS_POINTER: cudaError_enum = cudaError_enum(213);
    /// This indicates that an uncorrectable ECC error was detected during execution.
    pub const CUDA_ERROR_ECC_UNCORRECTABLE: cudaError_enum = cudaError_enum(214);
    /// This indicates that the [CUlimit](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gae24c2d4214af24139020f1aecaf32665) passed to the API call is not supported by the active device.
    pub const CUDA_ERROR_UNSUPPORTED_LIMIT: cudaError_enum = cudaError_enum(215);
    /// This indicates that the [`CUcontext`] passed to the API call can only be bound to a single CPU thread at a time but is already bound to a CPU thread.
    pub const CUDA_ERROR_CONTEXT_ALREADY_IN_USE: cudaError_enum = cudaError_enum(216);
    /// This indicates that peer access is not supported across the given devices.
    pub const CUDA_ERROR_PEER_ACCESS_UNSUPPORTED: cudaError_enum = cudaError_enum(217);
    /// This indicates that a PTX JIT compilation failed.
    pub const CUDA_ERROR_INVALID_PTX: cudaError_enum = cudaError_enum(218);
    /// This indicates an error with OpenGL or DirectX context.
    pub const CUDA_ERROR_INVALID_GRAPHICS_CONTEXT: cudaError_enum = cudaError_enum(219);
    /// This indicates that an uncorrectable NVLink error was detected during the execution.
    pub const CUDA_ERROR_NVLINK_UNCORRECTABLE: cudaError_enum = cudaError_enum(220);
    /// This indicates that the PTX JIT compiler library was not found.
    pub const CUDA_ERROR_JIT_COMPILER_NOT_FOUND: cudaError_enum = cudaError_enum(221);
    /// This indicates that the provided PTX was compiled with an unsupported toolchain.
    pub const CUDA_ERROR_UNSUPPORTED_PTX_VERSION: cudaError_enum = cudaError_enum(222);
    /// This indicates that the PTX JIT compilation was disabled.
    pub const CUDA_ERROR_JIT_COMPILATION_DISABLED: cudaError_enum = cudaError_enum(223);
    /// This indicates that the [CUexecAffinityType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga14e6345acf2bda65be91eda77cf03f5c) passed to the API call is not supported by the active device.
    pub const CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY: cudaError_enum = cudaError_enum(224);
    /// This indicates that the code to be compiled by the PTX JIT contains unsupported call to cudaDeviceSynchronize.
    pub const CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC: cudaError_enum = cudaError_enum(225);
    /// This indicates that an exception occurred on the device that is now contained by the GPU’s error containment capability.
    ///
    /// Common causes are - a. Certain types of invalid accesses of peer GPU memory over nvlink b. Certain classes of hardware errors This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
    pub const CUDA_ERROR_CONTAINED: cudaError_enum = cudaError_enum(226);
    /// This indicates that the Loader version is insufficient for fatbin.
    pub const CUDA_ERROR_INSUFFICIENT_LOADER_VERSION: cudaError_enum = cudaError_enum(
        227,
    );
    /// This indicates that the device kernel source is invalid.
    ///
    /// This includes compilation/linker errors encountered in device code or user error.
    pub const CUDA_ERROR_INVALID_SOURCE: cudaError_enum = cudaError_enum(300);
    /// This indicates that the file specified was not found.
    pub const CUDA_ERROR_FILE_NOT_FOUND: cudaError_enum = cudaError_enum(301);
    /// This indicates that a link to a shared object failed to resolve.
    pub const CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND: cudaError_enum = cudaError_enum(
        302,
    );
    /// This indicates that initialization of a shared object failed.
    pub const CUDA_ERROR_SHARED_OBJECT_INIT_FAILED: cudaError_enum = cudaError_enum(303);
    /// This indicates that an OS call failed.
    pub const CUDA_ERROR_OPERATING_SYSTEM: cudaError_enum = cudaError_enum(304);
    /// This indicates that a resource handle passed to the API call was not valid.
    ///
    /// Resource handles are opaque types like [`CUstream`] and [`CUevent`].
    pub const CUDA_ERROR_INVALID_HANDLE: cudaError_enum = cudaError_enum(400);
    /// This indicates that a resource required by the API call is not in a valid state to perform the requested operation.
    pub const CUDA_ERROR_ILLEGAL_STATE: cudaError_enum = cudaError_enum(401);
    /// This indicates an attempt was made to introspect an object in a way that would discard semantically important information.
    ///
    /// This is either due to the object using funtionality newer than the API version used to introspect it or omission of optional return arguments.
    pub const CUDA_ERROR_LOSSY_QUERY: cudaError_enum = cudaError_enum(402);
    /// This indicates that a named symbol was not found.
    ///
    /// Examples of symbols are global/constant variable names, driver function names, texture names, and surface names.
    pub const CUDA_ERROR_NOT_FOUND: cudaError_enum = cudaError_enum(500);
    /// This indicates that asynchronous operations issued previously have not completed yet.
    ///
    /// This result is not actually an error, but must be indicated differently than [`cudaError_enum::CUDA_SUCCESS`] (which indicates completion). Calls that may return this value include [`cuEventQuery`] and [`cuStreamQuery`].
    pub const CUDA_ERROR_NOT_READY: cudaError_enum = cudaError_enum(600);
    /// While executing a kernel, the device encountered a load or store instruction on an invalid memory address.
    ///
    /// This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
    pub const CUDA_ERROR_ILLEGAL_ADDRESS: cudaError_enum = cudaError_enum(700);
    /// This indicates that a launch did not occur because it did not have appropriate resources.
    ///
    /// This error usually indicates that the user has attempted to pass too many arguments to the device kernel, or the kernel launch specifies too many threads for the kernel’s register count. Passing arguments of the wrong size (i.e. a 64-bit pointer when a 32-bit int is expected) is equivalent to passing too many arguments and can also result in this error.
    pub const CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES: cudaError_enum = cudaError_enum(701);
    /// This indicates that the device kernel took too long to execute.
    ///
    /// This can only occur if timeouts are enabled - see the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT`] for more information. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
    pub const CUDA_ERROR_LAUNCH_TIMEOUT: cudaError_enum = cudaError_enum(702);
    /// This error indicates a kernel launch that uses an incompatible texturing mode.
    pub const CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING: cudaError_enum = cudaError_enum(
        703,
    );
    /// This error indicates that a call to [`cuCtxEnablePeerAccess`] is trying to re-enable peer access to a context which has already had peer access to it enabled.
    pub const CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED: cudaError_enum = cudaError_enum(
        704,
    );
    /// This error indicates that [`cuCtxDisablePeerAccess`] is trying to disable peer access which has not been enabled yet via [`cuCtxEnablePeerAccess`].
    pub const CUDA_ERROR_PEER_ACCESS_NOT_ENABLED: cudaError_enum = cudaError_enum(705);
    /// This error indicates that the primary context for the specified device has already been initialized.
    pub const CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE: cudaError_enum = cudaError_enum(708);
    /// This error indicates that the context current to the calling thread has been destroyed using cuCtxDestroy, or is a primary context which has not yet been initialized.
    pub const CUDA_ERROR_CONTEXT_IS_DESTROYED: cudaError_enum = cudaError_enum(709);
    /// A device-side assert triggered during kernel execution.
    ///
    /// The context cannot be used anymore, and must be destroyed. All existing device memory allocations from this context are invalid and must be reconstructed if the program is to continue using CUDA.
    pub const CUDA_ERROR_ASSERT: cudaError_enum = cudaError_enum(710);
    /// This error indicates that the hardware resources required to enable peer access have been exhausted for one or more of the devices passed to [`cuCtxEnablePeerAccess`].
    pub const CUDA_ERROR_TOO_MANY_PEERS: cudaError_enum = cudaError_enum(711);
    /// This error indicates that the memory range passed to cuMemHostRegister() has already been registered.
    pub const CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED: cudaError_enum = cudaError_enum(
        712,
    );
    /// This error indicates that the pointer passed to [`cuMemHostUnregister`] does not correspond to any currently registered memory region.
    pub const CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED: cudaError_enum = cudaError_enum(
        713,
    );
    /// While executing a kernel, the device encountered a stack error.
    ///
    /// This can be due to stack corruption or exceeding the stack size limit. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
    pub const CUDA_ERROR_HARDWARE_STACK_ERROR: cudaError_enum = cudaError_enum(714);
    /// While executing a kernel, the device encountered an illegal instruction.
    ///
    /// This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
    pub const CUDA_ERROR_ILLEGAL_INSTRUCTION: cudaError_enum = cudaError_enum(715);
    /// While executing a kernel, the device encountered a load or store instruction on a memory address which is not aligned.
    ///
    /// This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
    pub const CUDA_ERROR_MISALIGNED_ADDRESS: cudaError_enum = cudaError_enum(716);
    /// While executing a kernel, the device encountered an instruction which can only operate on memory locations in certain address spaces (global, shared, or local), but was supplied a memory address not belonging to an allowed address space.
    ///
    /// This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
    pub const CUDA_ERROR_INVALID_ADDRESS_SPACE: cudaError_enum = cudaError_enum(717);
    /// While executing a kernel, the device program counter wrapped its address space.
    ///
    /// This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
    pub const CUDA_ERROR_INVALID_PC: cudaError_enum = cudaError_enum(718);
    /// An exception occurred on the device while executing a kernel.
    ///
    /// Common causes include dereferencing an invalid device pointer and accessing out of bounds shared memory. Less common cases can be system specific - more information about these cases can be found in the system specific user guide. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
    pub const CUDA_ERROR_LAUNCH_FAILED: cudaError_enum = cudaError_enum(719);
    /// This error indicates that the number of blocks launched per grid for a kernel that was launched via either [`cuLaunchCooperativeKernel`] or [`cuLaunchCooperativeKernelMultiDevice`] exceeds the maximum number of blocks as allowed by [`cuOccupancyMaxActiveBlocksPerMultiprocessor`] or [`cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`] times the number of multiprocessors as specified by the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`].
    pub const CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE: cudaError_enum = cudaError_enum(
        720,
    );
    /// An exception occurred on the device while exiting a kernel using tensor memory: the tensor memory was not completely deallocated.
    ///
    /// This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.
    pub const CUDA_ERROR_TENSOR_MEMORY_LEAK: cudaError_enum = cudaError_enum(721);
    /// This error indicates that the attempted operation is not permitted.
    pub const CUDA_ERROR_NOT_PERMITTED: cudaError_enum = cudaError_enum(800);
    /// This error indicates that the attempted operation is not supported on the current system or device.
    pub const CUDA_ERROR_NOT_SUPPORTED: cudaError_enum = cudaError_enum(801);
    /// This error indicates that the system is not yet ready to start any CUDA work.
    ///
    /// To continue using CUDA, verify the system configuration is in a valid state and all required driver daemons are actively running. More information about this error can be found in the system specific user guide.
    pub const CUDA_ERROR_SYSTEM_NOT_READY: cudaError_enum = cudaError_enum(802);
    /// This error indicates that there is a mismatch between the versions of the display driver and the CUDA driver.
    ///
    /// Refer to the compatibility documentation for supported versions.
    pub const CUDA_ERROR_SYSTEM_DRIVER_MISMATCH: cudaError_enum = cudaError_enum(803);
    /// This error indicates that the system was upgraded to run with forward compatibility but the visible hardware detected by CUDA does not support this configuration.
    ///
    /// Refer to the compatibility documentation for the supported hardware matrix or ensure that only supported hardware is visible during initialization via the CUDA_VISIBLE_DEVICES environment variable.
    pub const CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE: cudaError_enum = cudaError_enum(
        804,
    );
    /// This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server.
    pub const CUDA_ERROR_MPS_CONNECTION_FAILED: cudaError_enum = cudaError_enum(805);
    /// This error indicates that the remote procedural call between the MPS server and the MPS client failed.
    pub const CUDA_ERROR_MPS_RPC_FAILURE: cudaError_enum = cudaError_enum(806);
    /// This error indicates that the MPS server is not ready to accept new MPS client requests.
    ///
    /// This error can be returned when the MPS server is in the process of recovering from a fatal failure.
    pub const CUDA_ERROR_MPS_SERVER_NOT_READY: cudaError_enum = cudaError_enum(807);
    /// This error indicates that the hardware resources required to create MPS client have been exhausted.
    pub const CUDA_ERROR_MPS_MAX_CLIENTS_REACHED: cudaError_enum = cudaError_enum(808);
    /// This error indicates the hardware resources required to support device connections have been exhausted.
    pub const CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED: cudaError_enum = cudaError_enum(
        809,
    );
    /// This error indicates that the MPS client has been terminated by the server.
    ///
    /// To continue using CUDA, the process must be terminated and relaunched.
    pub const CUDA_ERROR_MPS_CLIENT_TERMINATED: cudaError_enum = cudaError_enum(810);
    /// This error indicates that the module is using CUDA Dynamic Parallelism, but the current configuration, like MPS, does not support it.
    pub const CUDA_ERROR_CDP_NOT_SUPPORTED: cudaError_enum = cudaError_enum(811);
    /// This error indicates that a module contains an unsupported interaction between different versions of CUDA Dynamic Parallelism.
    pub const CUDA_ERROR_CDP_VERSION_MISMATCH: cudaError_enum = cudaError_enum(812);
    /// This error indicates that the operation is not permitted when the stream is capturing.
    pub const CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED: cudaError_enum = cudaError_enum(
        900,
    );
    /// This error indicates that the current capture sequence on the stream has been invalidated due to a previous error.
    pub const CUDA_ERROR_STREAM_CAPTURE_INVALIDATED: cudaError_enum = cudaError_enum(
        901,
    );
    /// This error indicates that the operation would have resulted in a merge of two independent capture sequences.
    pub const CUDA_ERROR_STREAM_CAPTURE_MERGE: cudaError_enum = cudaError_enum(902);
    /// This error indicates that the capture was not initiated in this stream.
    pub const CUDA_ERROR_STREAM_CAPTURE_UNMATCHED: cudaError_enum = cudaError_enum(903);
    /// This error indicates that the capture sequence contains a fork that was not joined to the primary stream.
    pub const CUDA_ERROR_STREAM_CAPTURE_UNJOINED: cudaError_enum = cudaError_enum(904);
    /// This error indicates that a dependency would have been created which crosses the capture sequence boundary.
    ///
    /// Only implicit in-stream ordering dependencies are allowed to cross the boundary.
    pub const CUDA_ERROR_STREAM_CAPTURE_ISOLATION: cudaError_enum = cudaError_enum(905);
    /// This error indicates a disallowed implicit dependency on a current capture sequence from cudaStreamLegacy.
    pub const CUDA_ERROR_STREAM_CAPTURE_IMPLICIT: cudaError_enum = cudaError_enum(906);
    /// This error indicates that the operation is not permitted on an event which was last recorded in a capturing stream.
    pub const CUDA_ERROR_CAPTURED_EVENT: cudaError_enum = cudaError_enum(907);
    /// A stream capture sequence not initiated with the [`CUstreamCaptureMode::CU_STREAM_CAPTURE_MODE_RELAXED`] argument to cuStreamBeginCapture was passed to [`cuStreamEndCapture`] in a different thread.
    pub const CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD: cudaError_enum = cudaError_enum(
        908,
    );
    /// This error indicates that the timeout specified for the wait operation has lapsed.
    pub const CUDA_ERROR_TIMEOUT: cudaError_enum = cudaError_enum(909);
    /// This error indicates that the graph update was not performed because it included changes which violated constraints specific to instantiated graph update.
    pub const CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE: cudaError_enum = cudaError_enum(910);
    /// This indicates that an error has occurred in a device outside of GPU.
    ///
    /// It can be a synchronous error with respect to CUDA API or an asynchronous error from the external device. In case of asynchronous error, it means that if CUDA was waiting for an external device’s signal before consuming shared data, the external device signaled an error indicating that the data is not valid for consumption. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. In case of synchronous error, it means that one or more external devices have encountered an error and cannot complete the operation.
    pub const CUDA_ERROR_EXTERNAL_DEVICE: cudaError_enum = cudaError_enum(911);
    /// Indicates a kernel launch error due to cluster misconfiguration.
    pub const CUDA_ERROR_INVALID_CLUSTER_SIZE: cudaError_enum = cudaError_enum(912);
    /// Indiciates a function handle is not loaded when calling an API that requires a loaded function.
    pub const CUDA_ERROR_FUNCTION_NOT_LOADED: cudaError_enum = cudaError_enum(913);
    /// This error indicates one or more resources passed in are not valid resource types for the operation.
    pub const CUDA_ERROR_INVALID_RESOURCE_TYPE: cudaError_enum = cudaError_enum(914);
    /// This error indicates one or more resources are insufficient or non-applicable for the operation.
    pub const CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION: cudaError_enum = cudaError_enum(
        915,
    );
    /// This error indicates that an error happened during the key rotation sequence.
    pub const CUDA_ERROR_KEY_ROTATION: cudaError_enum = cudaError_enum(916);
    /// This error indicates that the requested operation is not permitted because the stream is in a detached state.
    ///
    /// This can occur if the green context associated with the stream has been destroyed, limiting the stream’s operational capabilities.
    pub const CUDA_ERROR_STREAM_DETACHED: cudaError_enum = cudaError_enum(917);
    /// This error indicates that a graph recapture failed and had to be terminated.
    pub const CUDA_ERROR_GRAPH_RECAPTURE_FAILURE: cudaError_enum = cudaError_enum(918);
    /// The GPU fabric is not ready within the bounded wait while the fabric manager probe is still in progress (or not converging in time).
    ///
    /// Applications may retry after a delay; for the initialization wait budget, see environment variables such as CUDA_FABRIC_INIT_TIMEOUT_MS. The CUDA Runtime uses the same value as ::cudaErrorFabricNotReady.
    pub const CUDA_ERROR_FABRIC_NOT_READY: cudaError_enum = cudaError_enum(919);
    /// This indicates that an unknown internal error has occurred.
    pub const CUDA_ERROR_UNKNOWN: cudaError_enum = cudaError_enum(999);
}
/// Error codes
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct cudaError_enum(pub ::core::ffi::c_uint);
pub use self::cudaError_enum as CUresult;
impl CUdevice_P2PAttribute_enum {
    /// A relative value indicating the performance of the link between two devices.
    pub const CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK: CUdevice_P2PAttribute_enum = CUdevice_P2PAttribute_enum(
        1,
    );
    /// P2P Access is enable.
    pub const CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED: CUdevice_P2PAttribute_enum = CUdevice_P2PAttribute_enum(
        2,
    );
    /// All CUDA-valid atomic operation over the link are supported.
    pub const CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED: CUdevice_P2PAttribute_enum = CUdevice_P2PAttribute_enum(
        3,
    );
    /// Deprecated: use CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED instead
    pub const CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED: CUdevice_P2PAttribute_enum = CUdevice_P2PAttribute_enum(
        4,
    );
    /// Accessing CUDA arrays over the link supported.
    pub const CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED: CUdevice_P2PAttribute_enum = CUdevice_P2PAttribute_enum(
        4,
    );
    /// Only some CUDA-valid atomic operations over the link are supported.
    pub const CU_DEVICE_P2P_ATTRIBUTE_ONLY_PARTIAL_NATIVE_ATOMIC_SUPPORTED: CUdevice_P2PAttribute_enum = CUdevice_P2PAttribute_enum(
        5,
    );
}
/// P2P Attributes
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdevice_P2PAttribute_enum(pub ::core::ffi::c_uint);
pub use self::CUdevice_P2PAttribute_enum as CUdevice_P2PAttribute;
/// CUDA stream callback.
pub type CUstreamCallback = ::core::option::Option<
    unsafe extern "C" fn(
        hStream: CUstream,
        status: CUresult,
        userData: *mut ::core::ffi::c_void,
    ),
>;
/// Block size to per-block dynamic shared memory mapping for a certain kernel.
pub type CUoccupancyB2DSize = ::core::option::Option<
    unsafe extern "C" fn(blockSize: ::core::ffi::c_int) -> size_t,
>;
/// 2D memory copy parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_MEMCPY2D_st {
    /// Source X in bytes
    pub srcXInBytes: size_t,
    /// Source Y
    pub srcY: size_t,
    /// Source memory type (host, device, array)
    pub srcMemoryType: CUmemorytype,
    /// Source host pointer
    pub srcHost: *const ::core::ffi::c_void,
    /// Source device pointer
    pub srcDevice: CUdeviceptr,
    /// Source array reference
    pub srcArray: CUarray,
    /// Source pitch (ignored when src is array)
    pub srcPitch: size_t,
    /// Destination X in bytes
    pub dstXInBytes: size_t,
    /// Destination Y
    pub dstY: size_t,
    /// Destination memory type (host, device, array)
    pub dstMemoryType: CUmemorytype,
    /// Destination host pointer
    pub dstHost: *mut ::core::ffi::c_void,
    /// Destination device pointer
    pub dstDevice: CUdeviceptr,
    /// Destination array reference
    pub dstArray: CUarray,
    /// Destination pitch (ignored when dst is array)
    pub dstPitch: size_t,
    /// Width of 2D memory copy in bytes
    pub WidthInBytes: size_t,
    /// Height of 2D memory copy
    pub Height: size_t,
}
impl Default for CUDA_MEMCPY2D_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// 2D memory copy parameters.
pub type CUDA_MEMCPY2D_v2 = CUDA_MEMCPY2D_st;
/// 2D memory copy parameters
pub type CUDA_MEMCPY2D = CUDA_MEMCPY2D_v2;
/// 3D memory copy parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_MEMCPY3D_st {
    /// Source X in bytes
    pub srcXInBytes: size_t,
    /// Source Y
    pub srcY: size_t,
    /// Source Z
    pub srcZ: size_t,
    /// Source LOD
    pub srcLOD: size_t,
    /// Source memory type (host, device, array)
    pub srcMemoryType: CUmemorytype,
    /// Source host pointer
    pub srcHost: *const ::core::ffi::c_void,
    /// Source device pointer
    pub srcDevice: CUdeviceptr,
    /// Source array reference
    pub srcArray: CUarray,
    /// Must be NULL
    pub reserved0: *mut ::core::ffi::c_void,
    /// Source pitch (ignored when src is array)
    pub srcPitch: size_t,
    /// Source height (ignored when src is array; may be 0 if Depth==1)
    pub srcHeight: size_t,
    /// Destination X in bytes
    pub dstXInBytes: size_t,
    /// Destination Y
    pub dstY: size_t,
    /// Destination Z
    pub dstZ: size_t,
    /// Destination LOD
    pub dstLOD: size_t,
    /// Destination memory type (host, device, array)
    pub dstMemoryType: CUmemorytype,
    /// Destination host pointer
    pub dstHost: *mut ::core::ffi::c_void,
    /// Destination device pointer
    pub dstDevice: CUdeviceptr,
    /// Destination array reference
    pub dstArray: CUarray,
    /// Must be NULL
    pub reserved1: *mut ::core::ffi::c_void,
    /// Destination pitch (ignored when dst is array)
    pub dstPitch: size_t,
    /// Destination height (ignored when dst is array; may be 0 if Depth==1)
    pub dstHeight: size_t,
    /// Width of 3D memory copy in bytes
    pub WidthInBytes: size_t,
    /// Height of 3D memory copy
    pub Height: size_t,
    /// Depth of 3D memory copy
    pub Depth: size_t,
}
impl Default for CUDA_MEMCPY3D_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// 3D memory copy parameters.
pub type CUDA_MEMCPY3D_v2 = CUDA_MEMCPY3D_st;
/// 3D memory copy parameters
pub type CUDA_MEMCPY3D = CUDA_MEMCPY3D_v2;
/// 3D memory cross-context copy parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_MEMCPY3D_PEER_st {
    /// Source X in bytes
    pub srcXInBytes: size_t,
    /// Source Y
    pub srcY: size_t,
    /// Source Z
    pub srcZ: size_t,
    /// Source LOD
    pub srcLOD: size_t,
    /// Source memory type (host, device, array)
    pub srcMemoryType: CUmemorytype,
    /// Source host pointer
    pub srcHost: *const ::core::ffi::c_void,
    /// Source device pointer
    pub srcDevice: CUdeviceptr,
    /// Source array reference
    pub srcArray: CUarray,
    /// Source context (ignored with srcMemoryType is ::CU_MEMORYTYPE_ARRAY)
    pub srcContext: CUcontext,
    /// Source pitch (ignored when src is array)
    pub srcPitch: size_t,
    /// Source height (ignored when src is array; may be 0 if Depth==1)
    pub srcHeight: size_t,
    /// Destination X in bytes
    pub dstXInBytes: size_t,
    /// Destination Y
    pub dstY: size_t,
    /// Destination Z
    pub dstZ: size_t,
    /// Destination LOD
    pub dstLOD: size_t,
    /// Destination memory type (host, device, array)
    pub dstMemoryType: CUmemorytype,
    /// Destination host pointer
    pub dstHost: *mut ::core::ffi::c_void,
    /// Destination device pointer
    pub dstDevice: CUdeviceptr,
    /// Destination array reference
    pub dstArray: CUarray,
    /// Destination context (ignored with dstMemoryType is ::CU_MEMORYTYPE_ARRAY)
    pub dstContext: CUcontext,
    /// Destination pitch (ignored when dst is array)
    pub dstPitch: size_t,
    /// Destination height (ignored when dst is array; may be 0 if Depth==1)
    pub dstHeight: size_t,
    /// Width of 3D memory copy in bytes
    pub WidthInBytes: size_t,
    /// Height of 3D memory copy
    pub Height: size_t,
    /// Depth of 3D memory copy
    pub Depth: size_t,
}
impl Default for CUDA_MEMCPY3D_PEER_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// 3D memory cross-context copy parameters.
pub type CUDA_MEMCPY3D_PEER_v1 = CUDA_MEMCPY3D_PEER_st;
/// 3D memory cross-context copy parameters
pub type CUDA_MEMCPY3D_PEER = CUDA_MEMCPY3D_PEER_v1;
/// Memcpy node parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_MEMCPY_NODE_PARAMS_st {
    /// Must be zero
    pub flags: ::core::ffi::c_int,
    /// Must be zero
    pub reserved: ::core::ffi::c_int,
    /// Context on which to run the node
    pub copyCtx: CUcontext,
    /// Parameters for the memory copy
    pub copyParams: CUDA_MEMCPY3D,
}
impl Default for CUDA_MEMCPY_NODE_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Memcpy node parameters.
pub type CUDA_MEMCPY_NODE_PARAMS = CUDA_MEMCPY_NODE_PARAMS_st;
/// Array descriptor
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_ARRAY_DESCRIPTOR_st {
    /// Width of array
    pub Width: size_t,
    /// Height of array
    pub Height: size_t,
    /// Array format
    pub Format: CUarray_format,
    /// Channels per array element
    pub NumChannels: ::core::ffi::c_uint,
}
impl Default for CUDA_ARRAY_DESCRIPTOR_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Array descriptor.
pub type CUDA_ARRAY_DESCRIPTOR_v2 = CUDA_ARRAY_DESCRIPTOR_st;
/// Array descriptor
pub type CUDA_ARRAY_DESCRIPTOR = CUDA_ARRAY_DESCRIPTOR_v2;
/// 3D array descriptor
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_ARRAY3D_DESCRIPTOR_st {
    /// Width of 3D array
    pub Width: size_t,
    /// Height of 3D array
    pub Height: size_t,
    /// Depth of 3D array
    pub Depth: size_t,
    /// Array format
    pub Format: CUarray_format,
    /// Channels per array element
    pub NumChannels: ::core::ffi::c_uint,
    /// Flags
    pub Flags: ::core::ffi::c_uint,
}
impl Default for CUDA_ARRAY3D_DESCRIPTOR_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// 3D array descriptor.
pub type CUDA_ARRAY3D_DESCRIPTOR_v2 = CUDA_ARRAY3D_DESCRIPTOR_st;
/// 3D array descriptor
pub type CUDA_ARRAY3D_DESCRIPTOR = CUDA_ARRAY3D_DESCRIPTOR_v2;
/// CUDA array sparse properties
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_ARRAY_SPARSE_PROPERTIES_st {
    /// Width, height, and depth of a sparse array tile in elements.
    pub tileExtent: CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1,
    /// First mip level at which the mip tail begins.
    pub miptailFirstLevel: ::core::ffi::c_uint,
    /// Total size of the mip tail.
    pub miptailSize: ::core::ffi::c_ulonglong,
    /// Flags will either be zero or ::CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL
    pub flags: ::core::ffi::c_uint,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 4usize],
}
/// Native layout of the `tileExtent` member of [`CUDA_ARRAY_SPARSE_PROPERTIES_st`].
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1 {
    /// Width of sparse tile in elements
    pub width: ::core::ffi::c_uint,
    /// Height of sparse tile in elements
    pub height: ::core::ffi::c_uint,
    /// Depth of sparse tile in elements
    pub depth: ::core::ffi::c_uint,
}
/// CUDA array sparse properties.
pub type CUDA_ARRAY_SPARSE_PROPERTIES_v1 = CUDA_ARRAY_SPARSE_PROPERTIES_st;
/// CUDA array sparse properties
pub type CUDA_ARRAY_SPARSE_PROPERTIES = CUDA_ARRAY_SPARSE_PROPERTIES_v1;
/// CUDA array memory requirements
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st {
    /// Total required memory size
    pub size: size_t,
    /// alignment requirement
    pub alignment: size_t,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 4usize],
}
/// CUDA array memory requirements.
pub type CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 = CUDA_ARRAY_MEMORY_REQUIREMENTS_st;
/// CUDA array memory requirements
pub type CUDA_ARRAY_MEMORY_REQUIREMENTS = CUDA_ARRAY_MEMORY_REQUIREMENTS_v1;
/// CUDA Resource descriptor
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_RESOURCE_DESC_st {
    /// Resource type
    pub resType: CUresourcetype,
    /// Resource storage description selected by `resType`.
    pub res: CUDA_RESOURCE_DESC_st__bindgen_ty_1,
    /// Flags (must be zero)
    pub flags: ::core::ffi::c_uint,
}
/// Native layout of the `res` member of [`CUDA_RESOURCE_DESC_st`].
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUDA_RESOURCE_DESC_st__bindgen_ty_1 {
    /// CUDA array handle used for an array resource.
    pub array: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1,
    /// CUDA mipmapped-array handle used for a mipmapped resource.
    pub mipmap: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2,
    /// Device pointer, element format, and capacity of a linear resource.
    pub linear: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3,
    /// Device pointer, element format, dimensions, and row pitch of a two-dimensional resource.
    pub pitch2D: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
    /// Reserved storage in the native ABI.
    pub reserved: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5,
}
/// Native layout of the `array` member of [`CUDA_RESOURCE_DESC_st__bindgen_ty_1`].
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
    /// CUDA array
    pub hArray: CUarray,
}
impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Native layout of the `mipmap` member of [`CUDA_RESOURCE_DESC_st__bindgen_ty_1`].
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 {
    /// CUDA mipmapped array
    pub hMipmappedArray: CUmipmappedArray,
}
impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Native layout of the `linear` member of [`CUDA_RESOURCE_DESC_st__bindgen_ty_1`].
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 {
    /// Device pointer
    pub devPtr: CUdeviceptr,
    /// Array format
    pub format: CUarray_format,
    /// Channels per array element
    pub numChannels: ::core::ffi::c_uint,
    /// Size in bytes
    pub sizeInBytes: size_t,
}
impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Native layout of the `pitch2D` member of [`CUDA_RESOURCE_DESC_st__bindgen_ty_1`].
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 {
    /// Device pointer
    pub devPtr: CUdeviceptr,
    /// Array format
    pub format: CUarray_format,
    /// Channels per array element
    pub numChannels: ::core::ffi::c_uint,
    /// Width of the array in elements
    pub width: size_t,
    /// Height of the array in elements
    pub height: size_t,
    /// Pitch between two rows in bytes
    pub pitchInBytes: size_t,
}
impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Native layout of the `reserved` member of [`CUDA_RESOURCE_DESC_st__bindgen_ty_1`].
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5 {
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_int; 32usize],
}
impl Default for CUDA_RESOURCE_DESC_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUDA_RESOURCE_DESC_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// CUDA Resource descriptor.
pub type CUDA_RESOURCE_DESC_v1 = CUDA_RESOURCE_DESC_st;
/// CUDA Resource descriptor
pub type CUDA_RESOURCE_DESC = CUDA_RESOURCE_DESC_v1;
/// Texture descriptor
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
pub struct CUDA_TEXTURE_DESC_st {
    /// Address modes
    pub addressMode: [CUaddress_mode; 3usize],
    /// Filter mode
    pub filterMode: CUfilter_mode,
    /// Flags
    pub flags: ::core::ffi::c_uint,
    /// Maximum anisotropy ratio
    pub maxAnisotropy: ::core::ffi::c_uint,
    /// Mipmap filter mode
    pub mipmapFilterMode: CUfilter_mode,
    /// Mipmap level bias
    pub mipmapLevelBias: f32,
    /// Mipmap minimum level clamp
    pub minMipmapLevelClamp: f32,
    /// Mipmap maximum level clamp
    pub maxMipmapLevelClamp: f32,
    /// Border Color
    pub borderColor: [f32; 4usize],
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_int; 12usize],
}
impl Default for CUDA_TEXTURE_DESC_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Texture descriptor.
pub type CUDA_TEXTURE_DESC_v1 = CUDA_TEXTURE_DESC_st;
/// Texture descriptor
pub type CUDA_TEXTURE_DESC = CUDA_TEXTURE_DESC_v1;
impl CUresourceViewFormat_enum {
    /// No resource view format (use underlying resource format).
    pub const CU_RES_VIEW_FORMAT_NONE: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        0,
    );
    /// 1 channel unsigned 8-bit integers.
    pub const CU_RES_VIEW_FORMAT_UINT_1X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        1,
    );
    /// 2 channel unsigned 8-bit integers.
    pub const CU_RES_VIEW_FORMAT_UINT_2X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        2,
    );
    /// 4 channel unsigned 8-bit integers.
    pub const CU_RES_VIEW_FORMAT_UINT_4X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        3,
    );
    /// 1 channel signed 8-bit integers.
    pub const CU_RES_VIEW_FORMAT_SINT_1X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        4,
    );
    /// 2 channel signed 8-bit integers.
    pub const CU_RES_VIEW_FORMAT_SINT_2X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        5,
    );
    /// 4 channel signed 8-bit integers.
    pub const CU_RES_VIEW_FORMAT_SINT_4X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        6,
    );
    /// 1 channel unsigned 16-bit integers.
    pub const CU_RES_VIEW_FORMAT_UINT_1X16: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        7,
    );
    /// 2 channel unsigned 16-bit integers.
    pub const CU_RES_VIEW_FORMAT_UINT_2X16: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        8,
    );
    /// 4 channel unsigned 16-bit integers.
    pub const CU_RES_VIEW_FORMAT_UINT_4X16: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        9,
    );
    /// 1 channel signed 16-bit integers.
    pub const CU_RES_VIEW_FORMAT_SINT_1X16: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        10,
    );
    /// 2 channel signed 16-bit integers.
    pub const CU_RES_VIEW_FORMAT_SINT_2X16: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        11,
    );
    /// 4 channel signed 16-bit integers.
    pub const CU_RES_VIEW_FORMAT_SINT_4X16: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        12,
    );
    /// 1 channel unsigned 32-bit integers.
    pub const CU_RES_VIEW_FORMAT_UINT_1X32: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        13,
    );
    /// 2 channel unsigned 32-bit integers.
    pub const CU_RES_VIEW_FORMAT_UINT_2X32: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        14,
    );
    /// 4 channel unsigned 32-bit integers.
    pub const CU_RES_VIEW_FORMAT_UINT_4X32: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        15,
    );
    /// 1 channel signed 32-bit integers.
    pub const CU_RES_VIEW_FORMAT_SINT_1X32: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        16,
    );
    /// 2 channel signed 32-bit integers.
    pub const CU_RES_VIEW_FORMAT_SINT_2X32: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        17,
    );
    /// 4 channel signed 32-bit integers.
    pub const CU_RES_VIEW_FORMAT_SINT_4X32: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        18,
    );
    /// 1 channel 16-bit floating point.
    pub const CU_RES_VIEW_FORMAT_FLOAT_1X16: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        19,
    );
    /// 2 channel 16-bit floating point.
    pub const CU_RES_VIEW_FORMAT_FLOAT_2X16: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        20,
    );
    /// 4 channel 16-bit floating point.
    pub const CU_RES_VIEW_FORMAT_FLOAT_4X16: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        21,
    );
    /// 1 channel 32-bit floating point.
    pub const CU_RES_VIEW_FORMAT_FLOAT_1X32: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        22,
    );
    /// 2 channel 32-bit floating point.
    pub const CU_RES_VIEW_FORMAT_FLOAT_2X32: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        23,
    );
    /// 4 channel 32-bit floating point.
    pub const CU_RES_VIEW_FORMAT_FLOAT_4X32: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        24,
    );
    /// Block compressed 1.
    pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC1: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        25,
    );
    /// Block compressed 2.
    pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC2: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        26,
    );
    /// Block compressed 3.
    pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC3: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        27,
    );
    /// Block compressed 4 unsigned.
    pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC4: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        28,
    );
    /// Block compressed 4 signed.
    pub const CU_RES_VIEW_FORMAT_SIGNED_BC4: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        29,
    );
    /// Block compressed 5 unsigned.
    pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC5: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        30,
    );
    /// Block compressed 5 signed.
    pub const CU_RES_VIEW_FORMAT_SIGNED_BC5: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        31,
    );
    /// Block compressed 6 unsigned half-float.
    pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC6H: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        32,
    );
    /// Block compressed 6 signed half-float.
    pub const CU_RES_VIEW_FORMAT_SIGNED_BC6H: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        33,
    );
    /// Block compressed 7.
    pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC7: CUresourceViewFormat_enum = CUresourceViewFormat_enum(
        34,
    );
}
/// Resource view format
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUresourceViewFormat_enum(pub ::core::ffi::c_uint);
pub use self::CUresourceViewFormat_enum as CUresourceViewFormat;
/// Resource view descriptor
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_RESOURCE_VIEW_DESC_st {
    /// Resource view format
    pub format: CUresourceViewFormat,
    /// Width of the resource view
    pub width: size_t,
    /// Height of the resource view
    pub height: size_t,
    /// Depth of the resource view
    pub depth: size_t,
    /// First defined mipmap level
    pub firstMipmapLevel: ::core::ffi::c_uint,
    /// Last defined mipmap level
    pub lastMipmapLevel: ::core::ffi::c_uint,
    /// First layer index
    pub firstLayer: ::core::ffi::c_uint,
    /// Last layer index
    pub lastLayer: ::core::ffi::c_uint,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 16usize],
}
impl Default for CUDA_RESOURCE_VIEW_DESC_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Resource view descriptor.
pub type CUDA_RESOURCE_VIEW_DESC_v1 = CUDA_RESOURCE_VIEW_DESC_st;
/// Resource view descriptor
pub type CUDA_RESOURCE_VIEW_DESC = CUDA_RESOURCE_VIEW_DESC_v1;
/// Tensor map descriptor. Requires compiler support for aligning to 128 bytes.
#[repr(C)]
#[repr(align(128))]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUtensorMap_st {
    /// Opaque descriptor storage populated by the CUDA tensor-map encoding APIs.
    pub opaque: [cuuint64_t; 16usize],
}
impl Default for CUtensorMap_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Tensor map descriptor.
///
/// Requires compiler support for aligning to 128 bytes.
pub type CUtensorMap = CUtensorMap_st;
impl CUtensorMapDataType_enum {
    /// Unsigned 8-bit integer elements.
    pub const CU_TENSOR_MAP_DATA_TYPE_UINT8: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        0,
    );
    /// Unsigned 16-bit integer elements.
    pub const CU_TENSOR_MAP_DATA_TYPE_UINT16: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        1,
    );
    /// Unsigned 32-bit integer elements.
    pub const CU_TENSOR_MAP_DATA_TYPE_UINT32: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        2,
    );
    /// Signed 32-bit integer elements.
    pub const CU_TENSOR_MAP_DATA_TYPE_INT32: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        3,
    );
    /// Unsigned 64-bit integer elements.
    pub const CU_TENSOR_MAP_DATA_TYPE_UINT64: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        4,
    );
    /// Signed 64-bit integer elements.
    pub const CU_TENSOR_MAP_DATA_TYPE_INT64: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        5,
    );
    /// 16-bit floating-point elements.
    pub const CU_TENSOR_MAP_DATA_TYPE_FLOAT16: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        6,
    );
    /// 32-bit floating-point elements.
    pub const CU_TENSOR_MAP_DATA_TYPE_FLOAT32: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        7,
    );
    /// 64-bit floating-point elements.
    pub const CU_TENSOR_MAP_DATA_TYPE_FLOAT64: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        8,
    );
    /// 16-bit brain floating-point elements.
    pub const CU_TENSOR_MAP_DATA_TYPE_BFLOAT16: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        9,
    );
    /// 32-bit floating-point elements with subnormal values flushed to zero.
    pub const CU_TENSOR_MAP_DATA_TYPE_FLOAT32_FTZ: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        10,
    );
    /// TensorFloat-32 elements.
    pub const CU_TENSOR_MAP_DATA_TYPE_TFLOAT32: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        11,
    );
    /// TensorFloat-32 elements with subnormal values flushed to zero.
    pub const CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        12,
    );
    /// Groups of sixteen unsigned 4-bit values packed into eight bytes, with no gaps between groups.
    pub const CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        13,
    );
    /// Groups of sixteen unsigned 4-bit values in 16-byte-aligned storage, with eight padding bytes after each eight-byte packed group.
    pub const CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        14,
    );
    /// Groups of sixteen unsigned 6-bit values in 16-byte-aligned storage, with four padding bytes after each twelve-byte packed group.
    pub const CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B: CUtensorMapDataType_enum = CUtensorMapDataType_enum(
        15,
    );
}
/// Tensor map data type
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUtensorMapDataType_enum(pub ::core::ffi::c_uint);
pub use self::CUtensorMapDataType_enum as CUtensorMapDataType;
impl CUtensorMapInterleave_enum {
    /// No channel interleaving.
    pub const CU_TENSOR_MAP_INTERLEAVE_NONE: CUtensorMapInterleave_enum = CUtensorMapInterleave_enum(
        0,
    );
    /// Interleaves channels in 16-byte groups, such as eight 16-bit channels per group.
    pub const CU_TENSOR_MAP_INTERLEAVE_16B: CUtensorMapInterleave_enum = CUtensorMapInterleave_enum(
        1,
    );
    /// Interleaves channels in 32-byte groups, such as sixteen 16-bit channels per group.
    pub const CU_TENSOR_MAP_INTERLEAVE_32B: CUtensorMapInterleave_enum = CUtensorMapInterleave_enum(
        2,
    );
}
/// Tensor map interleave layout type
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUtensorMapInterleave_enum(pub ::core::ffi::c_uint);
pub use self::CUtensorMapInterleave_enum as CUtensorMapInterleave;
impl CUtensorMapSwizzle_enum {
    /// No shared-memory swizzling.
    pub const CU_TENSOR_MAP_SWIZZLE_NONE: CUtensorMapSwizzle_enum = CUtensorMapSwizzle_enum(
        0,
    );
    /// Swizzles 16-byte chunks within a 32-byte span.
    pub const CU_TENSOR_MAP_SWIZZLE_32B: CUtensorMapSwizzle_enum = CUtensorMapSwizzle_enum(
        1,
    );
    /// Swizzles 16-byte chunks within a 64-byte span.
    pub const CU_TENSOR_MAP_SWIZZLE_64B: CUtensorMapSwizzle_enum = CUtensorMapSwizzle_enum(
        2,
    );
    /// Swizzles 16-byte chunks within a 128-byte span.
    pub const CU_TENSOR_MAP_SWIZZLE_128B: CUtensorMapSwizzle_enum = CUtensorMapSwizzle_enum(
        3,
    );
    /// Swizzles 32-byte chunks within a 128-byte span.
    pub const CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B: CUtensorMapSwizzle_enum = CUtensorMapSwizzle_enum(
        4,
    );
    /// Swizzles 32-byte chunks within a 128-byte span and exchanges the lower and upper eight bytes of each 16-byte unit on alternate rows.
    pub const CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B_FLIP_8B: CUtensorMapSwizzle_enum = CUtensorMapSwizzle_enum(
        5,
    );
    /// Swizzles 64-byte chunks within a 128-byte span.
    pub const CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B: CUtensorMapSwizzle_enum = CUtensorMapSwizzle_enum(
        6,
    );
}
/// Tensor map swizzling mode of shared memory banks
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUtensorMapSwizzle_enum(pub ::core::ffi::c_uint);
pub use self::CUtensorMapSwizzle_enum as CUtensorMapSwizzle;
impl CUtensorMapL2promotion_enum {
    /// No L2 fetch-size promotion.
    pub const CU_TENSOR_MAP_L2_PROMOTION_NONE: CUtensorMapL2promotion_enum = CUtensorMapL2promotion_enum(
        0,
    );
    /// Fills L2 requests from DRAM at 64-byte granularity.
    pub const CU_TENSOR_MAP_L2_PROMOTION_L2_64B: CUtensorMapL2promotion_enum = CUtensorMapL2promotion_enum(
        1,
    );
    /// Fills L2 requests from DRAM at 128-byte granularity.
    pub const CU_TENSOR_MAP_L2_PROMOTION_L2_128B: CUtensorMapL2promotion_enum = CUtensorMapL2promotion_enum(
        2,
    );
    /// Fills L2 requests from DRAM at 256-byte granularity.
    pub const CU_TENSOR_MAP_L2_PROMOTION_L2_256B: CUtensorMapL2promotion_enum = CUtensorMapL2promotion_enum(
        3,
    );
}
/// Tensor map L2 promotion type
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUtensorMapL2promotion_enum(pub ::core::ffi::c_uint);
pub use self::CUtensorMapL2promotion_enum as CUtensorMapL2promotion;
impl CUtensorMapFloatOOBfill_enum {
    /// Fills out-of-bounds elements with zero.
    pub const CU_TENSOR_MAP_FLOAT_OOB_FILL_NONE: CUtensorMapFloatOOBfill_enum = CUtensorMapFloatOOBfill_enum(
        0,
    );
    /// Fills out-of-bounds elements with the special NaN value that requests zero contribution to FMA. Only floating-point tensor data types support this mode.
    pub const CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA: CUtensorMapFloatOOBfill_enum = CUtensorMapFloatOOBfill_enum(
        1,
    );
}
/// Tensor map out-of-bounds fill type
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUtensorMapFloatOOBfill_enum(pub ::core::ffi::c_uint);
pub use self::CUtensorMapFloatOOBfill_enum as CUtensorMapFloatOOBfill;
impl CUtensorMapIm2ColWideMode_enum {
    /// Loads along the W dimension using the element count in `pixelsPerColumn`.
    pub const CU_TENSOR_MAP_IM2COL_WIDE_MODE_W: CUtensorMapIm2ColWideMode_enum = CUtensorMapIm2ColWideMode_enum(
        0,
    );
    /// Uses native W128 loading along the W dimension; `pixelsPerColumn` is ignored.
    pub const CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128: CUtensorMapIm2ColWideMode_enum = CUtensorMapIm2ColWideMode_enum(
        1,
    );
}
/// Tensor map Im2Col wide mode
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUtensorMapIm2ColWideMode_enum(pub ::core::ffi::c_uint);
pub use self::CUtensorMapIm2ColWideMode_enum as CUtensorMapIm2ColWideMode;
/// GPU Direct v3 tokens
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st {
    /// GPUDirect peer-to-peer token identifying the allocation.
    pub p2pToken: ::core::ffi::c_ulonglong,
    /// Token identifying the CUDA virtual address space for GPUDirect peer access.
    pub vaSpaceToken: ::core::ffi::c_uint,
}
/// GPU Direct v3 tokens.
pub type CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 = CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st;
/// GPU Direct v3 tokens
pub type CUDA_POINTER_ATTRIBUTE_P2P_TOKENS = CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1;
impl CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum {
    /// No access, meaning the device cannot access this memory at all, thus must be staged through accessible memory in order to complete certain operations.
    pub const CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE: CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum = CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(
        0,
    );
    /// Read-only access, meaning writes to this memory are considered invalid accesses and thus return error in that case.
    pub const CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ: CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum = CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(
        1,
    );
    /// Read-write access, the device has full read-write access to the memory.
    pub const CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE: CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum = CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(
        3,
    );
}
/// Access flags that specify the level of access the current context's device has on the memory referenced.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(pub ::core::ffi::c_uint);
pub use self::CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum as CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS;
/// Kernel launch parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_LAUNCH_PARAMS_st {
    /// Kernel to launch
    pub function: CUfunction,
    /// Width of grid in blocks
    pub gridDimX: ::core::ffi::c_uint,
    /// Height of grid in blocks
    pub gridDimY: ::core::ffi::c_uint,
    /// Depth of grid in blocks
    pub gridDimZ: ::core::ffi::c_uint,
    /// X dimension of each thread block
    pub blockDimX: ::core::ffi::c_uint,
    /// Y dimension of each thread block
    pub blockDimY: ::core::ffi::c_uint,
    /// Z dimension of each thread block
    pub blockDimZ: ::core::ffi::c_uint,
    /// Dynamic shared-memory size per thread block in bytes
    pub sharedMemBytes: ::core::ffi::c_uint,
    /// Stream identifier
    pub hStream: CUstream,
    /// Array of pointers to kernel parameters
    pub kernelParams: *mut *mut ::core::ffi::c_void,
}
impl Default for CUDA_LAUNCH_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Kernel launch parameters.
pub type CUDA_LAUNCH_PARAMS_v1 = CUDA_LAUNCH_PARAMS_st;
/// Kernel launch parameters
pub type CUDA_LAUNCH_PARAMS = CUDA_LAUNCH_PARAMS_v1;
impl CUexternalMemoryHandleType_enum {
    /// Handle is an opaque file descriptor.
    pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD: CUexternalMemoryHandleType_enum = CUexternalMemoryHandleType_enum(
        1,
    );
    /// Handle is an opaque shared NT handle.
    pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32: CUexternalMemoryHandleType_enum = CUexternalMemoryHandleType_enum(
        2,
    );
    /// Handle is an opaque, globally shared handle.
    pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT: CUexternalMemoryHandleType_enum = CUexternalMemoryHandleType_enum(
        3,
    );
    /// Handle is a D3D12 heap object.
    pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP: CUexternalMemoryHandleType_enum = CUexternalMemoryHandleType_enum(
        4,
    );
    /// Handle is a D3D12 committed resource.
    pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE: CUexternalMemoryHandleType_enum = CUexternalMemoryHandleType_enum(
        5,
    );
    /// Handle is a shared NT handle to a D3D11 resource.
    pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE: CUexternalMemoryHandleType_enum = CUexternalMemoryHandleType_enum(
        6,
    );
    /// Handle is a globally shared handle to a D3D11 resource.
    pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT: CUexternalMemoryHandleType_enum = CUexternalMemoryHandleType_enum(
        7,
    );
    /// Handle is an NvSciBuf object.
    pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF: CUexternalMemoryHandleType_enum = CUexternalMemoryHandleType_enum(
        8,
    );
    /// Handle is a dma_buf file descriptor.
    pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_DMABUF_FD: CUexternalMemoryHandleType_enum = CUexternalMemoryHandleType_enum(
        9,
    );
}
/// External memory handle types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUexternalMemoryHandleType_enum(pub ::core::ffi::c_uint);
pub use self::CUexternalMemoryHandleType_enum as CUexternalMemoryHandleType;
/// External memory handle descriptor
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st {
    /// Type of the handle
    pub type_: CUexternalMemoryHandleType,
    /// Platform-specific external handle representation selected by `type`.
    pub handle: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1,
    /// Size of the memory allocation
    pub size: ::core::ffi::c_ulonglong,
    /// Flags must either be zero or ::CUDA_EXTERNAL_MEMORY_DEDICATED
    pub flags: ::core::ffi::c_uint,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 16usize],
}
/// Native layout of the `handle` member of [`CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st`].
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1 {
    /// File descriptor referencing the memory object. Valid when type is ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD
    pub fd: ::core::ffi::c_int,
    /// Win32 handle referencing the semaphore object. Valid when type is one of the following:
    /// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32
    /// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT
    /// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP
    /// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE
    /// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE
    /// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT Exactly one of 'handle' and 'name' must be non-NULL. If type is one of the following: ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT then 'name' must be NULL.
    pub win32: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1,
    /// A handle representing an NvSciBuf Object. Valid when type is ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF
    pub nvSciBufObject: *const ::core::ffi::c_void,
}
/// Win32 handle referencing the semaphore object. Valid when type is one of the following:
/// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32
/// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT
/// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP
/// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE
/// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE
/// - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT Exactly one of 'handle' and 'name' must be non-NULL. If type is one of the following: ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT then 'name' must be NULL.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
    /// Valid NT handle. Must be NULL if 'name' is non-NULL
    pub handle: *mut ::core::ffi::c_void,
    /// Name of a valid memory object. Must be NULL if 'handle' is non-NULL.
    pub name: *const ::core::ffi::c_void,
}
impl Default for CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// External memory handle descriptor.
pub type CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 = CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st;
/// External memory handle descriptor
pub type CUDA_EXTERNAL_MEMORY_HANDLE_DESC = CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1;
/// External memory buffer descriptor
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st {
    /// Offset into the memory object where the buffer's base is
    pub offset: ::core::ffi::c_ulonglong,
    /// Size of the buffer
    pub size: ::core::ffi::c_ulonglong,
    /// Flags reserved for future use. Must be zero.
    pub flags: ::core::ffi::c_uint,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 16usize],
}
/// External memory buffer descriptor.
pub type CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 = CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st;
/// External memory buffer descriptor
pub type CUDA_EXTERNAL_MEMORY_BUFFER_DESC = CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1;
/// External memory mipmap descriptor
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st {
    /// Offset into the memory object where the base level of the mipmap chain is.
    pub offset: ::core::ffi::c_ulonglong,
    /// Format, dimension and type of base level of the mipmap chain
    pub arrayDesc: CUDA_ARRAY3D_DESCRIPTOR,
    /// Total number of levels in the mipmap chain
    pub numLevels: ::core::ffi::c_uint,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 16usize],
}
impl Default for CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// External memory mipmap descriptor.
pub type CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 = CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st;
/// External memory mipmap descriptor
pub type CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC = CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1;
impl CUexternalSemaphoreHandleType_enum {
    /// Handle is an opaque file descriptor.
    pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD: CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(
        1,
    );
    /// Handle is an opaque shared NT handle.
    pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32: CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(
        2,
    );
    /// Handle is an opaque, globally shared handle.
    pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT: CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(
        3,
    );
    /// Handle is a shared NT handle referencing a D3D12 fence object.
    pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE: CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(
        4,
    );
    /// Handle is a shared NT handle referencing a D3D11 fence object.
    pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE: CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(
        5,
    );
    /// Opaque handle to NvSciSync Object.
    pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC: CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(
        6,
    );
    /// Handle is a shared NT handle referencing a D3D11 keyed mutex object.
    pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX: CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(
        7,
    );
    /// Handle is a globally shared handle referencing a D3D11 keyed mutex object.
    pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT: CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(
        8,
    );
    /// Handle is an opaque file descriptor referencing a timeline semaphore.
    pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD: CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(
        9,
    );
    /// Handle is an opaque shared NT handle referencing a timeline semaphore.
    pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32: CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(
        10,
    );
}
/// External semaphore handle types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUexternalSemaphoreHandleType_enum(pub ::core::ffi::c_uint);
pub use self::CUexternalSemaphoreHandleType_enum as CUexternalSemaphoreHandleType;
/// External semaphore handle descriptor
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st {
    /// Type of the handle
    pub type_: CUexternalSemaphoreHandleType,
    /// Platform-specific external handle representation selected by `type`.
    pub handle: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1,
    /// Flags reserved for the future. Must be zero.
    pub flags: ::core::ffi::c_uint,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 16usize],
}
/// Native layout of the `handle` member of [`CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st`].
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1 {
    /// File descriptor referencing the semaphore object. Valid when type is one of the following:
    /// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD
    /// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD
    pub fd: ::core::ffi::c_int,
    /// Win32 handle referencing the semaphore object. Valid when type is one of the following:
    /// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32
    /// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT
    /// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE
    /// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE
    /// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX
    /// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 Exactly one of 'handle' and 'name' must be non-NULL. If type is one of the following:
    /// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT
    /// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT then 'name' must be NULL.
    pub win32: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1,
    /// Valid NvSciSyncObj. Must be non NULL
    pub nvSciSyncObj: *const ::core::ffi::c_void,
}
/// Win32 handle referencing the semaphore object. Valid when type is one of the following:
/// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32
/// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT
/// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE
/// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE
/// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX
/// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 Exactly one of 'handle' and 'name' must be non-NULL. If type is one of the following:
/// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT
/// - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT then 'name' must be NULL.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
    /// Valid NT handle. Must be NULL if 'name' is non-NULL
    pub handle: *mut ::core::ffi::c_void,
    /// Name of a valid synchronization primitive. Must be NULL if 'handle' is non-NULL.
    pub name: *const ::core::ffi::c_void,
}
impl Default for CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// External semaphore handle descriptor.
pub type CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 = CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st;
/// External semaphore handle descriptor
pub type CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC = CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1;
/// External semaphore signal parameters
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st {
    /// Payload for the signal operation, interpreted using the external semaphore's handle type.
    pub params: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1,
    /// Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a ::CUexternalSemaphore of type ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which indicates that while signaling the ::CUexternalSemaphore, no memory synchronization operations should be performed for any external memory object imported as ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. For all other types of ::CUexternalSemaphore, flags must be zero.
    pub flags: ::core::ffi::c_uint,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 16usize],
}
/// Native layout of the `params` member of [`CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st`].
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1 {
    /// Parameters for fence objects
    pub fence: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1,
    /// NvSciSync fence representation used for an NvSciSync semaphore.
    pub nvSciSync: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2,
    /// Parameters for keyed mutex objects
    pub keyedMutex: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 12usize],
}
/// Parameters for fence objects
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1 {
    /// Value of fence to be signaled
    pub value: ::core::ffi::c_ulonglong,
}
/// Native layout of the `nvSciSync` member of [`CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1`].
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2 {
    /// Pointer to NvSciSyncFence. Valid if ::CUexternalSemaphoreHandleType is of type ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC.
    pub fence: *mut ::core::ffi::c_void,
    /// Reserved storage in the native ABI.
    pub reserved: ::core::ffi::c_ulonglong,
}
impl Default for CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Parameters for keyed mutex objects
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3 {
    /// Value of key to release the mutex with
    pub key: ::core::ffi::c_ulonglong,
}
impl Default for CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// External semaphore signal parameters.
pub type CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 = CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st;
/// External semaphore signal parameters
pub type CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS = CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1;
/// External semaphore wait parameters
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st {
    /// Payload for the wait operation, interpreted using the external semaphore's handle type.
    pub params: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1,
    /// Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a ::CUexternalSemaphore of type ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is ::CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates that while waiting for the ::CUexternalSemaphore, no memory synchronization operations should be performed for any external memory object imported as ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. For all other types of ::CUexternalSemaphore, flags must be zero.
    pub flags: ::core::ffi::c_uint,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 16usize],
}
/// Native layout of the `params` member of [`CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st`].
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1 {
    /// Parameters for fence objects
    pub fence: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1,
    /// Pointer to NvSciSyncFence. Valid if CUexternalSemaphoreHandleType is of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC.
    pub nvSciSync: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2,
    /// Parameters for keyed mutex objects
    pub keyedMutex: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 10usize],
}
/// Parameters for fence objects
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1 {
    /// Value of fence to be waited on
    pub value: ::core::ffi::c_ulonglong,
}
/// Pointer to NvSciSyncFence. Valid if CUexternalSemaphoreHandleType is of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC.
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2 {
    /// Pointer to the NvSciSync fence used by this semaphore operation.
    pub fence: *mut ::core::ffi::c_void,
    /// Reserved storage in the native ABI.
    pub reserved: ::core::ffi::c_ulonglong,
}
impl Default for CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Parameters for keyed mutex objects
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3 {
    /// Value of key to acquire the mutex with
    pub key: ::core::ffi::c_ulonglong,
    /// Timeout in milliseconds to wait to acquire the mutex
    pub timeoutMs: ::core::ffi::c_uint,
}
impl Default for CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// External semaphore wait parameters.
pub type CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 = CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st;
/// External semaphore wait parameters
pub type CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS = CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1;
/// Semaphore signal node parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st {
    /// Array of external semaphore handles.
    pub extSemArray: *mut CUexternalSemaphore,
    /// Array of external semaphore signal parameters.
    pub paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,
    /// Number of handles and parameters supplied in extSemArray and paramsArray.
    pub numExtSems: ::core::ffi::c_uint,
}
impl Default for CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Semaphore signal node parameters.
pub type CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st;
/// Semaphore signal node parameters
pub type CUDA_EXT_SEM_SIGNAL_NODE_PARAMS = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1;
/// Semaphore signal node parameters
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st {
    /// Array of external semaphore handles.
    pub extSemArray: *mut CUexternalSemaphore,
    /// Array of external semaphore signal parameters.
    pub paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,
    /// Number of handles and parameters supplied in extSemArray and paramsArray.
    pub numExtSems: ::core::ffi::c_uint,
    /// Anonymous native member. See [`CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st__bindgen_ty_1`] for its fields.
    pub __bindgen_anon_1: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st__bindgen_ty_1,
}
/// preferred context to use for the semaphore signal task
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st__bindgen_ty_1 {
    /// Preferred CUDA context for the external semaphore signal task.
    pub ctx: CUcontext,
    /// Preferred green context for the external semaphore signal task.
    pub gCtx: CUgreenCtx,
}
impl Default for CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Semaphore signal node parameters.
pub type CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st;
/// Semaphore wait node parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st {
    /// Array of external semaphore handles.
    pub extSemArray: *mut CUexternalSemaphore,
    /// Array of external semaphore wait parameters.
    pub paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,
    /// Number of handles and parameters supplied in extSemArray and paramsArray.
    pub numExtSems: ::core::ffi::c_uint,
}
impl Default for CUDA_EXT_SEM_WAIT_NODE_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Semaphore wait node parameters.
pub type CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 = CUDA_EXT_SEM_WAIT_NODE_PARAMS_st;
/// Semaphore wait node parameters
pub type CUDA_EXT_SEM_WAIT_NODE_PARAMS = CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1;
/// Semaphore wait node parameters
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st {
    /// Array of external semaphore handles.
    pub extSemArray: *mut CUexternalSemaphore,
    /// Array of external semaphore wait parameters.
    pub paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,
    /// Number of handles and parameters supplied in extSemArray and paramsArray.
    pub numExtSems: ::core::ffi::c_uint,
    /// Anonymous native member. See [`CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st__bindgen_ty_1`] for its fields.
    pub __bindgen_anon_1: CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st__bindgen_ty_1,
}
/// preferred context to use for the semaphore wait task
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st__bindgen_ty_1 {
    /// Preferred CUDA context for the external semaphore wait task.
    pub ctx: CUcontext,
    /// Preferred green context for the external semaphore wait task.
    pub gCtx: CUgreenCtx,
}
impl Default for CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Semaphore wait node parameters.
pub type CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 = CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st;
/// Opaque handle to a CUDA virtual-memory allocation. The handle identifies an allocation, not a device address; mappings are established separately with [`cuMemMap`].
pub type CUmemGenericAllocationHandle_v1 = ::core::ffi::c_ulonglong;
/// Opaque handle to a CUDA virtual-memory allocation. The handle identifies an allocation, not a device address; mappings are established separately with [`cuMemMap`].
pub type CUmemGenericAllocationHandle = CUmemGenericAllocationHandle_v1;
impl CUmemAllocationHandleType_enum {
    /// Does not allow any export mechanism.
    ///
    /// >.
    pub const CU_MEM_HANDLE_TYPE_NONE: CUmemAllocationHandleType_enum = CUmemAllocationHandleType_enum(
        0,
    );
    /// Allows a file descriptor to be used for exporting.
    ///
    /// Permitted only on POSIX systems. (int).
    pub const CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR: CUmemAllocationHandleType_enum = CUmemAllocationHandleType_enum(
        1,
    );
    /// Allows a Win32 NT handle to be used for exporting.
    ///
    /// (HANDLE).
    pub const CU_MEM_HANDLE_TYPE_WIN32: CUmemAllocationHandleType_enum = CUmemAllocationHandleType_enum(
        2,
    );
    /// Allows a Win32 KMT handle to be used for exporting.
    ///
    /// (D3DKMT_HANDLE).
    pub const CU_MEM_HANDLE_TYPE_WIN32_KMT: CUmemAllocationHandleType_enum = CUmemAllocationHandleType_enum(
        4,
    );
    /// Allows a fabric handle to be used for exporting.
    ///
    /// (CUmemFabricHandle).
    pub const CU_MEM_HANDLE_TYPE_FABRIC: CUmemAllocationHandleType_enum = CUmemAllocationHandleType_enum(
        8,
    );
    /// Reserved upper-bound sentinel for native allocation handle types.
    pub const CU_MEM_HANDLE_TYPE_MAX: CUmemAllocationHandleType_enum = CUmemAllocationHandleType_enum(
        2147483647,
    );
}
/// Flags for specifying particular handle types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemAllocationHandleType_enum(pub ::core::ffi::c_uint);
pub use self::CUmemAllocationHandleType_enum as CUmemAllocationHandleType;
impl CUmemAccess_flags_enum {
    /// Default, make the address range not accessible.
    pub const CU_MEM_ACCESS_FLAGS_PROT_NONE: CUmemAccess_flags_enum = CUmemAccess_flags_enum(
        0,
    );
    /// Make the address range read accessible.
    pub const CU_MEM_ACCESS_FLAGS_PROT_READ: CUmemAccess_flags_enum = CUmemAccess_flags_enum(
        1,
    );
    /// Make the address range read-write accessible.
    pub const CU_MEM_ACCESS_FLAGS_PROT_READWRITE: CUmemAccess_flags_enum = CUmemAccess_flags_enum(
        3,
    );
    /// Reserved upper-bound sentinel for native memory access protections.
    pub const CU_MEM_ACCESS_FLAGS_PROT_MAX: CUmemAccess_flags_enum = CUmemAccess_flags_enum(
        2147483647,
    );
}
/// Specifies the memory protection flags for mapping.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemAccess_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUmemAccess_flags_enum as CUmemAccess_flags;
impl CUmemLocationType_enum {
    /// No valid native memory location is selected.
    pub const CU_MEM_LOCATION_TYPE_INVALID: CUmemLocationType_enum = CUmemLocationType_enum(
        0,
    );
    /// Location is unspecified.
    ///
    /// This is used when creating a managed memory pool to indicate no preferred location for the pool.
    pub const CU_MEM_LOCATION_TYPE_NONE: CUmemLocationType_enum = CUmemLocationType_enum(
        0,
    );
    /// Location is a device location, thus id is a device ordinal.
    pub const CU_MEM_LOCATION_TYPE_DEVICE: CUmemLocationType_enum = CUmemLocationType_enum(
        1,
    );
    /// Location is host, id is ignored.
    pub const CU_MEM_LOCATION_TYPE_HOST: CUmemLocationType_enum = CUmemLocationType_enum(
        2,
    );
    /// Location is a host NUMA node, thus id is a host NUMA node id.
    pub const CU_MEM_LOCATION_TYPE_HOST_NUMA: CUmemLocationType_enum = CUmemLocationType_enum(
        3,
    );
    /// Location is a host NUMA node of the current thread, id is ignored.
    pub const CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT: CUmemLocationType_enum = CUmemLocationType_enum(
        4,
    );
    /// Location is not visible but device is accessible, id is always CU_DEVICE_INVALID.
    pub const CU_MEM_LOCATION_TYPE_INVISIBLE: CUmemLocationType_enum = CUmemLocationType_enum(
        5,
    );
    /// Location is a portion of device memory, specified by the locality domain ID.
    pub const CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN: CUmemLocationType_enum = CUmemLocationType_enum(
        6,
    );
    /// Reserved upper-bound sentinel for native memory location types.
    pub const CU_MEM_LOCATION_TYPE_MAX: CUmemLocationType_enum = CUmemLocationType_enum(
        2147483647,
    );
}
/// Specifies the type of location
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemLocationType_enum(pub ::core::ffi::c_uint);
pub use self::CUmemLocationType_enum as CUmemLocationType;
impl CUmemAllocationType_enum {
    /// No valid native memory allocation type is selected.
    pub const CU_MEM_ALLOCATION_TYPE_INVALID: CUmemAllocationType_enum = CUmemAllocationType_enum(
        0,
    );
    /// This allocation type is ‘pinned’, i.e.
    ///
    /// cannot migrate from its current location while the application is actively using it.
    pub const CU_MEM_ALLOCATION_TYPE_PINNED: CUmemAllocationType_enum = CUmemAllocationType_enum(
        1,
    );
    /// This allocation type is managed memory.
    pub const CU_MEM_ALLOCATION_TYPE_MANAGED: CUmemAllocationType_enum = CUmemAllocationType_enum(
        2,
    );
    /// ABI sentinel that forces a 32-bit C allocation-type enum representation.
    pub const CU_MEM_ALLOCATION_TYPE_MAX: CUmemAllocationType_enum = CUmemAllocationType_enum(
        2147483647,
    );
}
/// Defines the allocation types available
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemAllocationType_enum(pub ::core::ffi::c_uint);
pub use self::CUmemAllocationType_enum as CUmemAllocationType;
impl CUmemAllocationGranularity_flags_enum {
    /// Minimum required granularity for allocation.
    pub const CU_MEM_ALLOC_GRANULARITY_MINIMUM: CUmemAllocationGranularity_flags_enum = CUmemAllocationGranularity_flags_enum(
        0,
    );
    /// Recommended granularity for allocation for best performance.
    pub const CU_MEM_ALLOC_GRANULARITY_RECOMMENDED: CUmemAllocationGranularity_flags_enum = CUmemAllocationGranularity_flags_enum(
        1,
    );
}
/// Flag for requesting different optimal and required granularities for an allocation.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemAllocationGranularity_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUmemAllocationGranularity_flags_enum as CUmemAllocationGranularity_flags;
impl CUmemRangeHandleType_enum {
    /// Exports a memory-range handle as a DMA-BUF file descriptor.
    pub const CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD: CUmemRangeHandleType_enum = CUmemRangeHandleType_enum(
        1,
    );
    /// Reserved upper-bound sentinel for native memory-range handle types.
    pub const CU_MEM_RANGE_HANDLE_TYPE_MAX: CUmemRangeHandleType_enum = CUmemRangeHandleType_enum(
        2147483647,
    );
}
/// Specifies the handle type for address range
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemRangeHandleType_enum(pub ::core::ffi::c_uint);
pub use self::CUmemRangeHandleType_enum as CUmemRangeHandleType;
impl CUmemRangeFlags_enum {
    /// Indicates that DMA_BUF handle should be mapped via PCIe BAR1.
    pub const CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE: CUmemRangeFlags_enum = CUmemRangeFlags_enum(
        1,
    );
}
/// Flag for requesting handle type for address range.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemRangeFlags_enum(pub ::core::ffi::c_uint);
pub use self::CUmemRangeFlags_enum as CUmemRangeFlags;
impl CUarraySparseSubresourceType_enum {
    /// Selects a sparse mip level for array mapping.
    pub const CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL: CUarraySparseSubresourceType_enum = CUarraySparseSubresourceType_enum(
        0,
    );
    /// Selects a packed mip tail for array mapping.
    pub const CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL: CUarraySparseSubresourceType_enum = CUarraySparseSubresourceType_enum(
        1,
    );
}
/// Sparse subresource types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUarraySparseSubresourceType_enum(pub ::core::ffi::c_uint);
pub use self::CUarraySparseSubresourceType_enum as CUarraySparseSubresourceType;
impl CUmemOperationType_enum {
    /// Maps the selected sparse-array subresource to an allocation.
    pub const CU_MEM_OPERATION_TYPE_MAP: CUmemOperationType_enum = CUmemOperationType_enum(
        1,
    );
    /// Removes the mapping of the selected sparse-array subresource.
    pub const CU_MEM_OPERATION_TYPE_UNMAP: CUmemOperationType_enum = CUmemOperationType_enum(
        2,
    );
}
/// Memory operation types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemOperationType_enum(pub ::core::ffi::c_uint);
pub use self::CUmemOperationType_enum as CUmemOperationType;
impl CUmemHandleType_enum {
    /// Uses a generic CUDA allocation handle in an array-mapping operation.
    pub const CU_MEM_HANDLE_TYPE_GENERIC: CUmemHandleType_enum = CUmemHandleType_enum(0);
}
/// Memory handle types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemHandleType_enum(pub ::core::ffi::c_uint);
pub use self::CUmemHandleType_enum as CUmemHandleType;
/// Specifies the CUDA array or CUDA mipmapped array memory mapping information
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUarrayMapInfo_st {
    /// Resource type
    pub resourceType: CUresourcetype,
    /// Array or mipmapped-array resource selected by `resourceType`.
    pub resource: CUarrayMapInfo_st__bindgen_ty_1,
    /// Sparse subresource type
    pub subresourceType: CUarraySparseSubresourceType,
    /// Sparse mip-level or mip-tail region selected by `subresourceType`.
    pub subresource: CUarrayMapInfo_st__bindgen_ty_2,
    /// Memory operation type
    pub memOperationType: CUmemOperationType,
    /// Memory handle type
    pub memHandleType: CUmemHandleType,
    /// Memory handle representation selected by `memHandleType`.
    pub memHandle: CUarrayMapInfo_st__bindgen_ty_3,
    /// Offset within the memory
    pub offset: ::core::ffi::c_ulonglong,
    /// Device ordinal bit mask
    pub deviceBitMask: ::core::ffi::c_uint,
    /// flags for future use, must be zero now.
    pub flags: ::core::ffi::c_uint,
    /// Reserved for future use, must be zero now.
    pub reserved: [::core::ffi::c_uint; 2usize],
}
/// Native layout of the `resource` member of [`CUarrayMapInfo_st`].
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUarrayMapInfo_st__bindgen_ty_1 {
    /// Mipmapped array containing the sparse resource.
    pub mipmap: CUmipmappedArray,
    /// CUDA array containing the sparse resource.
    pub array: CUarray,
}
impl Default for CUarrayMapInfo_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Native layout of the `subresource` member of [`CUarrayMapInfo_st`].
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUarrayMapInfo_st__bindgen_ty_2 {
    /// Sparse mip-level coordinates and extents.
    pub sparseLevel: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1,
    /// Offset, size, and layer selecting a packed mip tail.
    pub miptail: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2,
}
/// Native layout of the `sparseLevel` member of [`CUarrayMapInfo_st__bindgen_ty_2`].
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1 {
    /// For CUDA mipmapped arrays must a valid mipmap level. For CUDA arrays must be zero
    pub level: ::core::ffi::c_uint,
    /// For CUDA layered arrays must be a valid layer index. Otherwise, must be zero
    pub layer: ::core::ffi::c_uint,
    /// Starting X offset in elements
    pub offsetX: ::core::ffi::c_uint,
    /// Starting Y offset in elements
    pub offsetY: ::core::ffi::c_uint,
    /// Starting Z offset in elements
    pub offsetZ: ::core::ffi::c_uint,
    /// Width in elements
    pub extentWidth: ::core::ffi::c_uint,
    /// Height in elements
    pub extentHeight: ::core::ffi::c_uint,
    /// Depth in elements
    pub extentDepth: ::core::ffi::c_uint,
}
/// Native layout of the `miptail` member of [`CUarrayMapInfo_st__bindgen_ty_2`].
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2 {
    /// For CUDA layered arrays must be a valid layer index. Otherwise, must be zero
    pub layer: ::core::ffi::c_uint,
    /// Offset within mip tail
    pub offset: ::core::ffi::c_ulonglong,
    /// Extent in bytes
    pub size: ::core::ffi::c_ulonglong,
}
impl Default for CUarrayMapInfo_st__bindgen_ty_2 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Native layout of the `memHandle` member of [`CUarrayMapInfo_st`].
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUarrayMapInfo_st__bindgen_ty_3 {
    /// Generic allocation handle used as backing memory for the mapping.
    pub memHandle: CUmemGenericAllocationHandle,
}
impl Default for CUarrayMapInfo_st__bindgen_ty_3 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUarrayMapInfo_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Specifies the CUDA array or CUDA mipmapped array memory mapping information.
pub type CUarrayMapInfo_v1 = CUarrayMapInfo_st;
/// Specifies the CUDA array or CUDA mipmapped array memory mapping information
pub type CUarrayMapInfo = CUarrayMapInfo_v1;
/// Specifies a memory location.
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUmemLocation_st {
    /// Specifies the location type, which modifies the meaning of id.
    pub type_: CUmemLocationType,
    /// Anonymous native member. See [`CUmemLocation_st__bindgen_ty_1`] for its fields.
    pub __bindgen_anon_1: CUmemLocation_st__bindgen_ty_1,
}
/// Anonymous native union in [`CUmemLocation_st`]. Its members share the same storage.
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUmemLocation_st__bindgen_ty_1 {
    /// Identifier for CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE, CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST, CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST_NUMA.
    pub id: ::core::ffi::c_int,
    /// Identifier for CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN.
    pub localized: CUmemLocation_st__bindgen_ty_1__bindgen_ty_1,
}
/// Native layout of the `localized` member of [`CUmemLocation_st__bindgen_ty_1`].
///
/// Identifier for CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemLocation_st__bindgen_ty_1__bindgen_ty_1 {
    /// Device ID
    pub deviceId: ::core::ffi::c_uchar,
    /// Locality domain ID
    pub localityDomainId: ::core::ffi::c_uchar,
}
impl Default for CUmemLocation_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUmemLocation_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Specifies a memory location.
pub type CUmemLocation_v1 = CUmemLocation_st;
/// Specifies a memory location.
pub type CUmemLocation = CUmemLocation_v1;
impl CUmemAllocationCompType_enum {
    /// Allocating non-compressible memory.
    pub const CU_MEM_ALLOCATION_COMP_NONE: CUmemAllocationCompType_enum = CUmemAllocationCompType_enum(
        0,
    );
    /// Allocating compressible memory.
    pub const CU_MEM_ALLOCATION_COMP_GENERIC: CUmemAllocationCompType_enum = CUmemAllocationCompType_enum(
        1,
    );
}
/// Specifies compression attribute for an allocation.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemAllocationCompType_enum(pub ::core::ffi::c_uint);
pub use self::CUmemAllocationCompType_enum as CUmemAllocationCompType;
/// Specifies the allocation properties for a allocation.
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUmemAllocationProp_st {
    /// Allocation type
    pub type_: CUmemAllocationType,
    /// requested ::CUmemAllocationHandleType
    pub requestedHandleTypes: CUmemAllocationHandleType,
    /// Location of allocation
    pub location: CUmemLocation,
    /// Windows-specific POBJECT_ATTRIBUTES required when ::CU_MEM_HANDLE_TYPE_WIN32 is specified.  This object attributes structure includes security attributes that define the scope of which exported allocations may be transferred to other processes.  In all other cases, this field is required to be zero.
    pub win32HandleMetaData: *mut ::core::ffi::c_void,
    /// Native allocation options for compression, GPUDirect RDMA, and allocation usage.
    pub allocFlags: CUmemAllocationProp_st__bindgen_ty_1,
}
/// Native layout of the `allocFlags` member of [`CUmemAllocationProp_st`].
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemAllocationProp_st__bindgen_ty_1 {
    /// Allocation hint for requesting compressible memory. On devices that support Compute Data Compression, compressible memory can be used to accelerate accesses to data with unstructured sparsity and other compressible data patterns. Applications are expected to query allocation property of the handle obtained with ::cuMemCreate using ::cuMemGetAllocationPropertiesFromHandle to validate if the obtained allocation is compressible or not. Note that compressed memory may not be mappable on all devices.
    pub compressionType: ::core::ffi::c_uchar,
    /// Allocation hint for requesting GPUDirect RDMA capable memory. On devices with attribute ::CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED set, this flag indicates that the memory will be used for GPUDirect RDMA. On platforms where the default RDMA path does not support localized allocations, this flag has the following effects:
    /// - For MPS clients using MLOPart/locality domains, this flag has the effect of disabling localization for the allocation. This allows the allocation to be used for GPUDirect RDMA with the default RDMA path.
    /// - For allocations that are localized using CUDA locality domain APIs, using this flag will return an error. To use GPUDirect RDMA with localized allocations on platforms where the default RDMA path does not support localized allocations, allocations must explicitly opt-in to using the PCIe (BAR1) path by setting the flag CU_MEM_CREATE_USAGE_GPU_DIRECT_RDMA_OVER_PCIE.
    pub gpuDirectRDMACapable: ::core::ffi::c_uchar,
    /// Bitmask indicating intended usage for this allocation
    pub usage: ::core::ffi::c_ushort,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uchar; 4usize],
}
impl Default for CUmemAllocationProp_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Specifies the allocation properties for a allocation.
pub type CUmemAllocationProp_v1 = CUmemAllocationProp_st;
/// Specifies the allocation properties for a allocation.
pub type CUmemAllocationProp = CUmemAllocationProp_v1;
impl CUmulticastGranularity_flags_enum {
    /// Minimum required granularity.
    pub const CU_MULTICAST_GRANULARITY_MINIMUM: CUmulticastGranularity_flags_enum = CUmulticastGranularity_flags_enum(
        0,
    );
    /// Recommended granularity for best performance.
    pub const CU_MULTICAST_GRANULARITY_RECOMMENDED: CUmulticastGranularity_flags_enum = CUmulticastGranularity_flags_enum(
        1,
    );
}
/// Flags for querying different granularities for a multicast object
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmulticastGranularity_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUmulticastGranularity_flags_enum as CUmulticastGranularity_flags;
/// Specifies the properties for a multicast object.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmulticastObjectProp_st {
    /// The number of devices in the multicast team that will bind memory to this object
    pub numDevices: ::core::ffi::c_uint,
    /// The maximum amount of memory that can be bound to this multicast object per device
    pub size: size_t,
    /// Bitmask of exportable handle types (see ::CUmemAllocationHandleType) for this object
    pub handleTypes: ::core::ffi::c_ulonglong,
    /// Flags for future use, must be zero now
    pub flags: ::core::ffi::c_ulonglong,
}
/// Specifies the properties for a multicast object.
pub type CUmulticastObjectProp_v1 = CUmulticastObjectProp_st;
/// Specifies the properties for a multicast object.
pub type CUmulticastObjectProp = CUmulticastObjectProp_v1;
/// Memory access descriptor
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUmemAccessDesc_st {
    /// Location on which the request is to change it's accessibility
    pub location: CUmemLocation,
    /// ::CUmemProt accessibility flags to set on the request
    pub flags: CUmemAccess_flags,
}
impl Default for CUmemAccessDesc_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Memory access descriptor.
pub type CUmemAccessDesc_v1 = CUmemAccessDesc_st;
/// Memory access descriptor
pub type CUmemAccessDesc = CUmemAccessDesc_v1;
impl CUgraphExecUpdateResult_enum {
    /// The update succeeded.
    pub const CU_GRAPH_EXEC_UPDATE_SUCCESS: CUgraphExecUpdateResult_enum = CUgraphExecUpdateResult_enum(
        0,
    );
    /// The update failed for an unexpected reason which is described in the return value of the function.
    pub const CU_GRAPH_EXEC_UPDATE_ERROR: CUgraphExecUpdateResult_enum = CUgraphExecUpdateResult_enum(
        1,
    );
    /// The update failed because the topology changed.
    pub const CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED: CUgraphExecUpdateResult_enum = CUgraphExecUpdateResult_enum(
        2,
    );
    /// The update failed because a node type changed.
    pub const CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED: CUgraphExecUpdateResult_enum = CUgraphExecUpdateResult_enum(
        3,
    );
    /// The update failed because the function of a kernel node changed (CUDA driver &lt; 11.2).
    pub const CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED: CUgraphExecUpdateResult_enum = CUgraphExecUpdateResult_enum(
        4,
    );
    /// The update failed because the parameters changed in a way that is not supported.
    pub const CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED: CUgraphExecUpdateResult_enum = CUgraphExecUpdateResult_enum(
        5,
    );
    /// The update failed because something about the node is not supported.
    pub const CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED: CUgraphExecUpdateResult_enum = CUgraphExecUpdateResult_enum(
        6,
    );
    /// The update failed because the function of a kernel node changed in an unsupported way.
    pub const CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE: CUgraphExecUpdateResult_enum = CUgraphExecUpdateResult_enum(
        7,
    );
    /// The update failed because the node attributes changed in a way that is not supported.
    pub const CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED: CUgraphExecUpdateResult_enum = CUgraphExecUpdateResult_enum(
        8,
    );
}
/// CUDA Graph Update error types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphExecUpdateResult_enum(pub ::core::ffi::c_uint);
pub use self::CUgraphExecUpdateResult_enum as CUgraphExecUpdateResult;
/// Result information returned by cuGraphExecUpdate
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphExecUpdateResultInfo_st {
    /// Gives more specific detail when a cuda graph update fails.
    pub result: CUgraphExecUpdateResult,
    /// The "to node" of the error edge when the topologies do not match. The error node when the error is associated with a specific node. NULL when the error is generic.
    pub errorNode: CUgraphNode,
    /// The from node of error edge when the topologies do not match. Otherwise NULL.
    pub errorFromNode: CUgraphNode,
}
impl Default for CUgraphExecUpdateResultInfo_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Result information returned by cuGraphExecUpdate.
pub type CUgraphExecUpdateResultInfo_v1 = CUgraphExecUpdateResultInfo_st;
/// Result information returned by cuGraphExecUpdate
pub type CUgraphExecUpdateResultInfo = CUgraphExecUpdateResultInfo_v1;
impl CUmemPool_attribute_enum {
    /// (value type = int) Allow cuMemAllocAsync to use memory asynchronously freed in another streams as long as a stream ordering dependency of the allocating stream on the free action exists.
    ///
    /// CUDA events and null stream interactions can create the required stream ordered dependencies. (default enabled).
    pub const CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        1,
    );
    /// (value type = int) Allow reuse of already completed frees when there is no dependency between the free and allocation.
    ///
    /// (default enabled).
    pub const CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        2,
    );
    /// (value type = int) Allow cuMemAllocAsync to insert new stream dependencies in order to establish the stream ordering required to reuse a piece of memory released by cuMemFreeAsync (default enabled).
    pub const CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        3,
    );
    /// (value type = cuuint64_t) Amount of reserved memory in bytes to hold onto before trying to release memory back to the OS.
    ///
    /// When more than the release threshold bytes of memory are held by the memory pool, the allocator will try to release memory back to the OS on the next call to stream, event or context synchronize. (default 0).
    pub const CU_MEMPOOL_ATTR_RELEASE_THRESHOLD: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        4,
    );
    /// (value type = cuuint64_t) Amount of backing memory currently allocated for the mempool.
    pub const CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        5,
    );
    /// (value type = cuuint64_t) High watermark of backing memory allocated for the mempool since the last time it was reset.
    ///
    /// High watermark can only be reset to zero.
    pub const CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        6,
    );
    /// (value type = cuuint64_t) Amount of memory from the pool that is currently in use by the application.
    pub const CU_MEMPOOL_ATTR_USED_MEM_CURRENT: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        7,
    );
    /// (value type = cuuint64_t) High watermark of the amount of memory from the pool that was in use by the application since the last time it was reset.
    ///
    /// High watermark can only be reset to zero.
    pub const CU_MEMPOOL_ATTR_USED_MEM_HIGH: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        8,
    );
    /// (value type = CUmemAllocationType) The allocation type of the mempool.
    pub const CU_MEMPOOL_ATTR_ALLOCATION_TYPE: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        9,
    );
    /// (value type = CUmemAllocationHandleType) Available export handle types for the mempool.
    ///
    /// For imported pools this value is always [`CUmemAllocationHandleType::CU_MEM_HANDLE_TYPE_NONE`] as an imported pool cannot be re-exported.
    pub const CU_MEMPOOL_ATTR_EXPORT_HANDLE_TYPES: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        10,
    );
    /// (value type = int) The location id for the mempool.
    ///
    /// If the location type for this pool is [`CUmemLocationType::CU_MEM_LOCATION_TYPE_INVISIBLE`] then ID will be CU_DEVICE_INVALID.
    pub const CU_MEMPOOL_ATTR_LOCATION_ID: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        11,
    );
    /// (value type = CUmemLocationType) The location type for the mempool.
    ///
    /// For imported memory pools where the device is not directly visible to the importing process or pools imported via fabric handles across nodes this will be [`CUmemLocationType::CU_MEM_LOCATION_TYPE_INVISIBLE`].
    pub const CU_MEMPOOL_ATTR_LOCATION_TYPE: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        12,
    );
    /// (value type = cuuint64_t) Maximum size of the pool in bytes, this value may be higher than what was initially passed to cuMemPoolCreate due to alignment requirements.
    ///
    /// A value of 0 indicates no maximum size. For [`CUmemAllocationType::CU_MEM_ALLOCATION_TYPE_MANAGED`] and IPC imported pools this value will be system dependent.
    pub const CU_MEMPOOL_ATTR_MAX_POOL_SIZE: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        13,
    );
    /// (value type = int) Indicates whether the pool has hardware compresssion enabled.
    pub const CU_MEMPOOL_ATTR_HW_DECOMPRESS_ENABLED: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        14,
    );
    /// (value type = int) The locality domain ID for the mempool, if the mempool is localized to a locality domain.
    ///
    /// A value of -1 indicates that the mempool is not localized.
    ///
    /// Note: On devices with a single locality domain, mempools created with [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`] and localityDomainId 0 are equivalent to full-device mempools created with [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE`]. The value of this attribute will be -1 for such mempools.
    pub const CU_MEMPOOL_ATTR_LOCALITY_DOMAIN_ID: CUmemPool_attribute_enum = CUmemPool_attribute_enum(
        15,
    );
}
/// CUDA memory pool attributes
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemPool_attribute_enum(pub ::core::ffi::c_uint);
pub use self::CUmemPool_attribute_enum as CUmemPool_attribute;
/// Specifies the properties of allocations made from the pool.
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUmemPoolProps_st {
    /// Allocation type. Currently must be specified as CU_MEM_ALLOCATION_TYPE_PINNED
    pub allocType: CUmemAllocationType,
    /// Handle types that will be supported by allocations from the pool.
    pub handleTypes: CUmemAllocationHandleType,
    /// Location where allocations should reside.
    pub location: CUmemLocation,
    /// Windows-specific LPSECURITYATTRIBUTES required when ::CU_MEM_HANDLE_TYPE_WIN32 is specified.  This security attribute defines the scope of which exported allocations may be transferred to other processes.  In all other cases, this field is required to be zero.
    pub win32SecurityAttributes: *mut ::core::ffi::c_void,
    /// Maximum pool size. When set to 0, defaults to a system dependent value.
    pub maxSize: size_t,
    /// Bitmask indicating intended usage for the pool.
    pub usage: ::core::ffi::c_ushort,
    /// Allocation hint for requesting GPUDirect RDMA capable memory. On devices that support GPUDirect RDMA, this flag indicates that the memory will be used for GPUDirect RDMA. On platforms where the default RDMA path does not support localized allocations, this flag has the following effects:
    /// - For MPS clients using MLOPart/locality domains, this flag has the effect of disabling localization for the pool. This allows the pool to be used for GPUDirect RDMA with the default RDMA path.
    /// - For pools that are localized using CUDA locality domain APIs, using this flag will have no effect, but attempting to export the localized memory without forcing PCIe will return an error. To use GPUDirect RDMA with localized pools on platforms where the default RDMA path does not support localized allocations, handles must be acquired with the flag ::CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE. Note that CUDA memory pools are only compatible with dma_buf mappings.
    pub gpuDirectRDMACapable: ::core::ffi::c_uchar,
    /// reserved for future use, must be 0
    pub reserved: [::core::ffi::c_uchar; 53usize],
}
impl Default for CUmemPoolProps_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Specifies the properties of allocations made from the pool.
pub type CUmemPoolProps_v1 = CUmemPoolProps_st;
/// Specifies the properties of allocations made from the pool.
pub type CUmemPoolProps = CUmemPoolProps_v1;
/// Opaque data for exporting a pool allocation
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemPoolPtrExportData_st {
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uchar; 64usize],
}
impl Default for CUmemPoolPtrExportData_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Opaque data for exporting a pool allocation.
pub type CUmemPoolPtrExportData_v1 = CUmemPoolPtrExportData_st;
/// Opaque data for exporting a pool allocation
pub type CUmemPoolPtrExportData = CUmemPoolPtrExportData_v1;
impl CUmemcpyFlags_enum {
    /// Uses the default behavior for the copy operation.
    pub const CU_MEMCPY_FLAG_DEFAULT: CUmemcpyFlags_enum = CUmemcpyFlags_enum(0);
    /// Hint to the driver to try and overlap the copy with compute work on the SMs.
    pub const CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE: CUmemcpyFlags_enum = CUmemcpyFlags_enum(
        1,
    );
}
/// Flags to specify for copies within a batch. For more details see ::cuMemcpyBatchAsync.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemcpyFlags_enum(pub ::core::ffi::c_uint);
pub use self::CUmemcpyFlags_enum as CUmemcpyFlags;
impl CUmemcpySrcAccessOrder_enum {
    /// Default invalid.
    pub const CU_MEMCPY_SRC_ACCESS_ORDER_INVALID: CUmemcpySrcAccessOrder_enum = CUmemcpySrcAccessOrder_enum(
        0,
    );
    /// Indicates that access to the source pointer must be in stream order.
    pub const CU_MEMCPY_SRC_ACCESS_ORDER_STREAM: CUmemcpySrcAccessOrder_enum = CUmemcpySrcAccessOrder_enum(
        1,
    );
    /// Indicates that access to the source pointer can be out of stream order and all accesses must be complete before the API call returns.
    ///
    /// This flag is suited for ephemeral sources (ex., stack variables) when it’s known that no prior operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the need for the user to synchronize the stream after the API call.
    pub const CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL: CUmemcpySrcAccessOrder_enum = CUmemcpySrcAccessOrder_enum(
        2,
    );
    /// Indicates that access to the source pointer can be out of stream order and the accesses can happen even after the API call returns.
    ///
    /// This flag is suited for host pointers allocated outside CUDA (ex., via malloc) when it’s known that no prior operations in the stream can be accessing the memory. Specifying this flag allows the driver to optimize the copy on certain platforms.
    pub const CU_MEMCPY_SRC_ACCESS_ORDER_ANY: CUmemcpySrcAccessOrder_enum = CUmemcpySrcAccessOrder_enum(
        3,
    );
    /// ABI sentinel that forces a 32-bit C source-access-order enum representation.
    pub const CU_MEMCPY_SRC_ACCESS_ORDER_MAX: CUmemcpySrcAccessOrder_enum = CUmemcpySrcAccessOrder_enum(
        2147483647,
    );
}
/// These flags allow applications to convey the source access ordering CUDA must maintain. The destination will always be accessed in stream order.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemcpySrcAccessOrder_enum(pub ::core::ffi::c_uint);
pub use self::CUmemcpySrcAccessOrder_enum as CUmemcpySrcAccessOrder;
/// Attributes specific to copies within a batch. For more details on usage see ::cuMemcpyBatchAsync.
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUmemcpyAttributes_st {
    /// Source access ordering to be observed for copies with this attribute.
    pub srcAccessOrder: CUmemcpySrcAccessOrder,
    /// Hint location for the source operand. Ignored when the pointers are not managed memory or memory allocated outside CUDA.
    pub srcLocHint: CUmemLocation,
    /// Hint location for the destination operand. Ignored when the pointers are not managed memory or memory allocated outside CUDA.
    pub dstLocHint: CUmemLocation,
    /// Additional flags for copies with this attribute. See ::CUmemcpyFlags
    pub flags: ::core::ffi::c_uint,
}
impl Default for CUmemcpyAttributes_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Attributes specific to copies within a batch.
///
/// For more details on usage see cuMemcpyBatchAsync.
pub type CUmemcpyAttributes_v1 = CUmemcpyAttributes_st;
/// Attributes specific to copies within a batch. For more details on usage see ::cuMemcpyBatchAsync.
pub type CUmemcpyAttributes = CUmemcpyAttributes_v1;
impl CUmemcpy3DOperandType_enum {
    /// Memcpy operand is a valid pointer.
    pub const CU_MEMCPY_OPERAND_TYPE_POINTER: CUmemcpy3DOperandType_enum = CUmemcpy3DOperandType_enum(
        1,
    );
    /// Memcpy operand is a CUarray.
    pub const CU_MEMCPY_OPERAND_TYPE_ARRAY: CUmemcpy3DOperandType_enum = CUmemcpy3DOperandType_enum(
        2,
    );
    /// Reserved upper-bound sentinel for native three-dimensional copy operand types.
    pub const CU_MEMCPY_OPERAND_TYPE_MAX: CUmemcpy3DOperandType_enum = CUmemcpy3DOperandType_enum(
        2147483647,
    );
}
/// These flags allow applications to convey the operand type for individual copies specified in ::cuMemcpy3DBatchAsync.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemcpy3DOperandType_enum(pub ::core::ffi::c_uint);
pub use self::CUmemcpy3DOperandType_enum as CUmemcpy3DOperandType;
/// Struct representing a 3D offset
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUoffset3D_st {
    /// Offset along the x axis in elements.
    pub x: size_t,
    /// Offset along the y axis in elements.
    pub y: size_t,
    /// Offset along the z axis in elements.
    pub z: size_t,
}
/// Struct representing a 3D offset.
pub type CUoffset3D_v1 = CUoffset3D_st;
/// Struct representing a 3D offset
pub type CUoffset3D = CUoffset3D_v1;
/// Struct representing width/height/depth of a CUarray in elements
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUextent3D_st {
    /// Copy extent along the x axis in elements.
    pub width: size_t,
    /// Copy extent along the y axis in elements.
    pub height: size_t,
    /// Copy extent along the z axis in elements.
    pub depth: size_t,
}
/// Struct representing width/height/depth of a CUarray in elements.
pub type CUextent3D_v1 = CUextent3D_st;
/// Struct representing width/height/depth of a CUarray in elements
pub type CUextent3D = CUextent3D_v1;
/// Struct representing an operand for copy with ::cuMemcpy3DBatchAsync
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUmemcpy3DOperand_st {
    /// Selects a pointer-backed or array-backed copy operand.
    pub type_: CUmemcpy3DOperandType,
    /// Operand storage and layout selected by `type`.
    pub op: CUmemcpy3DOperand_st__bindgen_ty_1,
}
/// Native layout of the `op` member of [`CUmemcpy3DOperand_st`].
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUmemcpy3DOperand_st__bindgen_ty_1 {
    /// Struct representing an operand when ::CUmemcpy3DOperand::type is ::CU_MEMCPY_OPERAND_TYPE_POINTER
    pub ptr: CUmemcpy3DOperand_st__bindgen_ty_1__bindgen_ty_1,
    /// Struct representing an operand when ::CUmemcpy3DOperand::type is ::CU_MEMCPY_OPERAND_TYPE_ARRAY
    pub array: CUmemcpy3DOperand_st__bindgen_ty_1__bindgen_ty_2,
}
/// Struct representing an operand when ::CUmemcpy3DOperand::type is ::CU_MEMCPY_OPERAND_TYPE_POINTER
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUmemcpy3DOperand_st__bindgen_ty_1__bindgen_ty_1 {
    /// Device address used as the pointer-backed copy operand.
    pub ptr: CUdeviceptr,
    /// Length of each row in elements.
    pub rowLength: size_t,
    /// Height of each layer in elements.
    pub layerHeight: size_t,
    /// Hint location for the operand. Ignored when the pointers are not managed memory or memory allocated outside CUDA.
    pub locHint: CUmemLocation,
}
impl Default for CUmemcpy3DOperand_st__bindgen_ty_1__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Struct representing an operand when ::CUmemcpy3DOperand::type is ::CU_MEMCPY_OPERAND_TYPE_ARRAY
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemcpy3DOperand_st__bindgen_ty_1__bindgen_ty_2 {
    /// referenced array
    pub array: CUarray,
    /// offset into the array in elements
    pub offset: CUoffset3D,
}
impl Default for CUmemcpy3DOperand_st__bindgen_ty_1__bindgen_ty_2 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUmemcpy3DOperand_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUmemcpy3DOperand_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Struct representing an operand for copy with cuMemcpy3DBatchAsync.
pub type CUmemcpy3DOperand_v1 = CUmemcpy3DOperand_st;
/// Struct representing an operand for copy with ::cuMemcpy3DBatchAsync
pub type CUmemcpy3DOperand = CUmemcpy3DOperand_v1;
/// One source, destination, extent, and access-order specification in a batched three-dimensional copy.
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_MEMCPY3D_BATCH_OP_st {
    /// Source memcpy operand.
    pub src: CUmemcpy3DOperand,
    /// Destination memcpy operand.
    pub dst: CUmemcpy3DOperand,
    /// Extents of the memcpy between src and dst. The width, height and depth components must not be 0.
    pub extent: CUextent3D,
    /// Source access ordering to be observed for copy from src to dst.
    pub srcAccessOrder: CUmemcpySrcAccessOrder,
    /// Additional flags for copies with this attribute. See ::CUmemcpyFlags
    pub flags: ::core::ffi::c_uint,
}
impl Default for CUDA_MEMCPY3D_BATCH_OP_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// One source, destination, extent, and access-order specification in a batched three-dimensional copy.
pub type CUDA_MEMCPY3D_BATCH_OP_v1 = CUDA_MEMCPY3D_BATCH_OP_st;
/// One source, destination, extent, and access-order specification in a batched three-dimensional copy.
pub type CUDA_MEMCPY3D_BATCH_OP = CUDA_MEMCPY3D_BATCH_OP_v1;
/// Memory allocation node parameters
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_MEM_ALLOC_NODE_PARAMS_v1_st {
    /// in: location where the allocation should reside (specified in ::location). ::handleTypes must be ::CU_MEM_HANDLE_TYPE_NONE. IPC is not supported.
    pub poolProps: CUmemPoolProps,
    /// in: array of memory access descriptors. Used to describe peer GPU access
    pub accessDescs: *const CUmemAccessDesc,
    /// in: number of memory access descriptors.  Must not exceed the number of GPUs.
    pub accessDescCount: size_t,
    /// in: size in bytes of the requested allocation
    pub bytesize: size_t,
    /// out: address of the allocation returned by CUDA
    pub dptr: CUdeviceptr,
}
impl Default for CUDA_MEM_ALLOC_NODE_PARAMS_v1_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Memory allocation node parameters.
pub type CUDA_MEM_ALLOC_NODE_PARAMS_v1 = CUDA_MEM_ALLOC_NODE_PARAMS_v1_st;
/// Memory allocation node parameters
pub type CUDA_MEM_ALLOC_NODE_PARAMS = CUDA_MEM_ALLOC_NODE_PARAMS_v1;
/// Memory allocation node parameters
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_MEM_ALLOC_NODE_PARAMS_v2_st {
    /// in: location where the allocation should reside (specified in ::location). ::handleTypes must be ::CU_MEM_HANDLE_TYPE_NONE. IPC is not supported.
    pub poolProps: CUmemPoolProps,
    /// in: array of memory access descriptors. Used to describe peer GPU access
    pub accessDescs: *const CUmemAccessDesc,
    /// in: number of memory access descriptors.  Must not exceed the number of GPUs.
    pub accessDescCount: size_t,
    /// in: size in bytes of the requested allocation
    pub bytesize: size_t,
    /// out: address of the allocation returned by CUDA
    pub dptr: CUdeviceptr,
}
impl Default for CUDA_MEM_ALLOC_NODE_PARAMS_v2_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Memory allocation node parameters.
pub type CUDA_MEM_ALLOC_NODE_PARAMS_v2 = CUDA_MEM_ALLOC_NODE_PARAMS_v2_st;
/// Memory free node parameters
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_MEM_FREE_NODE_PARAMS_st {
    /// in: the pointer to free
    pub dptr: CUdeviceptr,
}
/// Memory free node parameters.
pub type CUDA_MEM_FREE_NODE_PARAMS = CUDA_MEM_FREE_NODE_PARAMS_st;
impl CUgraphMem_attribute_enum {
    /// (value type = cuuint64_t) Amount of memory, in bytes, currently associated with graphs.
    pub const CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT: CUgraphMem_attribute_enum = CUgraphMem_attribute_enum(
        0,
    );
    /// (value type = cuuint64_t) High watermark of memory, in bytes, associated with graphs since the last time it was reset.
    ///
    /// High watermark can only be reset to zero.
    pub const CU_GRAPH_MEM_ATTR_USED_MEM_HIGH: CUgraphMem_attribute_enum = CUgraphMem_attribute_enum(
        1,
    );
    /// (value type = cuuint64_t) Amount of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator.
    pub const CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT: CUgraphMem_attribute_enum = CUgraphMem_attribute_enum(
        2,
    );
    /// (value type = cuuint64_t) High watermark of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator.
    pub const CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH: CUgraphMem_attribute_enum = CUgraphMem_attribute_enum(
        3,
    );
}
/// Device-level accounting and limits for memory allocated by CUDA graphs.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphMem_attribute_enum(pub ::core::ffi::c_uint);
pub use self::CUgraphMem_attribute_enum as CUgraphMem_attribute;
impl CUgraphChildGraphNodeOwnership_enum {
    /// Default behavior for a child graph node.
    ///
    /// Child graph is cloned into the parent and memory allocation/free nodes can’t be present in the child graph.
    pub const CU_GRAPH_CHILD_GRAPH_OWNERSHIP_CLONE: CUgraphChildGraphNodeOwnership_enum = CUgraphChildGraphNodeOwnership_enum(
        0,
    );
    /// The child graph is moved to the parent.
    ///
    /// The handle to the child graph is owned by the parent and will be destroyed when the parent is destroyed.
    ///
    /// The following restrictions apply to child graphs after they have been moved: Cannot be independently instantiated or destroyed; Cannot be added as a child graph of a separate parent graph; Cannot be used as an argument to cuGraphExecUpdate; Cannot have additional memory allocation or free nodes added.
    pub const CU_GRAPH_CHILD_GRAPH_OWNERSHIP_MOVE: CUgraphChildGraphNodeOwnership_enum = CUgraphChildGraphNodeOwnership_enum(
        1,
    );
    /// Invalid ownership flag.
    ///
    /// Set when params are queried to prevent accidentally reusing the driver-owned graph object.
    pub const CU_GRAPH_CHILD_GRAPH_OWNERSHIP_INVALID: CUgraphChildGraphNodeOwnership_enum = CUgraphChildGraphNodeOwnership_enum(
        -1,
    );
}
/// Child graph node ownership
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphChildGraphNodeOwnership_enum(pub ::core::ffi::c_int);
pub use self::CUgraphChildGraphNodeOwnership_enum as CUgraphChildGraphNodeOwnership;
/// Child graph node parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_CHILD_GRAPH_NODE_PARAMS_st {
    /// The child graph to clone into the node for node creation, or a handle to the graph owned by the node for node query. The graph must not contain conditional nodes. Graphs containing memory allocation or memory free nodes must set the ownership to be moved to the parent.
    pub graph: CUgraph,
    /// The ownership relationship of the child graph node.
    pub ownership: CUgraphChildGraphNodeOwnership,
}
impl Default for CUDA_CHILD_GRAPH_NODE_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Child graph node parameters.
pub type CUDA_CHILD_GRAPH_NODE_PARAMS = CUDA_CHILD_GRAPH_NODE_PARAMS_st;
/// Event record node parameters
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUDA_EVENT_RECORD_NODE_PARAMS_st {
    /// The event to record when the node executes
    pub event: CUevent,
    /// Anonymous native member. See [`CUDA_EVENT_RECORD_NODE_PARAMS_st__bindgen_ty_1`] for its fields.
    pub __bindgen_anon_1: CUDA_EVENT_RECORD_NODE_PARAMS_st__bindgen_ty_1,
}
/// preferred context to use for the event record
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUDA_EVENT_RECORD_NODE_PARAMS_st__bindgen_ty_1 {
    /// Preferred CUDA context for the event record.
    pub ctx: CUcontext,
    /// Preferred green context for the event record.
    pub gCtx: CUgreenCtx,
}
impl Default for CUDA_EVENT_RECORD_NODE_PARAMS_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUDA_EVENT_RECORD_NODE_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Event record node parameters.
pub type CUDA_EVENT_RECORD_NODE_PARAMS = CUDA_EVENT_RECORD_NODE_PARAMS_st;
/// Event wait node parameters
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUDA_EVENT_WAIT_NODE_PARAMS_st {
    /// The event to wait on from the node
    pub event: CUevent,
}
impl Default for CUDA_EVENT_WAIT_NODE_PARAMS_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Event wait node parameters.
pub type CUDA_EVENT_WAIT_NODE_PARAMS = CUDA_EVENT_WAIT_NODE_PARAMS_st;
/// Graph node parameters.  See ::cuGraphAddNode.
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUgraphNodeParams_st {
    /// Type of the node
    pub type_: CUgraphNodeType,
    /// Reserved. Must be zero.
    pub reserved0: [::core::ffi::c_int; 3usize],
    /// Anonymous native member. See [`CUgraphNodeParams_st__bindgen_ty_1`] for its fields.
    pub __bindgen_anon_1: CUgraphNodeParams_st__bindgen_ty_1,
    /// Reserved bytes. Must be zero.
    pub reserved2: ::core::ffi::c_longlong,
}
/// Anonymous native union in [`CUgraphNodeParams_st`]. Its members share the same storage.
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUgraphNodeParams_st__bindgen_ty_1 {
    /// Padding. Unused bytes must be zero.
    pub reserved1: [::core::ffi::c_longlong; 29usize],
    /// Kernel node parameters.
    pub kernel: CUDA_KERNEL_NODE_PARAMS_v3,
    /// Memcpy node parameters.
    pub memcpy: CUDA_MEMCPY_NODE_PARAMS,
    /// Memset node parameters.
    pub memset: CUDA_MEMSET_NODE_PARAMS_v2,
    /// Host node parameters.
    pub host: CUDA_HOST_NODE_PARAMS_v2,
    /// Child graph node parameters.
    pub graph: CUDA_CHILD_GRAPH_NODE_PARAMS,
    /// Event wait node parameters.
    pub eventWait: CUDA_EVENT_WAIT_NODE_PARAMS,
    /// Event record node parameters.
    pub eventRecord: CUDA_EVENT_RECORD_NODE_PARAMS,
    /// External semaphore signal node parameters.
    pub extSemSignal: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2,
    /// External semaphore wait node parameters.
    pub extSemWait: CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2,
    /// Memory allocation node parameters.
    pub alloc: CUDA_MEM_ALLOC_NODE_PARAMS_v2,
    /// Memory free node parameters.
    pub free: CUDA_MEM_FREE_NODE_PARAMS,
    /// MemOp node parameters.
    pub memOp: CUDA_BATCH_MEM_OP_NODE_PARAMS_v2,
    /// Conditional node parameters.
    pub conditional: CUDA_CONDITIONAL_NODE_PARAMS,
    /// Padding as bytes
    pub asBytes: [::core::ffi::c_char; 232usize],
}
impl Default for CUgraphNodeParams_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUgraphNodeParams_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Graph node parameters.
///
/// See cuGraphAddNode.
pub type CUgraphNodeParams = CUgraphNodeParams_st;
impl CUflushGPUDirectRDMAWritesOptions_enum {
    /// [`cuFlushGPUDirectRDMAWrites`] and its CUDA Runtime API counterpart are supported on the device.
    pub const CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST: CUflushGPUDirectRDMAWritesOptions_enum = CUflushGPUDirectRDMAWritesOptions_enum(
        1,
    );
    /// The [`CUstreamWaitValue_flags_enum::CU_STREAM_WAIT_VALUE_FLUSH`] flag and the [`CUstreamBatchMemOpType_enum::CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES`] MemOp are supported on the device.
    pub const CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS: CUflushGPUDirectRDMAWritesOptions_enum = CUflushGPUDirectRDMAWritesOptions_enum(
        2,
    );
}
/// Bitmasks for ::CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUflushGPUDirectRDMAWritesOptions_enum(pub ::core::ffi::c_uint);
pub use self::CUflushGPUDirectRDMAWritesOptions_enum as CUflushGPUDirectRDMAWritesOptions;
impl CUGPUDirectRDMAWritesOrdering_enum {
    /// The device does not natively support ordering of remote writes.
    ///
    /// [`cuFlushGPUDirectRDMAWrites`] can be leveraged if supported.
    pub const CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE: CUGPUDirectRDMAWritesOrdering_enum = CUGPUDirectRDMAWritesOrdering_enum(
        0,
    );
    /// Natively, the device can consistently consume remote writes, although other CUDA devices may not.
    pub const CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER: CUGPUDirectRDMAWritesOrdering_enum = CUGPUDirectRDMAWritesOrdering_enum(
        100,
    );
    /// Any CUDA device in the system can consistently consume remote writes to this device.
    pub const CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES: CUGPUDirectRDMAWritesOrdering_enum = CUGPUDirectRDMAWritesOrdering_enum(
        200,
    );
}
/// Platform native ordering for GPUDirect RDMA writes
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUGPUDirectRDMAWritesOrdering_enum(pub ::core::ffi::c_uint);
pub use self::CUGPUDirectRDMAWritesOrdering_enum as CUGPUDirectRDMAWritesOrdering;
impl CUflushGPUDirectRDMAWritesScope_enum {
    /// Blocks until remote writes are visible to the CUDA device context owning the data.
    pub const CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER: CUflushGPUDirectRDMAWritesScope_enum = CUflushGPUDirectRDMAWritesScope_enum(
        100,
    );
    /// Blocks until remote writes are visible to all CUDA device contexts.
    pub const CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES: CUflushGPUDirectRDMAWritesScope_enum = CUflushGPUDirectRDMAWritesScope_enum(
        200,
    );
}
/// The scopes for ::cuFlushGPUDirectRDMAWrites
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUflushGPUDirectRDMAWritesScope_enum(pub ::core::ffi::c_uint);
pub use self::CUflushGPUDirectRDMAWritesScope_enum as CUflushGPUDirectRDMAWritesScope;
impl CUflushGPUDirectRDMAWritesTarget_enum {
    /// Sets the target for [`cuFlushGPUDirectRDMAWrites`] to the currently active CUDA device context.
    pub const CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX: CUflushGPUDirectRDMAWritesTarget_enum = CUflushGPUDirectRDMAWritesTarget_enum(
        0,
    );
}
/// The targets for ::cuFlushGPUDirectRDMAWrites
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUflushGPUDirectRDMAWritesTarget_enum(pub ::core::ffi::c_uint);
pub use self::CUflushGPUDirectRDMAWritesTarget_enum as CUflushGPUDirectRDMAWritesTarget;
impl CUgraphDebugDot_flags_enum {
    /// Output all debug data as if every debug flag is enabled.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        1,
    );
    /// Use CUDA Runtime structures for output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        2,
    );
    /// Adds CUDA_KERNEL_NODE_PARAMS values to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        4,
    );
    /// Adds CUDA_MEMCPY3D values to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        8,
    );
    /// Adds CUDA_MEMSET_NODE_PARAMS values to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        16,
    );
    /// Adds CUDA_HOST_NODE_PARAMS values to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        32,
    );
    /// Adds CUevent handle from record and wait nodes to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        64,
    );
    /// Adds CUDA_EXT_SEM_SIGNAL_NODE_PARAMS values to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        128,
    );
    /// Adds CUDA_EXT_SEM_WAIT_NODE_PARAMS values to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        256,
    );
    /// Adds CUkernelNodeAttrValue values to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        512,
    );
    /// Adds node handles and every kernel function handle to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        1024,
    );
    /// Adds memory alloc node parameters to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        2048,
    );
    /// Adds memory free node parameters to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        4096,
    );
    /// Adds batch mem op node parameters to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        8192,
    );
    /// Adds edge numbering information.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        16384,
    );
    /// Adds conditional node parameters to output.
    pub const CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS: CUgraphDebugDot_flags_enum = CUgraphDebugDot_flags_enum(
        32768,
    );
}
/// The additional write options for ::cuGraphDebugDotPrint
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphDebugDot_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUgraphDebugDot_flags_enum as CUgraphDebugDot_flags;
impl CUuserObject_flags_enum {
    /// Indicates the destructor execution is not synchronized by any CUDA handle.
    pub const CU_USER_OBJECT_NO_DESTRUCTOR_SYNC: CUuserObject_flags_enum = CUuserObject_flags_enum(
        1,
    );
}
/// Flags for user objects for graphs
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUuserObject_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUuserObject_flags_enum as CUuserObject_flags;
impl CUuserObjectRetain_flags_enum {
    /// Transfer references from the caller rather than creating new references.
    pub const CU_GRAPH_USER_OBJECT_MOVE: CUuserObjectRetain_flags_enum = CUuserObjectRetain_flags_enum(
        1,
    );
}
/// Flags for retaining user object references for graphs
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUuserObjectRetain_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUuserObjectRetain_flags_enum as CUuserObjectRetain_flags;
impl CUgraphInstantiate_flags_enum {
    /// Automatically free memory allocated in a graph before relaunching.
    pub const CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH: CUgraphInstantiate_flags_enum = CUgraphInstantiate_flags_enum(
        1,
    );
    /// Automatically upload the graph after instantiation.
    ///
    /// Only supported by [`cuGraphInstantiateWithParams`]. The upload will be performed using the stream provided in `instantiateParams`.
    pub const CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD: CUgraphInstantiate_flags_enum = CUgraphInstantiate_flags_enum(
        2,
    );
    /// Instantiate the graph to be launchable from the device.
    ///
    /// This flag can only be used on platforms which support unified addressing. This flag cannot be used in conjunction with [`CUgraphInstantiate_flags::CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`].
    pub const CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH: CUgraphInstantiate_flags_enum = CUgraphInstantiate_flags_enum(
        4,
    );
    /// Run the graph using the per-node priority attributes rather than the priority of the stream it is launched into.
    pub const CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY: CUgraphInstantiate_flags_enum = CUgraphInstantiate_flags_enum(
        8,
    );
}
/// Flags for instantiating a graph
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphInstantiate_flags_enum(pub ::core::ffi::c_uint);
pub use self::CUgraphInstantiate_flags_enum as CUgraphInstantiate_flags;
impl CUdeviceNumaConfig_enum {
    /// The GPU is not a NUMA node.
    pub const CU_DEVICE_NUMA_CONFIG_NONE: CUdeviceNumaConfig_enum = CUdeviceNumaConfig_enum(
        0,
    );
    /// The GPU is a NUMA node, [`CUdevice_attribute::CU_DEVICE_ATTRIBUTE_NUMA_ID`] contains its NUMA ID.
    pub const CU_DEVICE_NUMA_CONFIG_NUMA_NODE: CUdeviceNumaConfig_enum = CUdeviceNumaConfig_enum(
        1,
    );
}
/// CUDA device NUMA configuration
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdeviceNumaConfig_enum(pub ::core::ffi::c_uint);
pub use self::CUdeviceNumaConfig_enum as CUdeviceNumaConfig;
impl CUprocessState_enum {
    /// Default process state.
    pub const CU_PROCESS_STATE_RUNNING: CUprocessState_enum = CUprocessState_enum(0);
    /// CUDA API locks are taken so further CUDA API calls will block.
    pub const CU_PROCESS_STATE_LOCKED: CUprocessState_enum = CUprocessState_enum(1);
    /// Application memory contents have been checkpointed and underlying allocations and device handles have been released.
    pub const CU_PROCESS_STATE_CHECKPOINTED: CUprocessState_enum = CUprocessState_enum(
        2,
    );
    /// Application entered an uncorrectable error during the checkpoint/restore process.
    pub const CU_PROCESS_STATE_FAILED: CUprocessState_enum = CUprocessState_enum(3);
    /// Application memory contents are being checkpointed.
    pub const CU_PROCESS_STATE_CHECKPOINTING: CUprocessState_enum = CUprocessState_enum(
        4,
    );
    /// Application memory contents are being restored.
    pub const CU_PROCESS_STATE_RESTORING: CUprocessState_enum = CUprocessState_enum(5);
}
/// CUDA Process States
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUprocessState_enum(pub ::core::ffi::c_uint);
pub use self::CUprocessState_enum as CUprocessState;
/// Per-GPU data for zero-copy mapped device memory used with CUDA checkpoint/restore on custom storage
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcheckpointCustomStoragePerDeviceData_st {
    /// Zero-copy mapped device memory pointer for the user to copy to/from
    pub devPtr: CUdeviceptr,
    /// Size of mapped memory
    pub size: size_t,
    /// Stream the user may use for the copy; the CUDA driver synchronizes on this stream before completing checkpoint or restore
    pub stream: CUstream,
}
impl Default for CUcheckpointCustomStoragePerDeviceData_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Per-GPU data for zero-copy mapped device memory used with CUDA checkpoint/restore on custom storage.
pub type CUcheckpointCustomStoragePerDeviceData = CUcheckpointCustomStoragePerDeviceData_st;
/// Incomplete native type used by [`CUcheckpointOperationHandle`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUIcheckpointOperation_st {
    _unused: [u8; 0],
}
/// Handle for a CUDA custom storage checkpoint or restore operation awaiting completion.
pub type CUcheckpointOperationHandle = *mut CUIcheckpointOperation_st;
/// Output from CUDA custom storage checkpoint/restore: per-GPU device pointers and a handle to complete the operation
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcheckpointCustomStorageInfo_st {
    /// Handle returned that is needed to complete checkpoint or restore
    pub handle: CUcheckpointOperationHandle,
    /// Returned pointer to array of per-device data, one per device. User should set to NULL
    pub perDeviceData: *mut CUcheckpointCustomStoragePerDeviceData,
    /// Number of devices (and elements in `perDeviceData` array)
    pub deviceCount: ::core::ffi::c_uint,
}
impl Default for CUcheckpointCustomStorageInfo_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Output from CUDA custom storage checkpoint/restore: per-GPU device pointers and a handle to complete the operation.
pub type CUcheckpointCustomStorageInfo = CUcheckpointCustomStorageInfo_st;
/// CUDA checkpoint optional lock arguments
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcheckpointLockArgs_st {
    /// Timeout in milliseconds to attempt to lock the process, 0 indicates no timeout
    pub timeoutMs: ::core::ffi::c_uint,
    /// Reserved for future use, must be zero
    pub reserved0: ::core::ffi::c_uint,
    /// Reserved for future use, must be zeroed
    pub reserved1: [cuuint64_t; 7usize],
}
/// CUDA checkpoint optional lock arguments.
pub type CUcheckpointLockArgs = CUcheckpointLockArgs_st;
/// CUDA checkpoint optional checkpoint arguments
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcheckpointCheckpointArgs_st {
    /// Optional custom storage; if NULL, GPU memory is checkpointed to host
    pub customStorageInfo_out: *mut *mut CUcheckpointCustomStorageInfo,
    /// Reserved for future use, must be zeroed
    pub reserved: [::core::ffi::c_char; 56usize],
}
impl Default for CUcheckpointCheckpointArgs_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// CUDA checkpoint optional checkpoint arguments.
pub type CUcheckpointCheckpointArgs = CUcheckpointCheckpointArgs_st;
/// CUDA checkpoint GPU UUID pairs for device remapping during restore
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcheckpointGpuPair_st {
    /// UUID of the GPU that was checkpointed
    pub oldUuid: CUuuid,
    /// UUID of the GPU to restore onto
    pub newUuid: CUuuid,
}
/// CUDA checkpoint GPU UUID pairs for device remapping during restore.
pub type CUcheckpointGpuPair = CUcheckpointGpuPair_st;
/// CUDA checkpoint optional restore arguments
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcheckpointRestoreArgs_st {
    /// Pointer to array of gpu pairs that indicate how to remap GPUs during restore
    pub gpuPairs: *mut CUcheckpointGpuPair,
    /// Number of gpu pairs to remap
    pub gpuPairsCount: ::core::ffi::c_uint,
    /// Padding to align the following fields
    pub padding0: ::core::ffi::c_uint,
    /// Optional custom storage; if NULL, GPU memory is restored from host
    pub customStorageInfo_out: *mut *mut CUcheckpointCustomStorageInfo,
    /// Reserved for future use, must be zeroed; includes alignment before `customStorageInfo`
    pub reserved: [::core::ffi::c_char; 40usize],
}
impl Default for CUcheckpointRestoreArgs_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// CUDA checkpoint optional restore arguments.
pub type CUcheckpointRestoreArgs = CUcheckpointRestoreArgs_st;
/// CUDA checkpoint optional unlock arguments
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcheckpointUnlockArgs_st {
    /// Reserved for future use, must be zeroed
    pub reserved: [cuuint64_t; 8usize],
}
/// CUDA checkpoint optional unlock arguments.
pub type CUcheckpointUnlockArgs = CUcheckpointUnlockArgs_st;
singe_loader::functions! { crate::DRIVER;
    /// Gets the string description of an error code.
    ///
    /// Sets `*pStr` to the address of a NULL-terminated string description of the error code `error`. If the error code is not recognized, [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] will be returned and `*pStr` will be set to the NULL address.
    ///
    /// # Parameters
    ///
    /// - `error`: Error code to convert to string.
    /// - `pStr`: Address of the string pointer.
    pub fn cuGetErrorString(
        error: CUresult,
        pStr: *mut *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the string representation of an error code enum name.
    ///
    /// Sets `*pStr` to the address of a NULL-terminated string representation of the name of the enum error code `error`. If the error code is not recognized, [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] will be returned and `*pStr` will be set to the NULL address.
    ///
    /// # Parameters
    ///
    /// - `error`: Error code to convert to string.
    /// - `pStr`: Address of the string pointer.
    pub fn cuGetErrorName(
        error: CUresult,
        pStr: *mut *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Initialize the CUDA driver API Initializes the driver API and must be called before any other function from the driver API in the current process.
    ///
    /// Currently, the `Flags` parameter must be 0. If [`cuInit`] has not been called, any function from the driver API will return [`cudaError_enum::CUDA_ERROR_NOT_INITIALIZED`].
    ///
    /// Note: cuInit preloads various libraries needed for JIT compilation. To opt-out of this behavior, set the environment variable CUDA_FORCE_PRELOAD_LIBRARIES=0. CUDA will lazily load JIT libraries as needed. To disable JIT entirely, set the environment variable CUDA_DISABLE_JIT=1.
    ///
    /// # Parameters
    ///
    /// - `Flags`: - Initialization flag for CUDA.
    pub fn cuInit(Flags: ::core::ffi::c_uint) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the latest CUDA version supported by driver.
    ///
    /// Returns in `*driverVersion` the version of CUDA supported by the driver. The version is returned as (1000 \* major + 10 \* minor). For example, CUDA 9.2 would be represented by 9020.
    ///
    /// This function automatically returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] if `driverVersion` is NULL.
    ///
    /// # Parameters
    ///
    /// - `driverVersion`: - Returns the CUDA driver version
    pub fn cuDriverGetVersion(driverVersion: *mut ::core::ffi::c_int) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a handle to a compute device.
    ///
    /// Returns in `*device` a device handle given an ordinal in the range **[0, [cuDeviceGetCount()](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__DEVICE.html#group__cuda__device_1ga52b5ce05cb8c5fb6831b2c0ff2887c74)-1]**.
    ///
    /// # Parameters
    ///
    /// - `device`: Returned device handle.
    /// - `ordinal`: Device number to get handle for.
    pub fn cuDeviceGet(device: *mut CUdevice, ordinal: ::core::ffi::c_int) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the number of compute-capable devices.
    ///
    /// Returns in `*count` the number of devices with compute capability greater than or equal to 2.0 that are available for execution. If there is no such device, [`cuDeviceGetCount`] returns 0.
    ///
    /// # Parameters
    ///
    /// - `count`: - Returned number of compute-capable devices
    pub fn cuDeviceGetCount(count: *mut ::core::ffi::c_int) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns an identifier string for the device.
    ///
    /// Returns an ASCII string identifying the device `dev` in the NULL-terminated string pointed to by `name`. `len` specifies the maximum length of the string that may be returned. `name` is shortened to the specified `len`, if `len` is less than the device name.
    ///
    /// # Parameters
    ///
    /// - `name`: Returned identifier string for the device.
    /// - `len`: Maximum length of string to store in `name`.
    /// - `dev`: Device to get identifier string for.
    pub fn cuDeviceGetName(
        name: *mut ::core::ffi::c_char,
        len: ::core::ffi::c_int,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Return an UUID for the device
    ///
    /// Returns 16-octets identifying the device `dev` in the structure pointed by the `uuid`. If the device is in MIG mode, returns its MIG UUID which uniquely identifies the subscribed MIG compute instance.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_DEVICE
    ///
    ///
    ///
    /// See also: ::cuDeviceGetAttribute, ::cuDeviceGetCount, ::cuDeviceGetName, ::cuDeviceGetLuid, ::cuDeviceGet, ::cuDeviceTotalMem, ::cudaGetDeviceProperties
    ///
    /// # Parameters
    ///
    /// - `uuid`: - Returned UUID
    /// - `dev`: - Device to get identifier string for
    pub fn cuDeviceGetUuid_v2(uuid: *mut CUuuid, dev: CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Return an LUID and device node mask for the device.
    ///
    /// Return identifying information (`luid` and `deviceNodeMask`) to allow matching device with graphics APIs.
    ///
    /// # Parameters
    ///
    /// - `luid`: Returned LUID.
    /// - `deviceNodeMask`: Returned device node mask.
    /// - `dev`: Device to get identifier string for.
    pub fn cuDeviceGetLuid(
        luid: *mut ::core::ffi::c_char,
        deviceNodeMask: *mut ::core::ffi::c_uint,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the total amount of memory on the device
    ///
    /// Returns in `*bytes` the total amount of memory available on the device `dev` in bytes.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_DEVICE
    ///
    ///
    ///
    /// See also: ::cuDeviceGetAttribute, ::cuDeviceGetCount, ::cuDeviceGetName, ::cuDeviceGetUuid, ::cuDeviceGet, ::cuDeviceGetExecAffinitySupport, ::cudaMemGetInfo
    ///
    /// # Parameters
    ///
    /// - `bytes`: - Returned memory available on device in bytes
    /// - `dev`: - Device handle
    pub fn cuDeviceTotalMem_v2(bytes: *mut size_t, dev: CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the maximum number of elements allocatable in a 1D linear texture for a given texture element size.
    ///
    /// Returns in `maxWidthInElements` the maximum number of texture elements allocatable in a 1D linear texture for given `format` and `numChannels`.
    ///
    /// # Parameters
    ///
    /// - `maxWidthInElements`: Returned maximum number of texture elements allocatable for given `format` and `numChannels`.
    /// - `format`: Texture format.
    /// - `numChannels`: Number of channels per texture element.
    /// - `dev`: Device handle.
    pub fn cuDeviceGetTexture1DLinearMaxWidth(
        maxWidthInElements: *mut size_t,
        format: CUarray_format,
        numChannels: ::core::ffi::c_uint,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns information about the device.
    ///
    /// Returns in `*pi` the integer value of the attribute `attrib` on device `dev`.
    ///
    /// # Parameters
    ///
    /// - `pi`: Returned device attribute value.
    /// - `attrib`: Device attribute to query.
    /// - `dev`: Device handle.
    pub fn cuDeviceGetAttribute(
        pi: *mut ::core::ffi::c_int,
        attrib: CUdevice_attribute,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Queries details about atomic operations supported between the device and host.
    ///
    /// Returns in `*capabilities` the details about requested atomic `*operations` over the link between `dev` and the host. The allocated size of `*operations` and `*capabilities` must be `count`.
    ///
    /// For each [CUatomicOperation](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gafd7012de0abfe50cee089f3f00d6dcf3) in `*operations`, the corresponding result in `*capabilities` will be a bitmask indicating which of [CUatomicOperationCapability](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gaf8fbc0f84fd6461c5611b3935b26e22c) the link supports natively.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_INVALID_DEVICE`] if `dev` is not valid.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] if `*capabilities` or `*operations` is NULL, if `count` is 0, or if any of `*operations` is not valid.
    ///
    /// # Parameters
    ///
    /// - `capabilities`: Returned capability details of each requested operation.
    /// - `operations`: Requested operations.
    /// - `count`: Count of requested operations and size of capabilities.
    /// - `dev`: Device handle.
    pub fn cuDeviceGetHostAtomicCapabilities(
        capabilities: *mut ::core::ffi::c_uint,
        operations: *const CUatomicOperation,
        count: ::core::ffi::c_uint,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Return NvSciSync attributes that this device can support.
    ///
    /// Returns in `nvSciSyncAttrList`, the properties of NvSciSync that this CUDA device, `dev` can support. The returned `nvSciSyncAttrList` can be used to create an NvSciSync object that matches this device’s capabilities.
    ///
    /// If NvSciSyncAttrKey_RequiredPerm field in `nvSciSyncAttrList` is already set this API will return [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`].
    ///
    /// The applications should set `nvSciSyncAttrList` to a valid NvSciSyncAttrList failing which this API will return [`cudaError_enum::CUDA_ERROR_INVALID_HANDLE`].
    ///
    /// The `flags` controls how applications intends to use the NvSciSync created from the `nvSciSyncAttrList`. The valid flags are:
    ///
    /// At least one of these flags must be set, failing which the API returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`]. Both the flags are orthogonal to one another: a developer may set both these flags that allows to set both wait and signal specific attributes in the same `nvSciSyncAttrList`.
    ///
    /// Note that this API updates the input `nvSciSyncAttrList` with values equivalent to the following public attribute key-values: NvSciSyncAttrKey_RequiredPerm is set to
    ///
    /// [`cudaError_enum::CUDA_SUCCESS`], [`cudaError_enum::CUDA_ERROR_DEINITIALIZED`], [`cudaError_enum::CUDA_ERROR_NOT_INITIALIZED`], [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`], [`cudaError_enum::CUDA_ERROR_INVALID_HANDLE`], [`cudaError_enum::CUDA_ERROR_INVALID_DEVICE`], [`cudaError_enum::CUDA_ERROR_NOT_SUPPORTED`], [`cudaError_enum::CUDA_ERROR_OUT_OF_MEMORY`].
    ///
    /// # Parameters
    ///
    /// - `nvSciSyncAttrList`: Return NvSciSync attributes supported.
    /// - `dev`: Valid CUDA Device to get NvSciSync attributes for.
    /// - `flags`: flags describing NvSciSync usage.
    pub fn cuDeviceGetNvSciSyncAttributes(
        nvSciSyncAttrList: *mut ::core::ffi::c_void,
        dev: CUdevice,
        flags: ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the current memory pool of a device.
    ///
    /// The memory pool must be local to the specified device. [`cuMemAllocAsync`] allocates from the current mempool of the provided stream’s device. By default, a device’s current memory pool is its default memory pool.
    pub fn cuDeviceSetMemPool(dev: CUdevice, pool: CUmemoryPool) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the current mempool for a device.
    ///
    /// Returns the last pool provided to [`cuDeviceSetMemPool`] for this device or the device’s default memory pool if [`cuDeviceSetMemPool`] has never been called. By default the current mempool is the default mempool for a device. Otherwise the returned pool must have been set with [`cuDeviceSetMemPool`].
    pub fn cuDeviceGetMemPool(pool: *mut CUmemoryPool, dev: CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the default mempool of a device.
    ///
    /// The default mempool of a device contains device memory from that device.
    pub fn cuDeviceGetDefaultMemPool(
        pool_out: *mut CUmemoryPool,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns information about the execution affinity support of the device.
    ///
    /// Returns in `*pi` whether execution affinity type `type` is supported by device `dev`. The supported types are.
    ///
    /// # Parameters
    ///
    /// - `pi`: 1 if the execution affinity type `type` is supported by the device, or 0 if not.
    /// - `type_`: Execution affinity type to query.
    /// - `dev`: Device handle.
    pub fn cuDeviceGetExecAffinitySupport(
        pi: *mut ::core::ffi::c_int,
        type_: CUexecAffinityType,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Blocks until remote writes are visible to the specified scope.
    ///
    /// Blocks until GPUDirect RDMA writes to the target context via mappings created through APIs like nvidia_p2p_get_pages (see <https://docs.nvidia.com/cuda/gpudirect-rdma> for more information), are visible to the specified scope.
    ///
    /// If the scope equals or lies within the scope indicated by [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING`], the call will be a no-op and can be safely omitted for performance. This can be determined by comparing the numerical values between the two enums, with smaller scopes having smaller values.
    ///
    /// On platforms that support GPUDirect RDMA writes via more than one path in hardware (see [`CUmemRangeFlags_enum::CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE`]), the user should consider those paths as belonging to separate ordering domains. Note that in such cases CUDA driver will report both RDMA writes ordering and RDMA write scope as ALL_DEVICES and a call to cuFlushGPUDirectRDMA will be a no-op, but when these multiple paths are used simultaneously, it is the user’s responsibility to ensure ordering by using mechanisms outside the scope of CUDA.
    ///
    /// Users may query support for this API via ::CU_DEVICE_ATTRIBUTE_FLUSH_FLUSH_GPU_DIRECT_RDMA_OPTIONS.
    ///
    /// # Parameters
    ///
    /// - `target`: The target of the operation, see [CUflushGPUDirectRDMAWritesTarget](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga01251451232c43bc5c7cb067ed2c28ef).
    /// - `scope`: The scope of the operation, see [CUflushGPUDirectRDMAWritesScope](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga9eafc4def87e0f6600f905e756ec99d1).
    pub fn cuFlushGPUDirectRDMAWrites(
        target: CUflushGPUDirectRDMAWritesTarget,
        scope: CUflushGPUDirectRDMAWritesScope,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns properties for a selected device.
    ///
    /// Returns in `*prop` the properties of device `dev`. The CUdevprop structure is defined as.
    ///
    /// # Parameters
    ///
    /// - `prop`: Returned properties of device.
    /// - `dev`: Device to get properties for.
    #[deprecated]
    pub fn cuDeviceGetProperties(prop: *mut CUdevprop, dev: CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the compute capability of the device.
    ///
    /// Returns in `*major` and `*minor` the major and minor revision numbers that define the compute capability of the device `dev`.
    ///
    /// # Parameters
    ///
    /// - `major`: Major revision number.
    /// - `minor`: Minor revision number.
    /// - `dev`: Device handle.
    #[deprecated]
    pub fn cuDeviceComputeCapability(
        major: *mut ::core::ffi::c_int,
        minor: *mut ::core::ffi::c_int,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Retain the primary context on the GPU.
    ///
    /// Retains the primary context on the device. Once the user successfully retains the primary context, the primary context will be active and available to the user until the user releases it with cuDevicePrimaryCtxRelease() or resets it with cuDevicePrimaryCtxReset(). Unlike cuCtxCreate() the newly retained context is not pushed onto the stack.
    ///
    /// Retaining the primary context for the first time will fail with [`cudaError_enum::CUDA_ERROR_UNKNOWN`] if the compute mode of the device is [`CUcomputemode_enum::CU_COMPUTEMODE_PROHIBITED`]. The function [`cuDeviceGetAttribute`] can be used with [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_COMPUTE_MODE`] to determine the compute mode of the device. The *nvidia-smi* tool can be used to set the compute mode for devices. Documentation for *nvidia-smi* can be obtained by passing a -h option to it.
    ///
    /// Please note that the primary context always supports pinned allocations. Other flags can be specified by cuDevicePrimaryCtxSetFlags().
    ///
    /// # Parameters
    ///
    /// - `pctx`: Returned context handle of the new context.
    /// - `dev`: Device for which primary context is requested.
    pub fn cuDevicePrimaryCtxRetain(pctx: *mut CUcontext, dev: CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Release the primary context on the GPU
    ///
    /// Releases the primary context interop on the device. A retained context should always be released once the user is done using it. The context is automatically reset once the last reference to it is released. This behavior is different when the primary context was retained by the CUDA runtime from CUDA 4.0 and earlier. In this case, the primary context remains always active.
    ///
    /// Releasing a primary context that has not been previously retained will fail with ::CUDA_ERROR_INVALID_CONTEXT.
    ///
    /// Please note that unlike ::cuCtxDestroy() this method does not pop the context from stack in any circumstances.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_DEVICE, ::CUDA_ERROR_INVALID_CONTEXT
    ///
    ///
    ///
    /// See also: ::cuDevicePrimaryCtxRetain, ::cuCtxDestroy, ::cuCtxGetApiVersion, ::cuCtxGetCacheConfig, ::cuCtxGetDevice, ::cuCtxGetFlags, ::cuCtxGetLimit, ::cuCtxPopCurrent, ::cuCtxPushCurrent, ::cuCtxSetCacheConfig, ::cuCtxSetLimit, ::cuCtxSynchronize
    ///
    /// # Parameters
    ///
    /// - `dev`: - Device which primary context is released
    pub fn cuDevicePrimaryCtxRelease_v2(dev: CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Set flags for the primary context
    ///
    /// Sets the flags for the primary context on the device overwriting perviously set ones.
    ///
    /// The three LSBs of the `flags` parameter can be used to control how the OS thread, which owns the CUDA context at the time of an API call, interacts with the OS scheduler when waiting for results from the GPU. Only one of the scheduling flags can be set when creating a context.
    ///
    /// - ::CU_CTX_SCHED_SPIN: Instruct CUDA to actively spin when waiting for results from the GPU. This can decrease latency when waiting for the GPU, but may lower the performance of CPU threads if they are performing work in parallel with the CUDA thread.
    ///
    /// - ::CU_CTX_SCHED_YIELD: Instruct CUDA to yield its thread when waiting for results from the GPU. This can increase latency when waiting for the GPU, but can increase the performance of CPU threads performing work in parallel with the GPU.
    ///
    /// - ::CU_CTX_SCHED_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the GPU to finish work.
    ///
    /// - ::CU_CTX_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the GPU to finish work. &lt;br> &lt;b>Deprecated:&lt;/b> This flag was deprecated as of CUDA 4.0 and was replaced with ::CU_CTX_SCHED_BLOCKING_SYNC.
    ///
    /// - ::CU_CTX_SCHED_AUTO: The default value if the `flags` parameter is zero, uses a heuristic based on the number of active CUDA contexts in the process *C* and the number of logical processors in the system *P.* If *C* > *P,* then CUDA will yield to other OS threads when waiting for the GPU (::CU_CTX_SCHED_YIELD), otherwise CUDA will not yield while waiting for results and actively spin on the processor (::CU_CTX_SCHED_SPIN). Additionally, on Tegra devices, ::CU_CTX_SCHED_AUTO uses a heuristic based on the power profile of the platform and may choose ::CU_CTX_SCHED_BLOCKING_SYNC for low-powered devices.
    ///
    /// - ::CU_CTX_LMEM_RESIZE_TO_MAX: Instruct CUDA to not reduce local memory after resizing local memory for a kernel. This can prevent thrashing by local memory allocations when launching many kernels with high local memory usage at the cost of potentially increased memory usage. &lt;br> &lt;b>Deprecated:&lt;/b> This flag is deprecated and the behavior enabled by this flag is now the default and cannot be disabled.
    ///
    /// - ::CU_CTX_COREDUMP_ENABLE: If GPU coredumps have not been enabled globally with ::cuCoredumpSetAttributeGlobal or environment variables, this flag can be set during context creation to instruct CUDA to create a coredump if this context raises an exception during execution. These environment variables are described in the CUDA-GDB user guide under the "GPU core dump support" section. The initial settings will be taken from the global settings at the time of context creation. The other settings that control coredump output can be modified by calling ::cuCoredumpSetAttribute from the created context after it becomes current.
    ///
    /// - ::CU_CTX_USER_COREDUMP_ENABLE: If user-triggered GPU coredumps have not been enabled globally with ::cuCoredumpSetAttributeGlobal or environment variables, this flag can be set during context creation to instruct CUDA to create a coredump if data is written to a certain pipe that is present in the OS space. These environment variables are described in the CUDA-GDB user guide under the "GPU core dump support" section. It is important to note that the pipe name `must` be set with ::cuCoredumpSetAttributeGlobal before creating the context if this flag is used. Setting this flag implies that ::CU_CTX_COREDUMP_ENABLE is set. The initial settings will be taken from the global settings at the time of context creation. The other settings that control coredump output can be modified by calling ::cuCoredumpSetAttribute from the created context after it becomes current.
    ///
    /// - ::CU_CTX_SYNC_MEMOPS: Ensures that synchronous memory operations initiated on this context will always synchronize. See further documentation in the section titled "API Synchronization behavior" to learn more about cases when synchronous memory operations can exhibit asynchronous behavior.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_DEVICE, ::CUDA_ERROR_INVALID_VALUE,
    ///
    ///
    ///
    /// See also: ::cuDevicePrimaryCtxRetain, ::cuDevicePrimaryCtxGetState, ::cuCtxCreate, ::cuCtxGetFlags, ::cuCtxSetFlags, ::cudaSetDeviceFlags
    ///
    /// # Parameters
    ///
    /// - `dev`: - Device for which the primary context flags are set
    /// - `flags`: - New flags for the device
    pub fn cuDevicePrimaryCtxSetFlags_v2(
        dev: CUdevice,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get the state of the primary context.
    ///
    /// Returns in `*flags` the flags for the primary context of `dev`, and in `*active` whether it is active. See cuDevicePrimaryCtxSetFlags for flag values.
    ///
    /// # Parameters
    ///
    /// - `dev`: Device to get primary context flags for.
    /// - `flags`: Pointer to store flags.
    /// - `active`: Pointer to store context state; 0 = inactive, 1 = active.
    pub fn cuDevicePrimaryCtxGetState(
        dev: CUdevice,
        flags: *mut ::core::ffi::c_uint,
        active: *mut ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroy all allocations and reset all state on the primary context
    ///
    /// Explicitly destroys and cleans up all resources associated with the current device in the current process.
    ///
    /// Note that it is responsibility of the calling function to ensure that no other module in the process is using the device any more. For that reason it is recommended to use ::cuDevicePrimaryCtxRelease() in most cases. However it is safe for other modules to call ::cuDevicePrimaryCtxRelease() even after resetting the device. Resetting the primary context does not release it, an application that has retained the primary context should explicitly release its usage.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_DEVICE, ::CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE
    ///
    ///
    ///
    /// See also: ::cuDevicePrimaryCtxRetain, ::cuDevicePrimaryCtxRelease, ::cuCtxGetApiVersion, ::cuCtxGetCacheConfig, ::cuCtxGetDevice, ::cuCtxGetFlags, ::cuCtxGetLimit, ::cuCtxPopCurrent, ::cuCtxPushCurrent, ::cuCtxSetCacheConfig, ::cuCtxSetLimit, ::cuCtxSynchronize, ::cudaDeviceReset
    ///
    /// # Parameters
    ///
    /// - `dev`: - Device for which primary context is destroyed
    pub fn cuDevicePrimaryCtxReset_v2(dev: CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Create a CUDA context
    ///
    /// Creates a new CUDA context and associates it with the calling thread. The `flags` parameter is described below. The context is created with a usage count of 1 and the caller of ::cuCtxCreate() must call ::cuCtxDestroy() when done using the context. If a context is already current to the thread, it is supplanted by the newly created context and may be restored by a subsequent call to ::cuCtxPopCurrent().
    ///
    /// A regular CUDA context can be created by setting `ctxCreateParams` to NULL.
    ///
    /// A CUDA context can be created with execution affinity. The type and the amount of execution resource the context can use is limited by `paramsArray` and `numExecAffinityParams` in `execAffinity`. The `paramsArray` is an array of `CUexecAffinityParam` and the `numExecAffinityParams` describes the size of the paramsArray. If two `CUexecAffinityParam` in the array have the same type, the latter execution affinity parameter overrides the former execution affinity parameter. The supported execution affinity types are:
    /// - ::CU_EXEC_AFFINITY_TYPE_SM_COUNT limits the portion of SMs that the context can use. The portion of SMs is specified as the number of SMs via `CUexecAffinitySmCount`. This limit will be internally rounded up to the next hardware-supported amount. Hence, it is imperative to query the actual execution affinity of the context via ::cuCtxGetExecAffinity after context creation. Currently, this attribute is only supported under Volta+ MPS.
    ///
    /// A CUDA context can be created in CIG(CUDA in Graphics) mode by setting `cigParams`. Data from graphics client is shared with CUDA via the `sharedData` in `cigParams`. Support for D3D12 graphics client can be determined using ::cuDeviceGetAttribute() with ::CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED. `sharedData` is a ID3D12CommandQueue handle. Support for Vulkan graphics client can be determined using ::cuDeviceGetAttribute() with ::CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED. `sharedData` is a Nvidia specific data blob populated by calling vkGetExternalComputeQueueDataNV(). `execAffinityParams` and `cigParams` are mutually exclusive and cannot both be non-NULL. Setting both to non-NULL values will result in undefined behavior. If both `execAffinityParams` and `cigParams` are NULL, the context will be created as a regular CUDA context.
    ///
    /// The three LSBs of the `flags` parameter can be used to control how the OS thread, which owns the CUDA context at the time of an API call, interacts with the OS scheduler when waiting for results from the GPU. Only one of the scheduling flags can be set when creating a context.
    ///
    /// - ::CU_CTX_SCHED_SPIN: Instruct CUDA to actively spin when waiting for results from the GPU. This can decrease latency when waiting for the GPU, but may lower the performance of CPU threads if they are performing work in parallel with the CUDA thread.
    ///
    /// - ::CU_CTX_SCHED_YIELD: Instruct CUDA to yield its thread when waiting for results from the GPU. This can increase latency when waiting for the GPU, but can increase the performance of CPU threads performing work in parallel with the GPU.
    ///
    /// - ::CU_CTX_SCHED_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the GPU to finish work.
    ///
    /// - ::CU_CTX_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the GPU to finish work. &lt;br> &lt;b>Deprecated:&lt;/b> This flag was deprecated as of CUDA 4.0 and was replaced with ::CU_CTX_SCHED_BLOCKING_SYNC.
    ///
    /// - ::CU_CTX_SCHED_AUTO: The default value if the `flags` parameter is zero, uses a heuristic based on the number of active CUDA contexts in the process *C* and the number of logical processors in the system *P.* If *C* > *P,* then CUDA will yield to other OS threads when waiting for the GPU (::CU_CTX_SCHED_YIELD), otherwise CUDA will not yield while waiting for results and actively spin on the processor (::CU_CTX_SCHED_SPIN). Additionally, on Tegra devices, ::CU_CTX_SCHED_AUTO uses a heuristic based on the power profile of the platform and may choose ::CU_CTX_SCHED_BLOCKING_SYNC for low-powered devices.
    ///
    /// - ::CU_CTX_MAP_HOST: Instruct CUDA to support mapped pinned allocations. This flag must be set in order to allocate pinned host memory that is accessible to the GPU.
    ///
    /// - ::CU_CTX_LMEM_RESIZE_TO_MAX: Instruct CUDA to not reduce local memory after resizing local memory for a kernel. This can prevent thrashing by local memory allocations when launching many kernels with high local memory usage at the cost of potentially increased memory usage. &lt;br> &lt;b>Deprecated:&lt;/b> This flag is deprecated and the behavior enabled by this flag is now the default and cannot be disabled. Instead, the per-thread stack size can be controlled with ::cuCtxSetLimit().
    ///
    /// - ::CU_CTX_COREDUMP_ENABLE: If GPU coredumps have not been enabled globally with ::cuCoredumpSetAttributeGlobal or environment variables, this flag can be set during context creation to instruct CUDA to create a coredump if this context raises an exception during execution. These environment variables are described in the CUDA-GDB user guide under the "GPU core dump support" section. The initial attributes will be taken from the global attributes at the time of context creation. The other attributes that control coredump output can be modified by calling ::cuCoredumpSetAttribute from the created context after it becomes current. This flag is not supported when CUDA context is created in CIG(CUDA in Graphics) mode.
    ///
    /// - ::CU_CTX_USER_COREDUMP_ENABLE: If user-triggered GPU coredumps have not been enabled globally with ::cuCoredumpSetAttributeGlobal or environment variables, this flag can be set during context creation to instruct CUDA to create a coredump if data is written to a certain pipe that is present in the OS space. These environment variables are described in the CUDA-GDB user guide under the "GPU core dump support" section. It is important to note that the pipe name `must` be set with ::cuCoredumpSetAttributeGlobal before creating the context if this flag is used. Setting this flag implies that ::CU_CTX_COREDUMP_ENABLE is set. The initial attributes will be taken from the global attributes at the time of context creation. The other attributes that control coredump output can be modified by calling ::cuCoredumpSetAttribute from the created context after it becomes current. Setting this flag on any context creation is equivalent to setting the ::CU_COREDUMP_ENABLE_USER_TRIGGER attribute to `true` globally. This flag is not supported when CUDA context is created in CIG(CUDA in Graphics) mode.
    ///
    /// - ::CU_CTX_SYNC_MEMOPS: Ensures that synchronous memory operations initiated on this context will always synchronize. See further documentation in the section titled "API Synchronization behavior" to learn more about cases when synchronous memory operations can exhibit asynchronous behavior.
    ///
    /// Context creation will fail with ::CUDA_ERROR_UNKNOWN if the compute mode of the device is ::CU_COMPUTEMODE_PROHIBITED. The function ::cuDeviceGetAttribute() can be used with ::CU_DEVICE_ATTRIBUTE_COMPUTE_MODE to determine the compute mode of the device. The &lt;i>nvidia-smi&lt;/i> tool can be used to set the compute mode for * devices. Documentation for &lt;i>nvidia-smi&lt;/i> can be obtained by passing a -h option to it.
    ///
    /// Context creation will fail with ::CUDA_ERROR_INVALID_VALUE if invalid parameter was passed by client to create the CUDA context.
    ///
    /// Context creation in CIG mode will fail with ::CUDA_ERROR_NOT_SUPPORTED if CIG is not supported by the device or the driver.
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_DEVICE, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_NOT_SUPPORTED, ::CUDA_ERROR_OUT_OF_MEMORY, ::CUDA_ERROR_UNKNOWN
    ///
    ///
    ///
    /// See also: ::cuCtxDestroy, ::cuCtxGetApiVersion, ::cuCtxGetCacheConfig, ::cuCtxGetDevice, ::cuCtxGetFlags, ::cuCtxGetLimit, ::cuCtxPopCurrent, ::cuCtxPushCurrent, ::cuCtxSetCacheConfig, ::cuCtxSetLimit, ::cuCoredumpSetAttributeGlobal, ::cuCoredumpSetAttribute, ::cuCtxSynchronize ::cuCtxGetExecAffinity,
    ///
    /// # Parameters
    ///
    /// - `pctx`: - Returned context handle of the new context
    /// - `ctxCreateParams`: - Context creation parameters. Can be NULL to create a regular CUDA context. See ::CUctxCreateParams for details.
    /// - `flags`: - Context creation flags
    /// - `dev`: - Device to create context on
    pub fn cuCtxCreate_v4(
        pctx: *mut CUcontext,
        ctxCreateParams: *mut CUctxCreateParams,
        flags: ::core::ffi::c_uint,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroy a CUDA context
    ///
    /// Destroys the CUDA context specified by `ctx`.  The context `ctx` will be destroyed regardless of how many threads it is current to. It is the responsibility of the calling function to ensure that no API call issues using `ctx` while ::cuCtxDestroy() is executing.
    ///
    /// Destroys and cleans up all resources associated with the context. It is the caller's responsibility to ensure that the context or its resources are not accessed or passed in subsequent API calls and doing so will result in undefined behavior. These resources include CUDA types ::CUmodule, ::CUfunction, ::CUstream, ::CUevent, ::CUarray, ::CUmipmappedArray, ::CUtexObject, ::CUsurfObject, ::CUtexref, ::CUsurfref, ::CUgraphicsResource, ::CUlinkState, ::CUexternalMemory and ::CUexternalSemaphore. These resources also include memory allocations by ::cuMemAlloc(), ::cuMemAllocHost(), ::cuMemAllocManaged() and ::cuMemAllocPitch().
    ///
    /// If `ctx` is current to the calling thread then `ctx` will also be popped from the current thread's context stack (as though ::cuCtxPopCurrent() were called).  If `ctx` is current to other threads, then `ctx` will remain current to those threads, and attempting to access `ctx` from those threads will result in the error ::CUDA_ERROR_CONTEXT_IS_DESTROYED.
    ///
    ///
    ///
    /// Note: ::cuCtxDestroy() will not destroy memory allocations by ::cuMemCreate(), ::cuMemAllocAsync() and ::cuMemAllocFromPoolAsync(). These memory allocations are not associated with any CUDA context and need to be destroyed explicitly.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    ///
    ///
    /// See also: ::cuCtxCreate, ::cuCtxGetApiVersion, ::cuCtxGetCacheConfig, ::cuCtxGetDevice, ::cuCtxGetFlags, ::cuCtxGetLimit, ::cuCtxPopCurrent, ::cuCtxPushCurrent, ::cuCtxSetCacheConfig, ::cuCtxSetLimit, ::cuCtxSynchronize
    ///
    /// # Parameters
    ///
    /// - `ctx`: - Context to destroy
    pub fn cuCtxDestroy_v2(ctx: CUcontext) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Pushes a context on the current CPU thread
    ///
    /// Pushes the given context `ctx` onto the CPU thread's stack of current contexts. The specified context becomes the CPU thread's current context, so all CUDA functions that operate on the current context are affected.
    ///
    /// The previous current context may be made current again by calling ::cuCtxDestroy() or ::cuCtxPopCurrent().
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    ///
    ///
    /// See also: ::cuCtxCreate, ::cuCtxDestroy, ::cuCtxGetApiVersion, ::cuCtxGetCacheConfig, ::cuCtxGetDevice, ::cuCtxGetFlags, ::cuCtxGetLimit, ::cuCtxPopCurrent, ::cuCtxSetCacheConfig, ::cuCtxSetLimit, ::cuCtxSynchronize
    ///
    /// # Parameters
    ///
    /// - `ctx`: - Context to push
    pub fn cuCtxPushCurrent_v2(ctx: CUcontext) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Pops the current CUDA context from the current CPU thread.
    ///
    /// Pops the current CUDA context from the CPU thread and passes back the old context handle in `*pctx`. That context may then be made current to a different CPU thread by calling ::cuCtxPushCurrent().
    ///
    /// If a context was current to the CPU thread before ::cuCtxCreate() or ::cuCtxPushCurrent() was called, this function makes that context current to the CPU thread again.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT
    ///
    ///
    ///
    /// See also: ::cuCtxCreate, ::cuCtxDestroy, ::cuCtxGetApiVersion, ::cuCtxGetCacheConfig, ::cuCtxGetDevice, ::cuCtxGetFlags, ::cuCtxGetLimit, ::cuCtxPushCurrent, ::cuCtxSetCacheConfig, ::cuCtxSetLimit, ::cuCtxSynchronize
    ///
    /// # Parameters
    ///
    /// - `pctx`: - Returned popped context handle
    pub fn cuCtxPopCurrent_v2(pctx: *mut CUcontext) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Binds the specified CUDA context to the calling CPU thread.
    ///
    /// Binds the specified CUDA context to the calling CPU thread. If `ctx` is NULL then the CUDA context previously bound to the calling CPU thread is unbound and [`cudaError_enum::CUDA_SUCCESS`] is returned.
    ///
    /// If there exists a CUDA context stack on the calling CPU thread, this will replace the top of that stack with `ctx`. If `ctx` is NULL then this will be equivalent to popping the top of the calling CPU thread’s CUDA context stack (or a no-op if the calling CPU thread’s CUDA context stack is empty).
    ///
    /// # Parameters
    ///
    /// - `ctx`: - Context to bind to the calling CPU thread
    pub fn cuCtxSetCurrent(ctx: CUcontext) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the CUDA context bound to the calling CPU thread.
    ///
    /// Returns in `*pctx` the CUDA context bound to the calling CPU thread. If no context is bound to the calling CPU thread then `*pctx` is set to NULL and [`cudaError_enum::CUDA_SUCCESS`] is returned.
    ///
    /// # Parameters
    ///
    /// - `pctx`: - Returned context handle
    pub fn cuCtxGetCurrent(pctx: *mut CUcontext) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the device handle for the current context.
    ///
    /// Returns in `*device` the handle of the current context’s device.
    ///
    /// # Parameters
    ///
    /// - `device`: - Returned device handle for the current context
    pub fn cuCtxGetDevice(device: *mut CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the device handle for the specified context.
    ///
    /// Returns in `*device` the handle of the specified context’s device. If the specified context is NULL, the API will return the current context’s device.
    ///
    /// # Parameters
    ///
    /// - `device`: Returned device handle for the specified context.
    /// - `ctx`: Context for which to obtain the device.
    pub fn cuCtxGetDevice_v2(device: *mut CUdevice, ctx: CUcontext) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the flags for the current context.
    ///
    /// Returns in `*flags` the flags of the current context. See cuCtxCreate for flag values.
    ///
    /// # Parameters
    ///
    /// - `flags`: - Pointer to store flags of current context
    pub fn cuCtxGetFlags(flags: *mut ::core::ffi::c_uint) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the flags for the current context.
    ///
    /// Sets the flags for the current context overwriting previously set ones. See cuDevicePrimaryCtxSetFlags for flag values.
    ///
    /// # Parameters
    ///
    /// - `flags`: - Flags to set on the current context
    pub fn cuCtxSetFlags(flags: ::core::ffi::c_uint) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the unique Id associated with the context supplied.
    ///
    /// Returns in `ctxId` the unique Id which is associated with a given context. The Id is unique for the life of the program for this instance of CUDA. If context is supplied as NULL and there is one current, the Id of the current context is returned.
    ///
    /// # Parameters
    ///
    /// - `ctx`: Context for which to obtain the Id.
    /// - `ctxId`: Pointer to store the Id of the context.
    pub fn cuCtxGetId(ctx: CUcontext, ctxId: *mut ::core::ffi::c_ulonglong) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Block for the current context’s tasks to complete.
    ///
    /// Blocks until the current context has completed all preceding requested tasks. If the current context is the primary context, green contexts that have been created will also be synchronized. [`cuCtxSynchronize`] returns an error if one of the preceding tasks failed. If the context was created with the [`CUctx_flags_enum::CU_CTX_SCHED_BLOCKING_SYNC`] flag, the CPU thread will block until the GPU context has finished its work.
    pub fn cuCtxSynchronize() -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Block for the specified context’s tasks to complete.
    ///
    /// Blocks until the specified context has completed all preceding requested tasks. If the specified context is the primary context, green contexts that have been created will also be synchronized. The API returns an error if one of the preceding tasks failed.
    ///
    /// If the context was created with the [`CUctx_flags_enum::CU_CTX_SCHED_BLOCKING_SYNC`] flag, the CPU thread will block until the GPU context has finished its work.
    ///
    /// If the specified context is NULL, the API will operate on the current context.
    ///
    /// # Parameters
    ///
    /// - `ctx`: - Context to synchronize
    pub fn cuCtxSynchronize_v2(ctx: CUcontext) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Set resource limits.
    ///
    /// Setting `limit` to `value` is a request by the application to update the current limit maintained by the context. The driver is free to modify the requested value to meet h/w requirements (this could be clamping to minimum or maximum values, rounding up to nearest element size, etc). The application can use [`cuCtxGetLimit`] to find out exactly what the limit has been set to.
    ///
    /// Setting each [CUlimit](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gae24c2d4214af24139020f1aecaf32665) has its own specific restrictions, so each is discussed here.
    ///
    /// # Parameters
    ///
    /// - `limit`: Limit to set.
    /// - `value`: Size of limit.
    pub fn cuCtxSetLimit(limit: CUlimit, value: size_t) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns resource limits.
    ///
    /// Returns in `*pvalue` the current size of `limit`. The supported [CUlimit](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gae24c2d4214af24139020f1aecaf32665) values are.
    ///
    /// # Parameters
    ///
    /// - `pvalue`: Returned size of limit.
    /// - `limit`: Limit to query.
    pub fn cuCtxGetLimit(pvalue: *mut size_t, limit: CUlimit) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the preferred cache configuration for the current context.
    ///
    /// On devices where the L1 cache and shared memory use the same hardware resources, this function returns through `pconfig` the preferred cache configuration for the current context. This is only a preference. The driver will use the requested configuration if possible, but it is free to choose a different configuration if required to execute functions.
    ///
    /// This will return a `pconfig` of [`CUfunc_cache_enum::CU_FUNC_CACHE_PREFER_NONE`] on devices where the size of the L1 cache and shared memory are fixed.
    ///
    /// The supported cache configurations are.
    ///
    /// # Parameters
    ///
    /// - `pconfig`: - Returned cache configuration
    pub fn cuCtxGetCacheConfig(pconfig: *mut CUfunc_cache) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the preferred cache configuration for the current context.
    ///
    /// On devices where the L1 cache and shared memory use the same hardware resources, this sets through `config` the preferred cache configuration for the current context. This is only a preference. The driver will use the requested configuration if possible, but it is free to choose a different configuration if required to execute the function. Any function preference set via [`cuFuncSetCacheConfig`] or [`cuKernelSetCacheConfig`] will be preferred over this context-wide setting. Setting the context-wide cache configuration to [`CUfunc_cache_enum::CU_FUNC_CACHE_PREFER_NONE`] will cause subsequent kernel launches to prefer to not change the cache configuration unless required to launch the kernel.
    ///
    /// This setting does nothing on devices where the size of the L1 cache and shared memory are fixed.
    ///
    /// Launching a kernel with a different preference than the most recent preference setting may insert a device-side synchronization point.
    ///
    /// The supported cache configurations are.
    ///
    /// # Parameters
    ///
    /// - `config`: - Requested cache configuration
    pub fn cuCtxSetCacheConfig(config: CUfunc_cache) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the context’s API version.
    ///
    /// Returns a version number in `version` corresponding to the capabilities of the context (e.g. 3010 or 3020), which library developers can use to direct callers to a specific API version. If `ctx` is NULL, returns the API version used to create the currently bound context.
    ///
    /// Note that new API versions are only introduced when context capabilities are changed that break binary compatibility, so the API version and driver version may be different. For example, it is valid for the API version to be 3020 while the driver version is 4020.
    ///
    /// # Parameters
    ///
    /// - `ctx`: Context to check.
    /// - `version`: Pointer to version.
    pub fn cuCtxGetApiVersion(
        ctx: CUcontext,
        version: *mut ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns numerical values that correspond to the least and greatest stream priorities.
    ///
    /// Returns in `*leastPriority` and `*greatestPriority` the numerical values that correspond to the least and greatest stream priorities respectively. Stream priorities follow a convention where lower numbers imply greater priorities. The range of meaningful stream priorities is given by `*greatestPriority`, `*leastPriority`. If the user attempts to create a stream with a priority value that is outside the meaningful range as specified by this API, the priority is automatically clamped down or up to either `*leastPriority` or `*greatestPriority` respectively. See [`cuStreamCreateWithPriority`] for details on creating a priority stream. A NULL may be passed in for `*leastPriority` or `*greatestPriority` if the value is not desired.
    ///
    /// This function will return ‘0’ in both `*leastPriority` and `*greatestPriority` if the current context’s device does not support stream priorities (see [`cuDeviceGetAttribute`]).
    ///
    /// # Parameters
    ///
    /// - `leastPriority`: Pointer to an int in which the numerical value for least stream priority is returned.
    /// - `greatestPriority`: Pointer to an int in which the numerical value for greatest stream priority is returned.
    pub fn cuCtxGetStreamPriorityRange(
        leastPriority: *mut ::core::ffi::c_int,
        greatestPriority: *mut ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Resets all persisting lines in cache to normal status.
    ///
    /// [`cuCtxResetPersistingL2Cache`] Resets all persisting lines in cache to normal status. Takes effect on function return.
    pub fn cuCtxResetPersistingL2Cache() -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the execution affinity setting for the current context.
    ///
    /// Returns in `*pExecAffinity` the current value of `type`. The supported [CUexecAffinityType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga14e6345acf2bda65be91eda77cf03f5c) values are.
    ///
    /// # Parameters
    ///
    /// - `pExecAffinity`: Returned execution affinity.
    /// - `type_`: Execution affinity type to query.
    pub fn cuCtxGetExecAffinity(
        pExecAffinity: *mut CUexecAffinityParam,
        type_: CUexecAffinityType,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Records an event.
    ///
    /// Captures in `hEvent` all the activities of the context `hCtx` at the time of this call. `hEvent` and `hCtx` must be from the same CUDA context, otherwise [`cudaError_enum::CUDA_ERROR_INVALID_HANDLE`] will be returned. Calls such as [`cuEventQuery`] or [`cuCtxWaitEvent`] will then examine or wait for completion of the work that was captured. Uses of `hCtx` after this call do not modify `hEvent`. If the context passed to `hCtx` is the primary context, `hEvent` will capture all the activities of the primary context and its green contexts. If the context passed to `hCtx` is a context converted from green context via [`cuCtxFromGreenCtx`], `hEvent` will capture only the activities of the green context.
    ///
    /// # Parameters
    ///
    /// - `hCtx`: Context to record event for.
    /// - `hEvent`: Event to record.
    pub fn cuCtxRecordEvent(hCtx: CUcontext, hEvent: CUevent) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Make a context wait on an event.
    ///
    /// Makes all future work submitted to context `hCtx` wait for all work captured in `hEvent`. The synchronization will be performed on the device and will not block the calling CPU thread. See [`cuCtxRecordEvent`] for details on what is captured by an event. If the context passed to `hCtx` is the primary context, the primary context and its green contexts will wait for `hEvent`. If the context passed to `hCtx` is a context converted from green context via [`cuCtxFromGreenCtx`], the green context will wait for `hEvent`.
    ///
    /// # Parameters
    ///
    /// - `hCtx`: Context to wait.
    /// - `hEvent`: Event to wait on.
    pub fn cuCtxWaitEvent(hCtx: CUcontext, hEvent: CUevent) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Increment a context’s usage-count.
    ///
    /// Note that
    ///
    /// Increments the usage count of the context and passes back a context handle in `*pctx` that must be passed to [`cuCtxDetach`] when the application is done with the context. [`cuCtxAttach`] fails if there is no context current to the thread.
    ///
    /// Currently, the `flags` parameter must be 0.
    ///
    /// # Parameters
    ///
    /// - `pctx`: Returned context handle of the current context.
    /// - `flags`: Context attach flags (must be 0).
    #[deprecated]
    pub fn cuCtxAttach(pctx: *mut CUcontext, flags: ::core::ffi::c_uint) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Decrement a context’s usage-count.
    ///
    /// Note that
    ///
    /// Decrements the usage count of the context `ctx`, and destroys the context if the usage count goes to 0. The context must be a handle that was passed back by cuCtxCreate() or [`cuCtxAttach`], and must be current to the calling thread.
    ///
    /// # Parameters
    ///
    /// - `ctx`: - Context to destroy
    #[deprecated]
    pub fn cuCtxDetach(ctx: CUcontext) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the current shared memory configuration for the current context.
    ///
    /// This function will return in `pConfig` the current size of shared memory banks in the current context. On devices with configurable shared memory banks, [`cuCtxSetSharedMemConfig`] can be used to change this setting, so that all subsequent kernel launches will by default use the new bank size. When [`cuCtxGetSharedMemConfig`] is called on devices without configurable shared memory, it will return the fixed bank size of the hardware.
    ///
    /// The returned bank configurations can be either.
    ///
    /// # Parameters
    ///
    /// - `pConfig`: - returned shared memory configuration
    #[deprecated]
    pub fn cuCtxGetSharedMemConfig(pConfig: *mut CUsharedconfig) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the shared memory configuration for the current context.
    ///
    /// On devices with configurable shared memory banks, this function will set the context’s shared memory bank size which is used for subsequent kernel launches.
    ///
    /// Changed the shared memory configuration between launches may insert a device side synchronization point between those launches.
    ///
    /// Changing the shared memory bank size will not increase shared memory usage or affect occupancy of kernels, but may have major effects on performance. Larger bank sizes will allow for greater potential bandwidth to shared memory, but will change what kinds of accesses to shared memory will result in bank conflicts.
    ///
    /// This function will do nothing on devices with fixed shared memory bank size.
    ///
    /// The supported bank configurations are.
    ///
    /// # Parameters
    ///
    /// - `config`: - requested shared memory configuration
    #[deprecated]
    pub fn cuCtxSetSharedMemConfig(config: CUsharedconfig) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Loads a compute module.
    ///
    /// Takes a filename `fname` and loads the corresponding module `module` into the current context. The CUDA driver API does not attempt to lazily allocate the resources needed by a module; if the memory for functions and data (constant and global) needed by the module cannot be allocated, [`cuModuleLoad`] fails. The file should be a `cubin` file as output by **nvcc**, or a `PTX` file either as output by **nvcc** or handwritten, or a `fatbin` file as output by **nvcc** from toolchain 4.0 or later, or a `Tile` IR file.
    ///
    /// # Parameters
    ///
    /// - `module`: Returned module.
    /// - `fname`: Filename of module to load.
    pub fn cuModuleLoad(
        module: *mut CUmodule,
        fname: *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Load a module’s data.
    ///
    /// Takes a pointer `image` and loads the corresponding module `module` into the current context. The `image` may be a `cubin` or `fatbin` as output by **nvcc**, or a NULL-terminated `PTX`, either as output by **nvcc** or hand-written, or `Tile` IR data.
    ///
    /// # Parameters
    ///
    /// - `module`: Returned module.
    /// - `image`: Module data to load.
    pub fn cuModuleLoadData(
        module: *mut CUmodule,
        image: *const ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Load a module’s data with options.
    ///
    /// Takes a pointer `image` and loads the corresponding module `module` into the current context. The `image` may be a `cubin` or `fatbin` as output by **nvcc**, or a NULL-terminated `PTX`, either as output by **nvcc** or hand-written, or `Tile` IR data.
    ///
    /// # Parameters
    ///
    /// - `module`: Returned module.
    /// - `image`: Module data to load.
    /// - `numOptions`: Number of options.
    /// - `options`: Options for JIT.
    /// - `optionValues`: Option values for JIT.
    pub fn cuModuleLoadDataEx(
        module: *mut CUmodule,
        image: *const ::core::ffi::c_void,
        numOptions: ::core::ffi::c_uint,
        options: *mut CUjit_option,
        optionValues: *mut *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Load a module’s data.
    ///
    /// Takes a pointer `fatCubin` and loads the corresponding module `module` into the current context. The pointer represents a *fat binary* object, which is a collection of different `cubin` and/or `PTX` files, all representing the same device code, but compiled and optimized for different architectures.
    ///
    /// Prior to CUDA 4.0, there was no documented API for constructing and using fat binary objects by programmers. Starting with CUDA 4.0, fat binary objects can be constructed by providing the *-fatbin option* to **nvcc**. More information can be found in the **nvcc** document.
    ///
    /// # Parameters
    ///
    /// - `module`: Returned module.
    /// - `fatCubin`: Fat binary to load.
    pub fn cuModuleLoadFatBinary(
        module: *mut CUmodule,
        fatCubin: *const ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Unloads a module.
    ///
    /// Unloads a module `hmod` from the current context. Attempting to unload a module which was obtained from the Library Management API such as [`cuLibraryGetModule`] will return [`cudaError_enum::CUDA_ERROR_NOT_PERMITTED`].
    ///
    /// # Parameters
    ///
    /// - `hmod`: - Module to unload
    pub fn cuModuleUnload(hmod: CUmodule) -> CUresult;
}
impl CUmoduleLoadingMode_enum {
    /// Lazy Kernel Loading is not enabled.
    pub const CU_MODULE_EAGER_LOADING: CUmoduleLoadingMode_enum = CUmoduleLoadingMode_enum(
        1,
    );
    /// Lazy Kernel Loading is enabled.
    pub const CU_MODULE_LAZY_LOADING: CUmoduleLoadingMode_enum = CUmoduleLoadingMode_enum(
        2,
    );
}
/// CUDA Lazy Loading status
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmoduleLoadingMode_enum(pub ::core::ffi::c_uint);
pub use self::CUmoduleLoadingMode_enum as CUmoduleLoadingMode;
singe_loader::functions! { crate::DRIVER;
    /// Query lazy loading mode.
    ///
    /// Returns lazy loading mode Module loading mode is controlled by CUDA_MODULE_LOADING env variable.
    ///
    /// # Parameters
    ///
    /// - `mode`: - Returns the lazy loading mode
    pub fn cuModuleGetLoadingMode(mode: *mut CUmoduleLoadingMode) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a function handle.
    ///
    /// Returns in `*hfunc` the handle of the function of name `name` located in module `hmod`. If no function of that name exists, [`cuModuleGetFunction`] returns [`cudaError_enum::CUDA_ERROR_NOT_FOUND`].
    ///
    /// # Parameters
    ///
    /// - `hfunc`: Returned function handle.
    /// - `hmod`: Module to retrieve function from.
    /// - `name`: Name of function to retrieve.
    pub fn cuModuleGetFunction(
        hfunc: *mut CUfunction,
        hmod: CUmodule,
        name: *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the number of functions within a module.
    ///
    /// Returns in `count` the number of functions in `mod`.
    ///
    /// # Parameters
    ///
    /// - `count`: Number of functions found within the module.
    /// - `mod_`: Module to query.
    pub fn cuModuleGetFunctionCount(
        count: *mut ::core::ffi::c_uint,
        mod_: CUmodule,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the function handles within a module.
    ///
    /// Returns in `functions` a maximum number of `numFunctions` function handles within `mod`. When function loading mode is set to LAZY the function retrieved may be partially loaded. The loading state of a function can be queried using ::cuFunctionIsLoaded. CUDA APIs may load the function automatically when called with partially loaded function handle which may incur additional latency. Alternatively, ::cuFunctionLoad can be used to explicitly load a function. The returned function handles become invalid when the module is unloaded.
    ///
    /// # Parameters
    ///
    /// - `functions`: Buffer where the function handles are returned to.
    /// - `numFunctions`: Maximum number of function handles may be returned to the buffer.
    /// - `mod_`: Module to query from.
    pub fn cuModuleEnumerateFunctions(
        functions: *mut CUfunction,
        numFunctions: ::core::ffi::c_uint,
        mod_: CUmodule,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a global pointer from a module
    ///
    /// Returns in `*dptr` and `*bytes` the base pointer and size of the global of name `name` located in module `hmod`. If no variable of that name exists, ::cuModuleGetGlobal() returns ::CUDA_ERROR_NOT_FOUND. One of the parameters `dptr` or `bytes` (not both) can be NULL in which case it is ignored.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_NOT_FOUND
    ///
    ///
    ///
    /// See also: ::cuModuleGetFunction, ::cuModuleGetTexRef, ::cuModuleLoad, ::cuModuleLoadData, ::cuModuleLoadDataEx, ::cuModuleLoadFatBinary, ::cuModuleUnload, ::cudaGetSymbolAddress, ::cudaGetSymbolSize
    ///
    /// # Parameters
    ///
    /// - `dptr`: - Returned global device pointer
    /// - `bytes`: - Returned global size in bytes
    /// - `hmod`: - Module to retrieve global from
    /// - `name`: - Name of global to retrieve
    pub fn cuModuleGetGlobal_v2(
        dptr: *mut CUdeviceptr,
        bytes: *mut size_t,
        hmod: CUmodule,
        name: *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a pending JIT linker invocation.
    ///
    /// If the call is successful, the caller owns the returned CUlinkState, which should eventually be destroyed with ::cuLinkDestroy.  The device code machine size (32 or 64 bit) will match the calling application.
    ///
    /// Both linker and compiler options may be specified.  Compiler options will be applied to inputs to this linker action which must be compiled from PTX. The options ::CU_JIT_WALL_TIME, ::CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, and ::CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES will accumulate data until the CUlinkState is destroyed.
    ///
    /// The data passed in via ::cuLinkAddData and ::cuLinkAddFile will be treated as relocatable (-rdc=true to nvcc) when linking the final cubin during ::cuLinkComplete and will have similar consequences as offline relocatable device code linking.
    ///
    /// `optionValues` must remain valid for the life of the CUlinkState if output options are used.  No other references to inputs are maintained after this call returns.
    ///
    ///
    ///
    /// Note: For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_OUT_OF_MEMORY, ::CUDA_ERROR_JIT_COMPILER_NOT_FOUND
    ///
    ///
    ///
    /// See also: ::cuLinkAddData, ::cuLinkAddFile, ::cuLinkComplete, ::cuLinkDestroy
    ///
    /// # Parameters
    ///
    /// - `numOptions`: Size of options arrays
    /// - `options`: Array of linker and compiler options
    /// - `optionValues`: Array of option values, each cast to void *
    /// - `stateOut`: On success, this will contain a CUlinkState to specify and complete this action
    pub fn cuLinkCreate_v2(
        numOptions: ::core::ffi::c_uint,
        options: *mut CUjit_option,
        optionValues: *mut *mut ::core::ffi::c_void,
        stateOut: *mut CUlinkState,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Add an input to a pending linker invocation
    ///
    /// Ownership of `data` is retained by the caller.  No reference is retained to any inputs after this call returns.
    ///
    /// This method accepts only compiler options, which are used if the data must be compiled from PTX, and does not accept any of ::CU_JIT_WALL_TIME, ::CU_JIT_INFO_LOG_BUFFER, ::CU_JIT_ERROR_LOG_BUFFER, ::CU_JIT_TARGET_FROM_CUCONTEXT, or ::CU_JIT_TARGET.
    ///
    ///
    ///
    /// Note: For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_IMAGE, ::CUDA_ERROR_INVALID_PTX, ::CUDA_ERROR_UNSUPPORTED_PTX_VERSION, ::CUDA_ERROR_OUT_OF_MEMORY, ::CUDA_ERROR_NO_BINARY_FOR_GPU
    ///
    ///
    ///
    /// See also: ::cuLinkCreate, ::cuLinkAddFile, ::cuLinkComplete, ::cuLinkDestroy
    ///
    /// # Parameters
    ///
    /// - `state`: A pending linker action.
    /// - `type_`: The type of the input data.
    /// - `data`: The input data.  PTX must be NULL-terminated.
    /// - `size`: The length of the input data.
    /// - `name`: An optional name for this input in log messages.
    /// - `numOptions`: Size of options.
    /// - `options`: Options to be applied only for this input (overrides options from ::cuLinkCreate).
    /// - `optionValues`: Array of option values, each cast to void *.
    pub fn cuLinkAddData_v2(
        state: CUlinkState,
        type_: CUjitInputType,
        data: *mut ::core::ffi::c_void,
        size: size_t,
        name: *const ::core::ffi::c_char,
        numOptions: ::core::ffi::c_uint,
        options: *mut CUjit_option,
        optionValues: *mut *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Add a file input to a pending linker invocation
    ///
    /// No reference is retained to any inputs after this call returns.
    ///
    /// This method accepts only compiler options, which are used if the input must be compiled from PTX, and does not accept any of ::CU_JIT_WALL_TIME, ::CU_JIT_INFO_LOG_BUFFER, ::CU_JIT_ERROR_LOG_BUFFER, ::CU_JIT_TARGET_FROM_CUCONTEXT, or ::CU_JIT_TARGET.
    ///
    /// This method is equivalent to invoking ::cuLinkAddData on the contents of the file.
    ///
    ///
    ///
    /// Note: For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_FILE_NOT_FOUND ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_IMAGE, ::CUDA_ERROR_INVALID_PTX, ::CUDA_ERROR_UNSUPPORTED_PTX_VERSION, ::CUDA_ERROR_OUT_OF_MEMORY, ::CUDA_ERROR_NO_BINARY_FOR_GPU
    ///
    ///
    ///
    /// See also: ::cuLinkCreate, ::cuLinkAddData, ::cuLinkComplete, ::cuLinkDestroy
    ///
    /// # Parameters
    ///
    /// - `state`: A pending linker action
    /// - `type_`: The type of the input data
    /// - `path`: Path to the input file
    /// - `numOptions`: Size of options
    /// - `options`: Options to be applied only for this input (overrides options from ::cuLinkCreate)
    /// - `optionValues`: Array of option values, each cast to void *
    pub fn cuLinkAddFile_v2(
        state: CUlinkState,
        type_: CUjitInputType,
        path: *const ::core::ffi::c_char,
        numOptions: ::core::ffi::c_uint,
        options: *mut CUjit_option,
        optionValues: *mut *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Complete a pending linker invocation.
    ///
    /// Completes the pending linker action and returns the cubin image for the linked device code, which can be used with [`cuModuleLoadData`]. The cubin is owned by `state`, so it should be loaded before `state` is destroyed via [`cuLinkDestroy`]. This call does not destroy `state`.
    ///
    /// # Parameters
    ///
    /// - `state`: A pending linker invocation.
    /// - `cubinOut`: On success, this will point to the output image.
    /// - `sizeOut`: Optional parameter to receive the size of the generated image.
    pub fn cuLinkComplete(
        state: CUlinkState,
        cubinOut: *mut *mut ::core::ffi::c_void,
        sizeOut: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys state for a JIT linker invocation.
    ///
    /// # Parameters
    ///
    /// - `state`: State object for the linker invocation
    pub fn cuLinkDestroy(state: CUlinkState) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a handle to a texture reference.
    ///
    /// Returns in `*pTexRef` the handle of the texture reference of name `name` in the module `hmod`. If no texture reference of that name exists, [`cuModuleGetTexRef`] returns [`cudaError_enum::CUDA_ERROR_NOT_FOUND`]. This texture reference handle should not be destroyed, since it will be destroyed when the module is unloaded.
    ///
    /// # Parameters
    ///
    /// - `pTexRef`: Returned texture reference.
    /// - `hmod`: Module to retrieve texture reference from.
    /// - `name`: Name of texture reference to retrieve.
    #[deprecated]
    pub fn cuModuleGetTexRef(
        pTexRef: *mut CUtexref,
        hmod: CUmodule,
        name: *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a handle to a surface reference.
    ///
    /// Returns in `*pSurfRef` the handle of the surface reference of name `name` in the module `hmod`. If no surface reference of that name exists, [`cuModuleGetSurfRef`] returns [`cudaError_enum::CUDA_ERROR_NOT_FOUND`].
    ///
    /// # Parameters
    ///
    /// - `pSurfRef`: Returned surface reference.
    /// - `hmod`: Module to retrieve surface reference from.
    /// - `name`: Name of surface reference to retrieve.
    #[deprecated]
    pub fn cuModuleGetSurfRef(
        pSurfRef: *mut CUsurfref,
        hmod: CUmodule,
        name: *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Load a library with specified code and options.
    ///
    /// Takes a pointer `code` and loads the corresponding library `library` based on the application defined library loading mode:
    ///
    /// These environment variables are described in the CUDA programming guide under the “CUDA environment variables” section.
    ///
    /// The `code` may be a `cubin` or `fatbin` as output by **nvcc**, or a NULL-terminated `PTX`, either as output by **nvcc** or hand-written, or `Tile` IR data. A fatbin should also contain relocatable code when doing separate compilation.
    ///
    /// Options are passed as an array via `jitOptions` and any corresponding parameters are passed in `jitOptionsValues`. The number of total JIT options is supplied via `numJitOptions`. Any outputs will be returned via `jitOptionsValues`.
    ///
    /// Library load options are passed as an array via `libraryOptions` and any corresponding parameters are passed in `libraryOptionValues`. The number of total library load options is supplied via `numLibraryOptions`.
    ///
    /// # Parameters
    ///
    /// - `library`: Returned library.
    /// - `code`: Code to load.
    /// - `jitOptions`: Options for JIT.
    /// - `jitOptionsValues`: Option values for JIT.
    /// - `numJitOptions`: Number of options.
    /// - `libraryOptions`: Options for loading.
    /// - `libraryOptionValues`: Option values for loading.
    /// - `numLibraryOptions`: Number of options for loading.
    pub fn cuLibraryLoadData(
        library: *mut CUlibrary,
        code: *const ::core::ffi::c_void,
        jitOptions: *mut CUjit_option,
        jitOptionsValues: *mut *mut ::core::ffi::c_void,
        numJitOptions: ::core::ffi::c_uint,
        libraryOptions: *mut CUlibraryOption,
        libraryOptionValues: *mut *mut ::core::ffi::c_void,
        numLibraryOptions: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Load a library with specified file and options.
    ///
    /// Takes a pointer `code` and loads the corresponding library `library` based on the application defined library loading mode:
    ///
    /// These environment variables are described in the CUDA programming guide under the “CUDA environment variables” section.
    ///
    /// The file should be a `cubin` file as output by **nvcc**, or a `PTX` file either as output by **nvcc** or handwritten, or a `fatbin` file as output by **nvcc** or hand-written, or `Tile` IR file. A fatbin should also contain relocatable code when doing separate compilation.
    ///
    /// Options are passed as an array via `jitOptions` and any corresponding parameters are passed in `jitOptionsValues`. The number of total options is supplied via `numJitOptions`. Any outputs will be returned via `jitOptionsValues`.
    ///
    /// Library load options are passed as an array via `libraryOptions` and any corresponding parameters are passed in `libraryOptionValues`. The number of total library load options is supplied via `numLibraryOptions`.
    ///
    /// # Parameters
    ///
    /// - `library`: Returned library.
    /// - `fileName`: File to load from.
    /// - `jitOptions`: Options for JIT.
    /// - `jitOptionsValues`: Option values for JIT.
    /// - `numJitOptions`: Number of options.
    /// - `libraryOptions`: Options for loading.
    /// - `libraryOptionValues`: Option values for loading.
    /// - `numLibraryOptions`: Number of options for loading.
    pub fn cuLibraryLoadFromFile(
        library: *mut CUlibrary,
        fileName: *const ::core::ffi::c_char,
        jitOptions: *mut CUjit_option,
        jitOptionsValues: *mut *mut ::core::ffi::c_void,
        numJitOptions: ::core::ffi::c_uint,
        libraryOptions: *mut CUlibraryOption,
        libraryOptionValues: *mut *mut ::core::ffi::c_void,
        numLibraryOptions: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Unloads a library.
    ///
    /// Unloads the library specified with `library`.
    ///
    /// # Parameters
    ///
    /// - `library`: - Library to unload
    pub fn cuLibraryUnload(library: CUlibrary) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a kernel handle.
    ///
    /// Returns in `pKernel` the handle of the kernel with name `name` located in library `library`. If kernel handle is not found, the call returns [`cudaError_enum::CUDA_ERROR_NOT_FOUND`].
    ///
    /// # Parameters
    ///
    /// - `pKernel`: Returned kernel handle.
    /// - `library`: Library to retrieve kernel from.
    /// - `name`: Name of kernel to retrieve.
    pub fn cuLibraryGetKernel(
        pKernel: *mut CUkernel,
        library: CUlibrary,
        name: *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the number of kernels within a library.
    ///
    /// Returns in `count` the number of kernels in `lib`.
    ///
    /// # Parameters
    ///
    /// - `count`: Number of kernels found within the library.
    /// - `lib`: Library to query.
    pub fn cuLibraryGetKernelCount(
        count: *mut ::core::ffi::c_uint,
        lib: CUlibrary,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Retrieve the kernel handles within a library.
    ///
    /// Returns in `kernels` a maximum number of `numKernels` kernel handles within `lib`. The returned kernel handle becomes invalid when the library is unloaded.
    ///
    /// # Parameters
    ///
    /// - `kernels`: Buffer where the kernel handles are returned to.
    /// - `numKernels`: Maximum number of kernel handles may be returned to the buffer.
    /// - `lib`: Library to query from.
    pub fn cuLibraryEnumerateKernels(
        kernels: *mut CUkernel,
        numKernels: ::core::ffi::c_uint,
        lib: CUlibrary,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a module handle.
    ///
    /// Returns in `pMod` the module handle associated with the current context located in library `library`. If module handle is not found, the call returns [`cudaError_enum::CUDA_ERROR_NOT_FOUND`].
    ///
    /// # Parameters
    ///
    /// - `pMod`: Returned module handle.
    /// - `library`: Library to retrieve module from.
    pub fn cuLibraryGetModule(pMod: *mut CUmodule, library: CUlibrary) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a function handle.
    ///
    /// Returns in `pFunc` the handle of the function for the requested kernel `kernel` and the current context. If function handle is not found, the call returns [`cudaError_enum::CUDA_ERROR_NOT_FOUND`].
    ///
    /// # Parameters
    ///
    /// - `pFunc`: Returned function handle.
    /// - `kernel`: Kernel to retrieve function for the requested context.
    pub fn cuKernelGetFunction(pFunc: *mut CUfunction, kernel: CUkernel) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a library handle.
    ///
    /// Returns in `pLib` the handle of the library for the requested kernel `kernel`.
    ///
    /// # Parameters
    ///
    /// - `pLib`: Returned library handle.
    /// - `kernel`: Kernel to retrieve library handle.
    pub fn cuKernelGetLibrary(pLib: *mut CUlibrary, kernel: CUkernel) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a global device pointer.
    ///
    /// Returns in `*dptr` and `*bytes` the base pointer and size of the global with name `name` for the requested library `library` and the current context. If no global for the requested name `name` exists, the call returns [`cudaError_enum::CUDA_ERROR_NOT_FOUND`]. One of the parameters `dptr` or `bytes` (not both) can be NULL in which case it is ignored.
    ///
    /// # Parameters
    ///
    /// - `dptr`: Returned global device pointer for the requested context.
    /// - `bytes`: Returned global size in bytes.
    /// - `library`: Library to retrieve global from.
    /// - `name`: Name of global to retrieve.
    pub fn cuLibraryGetGlobal(
        dptr: *mut CUdeviceptr,
        bytes: *mut size_t,
        library: CUlibrary,
        name: *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a pointer to managed memory.
    ///
    /// Returns in `*dptr` and `*bytes` the base pointer and size of the managed memory with name `name` for the requested library `library`. If no managed memory with the requested name `name` exists, the call returns [`cudaError_enum::CUDA_ERROR_NOT_FOUND`]. One of the parameters `dptr` or `bytes` (not both) can be NULL in which case it is ignored. Note that managed memory for library `library` is shared across devices and is registered when the library is loaded into at least one context.
    ///
    /// # Parameters
    ///
    /// - `dptr`: Returned pointer to the managed memory.
    /// - `bytes`: Returned memory size in bytes.
    /// - `library`: Library to retrieve managed memory from.
    /// - `name`: Name of managed memory to retrieve.
    pub fn cuLibraryGetManaged(
        dptr: *mut CUdeviceptr,
        bytes: *mut size_t,
        library: CUlibrary,
        name: *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a pointer to a unified function.
    ///
    /// Returns in `*fptr` the function pointer to a unified function denoted by `symbol`. If no unified function with name `symbol` exists, the call returns [`cudaError_enum::CUDA_ERROR_NOT_FOUND`]. If there is no device with attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS`] present in the system, the call may return [`cudaError_enum::CUDA_ERROR_NOT_FOUND`].
    ///
    /// # Parameters
    ///
    /// - `fptr`: Returned pointer to a unified function.
    /// - `library`: Library to retrieve function pointer memory from.
    /// - `symbol`: Name of function pointer to retrieve.
    pub fn cuLibraryGetUnifiedFunction(
        fptr: *mut *mut ::core::ffi::c_void,
        library: CUlibrary,
        symbol: *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns information about a kernel.
    ///
    /// Returns in `*pi` the integer value of the attribute `attrib` for the kernel `kernel` for the requested device `dev`. The supported attributes are.
    ///
    /// # Parameters
    ///
    /// - `pi`: Returned attribute value.
    /// - `attrib`: Attribute requested.
    /// - `kernel`: Kernel to query attribute of.
    /// - `dev`: Device to query attribute of.
    pub fn cuKernelGetAttribute(
        pi: *mut ::core::ffi::c_int,
        attrib: CUfunction_attribute,
        kernel: CUkernel,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets information about a kernel.
    ///
    /// This call sets the value of a specified attribute `attrib` on the kernel `kernel` for the requested device `dev` to an integer value specified by `val`. This function returns [`CUresult::CUDA_SUCCESS`] if the new value of the attribute could be successfully set. If the set fails, this call will return an error. Not all attributes can have values set. Attempting to set a value on a read-only attribute will result in an error ([`CUresult::CUDA_ERROR_INVALID_VALUE`])
    ///
    /// Note that attributes set using [`cuFuncSetAttribute`] will override the attribute set by this API irrespective of whether the call to [`cuFuncSetAttribute`] is made before or after this API call. However, [`cuKernelGetAttribute`] will always return the attribute value set by this API.
    ///
    /// Supported attributes are.
    ///
    /// # Parameters
    ///
    /// - `attrib`: Attribute requested.
    /// - `val`: Value to set.
    /// - `kernel`: Kernel to set attribute of.
    /// - `dev`: Device to set attribute of.
    pub fn cuKernelSetAttribute(
        attrib: CUfunction_attribute,
        val: ::core::ffi::c_int,
        kernel: CUkernel,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the preferred cache configuration for a device kernel.
    ///
    /// On devices where the L1 cache and shared memory use the same hardware resources, this sets through `config` the preferred cache configuration for the device kernel `kernel` on the requested device `dev`. This is only a preference. The driver will use the requested configuration if possible, but it is free to choose a different configuration if required to execute `kernel`. Any context-wide preference set via [`cuCtxSetCacheConfig`] will be overridden by this per-kernel setting.
    ///
    /// Note that attributes set using [`cuFuncSetCacheConfig`] will override the attribute set by this API irrespective of whether the call to [`cuFuncSetCacheConfig`] is made before or after this API call.
    ///
    /// This setting does nothing on devices where the size of the L1 cache and shared memory are fixed.
    ///
    /// Launching a kernel with a different preference than the most recent preference setting may insert a device-side synchronization point.
    ///
    /// The supported cache configurations are.
    ///
    /// # Parameters
    ///
    /// - `kernel`: Kernel to configure cache for.
    /// - `config`: Requested cache configuration.
    /// - `dev`: Device to set attribute of.
    pub fn cuKernelSetCacheConfig(
        kernel: CUkernel,
        config: CUfunc_cache,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the function name for a [`CUkernel`] handle.
    ///
    /// Returns in `**name` the function name associated with the kernel handle `hfunc`. The function name is returned as a null-terminated string. The returned name is only valid when the kernel handle is valid. If the library is unloaded or reloaded, one must call the API again to get the updated name. This API may return a mangled name if the function is not declared as having C linkage. If either `**name` or `hfunc` is NULL, [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] is returned.
    ///
    /// # Parameters
    ///
    /// - `name`: The returned name of the function.
    /// - `hfunc`: The function handle to retrieve the name for.
    pub fn cuKernelGetName(
        name: *mut *const ::core::ffi::c_char,
        hfunc: CUkernel,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the offset and size of a kernel parameter in the device-side parameter layout.
    ///
    /// Queries the kernel parameter at `paramIndex` into `kernel's` list of parameters, and returns in `paramOffset` and `paramSize` the offset and size, respectively, where the parameter will reside in the device-side parameter layout. This information can be used to update kernel node parameters from the device via ::cudaGraphKernelNodeSetParam() and ::cudaGraphKernelNodeUpdatesApply(). `paramIndex` must be less than the number of parameters that `kernel` takes. `paramSize` can be set to NULL if only the parameter offset is desired.
    ///
    /// # Parameters
    ///
    /// - `kernel`: The kernel to query.
    /// - `paramIndex`: The parameter index to query.
    /// - `paramOffset`: Returns the offset into the device-side parameter layout at which the parameter resides.
    /// - `paramSize`: Optionally returns the size of the parameter in the device-side parameter layout.
    pub fn cuKernelGetParamInfo(
        kernel: CUkernel,
        paramIndex: size_t,
        paramOffset: *mut size_t,
        paramSize: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the number of parameters used by the kernel.
    ///
    /// Queries the number of kernel parameters used by `kernel` and returns it in `paramCount`.
    ///
    /// # Parameters
    ///
    /// - `kernel`: The kernel to query.
    /// - `paramCount`: Returns the number of parameters used by the function.
    pub fn cuKernelGetParamCount(kernel: CUkernel, paramCount: *mut size_t) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets free and total memory
    ///
    /// Returns in `*total` the total amount of memory available to the the current context. Returns in `*free` the amount of memory on the device that is free according to the OS. CUDA is not guaranteed to be able to allocate all of the memory that the OS reports as free. In a multi-tenet situation, free estimate returned is prone to race condition where a new allocation/free done by a different process or a different thread in the same process between the time when free memory was estimated and reported, will result in deviation in free value reported and actual free memory.
    ///
    /// The integrated GPU on Tegra shares memory with CPU and other component of the SoC. The free and total values returned by the API excludes the SWAP memory space maintained by the OS on some platforms. The OS may move some of the memory pages into swap area as the GPU or CPU allocate or access memory. See Tegra app note on how to calculate total and free memory on Tegra.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemGetInfo
    ///
    /// # Parameters
    ///
    /// - `free`: - Returned free memory in bytes
    /// - `total`: - Returned total memory in bytes
    pub fn cuMemGetInfo_v2(free: *mut size_t, total: *mut size_t) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Allocates device memory
    ///
    /// Allocates `bytesize` bytes of linear memory on the device and returns in `*dptr` a pointer to the allocated memory. The allocated memory is suitably aligned for any kind of variable. The memory is not cleared. If `bytesize` is 0, ::cuMemAlloc() returns ::CUDA_ERROR_INVALID_VALUE.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_OUT_OF_MEMORY ::CUDA_ERROR_EXTERNAL_DEVICE
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMalloc
    ///
    /// # Parameters
    ///
    /// - `dptr`: - Returned device pointer
    /// - `bytesize`: - Requested allocation size in bytes
    pub fn cuMemAlloc_v2(dptr: *mut CUdeviceptr, bytesize: size_t) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Allocates pitched device memory
    ///
    /// Allocates at least `WidthInBytes` * `Height` bytes of linear memory on the device and returns in `*dptr` a pointer to the allocated memory. The function may pad the allocation to ensure that corresponding pointers in any given row will continue to meet the alignment requirements for coalescing as the address is updated from row to row. `ElementSizeBytes` specifies the size of the largest reads and writes that will be performed on the memory range. `ElementSizeBytes` may be 4, 8 or 16 (since coalesced memory transactions are not possible on other data sizes). If `ElementSizeBytes` is smaller than the actual read/write size of a kernel, the kernel will run correctly, but possibly at reduced speed. The pitch returned in `*pPitch` by ::cuMemAllocPitch() is the width in bytes of the allocation. The intended usage of pitch is as a separate parameter of the allocation, used to compute addresses within the 2D array. Given the row and column of an array element of type **T,** the address is computed as:
    ///
    ///
    ///
    /// ```text
    ///    T* pElement = (T*)((char*)BaseAddress + Row * Pitch) + Column;
    /// ```
    ///
    /// The pitch returned by ::cuMemAllocPitch() is guaranteed to work with ::cuMemcpy2D() under all circumstances. For allocations of 2D arrays, it is recommended that programmers consider performing pitch allocations using ::cuMemAllocPitch(). Due to alignment restrictions in the hardware, this is especially true if the application will be performing 2D memory copies between different regions of device memory (whether linear memory or CUDA arrays).
    ///
    /// The byte alignment of the pitch returned by ::cuMemAllocPitch() is guaranteed to match or exceed the alignment requirement for texture binding with ::cuTexRefSetAddress2D().
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_OUT_OF_MEMORY
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMallocPitch
    ///
    /// # Parameters
    ///
    /// - `dptr`: - Returned device pointer
    /// - `pPitch`: - Returned pitch of allocation in bytes
    /// - `WidthInBytes`: - Requested allocation width in bytes
    /// - `Height`: - Requested allocation height in rows
    /// - `ElementSizeBytes`: - Size of largest reads/writes for range
    pub fn cuMemAllocPitch_v2(
        dptr: *mut CUdeviceptr,
        pPitch: *mut size_t,
        WidthInBytes: size_t,
        Height: size_t,
        ElementSizeBytes: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Frees device memory
    ///
    /// Frees the memory space pointed to by `dptr`, which must have been returned by a previous call to one of the following memory allocation APIs - ::cuMemAlloc(), ::cuMemAllocPitch(), ::cuMemAllocManaged(), ::cuMemAllocAsync(), ::cuMemAllocFromPoolAsync()
    ///
    /// Note - This API will not perform any implict synchronization when the pointer was allocated with ::cuMemAllocAsync or ::cuMemAllocFromPoolAsync. Callers must ensure that all accesses to these pointer have completed before invoking ::cuMemFree. For best performance and memory reuse, users should use ::cuMemFreeAsync to free memory allocated via the stream ordered memory allocator. For all other pointers, this API may perform implicit synchronization.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemAllocManaged, ::cuMemAllocAsync, ::cuMemAllocFromPoolAsync, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemFreeAsync, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaFree
    ///
    /// # Parameters
    ///
    /// - `dptr`: - Pointer to memory to free
    pub fn cuMemFree_v2(dptr: CUdeviceptr) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get information on memory allocations
    ///
    /// Returns the base address in `*pbase` and size in `*psize` of the allocation that contains the input pointer `dptr`. Both parameters `pbase` and `psize` are optional. If one of them is NULL, it is ignored.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_NOT_FOUND, ::CUDA_ERROR_INVALID_VALUE
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32
    ///
    /// # Parameters
    ///
    /// - `pbase`: - Returned base address
    /// - `psize`: - Returned size of device memory allocation
    /// - `dptr`: - Device pointer to query
    pub fn cuMemGetAddressRange_v2(
        pbase: *mut CUdeviceptr,
        psize: *mut size_t,
        dptr: CUdeviceptr,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Allocates page-locked host memory
    ///
    /// Allocates `bytesize` bytes of host memory that is page-locked and accessible to the device. The driver tracks the virtual memory ranges allocated with this function and automatically accelerates calls to functions such as ::cuMemcpy(). Since the memory can be accessed directly by the device, it can be read or written with much higher bandwidth than pageable memory obtained with functions such as ::malloc().
    ///
    /// On systems where ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES is true, ::cuMemAllocHost may not page-lock the allocated memory.
    ///
    /// Page-locking excessive amounts of memory with ::cuMemAllocHost() may degrade system performance, since it reduces the amount of memory available to the system for paging. As a result, this function is best used sparingly to allocate staging areas for data exchange between host and device.
    ///
    /// Note all host memory allocated using ::cuMemAllocHost() will automatically be immediately accessible to all contexts on all devices which support unified addressing (as may be queried using ::CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING). The device pointer that may be used to access this host memory from those contexts is always equal to the returned host pointer `*pp`. See `CUDA_UNIFIED` for additional details.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_OUT_OF_MEMORY ::CUDA_ERROR_EXTERNAL_DEVICE
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMallocHost
    ///
    /// # Parameters
    ///
    /// - `pp`: - Returned pointer to host memory
    /// - `bytesize`: - Requested allocation size in bytes
    pub fn cuMemAllocHost_v2(
        pp: *mut *mut ::core::ffi::c_void,
        bytesize: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Frees page-locked host memory.
    ///
    /// Frees the memory space pointed to by `p`, which must have been returned by a previous call to cuMemAllocHost().
    ///
    /// # Parameters
    ///
    /// - `p`: - Pointer to memory to free
    pub fn cuMemFreeHost(p: *mut ::core::ffi::c_void) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Allocates page-locked host memory.
    ///
    /// Allocates `bytesize` bytes of host memory that is page-locked and accessible to the device. The driver tracks the virtual memory ranges allocated with this function and automatically accelerates calls to functions such as cuMemcpyHtoD(). Since the memory can be accessed directly by the device, it can be read or written with much higher bandwidth than pageable memory obtained with functions such as ::malloc().
    ///
    /// On systems where [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`] is true, [`cuMemHostAlloc`] may not page-lock the allocated memory.
    ///
    /// Page-locking excessive amounts of memory may degrade system performance, since it reduces the amount of memory available to the system for paging. As a result, this function is best used sparingly to allocate staging areas for data exchange between host and device.
    ///
    /// The `Flags` parameter enables different options to be specified that affect the allocation, as follows.
    ///
    /// All of these flags are orthogonal to one another: a developer may allocate memory that is portable, mapped and/or write-combined with no restrictions.
    ///
    /// The [`CU_MEMHOSTALLOC_DEVICEMAP`] flag may be specified on CUDA contexts for devices that do not support mapped pinned memory. The failure is deferred to cuMemHostGetDevicePointer() because the memory may be mapped into other CUDA contexts via the [`CU_MEMHOSTALLOC_PORTABLE`] flag.
    ///
    /// The memory allocated by this function must be freed with [`cuMemFreeHost`].
    ///
    /// Note all host memory allocated using [`cuMemHostAlloc`] will automatically be immediately accessible to all contexts on all devices which support unified addressing (as may be queried using [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING`]). Unless the flag [`CU_MEMHOSTALLOC_WRITECOMBINED`] is specified, the device pointer that may be used to access this host memory from those contexts is always equal to the returned host pointer `*pp`. If the flag [`CU_MEMHOSTALLOC_WRITECOMBINED`] is specified, then the function cuMemHostGetDevicePointer() must be used to query the device pointer, even if the context supports unified addressing. See [Unified Addressing](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__UNIFIED.html#group__cuda__unified) for additional details.
    ///
    /// # Parameters
    ///
    /// - `pp`: Returned pointer to host memory.
    /// - `bytesize`: Requested allocation size in bytes.
    /// - `Flags`: Flags for allocation request.
    pub fn cuMemHostAlloc(
        pp: *mut *mut ::core::ffi::c_void,
        bytesize: size_t,
        Flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Passes back device pointer of mapped pinned memory
    ///
    /// Passes back the device pointer `pdptr` corresponding to the mapped, pinned host buffer `p` allocated by ::cuMemHostAlloc.
    ///
    /// ::cuMemHostGetDevicePointer() will fail if the ::CU_MEMHOSTALLOC_DEVICEMAP flag was not specified at the time the memory was allocated, or if the function is called on a GPU that does not support mapped pinned memory.
    ///
    /// For devices that have a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, the memory can also be accessed from the device using the host pointer `p`. The device pointer returned by ::cuMemHostGetDevicePointer() may or may not match the original host pointer `p` and depends on the devices visible to the application. If all devices visible to the application have a non-zero value for the device attribute, the device pointer returned by ::cuMemHostGetDevicePointer() will match the original pointer `p`. If any device visible to the application has a zero value for the device attribute, the device pointer returned by ::cuMemHostGetDevicePointer() will not match the original host pointer `p`, but it will be suitable for use on all devices provided Unified Virtual Addressing is enabled. In such systems, it is valid to access the memory using either pointer on devices that have a non-zero value for the device attribute. Note however that such devices should access the memory using only one of the two pointers and not both.
    ///
    /// `Flags` provides for future releases. For now, it must be set to 0.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaHostGetDevicePointer
    ///
    /// # Parameters
    ///
    /// - `pdptr`: - Returned device pointer
    /// - `p`: - Host pointer
    /// - `Flags`: - Options (must be 0)
    pub fn cuMemHostGetDevicePointer_v2(
        pdptr: *mut CUdeviceptr,
        p: *mut ::core::ffi::c_void,
        Flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Passes back flags that were used for a pinned allocation.
    ///
    /// Passes back the flags `pFlags` that were specified when allocating the pinned host buffer `p` allocated by [`cuMemHostAlloc`].
    ///
    /// [`cuMemHostGetFlags`] will fail if the pointer does not reside in an allocation performed by cuMemAllocHost() or [`cuMemHostAlloc`].
    ///
    /// # Parameters
    ///
    /// - `pFlags`: Returned flags word.
    /// - `p`: Host pointer.
    pub fn cuMemHostGetFlags(
        pFlags: *mut ::core::ffi::c_uint,
        p: *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Allocates memory that will be automatically managed by the Unified Memory system.
    ///
    /// Allocates `bytesize` bytes of managed memory on the device and returns in `*dptr` a pointer to the allocated memory. If the device doesn’t support allocating managed memory, [`cudaError_enum::CUDA_ERROR_NOT_SUPPORTED`] is returned. Support for managed memory can be queried using the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY`]. The allocated memory is suitably aligned for any kind of variable. The memory is not cleared. If `bytesize` is 0, [`cuMemAllocManaged`] returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`]. The pointer is valid on the CPU and on all GPUs in the system that support managed memory. All accesses to this pointer must obey the Unified Memory programming model.
    ///
    /// `flags` specifies the default stream association for this allocation. `flags` must be one of [`CUmemAttach_flags_enum::CU_MEM_ATTACH_GLOBAL`] or [`CUmemAttach_flags_enum::CU_MEM_ATTACH_HOST`]. If [`CUmemAttach_flags_enum::CU_MEM_ATTACH_GLOBAL`] is specified, then this memory is accessible from any stream on any device. If [`CUmemAttach_flags_enum::CU_MEM_ATTACH_HOST`] is specified, then the allocation should not be accessed from devices that have a zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`]; an explicit call to [`cuStreamAttachMemAsync`] will be required to enable access on such devices.
    ///
    /// If the association is later changed via [`cuStreamAttachMemAsync`] to a single stream, the default association as specified during [`cuMemAllocManaged`] is restored when that stream is destroyed. For **managed** variables, the default association is always [`CUmemAttach_flags_enum::CU_MEM_ATTACH_GLOBAL`]. Note that destroying a stream is an asynchronous operation, and as a result, the change to default association won’t happen until all work in the stream has completed.
    ///
    /// Memory allocated with [`cuMemAllocManaged`] should be released with cuMemFree.
    ///
    /// Device memory oversubscription is possible for GPUs that have a non-zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`]. Managed memory on such GPUs may be evicted from device memory to host memory at any time by the Unified Memory driver in order to make room for other allocations.
    ///
    /// In a system where all GPUs have a non-zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`], managed memory may not be populated when this API returns and instead may be populated on access. In such systems, managed memory can migrate to any processor’s memory at any time. The Unified Memory driver will employ heuristics to maintain data locality and prevent excessive page faults to the extent possible. The application can also guide the driver about memory usage patterns via cuMemAdvise. The application can also explicitly migrate memory to a desired processor’s memory via cuMemPrefetchAsync.
    ///
    /// In a multi-GPU system where all of the GPUs have a zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`] and all the GPUs have peer-to-peer support with each other, the physical storage for managed memory is created on the GPU which is active at the time [`cuMemAllocManaged`] is called. All other GPUs will reference the data at reduced bandwidth via peer mappings over the PCIe bus. The Unified Memory driver does not migrate memory among such GPUs.
    ///
    /// In a multi-GPU system where not all GPUs have peer-to-peer support with each other and where the value of the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`] is zero for at least one of those GPUs, the location chosen for physical storage of managed memory is system-dependent.
    ///
    /// # Parameters
    ///
    /// - `dptr`: Returned device pointer.
    /// - `bytesize`: Requested allocation size in bytes.
    /// - `flags`: Must be one of [`CUmemAttach_flags_enum::CU_MEM_ATTACH_GLOBAL`] or [`CUmemAttach_flags_enum::CU_MEM_ATTACH_HOST`].
    pub fn cuMemAllocManaged(
        dptr: *mut CUdeviceptr,
        bytesize: size_t,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Registers a callback function to receive async notifications.
    ///
    /// Registers `callbackFunc` to receive async notifications.
    ///
    /// The `userData`
    ///
    /// parameter is passed to the callback function at async notification time.
    ///
    /// Likewise,
    ///
    /// The callback function being registered should be designed to return quickly (~10ms).
    ///
    /// Any long running tasks should be queued for execution on an application thread.
    ///
    /// Callbacks may not call cuDeviceRegisterAsyncNotification or cuDeviceUnregisterAsyncNotification. Doing so will result in [`cudaError_enum::CUDA_ERROR_NOT_PERMITTED`]. Async notification callbacks execute in an undefined order and may be serialized.
    ///
    /// Returns in `*callback` a handle representing the registered callback instance.
    ///
    /// # Parameters
    ///
    /// - `device`: The device on which to register the callback.
    /// - `callbackFunc`: The function to register as a callback.
    /// - `userData`: A generic pointer to user data. This is passed into the callback function.
    /// - `callback`: A handle representing the registered callback instance.
    pub fn cuDeviceRegisterAsyncNotification(
        device: CUdevice,
        callbackFunc: CUasyncCallback,
        userData: *mut ::core::ffi::c_void,
        callback: *mut CUasyncCallbackHandle,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Unregisters an async notification callback.
    ///
    /// Unregisters `callback` so that the corresponding callback function will stop receiving async notifications.
    ///
    /// # Parameters
    ///
    /// - `device`: The device from which to remove `callback`.
    /// - `callback`: The callback instance to unregister from receiving async notifications.
    pub fn cuDeviceUnregisterAsyncNotification(
        device: CUdevice,
        callback: CUasyncCallbackHandle,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a handle to a compute device.
    ///
    /// Returns in `*device` a device handle given a PCI bus ID string.
    ///
    /// where `domain`, `bus`, `device`, and `function` are all hexadecimal values.
    ///
    /// # Parameters
    ///
    /// - `dev`: Returned device handle.
    /// - `pciBusId`: String in one of the following forms.
    pub fn cuDeviceGetByPCIBusId(
        dev: *mut CUdevice,
        pciBusId: *const ::core::ffi::c_char,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a PCI Bus Id string for the device.
    ///
    /// Returns an ASCII string identifying the device `dev` in the NULL-terminated string pointed to by `pciBusId`. `len` specifies the maximum length of the string that may be returned.
    ///
    /// where `domain`, `bus`, `device`, and `function` are all hexadecimal values. pciBusId should be large enough to store 13 characters including the NULL-terminator.
    ///
    /// # Parameters
    ///
    /// - `pciBusId`: Returned identifier string for the device in the following format.
    /// - `len`: Maximum length of string to store in `name`.
    /// - `dev`: Device to get identifier string for.
    pub fn cuDeviceGetPCIBusId(
        pciBusId: *mut ::core::ffi::c_char,
        len: ::core::ffi::c_int,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets an interprocess handle for a previously allocated event.
    ///
    /// Takes as input a previously allocated event. This event must have been created with the [`CUevent_flags_enum::CU_EVENT_INTERPROCESS`] and [`CUevent_flags_enum::CU_EVENT_DISABLE_TIMING`] flags set. This opaque handle may be copied into other processes and opened with [`cuIpcOpenEventHandle`] to allow efficient hardware synchronization between GPU work in different processes.
    ///
    /// After the event has been opened in the importing process, [`cuEventRecord`], [`cuEventSynchronize`], [`cuStreamWaitEvent`] and [`cuEventQuery`] may be used in either process. Performing operations on the imported event after the exported event has been freed with cuEventDestroy will result in undefined behavior.
    ///
    /// IPC functionality is restricted to devices with support for unified addressing on Linux and Windows operating systems. IPC functionality on Windows is supported for compatibility purposes but not recommended as it comes with performance cost. Users can test their device for IPC functionality by calling [`cuDeviceGetAttribute`] with [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED`].
    ///
    /// # Parameters
    ///
    /// - `pHandle`: Pointer to a user allocated CUipcEventHandle in which to return the opaque event handle.
    /// - `event`: Event allocated with [`CUevent_flags_enum::CU_EVENT_INTERPROCESS`] and [`CUevent_flags_enum::CU_EVENT_DISABLE_TIMING`] flags.
    pub fn cuIpcGetEventHandle(
        pHandle: *mut CUipcEventHandle,
        event: CUevent,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Opens an interprocess event handle for use in the current process.
    ///
    /// Opens an interprocess event handle exported from another process with [`cuIpcGetEventHandle`]. This function returns a [`CUevent`] that behaves like a locally created event with the [`CUevent_flags_enum::CU_EVENT_DISABLE_TIMING`] flag specified. This event must be freed with cuEventDestroy.
    ///
    /// Performing operations on the imported event after the exported event has been freed with cuEventDestroy will result in undefined behavior.
    ///
    /// IPC functionality is restricted to devices with support for unified addressing on Linux and Windows operating systems. IPC functionality on Windows is supported for compatibility purposes but not recommended as it comes with performance cost. Users can test their device for IPC functionality by calling ::cuapiDeviceGetAttribute with [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED`].
    ///
    /// # Parameters
    ///
    /// - `phEvent`: Returns the imported event.
    /// - `handle`: Interprocess handle to open.
    pub fn cuIpcOpenEventHandle(
        phEvent: *mut CUevent,
        handle: CUipcEventHandle,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets an interprocess memory handle for an existing device memory allocation.
    ///
    /// Takes a pointer to the base of an existing device memory allocation created with cuMemAlloc and exports it for use in another process. This is a lightweight operation and may be called multiple times on an allocation without adverse effects.
    ///
    /// If a region of memory is freed with cuMemFree and a subsequent call to cuMemAlloc returns memory with the same device address, [`cuIpcGetMemHandle`] will return a unique handle for the new memory.
    ///
    /// IPC functionality is restricted to devices with support for unified addressing on Linux and Windows operating systems. IPC functionality on Windows is supported for compatibility purposes but not recommended as it comes with performance cost. Users can test their device for IPC functionality by calling ::cuapiDeviceGetAttribute with [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED`].
    ///
    /// # Parameters
    ///
    /// - `pHandle`: Pointer to user allocated CUipcMemHandle to return the handle in.
    /// - `dptr`: Base pointer to previously allocated device memory.
    pub fn cuIpcGetMemHandle(
        pHandle: *mut CUipcMemHandle,
        dptr: CUdeviceptr,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process.
    ///
    /// Maps memory exported from another process with ::cuIpcGetMemHandle into the current device address space. For contexts on different devices ::cuIpcOpenMemHandle can attempt to enable peer access between the devices as if the user called ::cuCtxEnablePeerAccess. This behavior is controlled by the ::CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS flag. ::cuDeviceCanAccessPeer can determine if a mapping is possible.
    ///
    /// Contexts that may open ::CUipcMemHandles are restricted in the following way. ::CUipcMemHandles from each ::CUdevice in a given process may only be opened by one ::CUcontext per ::CUdevice per other process.
    ///
    /// If the memory handle has already been opened by the current context, the reference count on the handle is incremented by 1 and the existing device pointer is returned.
    ///
    /// Memory returned from ::cuIpcOpenMemHandle must be freed with ::cuIpcCloseMemHandle.
    ///
    /// Calling ::cuMemFree on an exported memory region before calling ::cuIpcCloseMemHandle in the importing context will result in undefined behavior.
    ///
    /// IPC functionality is restricted to devices with support for unified addressing on Linux and Windows operating systems. IPC functionality on Windows is supported for compatibility purposes but not recommended as it comes with performance cost. Users can test their device for IPC functionality by calling ::cuapiDeviceGetAttribute with ::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_MAP_FAILED, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_TOO_MANY_PEERS, ::CUDA_ERROR_INVALID_VALUE
    ///
    ///
    ///
    /// Note: No guarantees are made about the address returned in `*pdptr`. In particular, multiple processes may not receive the same address for the same `handle`.
    ///
    ///
    ///
    /// See also: ::cuMemAlloc, ::cuMemFree, ::cuIpcGetEventHandle, ::cuIpcOpenEventHandle, ::cuIpcGetMemHandle, ::cuIpcCloseMemHandle, ::cuCtxEnablePeerAccess, ::cuDeviceCanAccessPeer, ::cudaIpcOpenMemHandle
    ///
    /// # Parameters
    ///
    /// - `pdptr`: - Returned device pointer
    /// - `handle`: - ::CUipcMemHandle to open
    /// - `Flags`: - Flags for this operation. Must be specified as ::CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS
    pub fn cuIpcOpenMemHandle_v2(
        pdptr: *mut CUdeviceptr,
        handle: CUipcMemHandle,
        Flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Attempts to close memory mapped with cuIpcOpenMemHandle.
    ///
    /// Decrements the reference count of the memory returned by cuIpcOpenMemHandle by 1. When the reference count reaches 0, this API unmaps the memory. The original allocation in the exporting process as well as imported mappings in other processes will be unaffected.
    ///
    /// Any resources used to enable peer access will be freed if this is the last mapping using them.
    ///
    /// IPC functionality is restricted to devices with support for unified addressing on Linux and Windows operating systems. IPC functionality on Windows is supported for compatibility purposes but not recommended as it comes with performance cost. Users can test their device for IPC functionality by calling ::cuapiDeviceGetAttribute with [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED`].
    ///
    /// # Parameters
    ///
    /// - `dptr`: - Device pointer returned by ::cuIpcOpenMemHandle
    pub fn cuIpcCloseMemHandle(dptr: CUdeviceptr) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Registers an existing host memory range for use by CUDA
    ///
    /// Page-locks the memory range specified by `p` and `bytesize` and maps it for the device(s) as specified by `Flags`. This memory range also is added to the same tracking mechanism as ::cuMemHostAlloc to automatically accelerate calls to functions such as ::cuMemcpyHtoD(). Since the memory can be accessed directly by the device, it can be read or written with much higher bandwidth than pageable memory that has not been registered.  Page-locking excessive amounts of memory may degrade system performance, since it reduces the amount of memory available to the system for paging. As a result, this function is best used sparingly to register staging areas for data exchange between host and device.
    ///
    /// On systems where ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES is true, ::cuMemHostRegister will not page-lock the memory range specified by `ptr` but only populate unpopulated pages.
    ///
    /// The `Flags` parameter enables different options to be specified that affect the allocation, as follows.
    ///
    /// - ::CU_MEMHOSTREGISTER_PORTABLE: The memory returned by this call will be considered as pinned memory by all CUDA contexts, not just the one that performed the allocation.
    ///
    /// - ::CU_MEMHOSTREGISTER_DEVICEMAP: Maps the allocation into the CUDA address space. The device pointer to the memory may be obtained by calling ::cuMemHostGetDevicePointer().
    ///
    /// - ::CU_MEMHOSTREGISTER_IOMEMORY: The pointer is treated as pointing to some I/O memory space, e.g. the PCI Express resource of a 3rd party device.
    ///
    /// - ::CU_MEMHOSTREGISTER_READ_ONLY: The pointer is treated as pointing to memory that is considered read-only by the device.  On platforms without ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, this flag is required in order to register memory mapped to the CPU as read-only.  Support for the use of this flag can be queried from the device attribute ::CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED.  Using this flag with a current context associated with a device that does not have this attribute set will cause ::cuMemHostRegister to error with CUDA_ERROR_NOT_SUPPORTED.
    ///
    /// All of these flags are orthogonal to one another: a developer may page-lock memory that is portable or mapped with no restrictions.
    ///
    /// The ::CU_MEMHOSTREGISTER_DEVICEMAP flag may be specified on CUDA contexts for devices that do not support mapped pinned memory. The failure is deferred to ::cuMemHostGetDevicePointer() because the memory may be mapped into other CUDA contexts via the ::CU_MEMHOSTREGISTER_PORTABLE flag.
    ///
    /// For devices that have a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, the memory can also be accessed from the device using the host pointer `p`. The device pointer returned by ::cuMemHostGetDevicePointer() may or may not match the original host pointer `ptr` and depends on the devices visible to the application. If all devices visible to the application have a non-zero value for the device attribute, the device pointer returned by ::cuMemHostGetDevicePointer() will match the original pointer `ptr`. If any device visible to the application has a zero value for the device attribute, the device pointer returned by ::cuMemHostGetDevicePointer() will not match the original host pointer `ptr`, but it will be suitable for use on all devices provided Unified Virtual Addressing is enabled. In such systems, it is valid to access the memory using either pointer on devices that have a non-zero value for the device attribute. Note however that such devices should access the memory using only of the two pointers and not both.
    ///
    /// The memory page-locked by this function must be unregistered with ::cuMemHostUnregister().
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_OUT_OF_MEMORY, ::CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED, ::CUDA_ERROR_NOT_PERMITTED, ::CUDA_ERROR_NOT_SUPPORTED ::CUDA_ERROR_EXTERNAL_DEVICE
    ///
    ///
    ///
    /// See also: ::cuMemHostUnregister, ::cuMemHostGetFlags, ::cuMemHostGetDevicePointer, ::cudaHostRegister
    ///
    /// # Parameters
    ///
    /// - `p`: - Host pointer to memory to page-lock
    /// - `bytesize`: - Size in bytes of the address range to page-lock
    /// - `Flags`: - Flags for allocation request
    pub fn cuMemHostRegister_v2(
        p: *mut ::core::ffi::c_void,
        bytesize: size_t,
        Flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Unregisters a memory range that was registered with cuMemHostRegister.
    ///
    /// Unmaps the memory range whose base address is specified by `p`, and makes it pageable again.
    ///
    /// The base address must be the same one specified to cuMemHostRegister().
    ///
    /// # Parameters
    ///
    /// - `p`: - Host pointer to memory to unregister
    pub fn cuMemHostUnregister(p: *mut ::core::ffi::c_void) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory.
    ///
    /// Copies data between two pointers. `dst` and `src` are base pointers of the destination and source, respectively. `ByteCount` specifies the number of bytes to copy. Note that this function infers the type of the transfer (host to host, host to device, device to device, or device to host) from the pointer values. This function is only allowed in contexts which support unified addressing.
    ///
    /// # Parameters
    ///
    /// - `dst`: Destination unified virtual address space pointer.
    /// - `src`: Source unified virtual address space pointer.
    /// - `ByteCount`: Size of memory copy in bytes.
    pub fn cuMemcpy(dst: CUdeviceptr, src: CUdeviceptr, ByteCount: size_t) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies device memory between two contexts.
    ///
    /// Copies from device memory in one context to device memory in another context. `dstDevice` is the base device pointer of the destination memory and `dstContext` is the destination context. `srcDevice` is the base device pointer of the source memory and `srcContext` is the source pointer. `ByteCount` specifies the number of bytes to copy.
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: Destination device pointer.
    /// - `dstContext`: Destination context.
    /// - `srcDevice`: Source device pointer.
    /// - `srcContext`: Source context.
    /// - `ByteCount`: Size of memory copy in bytes.
    pub fn cuMemcpyPeer(
        dstDevice: CUdeviceptr,
        dstContext: CUcontext,
        srcDevice: CUdeviceptr,
        srcContext: CUcontext,
        ByteCount: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Host to Device
    ///
    /// Copies from host memory to device memory. `dstDevice` and `srcHost` are the base addresses of the destination and source, respectively. `ByteCount` specifies the number of bytes to copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _sync
    ///
    /// Note: _memcpy
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemcpy, ::cudaMemcpyToSymbol
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: - Destination device pointer
    /// - `srcHost`: - Source host pointer
    /// - `ByteCount`: - Size of memory copy in bytes
    pub fn cuMemcpyHtoD_v2(
        dstDevice: CUdeviceptr,
        srcHost: *const ::core::ffi::c_void,
        ByteCount: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Device to Host
    ///
    /// Copies from device to host memory. `dstHost` and `srcDevice` specify the base pointers of the destination and source, respectively. `ByteCount` specifies the number of bytes to copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _sync
    ///
    /// Note: _memcpy
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemcpy, ::cudaMemcpyFromSymbol
    ///
    /// # Parameters
    ///
    /// - `dstHost`: - Destination host pointer
    /// - `srcDevice`: - Source device pointer
    /// - `ByteCount`: - Size of memory copy in bytes
    pub fn cuMemcpyDtoH_v2(
        dstHost: *mut ::core::ffi::c_void,
        srcDevice: CUdeviceptr,
        ByteCount: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Device to Device
    ///
    /// Copies from device memory to device memory. `dstDevice` and `srcDevice` are the base pointers of the destination and source, respectively. `ByteCount` specifies the number of bytes to copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _sync
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemcpy, ::cudaMemcpyToSymbol, ::cudaMemcpyFromSymbol
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: - Destination device pointer
    /// - `srcDevice`: - Source device pointer
    /// - `ByteCount`: - Size of memory copy in bytes
    pub fn cuMemcpyDtoD_v2(
        dstDevice: CUdeviceptr,
        srcDevice: CUdeviceptr,
        ByteCount: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Device to Array
    ///
    /// Copies from device memory to a 1D CUDA array. `dstArray` and `dstOffset` specify the CUDA array handle and starting index of the destination data. `srcDevice` specifies the base pointer of the source. `ByteCount` specifies the number of bytes to copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _sync
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemcpyToArray
    ///
    /// # Parameters
    ///
    /// - `dstArray`: - Destination array
    /// - `dstOffset`: - Offset in bytes of destination array
    /// - `srcDevice`: - Source device pointer
    /// - `ByteCount`: - Size of memory copy in bytes
    pub fn cuMemcpyDtoA_v2(
        dstArray: CUarray,
        dstOffset: size_t,
        srcDevice: CUdeviceptr,
        ByteCount: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Array to Device
    ///
    /// Copies from one 1D CUDA array to device memory. `dstDevice` specifies the base pointer of the destination and must be naturally aligned with the CUDA array elements. `srcArray` and `srcOffset` specify the CUDA array handle and the offset in bytes into the array where the copy is to begin. `ByteCount` specifies the number of bytes to copy and must be evenly divisible by the array element size.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _sync
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemcpyFromArray
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: - Destination device pointer
    /// - `srcArray`: - Source array
    /// - `srcOffset`: - Offset in bytes of source array
    /// - `ByteCount`: - Size of memory copy in bytes
    pub fn cuMemcpyAtoD_v2(
        dstDevice: CUdeviceptr,
        srcArray: CUarray,
        srcOffset: size_t,
        ByteCount: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Host to Array
    ///
    /// Copies from host memory to a 1D CUDA array. `dstArray` and `dstOffset` specify the CUDA array handle and starting offset in bytes of the destination data.  `pSrc` specifies the base address of the source. `ByteCount` specifies the number of bytes to copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _sync
    ///
    /// Note: _memcpy
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemcpyToArray
    ///
    /// # Parameters
    ///
    /// - `dstArray`: - Destination array
    /// - `dstOffset`: - Offset in bytes of destination array
    /// - `srcHost`: - Source host pointer
    /// - `ByteCount`: - Size of memory copy in bytes
    pub fn cuMemcpyHtoA_v2(
        dstArray: CUarray,
        dstOffset: size_t,
        srcHost: *const ::core::ffi::c_void,
        ByteCount: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Array to Host
    ///
    /// Copies from one 1D CUDA array to host memory. `dstHost` specifies the base pointer of the destination. `srcArray` and `srcOffset` specify the CUDA array handle and starting offset in bytes of the source data. `ByteCount` specifies the number of bytes to copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _sync
    ///
    /// Note: _memcpy
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemcpyFromArray
    ///
    /// # Parameters
    ///
    /// - `dstHost`: - Destination device pointer
    /// - `srcArray`: - Source array
    /// - `srcOffset`: - Offset in bytes of source array
    /// - `ByteCount`: - Size of memory copy in bytes
    pub fn cuMemcpyAtoH_v2(
        dstHost: *mut ::core::ffi::c_void,
        srcArray: CUarray,
        srcOffset: size_t,
        ByteCount: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Array to Array
    ///
    /// Copies from one 1D CUDA array to another. `dstArray` and `srcArray` specify the handles of the destination and source CUDA arrays for the copy, respectively. `dstOffset` and `srcOffset` specify the destination and source offsets in bytes into the CUDA arrays. `ByteCount` is the number of bytes to be copied. The size of the elements in the CUDA arrays need not be the same format, but the elements must be the same size; and count must be evenly divisible by that size.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _sync
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemcpyArrayToArray
    ///
    /// # Parameters
    ///
    /// - `dstArray`: - Destination array
    /// - `dstOffset`: - Offset in bytes of destination array
    /// - `srcArray`: - Source array
    /// - `srcOffset`: - Offset in bytes of source array
    /// - `ByteCount`: - Size of memory copy in bytes
    pub fn cuMemcpyAtoA_v2(
        dstArray: CUarray,
        dstOffset: size_t,
        srcArray: CUarray,
        srcOffset: size_t,
        ByteCount: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory for 2D arrays
    ///
    /// Perform a 2D memory copy according to the parameters specified in `pCopy`. The ::CUDA_MEMCPY2D structure is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///    typedef struct CUDA_MEMCPY2D_st {
    ///       unsigned int srcXInBytes, srcY;
    ///       CUmemorytype srcMemoryType;
    ///           const void *srcHost;
    ///           CUdeviceptr srcDevice;
    ///           CUarray srcArray;
    ///           unsigned int srcPitch;
    ///
    ///       unsigned int dstXInBytes, dstY;
    ///       CUmemorytype dstMemoryType;
    ///           void *dstHost;
    ///           CUdeviceptr dstDevice;
    ///           CUarray dstArray;
    ///           unsigned int dstPitch;
    ///
    ///       unsigned int WidthInBytes;
    ///       unsigned int Height;
    ///    } CUDA_MEMCPY2D;
    /// ```
    ///
    /// where:
    /// - ::srcMemoryType and ::dstMemoryType specify the type of memory of the source and destination, respectively; ::CUmemorytype_enum is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///    typedef enum CUmemorytype_enum {
    ///       CU_MEMORYTYPE_HOST = 0x01,
    ///       CU_MEMORYTYPE_DEVICE = 0x02,
    ///       CU_MEMORYTYPE_ARRAY = 0x03,
    ///       CU_MEMORYTYPE_UNIFIED = 0x04
    ///    } CUmemorytype;
    /// ```
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::srcDevice and ::srcPitch specify the (unified virtual address space) base address of the source data and the bytes per row to apply.  ::srcArray is ignored. This value may be used only if unified addressing is supported in the calling context.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_HOST, ::srcHost and ::srcPitch specify the (host) base address of the source data and the bytes per row to apply. ::srcArray is ignored.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_DEVICE, ::srcDevice and ::srcPitch specify the (device) base address of the source data and the bytes per row to apply. ::srcArray is ignored.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_ARRAY, ::srcArray specifies the handle of the source data. ::srcHost, ::srcDevice and ::srcPitch are ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_HOST, ::dstHost and ::dstPitch specify the (host) base address of the destination data and the bytes per row to apply. ::dstArray is ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::dstDevice and ::dstPitch specify the (unified virtual address space) base address of the source data and the bytes per row to apply.  ::dstArray is ignored. This value may be used only if unified addressing is supported in the calling context.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_DEVICE, ::dstDevice and ::dstPitch specify the (device) base address of the destination data and the bytes per row to apply. ::dstArray is ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_ARRAY, ::dstArray specifies the handle of the destination data. ::dstHost, ::dstDevice and ::dstPitch are ignored.
    ///
    /// - ::srcXInBytes and ::srcY specify the base address of the source data for the copy.
    ///
    ///
    ///
    /// For host pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   void* Start = (void*)((char*)srcHost+srcY*srcPitch + srcXInBytes);
    /// ```
    ///
    ///
    ///
    /// For device pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   CUdeviceptr Start = srcDevice+srcY*srcPitch+srcXInBytes;
    /// ```
    ///
    ///
    ///
    /// For CUDA arrays, ::srcXInBytes must be evenly divisible by the array element size.
    ///
    /// - ::dstXInBytes and ::dstY specify the base address of the destination data for the copy.
    ///
    ///
    ///
    /// For host pointers, the base address is
    ///
    ///
    ///
    /// ```text
    ///   void* dstStart = (void*)((char*)dstHost+dstY*dstPitch + dstXInBytes);
    /// ```
    ///
    ///
    ///
    /// For device pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   CUdeviceptr dstStart = dstDevice+dstY*dstPitch+dstXInBytes;
    /// ```
    ///
    ///
    ///
    /// For CUDA arrays, ::dstXInBytes must be evenly divisible by the array element size.
    ///
    /// - ::WidthInBytes and ::Height specify the width (in bytes) and height of the 2D copy being performed.
    /// - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes + ::srcXInBytes, and ::dstPitch must be greater than or equal to ::WidthInBytes + dstXInBytes.
    ///
    ///
    ///
    /// ::cuMemcpy2D() returns an error if any pitch is greater than the maximum allowed (::CU_DEVICE_ATTRIBUTE_MAX_PITCH). ::cuMemAllocPitch() passes back pitches that always work with ::cuMemcpy2D(). On intra-device memory copies (device to device, CUDA array to device, CUDA array to CUDA array), ::cuMemcpy2D() may fail for pitches not computed by ::cuMemAllocPitch(). ::cuMemcpy2DUnaligned() does not have this restriction, but may run significantly slower in the cases where ::cuMemcpy2D() would have returned an error code.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _sync
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemcpy2D, ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray
    ///
    /// # Parameters
    ///
    /// - `pCopy`: - Parameters for the memory copy
    pub fn cuMemcpy2D_v2(pCopy: *const CUDA_MEMCPY2D) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory for 2D arrays
    ///
    /// Perform a 2D memory copy according to the parameters specified in `pCopy`. The ::CUDA_MEMCPY2D structure is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///    typedef struct CUDA_MEMCPY2D_st {
    ///       unsigned int srcXInBytes, srcY;
    ///       CUmemorytype srcMemoryType;
    ///       const void *srcHost;
    ///       CUdeviceptr srcDevice;
    ///       CUarray srcArray;
    ///       unsigned int srcPitch;
    ///       unsigned int dstXInBytes, dstY;
    ///       CUmemorytype dstMemoryType;
    ///       void *dstHost;
    ///       CUdeviceptr dstDevice;
    ///       CUarray dstArray;
    ///       unsigned int dstPitch;
    ///       unsigned int WidthInBytes;
    ///       unsigned int Height;
    ///    } CUDA_MEMCPY2D;
    /// ```
    ///
    /// where:
    /// - ::srcMemoryType and ::dstMemoryType specify the type of memory of the source and destination, respectively; ::CUmemorytype_enum is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///    typedef enum CUmemorytype_enum {
    ///       CU_MEMORYTYPE_HOST = 0x01,
    ///       CU_MEMORYTYPE_DEVICE = 0x02,
    ///       CU_MEMORYTYPE_ARRAY = 0x03,
    ///       CU_MEMORYTYPE_UNIFIED = 0x04
    ///    } CUmemorytype;
    /// ```
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::srcDevice and ::srcPitch specify the (unified virtual address space) base address of the source data and the bytes per row to apply.  ::srcArray is ignored. This value may be used only if unified addressing is supported in the calling context.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_HOST, ::srcHost and ::srcPitch specify the (host) base address of the source data and the bytes per row to apply. ::srcArray is ignored.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_DEVICE, ::srcDevice and ::srcPitch specify the (device) base address of the source data and the bytes per row to apply. ::srcArray is ignored.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_ARRAY, ::srcArray specifies the handle of the source data. ::srcHost, ::srcDevice and ::srcPitch are ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::dstDevice and ::dstPitch specify the (unified virtual address space) base address of the source data and the bytes per row to apply.  ::dstArray is ignored. This value may be used only if unified addressing is supported in the calling context.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_HOST, ::dstHost and ::dstPitch specify the (host) base address of the destination data and the bytes per row to apply. ::dstArray is ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_DEVICE, ::dstDevice and ::dstPitch specify the (device) base address of the destination data and the bytes per row to apply. ::dstArray is ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_ARRAY, ::dstArray specifies the handle of the destination data. ::dstHost, ::dstDevice and ::dstPitch are ignored.
    ///
    /// - ::srcXInBytes and ::srcY specify the base address of the source data for the copy.
    ///
    ///
    ///
    /// For host pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   void* Start = (void*)((char*)srcHost+srcY*srcPitch + srcXInBytes);
    /// ```
    ///
    ///
    ///
    /// For device pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   CUdeviceptr Start = srcDevice+srcY*srcPitch+srcXInBytes;
    /// ```
    ///
    ///
    ///
    /// For CUDA arrays, ::srcXInBytes must be evenly divisible by the array element size.
    ///
    /// - ::dstXInBytes and ::dstY specify the base address of the destination data for the copy.
    ///
    ///
    ///
    /// For host pointers, the base address is
    ///
    ///
    ///
    /// ```text
    ///   void* dstStart = (void*)((char*)dstHost+dstY*dstPitch + dstXInBytes);
    /// ```
    ///
    ///
    ///
    /// For device pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   CUdeviceptr dstStart = dstDevice+dstY*dstPitch+dstXInBytes;
    /// ```
    ///
    ///
    ///
    /// For CUDA arrays, ::dstXInBytes must be evenly divisible by the array element size.
    ///
    /// - ::WidthInBytes and ::Height specify the width (in bytes) and height of the 2D copy being performed.
    /// - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes + ::srcXInBytes, and ::dstPitch must be greater than or equal to ::WidthInBytes + dstXInBytes.
    ///
    ///
    ///
    /// ::cuMemcpy2D() returns an error if any pitch is greater than the maximum allowed (::CU_DEVICE_ATTRIBUTE_MAX_PITCH). ::cuMemAllocPitch() passes back pitches that always work with ::cuMemcpy2D(). On intra-device memory copies (device to device, CUDA array to device, CUDA array to CUDA array), ::cuMemcpy2D() may fail for pitches not computed by ::cuMemAllocPitch(). ::cuMemcpy2DUnaligned() does not have this restriction, but may run significantly slower in the cases where ::cuMemcpy2D() would have returned an error code.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _sync
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemcpy2D, ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray
    ///
    /// # Parameters
    ///
    /// - `pCopy`: - Parameters for the memory copy
    pub fn cuMemcpy2DUnaligned_v2(pCopy: *const CUDA_MEMCPY2D) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory for 3D arrays
    ///
    /// Perform a 3D memory copy according to the parameters specified in `pCopy`. The ::CUDA_MEMCPY3D structure is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///         typedef struct CUDA_MEMCPY3D_st {
    ///
    ///             unsigned int srcXInBytes, srcY, srcZ;
    ///             unsigned int srcLOD;
    ///             CUmemorytype srcMemoryType;
    ///                 const void *srcHost;
    ///                 CUdeviceptr srcDevice;
    ///                 CUarray srcArray;
    ///                 unsigned int srcPitch;  // ignored when src is array
    ///                 unsigned int srcHeight; // ignored when src is array; may be 0 if Depth==1
    ///
    ///             unsigned int dstXInBytes, dstY, dstZ;
    ///             unsigned int dstLOD;
    ///             CUmemorytype dstMemoryType;
    ///                 void *dstHost;
    ///                 CUdeviceptr dstDevice;
    ///                 CUarray dstArray;
    ///                 unsigned int dstPitch;  // ignored when dst is array
    ///                 unsigned int dstHeight; // ignored when dst is array; may be 0 if Depth==1
    ///
    ///             unsigned int WidthInBytes;
    ///             unsigned int Height;
    ///             unsigned int Depth;
    ///         } CUDA_MEMCPY3D;
    /// ```
    ///
    /// where:
    /// - ::srcMemoryType and ::dstMemoryType specify the type of memory of the source and destination, respectively; ::CUmemorytype_enum is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///    typedef enum CUmemorytype_enum {
    ///       CU_MEMORYTYPE_HOST = 0x01,
    ///       CU_MEMORYTYPE_DEVICE = 0x02,
    ///       CU_MEMORYTYPE_ARRAY = 0x03,
    ///       CU_MEMORYTYPE_UNIFIED = 0x04
    ///    } CUmemorytype;
    /// ```
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::srcDevice and ::srcPitch specify the (unified virtual address space) base address of the source data and the bytes per row to apply.  ::srcArray is ignored. This value may be used only if unified addressing is supported in the calling context.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_HOST, ::srcHost, ::srcPitch and ::srcHeight specify the (host) base address of the source data, the bytes per row, and the height of each 2D slice of the 3D array. ::srcArray is ignored.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_DEVICE, ::srcDevice, ::srcPitch and ::srcHeight specify the (device) base address of the source data, the bytes per row, and the height of each 2D slice of the 3D array. ::srcArray is ignored.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_ARRAY, ::srcArray specifies the handle of the source data. ::srcHost, ::srcDevice, ::srcPitch and ::srcHeight are ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::dstDevice and ::dstPitch specify the (unified virtual address space) base address of the source data and the bytes per row to apply.  ::dstArray is ignored. This value may be used only if unified addressing is supported in the calling context.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_HOST, ::dstHost and ::dstPitch specify the (host) base address of the destination data, the bytes per row, and the height of each 2D slice of the 3D array. ::dstArray is ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_DEVICE, ::dstDevice and ::dstPitch specify the (device) base address of the destination data, the bytes per row, and the height of each 2D slice of the 3D array. ::dstArray is ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_ARRAY, ::dstArray specifies the handle of the destination data. ::dstHost, ::dstDevice, ::dstPitch and ::dstHeight are ignored.
    ///
    /// - ::srcXInBytes, ::srcY and ::srcZ specify the base address of the source data for the copy.
    ///
    ///
    ///
    /// For host pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   void* Start = (void*)((char*)srcHost+(srcZ*srcHeight+srcY)*srcPitch + srcXInBytes);
    /// ```
    ///
    ///
    ///
    /// For device pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   CUdeviceptr Start = srcDevice+(srcZ*srcHeight+srcY)*srcPitch+srcXInBytes;
    /// ```
    ///
    ///
    ///
    /// For CUDA arrays, ::srcXInBytes must be evenly divisible by the array element size.
    ///
    /// - dstXInBytes, ::dstY and ::dstZ specify the base address of the destination data for the copy.
    ///
    ///
    ///
    /// For host pointers, the base address is
    ///
    ///
    ///
    /// ```text
    ///   void* dstStart = (void*)((char*)dstHost+(dstZ*dstHeight+dstY)*dstPitch + dstXInBytes);
    /// ```
    ///
    ///
    ///
    /// For device pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   CUdeviceptr dstStart = dstDevice+(dstZ*dstHeight+dstY)*dstPitch+dstXInBytes;
    /// ```
    ///
    ///
    ///
    /// For CUDA arrays, ::dstXInBytes must be evenly divisible by the array element size.
    ///
    /// - ::WidthInBytes, ::Height and ::Depth specify the width (in bytes), height and depth of the 3D copy being performed.
    /// - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes + ::srcXInBytes, and ::dstPitch must be greater than or equal to ::WidthInBytes + dstXInBytes.
    /// - If specified, ::srcHeight must be greater than or equal to ::Height + ::srcY, and ::dstHeight must be greater than or equal to ::Height + ::dstY.
    ///
    ///
    ///
    /// ::cuMemcpy3D() returns an error if any pitch is greater than the maximum allowed (::CU_DEVICE_ATTRIBUTE_MAX_PITCH).
    ///
    /// The ::srcLOD and ::dstLOD members of the ::CUDA_MEMCPY3D structure must be set to 0.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _sync
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMemcpy3D
    ///
    /// # Parameters
    ///
    /// - `pCopy`: - Parameters for the memory copy
    pub fn cuMemcpy3D_v2(pCopy: *const CUDA_MEMCPY3D) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory between contexts.
    ///
    /// Perform a 3D memory copy according to the parameters specified in `pCopy`. See the definition of the CUDA_MEMCPY3D_PEER structure for documentation of its parameters.
    ///
    /// # Parameters
    ///
    /// - `pCopy`: - Parameters for the memory copy
    pub fn cuMemcpy3DPeer(pCopy: *const CUDA_MEMCPY3D_PEER) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory asynchronously.
    ///
    /// Copies data between two pointers. `dst` and `src` are base pointers of the destination and source, respectively. `ByteCount` specifies the number of bytes to copy. Note that this function infers the type of the transfer (host to host, host to device, device to device, or device to host) from the pointer values. This function is only allowed in contexts which support unified addressing.
    ///
    /// # Parameters
    ///
    /// - `dst`: Destination unified virtual address space pointer.
    /// - `src`: Source unified virtual address space pointer.
    /// - `ByteCount`: Size of memory copy in bytes.
    /// - `hStream`: Stream identifier.
    pub fn cuMemcpyAsync(
        dst: CUdeviceptr,
        src: CUdeviceptr,
        ByteCount: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies device memory between two contexts asynchronously.
    ///
    /// Copies from device memory in one context to device memory in another context. `dstDevice` is the base device pointer of the destination memory and `dstContext` is the destination context. `srcDevice` is the base device pointer of the source memory and `srcContext` is the source pointer. `ByteCount` specifies the number of bytes to copy.
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: Destination device pointer.
    /// - `dstContext`: Destination context.
    /// - `srcDevice`: Source device pointer.
    /// - `srcContext`: Source context.
    /// - `ByteCount`: Size of memory copy in bytes.
    /// - `hStream`: Stream identifier.
    pub fn cuMemcpyPeerAsync(
        dstDevice: CUdeviceptr,
        dstContext: CUcontext,
        srcDevice: CUdeviceptr,
        srcContext: CUcontext,
        ByteCount: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Host to Device
    ///
    /// Copies from host memory to device memory. `dstDevice` and `srcHost` are the base addresses of the destination and source, respectively. `ByteCount` specifies the number of bytes to copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE
    ///
    /// Note: _async
    ///
    /// Note: _null_stream
    ///
    /// Note: _memcpy
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemcpyAsync, ::cudaMemcpyToSymbolAsync
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: - Destination device pointer
    /// - `srcHost`: - Source host pointer
    /// - `ByteCount`: - Size of memory copy in bytes
    /// - `hStream`: - Stream identifier
    pub fn cuMemcpyHtoDAsync_v2(
        dstDevice: CUdeviceptr,
        srcHost: *const ::core::ffi::c_void,
        ByteCount: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Device to Host
    ///
    /// Copies from device to host memory. `dstHost` and `srcDevice` specify the base pointers of the destination and source, respectively. `ByteCount` specifies the number of bytes to copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE
    ///
    /// Note: _async
    ///
    /// Note: _null_stream
    ///
    /// Note: _memcpy
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemcpyAsync, ::cudaMemcpyFromSymbolAsync
    ///
    /// # Parameters
    ///
    /// - `dstHost`: - Destination host pointer
    /// - `srcDevice`: - Source device pointer
    /// - `ByteCount`: - Size of memory copy in bytes
    /// - `hStream`: - Stream identifier
    pub fn cuMemcpyDtoHAsync_v2(
        dstHost: *mut ::core::ffi::c_void,
        srcDevice: CUdeviceptr,
        ByteCount: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Device to Device
    ///
    /// Copies from device memory to device memory. `dstDevice` and `srcDevice` are the base pointers of the destination and source, respectively. `ByteCount` specifies the number of bytes to copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE
    ///
    /// Note: _async
    ///
    /// Note: _null_stream
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemcpyAsync, ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: - Destination device pointer
    /// - `srcDevice`: - Source device pointer
    /// - `ByteCount`: - Size of memory copy in bytes
    /// - `hStream`: - Stream identifier
    pub fn cuMemcpyDtoDAsync_v2(
        dstDevice: CUdeviceptr,
        srcDevice: CUdeviceptr,
        ByteCount: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Host to Array
    ///
    /// Copies from host memory to a 1D CUDA array. `dstArray` and `dstOffset` specify the CUDA array handle and starting offset in bytes of the destination data. `srcHost` specifies the base address of the source. `ByteCount` specifies the number of bytes to copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE
    ///
    /// Note: _async
    ///
    /// Note: _null_stream
    ///
    /// Note: _memcpy
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemcpyToArrayAsync
    ///
    /// # Parameters
    ///
    /// - `dstArray`: - Destination array
    /// - `dstOffset`: - Offset in bytes of destination array
    /// - `srcHost`: - Source host pointer
    /// - `ByteCount`: - Size of memory copy in bytes
    /// - `hStream`: - Stream identifier
    pub fn cuMemcpyHtoAAsync_v2(
        dstArray: CUarray,
        dstOffset: size_t,
        srcHost: *const ::core::ffi::c_void,
        ByteCount: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory from Array to Host
    ///
    /// Copies from one 1D CUDA array to host memory. `dstHost` specifies the base pointer of the destination. `srcArray` and `srcOffset` specify the CUDA array handle and starting offset in bytes of the source data. `ByteCount` specifies the number of bytes to copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE
    ///
    /// Note: _async
    ///
    /// Note: _null_stream
    ///
    /// Note: _memcpy
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemcpyFromArrayAsync
    ///
    /// # Parameters
    ///
    /// - `dstHost`: - Destination pointer
    /// - `srcArray`: - Source array
    /// - `srcOffset`: - Offset in bytes of source array
    /// - `ByteCount`: - Size of memory copy in bytes
    /// - `hStream`: - Stream identifier
    pub fn cuMemcpyAtoHAsync_v2(
        dstHost: *mut ::core::ffi::c_void,
        srcArray: CUarray,
        srcOffset: size_t,
        ByteCount: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory for 2D arrays
    ///
    /// Perform a 2D memory copy according to the parameters specified in `pCopy`. The ::CUDA_MEMCPY2D structure is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///    typedef struct CUDA_MEMCPY2D_st {
    ///       unsigned int srcXInBytes, srcY;
    ///       CUmemorytype srcMemoryType;
    ///       const void *srcHost;
    ///       CUdeviceptr srcDevice;
    ///       CUarray srcArray;
    ///       unsigned int srcPitch;
    ///       unsigned int dstXInBytes, dstY;
    ///       CUmemorytype dstMemoryType;
    ///       void *dstHost;
    ///       CUdeviceptr dstDevice;
    ///       CUarray dstArray;
    ///       unsigned int dstPitch;
    ///       unsigned int WidthInBytes;
    ///       unsigned int Height;
    ///    } CUDA_MEMCPY2D;
    /// ```
    ///
    /// where:
    /// - ::srcMemoryType and ::dstMemoryType specify the type of memory of the source and destination, respectively; ::CUmemorytype_enum is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///    typedef enum CUmemorytype_enum {
    ///       CU_MEMORYTYPE_HOST = 0x01,
    ///       CU_MEMORYTYPE_DEVICE = 0x02,
    ///       CU_MEMORYTYPE_ARRAY = 0x03,
    ///       CU_MEMORYTYPE_UNIFIED = 0x04
    ///    } CUmemorytype;
    /// ```
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_HOST, ::srcHost and ::srcPitch specify the (host) base address of the source data and the bytes per row to apply. ::srcArray is ignored.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::srcDevice and ::srcPitch specify the (unified virtual address space) base address of the source data and the bytes per row to apply.  ::srcArray is ignored. This value may be used only if unified addressing is supported in the calling context.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_DEVICE, ::srcDevice and ::srcPitch specify the (device) base address of the source data and the bytes per row to apply. ::srcArray is ignored.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_ARRAY, ::srcArray specifies the handle of the source data. ::srcHost, ::srcDevice and ::srcPitch are ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::dstDevice and ::dstPitch specify the (unified virtual address space) base address of the source data and the bytes per row to apply.  ::dstArray is ignored. This value may be used only if unified addressing is supported in the calling context.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_HOST, ::dstHost and ::dstPitch specify the (host) base address of the destination data and the bytes per row to apply. ::dstArray is ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_DEVICE, ::dstDevice and ::dstPitch specify the (device) base address of the destination data and the bytes per row to apply. ::dstArray is ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_ARRAY, ::dstArray specifies the handle of the destination data. ::dstHost, ::dstDevice and ::dstPitch are ignored.
    ///
    /// - ::srcXInBytes and ::srcY specify the base address of the source data for the copy.
    ///
    ///
    ///
    /// For host pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   void* Start = (void*)((char*)srcHost+srcY*srcPitch + srcXInBytes);
    /// ```
    ///
    ///
    ///
    /// For device pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   CUdeviceptr Start = srcDevice+srcY*srcPitch+srcXInBytes;
    /// ```
    ///
    ///
    ///
    /// For CUDA arrays, ::srcXInBytes must be evenly divisible by the array element size.
    ///
    /// - ::dstXInBytes and ::dstY specify the base address of the destination data for the copy.
    ///
    ///
    ///
    /// For host pointers, the base address is
    ///
    ///
    ///
    /// ```text
    ///   void* dstStart = (void*)((char*)dstHost+dstY*dstPitch + dstXInBytes);
    /// ```
    ///
    ///
    ///
    /// For device pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   CUdeviceptr dstStart = dstDevice+dstY*dstPitch+dstXInBytes;
    /// ```
    ///
    ///
    ///
    /// For CUDA arrays, ::dstXInBytes must be evenly divisible by the array element size.
    ///
    /// - ::WidthInBytes and ::Height specify the width (in bytes) and height of the 2D copy being performed.
    /// - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes + ::srcXInBytes, and ::dstPitch must be greater than or equal to ::WidthInBytes + dstXInBytes.
    /// - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes + ::srcXInBytes, and ::dstPitch must be greater than or equal to ::WidthInBytes + dstXInBytes.
    /// - If specified, ::srcHeight must be greater than or equal to ::Height + ::srcY, and ::dstHeight must be greater than or equal to ::Height + ::dstY.
    ///
    ///
    ///
    /// ::cuMemcpy2DAsync() returns an error if any pitch is greater than the maximum allowed (::CU_DEVICE_ATTRIBUTE_MAX_PITCH). ::cuMemAllocPitch() passes back pitches that always work with ::cuMemcpy2D(). On intra-device memory copies (device to device, CUDA array to device, CUDA array to CUDA array), ::cuMemcpy2DAsync() may fail for pitches not computed by ::cuMemAllocPitch().
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE
    ///
    /// Note: _async
    ///
    /// Note: _null_stream
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemcpy2DAsync, ::cudaMemcpy2DToArrayAsync, ::cudaMemcpy2DFromArrayAsync
    ///
    /// # Parameters
    ///
    /// - `pCopy`: - Parameters for the memory copy
    /// - `hStream`: - Stream identifier
    pub fn cuMemcpy2DAsync_v2(
        pCopy: *const CUDA_MEMCPY2D,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory for 3D arrays
    ///
    /// Perform a 3D memory copy according to the parameters specified in `pCopy`. The ::CUDA_MEMCPY3D structure is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///         typedef struct CUDA_MEMCPY3D_st {
    ///
    ///             unsigned int srcXInBytes, srcY, srcZ;
    ///             unsigned int srcLOD;
    ///             CUmemorytype srcMemoryType;
    ///                 const void *srcHost;
    ///                 CUdeviceptr srcDevice;
    ///                 CUarray srcArray;
    ///                 unsigned int srcPitch;  // ignored when src is array
    ///                 unsigned int srcHeight; // ignored when src is array; may be 0 if Depth==1
    ///
    ///             unsigned int dstXInBytes, dstY, dstZ;
    ///             unsigned int dstLOD;
    ///             CUmemorytype dstMemoryType;
    ///                 void *dstHost;
    ///                 CUdeviceptr dstDevice;
    ///                 CUarray dstArray;
    ///                 unsigned int dstPitch;  // ignored when dst is array
    ///                 unsigned int dstHeight; // ignored when dst is array; may be 0 if Depth==1
    ///
    ///             unsigned int WidthInBytes;
    ///             unsigned int Height;
    ///             unsigned int Depth;
    ///         } CUDA_MEMCPY3D;
    /// ```
    ///
    /// where:
    /// - ::srcMemoryType and ::dstMemoryType specify the type of memory of the source and destination, respectively; ::CUmemorytype_enum is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///    typedef enum CUmemorytype_enum {
    ///       CU_MEMORYTYPE_HOST = 0x01,
    ///       CU_MEMORYTYPE_DEVICE = 0x02,
    ///       CU_MEMORYTYPE_ARRAY = 0x03,
    ///       CU_MEMORYTYPE_UNIFIED = 0x04
    ///    } CUmemorytype;
    /// ```
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::srcDevice and ::srcPitch specify the (unified virtual address space) base address of the source data and the bytes per row to apply.  ::srcArray is ignored. This value may be used only if unified addressing is supported in the calling context.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_HOST, ::srcHost, ::srcPitch and ::srcHeight specify the (host) base address of the source data, the bytes per row, and the height of each 2D slice of the 3D array. ::srcArray is ignored.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_DEVICE, ::srcDevice, ::srcPitch and ::srcHeight specify the (device) base address of the source data, the bytes per row, and the height of each 2D slice of the 3D array. ::srcArray is ignored.
    ///
    ///
    ///
    /// If ::srcMemoryType is ::CU_MEMORYTYPE_ARRAY, ::srcArray specifies the handle of the source data. ::srcHost, ::srcDevice, ::srcPitch and ::srcHeight are ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::dstDevice and ::dstPitch specify the (unified virtual address space) base address of the source data and the bytes per row to apply.  ::dstArray is ignored. This value may be used only if unified addressing is supported in the calling context.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_HOST, ::dstHost and ::dstPitch specify the (host) base address of the destination data, the bytes per row, and the height of each 2D slice of the 3D array. ::dstArray is ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_DEVICE, ::dstDevice and ::dstPitch specify the (device) base address of the destination data, the bytes per row, and the height of each 2D slice of the 3D array. ::dstArray is ignored.
    ///
    ///
    ///
    /// If ::dstMemoryType is ::CU_MEMORYTYPE_ARRAY, ::dstArray specifies the handle of the destination data. ::dstHost, ::dstDevice, ::dstPitch and ::dstHeight are ignored.
    ///
    /// - ::srcXInBytes, ::srcY and ::srcZ specify the base address of the source data for the copy.
    ///
    ///
    ///
    /// For host pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   void* Start = (void*)((char*)srcHost+(srcZ*srcHeight+srcY)*srcPitch + srcXInBytes);
    /// ```
    ///
    ///
    ///
    /// For device pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   CUdeviceptr Start = srcDevice+(srcZ*srcHeight+srcY)*srcPitch+srcXInBytes;
    /// ```
    ///
    ///
    ///
    /// For CUDA arrays, ::srcXInBytes must be evenly divisible by the array element size.
    ///
    /// - dstXInBytes, ::dstY and ::dstZ specify the base address of the destination data for the copy.
    ///
    ///
    ///
    /// For host pointers, the base address is
    ///
    ///
    ///
    /// ```text
    ///   void* dstStart = (void*)((char*)dstHost+(dstZ*dstHeight+dstY)*dstPitch + dstXInBytes);
    /// ```
    ///
    ///
    ///
    /// For device pointers, the starting address is
    ///
    ///
    ///
    /// ```text
    ///   CUdeviceptr dstStart = dstDevice+(dstZ*dstHeight+dstY)*dstPitch+dstXInBytes;
    /// ```
    ///
    ///
    ///
    /// For CUDA arrays, ::dstXInBytes must be evenly divisible by the array element size.
    ///
    /// - ::WidthInBytes, ::Height and ::Depth specify the width (in bytes), height and depth of the 3D copy being performed.
    /// - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes + ::srcXInBytes, and ::dstPitch must be greater than or equal to ::WidthInBytes + dstXInBytes.
    /// - If specified, ::srcHeight must be greater than or equal to ::Height + ::srcY, and ::dstHeight must be greater than or equal to ::Height + ::dstY.
    ///
    ///
    ///
    /// ::cuMemcpy3DAsync() returns an error if any pitch is greater than the maximum allowed (::CU_DEVICE_ATTRIBUTE_MAX_PITCH).
    ///
    /// The ::srcLOD and ::dstLOD members of the ::CUDA_MEMCPY3D structure must be set to 0.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE
    ///
    /// Note: _async
    ///
    /// Note: _null_stream
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemcpy3DAsync
    ///
    /// # Parameters
    ///
    /// - `pCopy`: - Parameters for the memory copy
    /// - `hStream`: - Stream identifier
    pub fn cuMemcpy3DAsync_v2(
        pCopy: *const CUDA_MEMCPY3D,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies memory between contexts asynchronously.
    ///
    /// Perform a 3D memory copy according to the parameters specified in `pCopy`. See the definition of the CUDA_MEMCPY3D_PEER structure for documentation of its parameters.
    ///
    /// # Parameters
    ///
    /// - `pCopy`: Parameters for the memory copy.
    /// - `hStream`: Stream identifier.
    pub fn cuMemcpy3DPeerAsync(
        pCopy: *const CUDA_MEMCPY3D_PEER,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Performs a batch of memory copies asynchronously.
    ///
    /// Performs a batch of memory copies. The batch as a whole executes in stream order but copies within a batch are not guaranteed to execute in any specific order. This API only supports pointer-to-pointer copies. For copies involving CUDA arrays, please see ::cuMemcpy3DBatchAsync.
    ///
    /// Performs memory copies from source buffers specified in `srcs` to destination buffers specified in `dsts`. The size of each copy is specified in `sizes`. All three arrays must be of the same length as specified by `count`. Since there are no ordering guarantees for copies within a batch, specifying any dependent copies within a batch will result in undefined behavior.
    ///
    /// Every copy in the batch has to be associated with a set of attributes specified in the `attrs` array. Each entry in this array can apply to more than one copy. This can be done by specifying in the `attrsIdxs` array, the index of the first copy that the corresponding entry in the `attrs` array applies to. Both `attrs` and `attrsIdxs` must be of the same length as specified by `numAttrs`. For example, if a batch has 10 copies listed in dst/src/sizes, the first 6 of which have one set of attributes and the remaining 4 another, then `numAttrs` will be 2, `attrsIdxs` will be {0, 6} and `attrs` will contains the two sets of attributes. Note that the first entry in `attrsIdxs` must always be 0. Also, each entry must be greater than the previous entry and the last entry should be less than `count`. Furthermore, `numAttrs` must be lesser than or equal to `count`.
    ///
    /// The ::CUmemcpyAttributes::srcAccessOrder indicates the source access ordering to be observed for copies associated with the attribute. If the source access order is set to ::CU_MEMCPY_SRC_ACCESS_ORDER_STREAM, then the source will be accessed in stream order. If the source access order is set to ::CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL then it indicates that access to the source pointer can be out of stream order and all accesses must be complete before the API call returns. This flag is suited for ephemeral sources (ex., stack variables) when it's known that no prior operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the need for the user to synchronize the stream after the API call. If the source access order is set to ::CU_MEMCPY_SRC_ACCESS_ORDER_ANY then it indicates that access to the source pointer can be out of stream order and the accesses can happen even after the API call returns. This flag is suited for host pointers allocated outside CUDA (ex., via malloc) when it's known that no prior operations in the stream can be accessing the memory. Specifying this flag allows the driver to optimize the copy on certain platforms. Each memcpy operation in the batch must have a valid ::CUmemcpyAttributes corresponding to it including the appropriate srcAccessOrder setting, otherwise the API will return ::CUDA_ERROR_INVALID_VALUE.
    ///
    /// The ::CUmemcpyAttributes::srcLocHint and ::CUmemcpyAttributes::dstLocHint allows applications to specify hint locations for operands of a copy when the operand doesn't have a fixed location. That is, these hints are only applicable for managed memory pointers on devices where ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS is true or system-allocated pageable memory on devices where ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS is true. For other cases, these hints are ignored.
    ///
    /// The ::CUmemcpyAttributes::flags field can be used to specify certain flags for copies. Setting the ::CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE flag indicates that the associated copies should preferably overlap with any compute work. Note that this flag is a hint and can be ignored depending on the platform and other parameters of the copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _async
    ///
    /// Note: _memcpy
    ///
    /// # Parameters
    ///
    /// - `dsts`: - Array of destination pointers.
    /// - `srcs`: - Array of memcpy source pointers.
    /// - `sizes`: - Array of sizes for memcpy operations.
    /// - `count`: - Size of `dsts`, `srcs` and `sizes` arrays
    /// - `attrs`: - Array of memcpy attributes.
    /// - `attrsIdxs`: - Array of indices to specify which copies each entry in the `attrs` array applies to. The attributes specified in attrs\[k\] will be applied to copies starting from attrsIdxs\[k\] through attrsIdxs\[k+1\] - 1. Also attrs\[numAttrs-1\] will apply to copies starting from attrsIdxs\[numAttrs-1\] through count - 1.
    /// - `numAttrs`: - Size of `attrs` and `attrsIdxs` arrays.
    /// - `hStream`: - The stream to enqueue the operations in. Must not be legacy NULL stream.
    pub fn cuMemcpyBatchAsync_v2(
        dsts: *mut CUdeviceptr,
        srcs: *mut CUdeviceptr,
        sizes: *mut size_t,
        count: size_t,
        attrs: *mut CUmemcpyAttributes,
        attrsIdxs: *mut size_t,
        numAttrs: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Performs a batch of 3D memory copies asynchronously.
    ///
    /// Performs a batch of memory copies. The batch as a whole executes in stream order but copies within a batch are not guaranteed to execute in any specific order. Note that this means specifying any dependent copies within a batch will result in undefined behavior.
    ///
    /// Performs memory copies as specified in the `opList` array. The length of this array is specified in `numOps`. Each entry in this array describes a copy operation. This includes among other things, the source and destination operands for the copy as specified in ::CUDA_MEMCPY3D_BATCH_OP::src and ::CUDA_MEMCPY3D_BATCH_OP::dst respectively. The source and destination operands of a copy can either be a pointer or a CUDA array. The width, height and depth of a copy is specified in ::CUDA_MEMCPY3D_BATCH_OP::extent. The width, height and depth of a copy are specified in elements and must not be zero. For pointer-to-pointer copies, the element size is considered to be 1. For pointer to CUDA array or vice versa copies, the element size is determined by the CUDA array. For CUDA array to CUDA array copies, the element size of the two CUDA arrays must match.
    ///
    /// For a given operand, if ::CUmemcpy3DOperand::type is specified as ::CU_MEMCPY_OPERAND_TYPE_POINTER, then ::CUmemcpy3DOperand::op::ptr will be used. The ::CUmemcpy3DOperand::op::ptr::ptr field must contain the pointer where the copy should begin. The ::CUmemcpy3DOperand::op::ptr::rowLength field specifies the length of each row in elements and must either be zero or be greater than or equal to the width of the copy specified in ::CUDA_MEMCPY3D_BATCH_OP::extent::width. The ::CUmemcpy3DOperand::op::ptr::layerHeight field specifies the height of each layer and must either be zero or be greater than or equal to the height of the copy specified in ::CUDA_MEMCPY3D_BATCH_OP::extent::height. When either of these values is zero, that aspect of the operand is considered to be tightly packed according to the copy extent. For managed memory pointers on devices where ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS is true or system-allocated pageable memory on devices where ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS is true, the ::CUmemcpy3DOperand::op::ptr::locHint field can be used to hint the location of the operand.
    ///
    /// If an operand's type is specified as ::CU_MEMCPY_OPERAND_TYPE_ARRAY, then ::CUmemcpy3DOperand::op::array will be used. The ::CUmemcpy3DOperand::op::array::array field specifies the CUDA array and ::CUmemcpy3DOperand::op::array::offset specifies the 3D offset into that array where the copy begins.
    ///
    /// The ::CUmemcpyAttributes::srcAccessOrder indicates the source access ordering to be observed for copies associated with the attribute. If the source access order is set to ::CU_MEMCPY_SRC_ACCESS_ORDER_STREAM, then the source will be accessed in stream order. If the source access order is set to ::CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL then it indicates that access to the source pointer can be out of stream order and all accesses must be complete before the API call returns. This flag is suited for ephemeral sources (ex., stack variables) when it's known that no prior operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the need for the user to synchronize the stream after the API call. If the source access order is set to ::CU_MEMCPY_SRC_ACCESS_ORDER_ANY then it indicates that access to the source pointer can be out of stream order and the accesses can happen even after the API call returns. This flag is suited for host pointers allocated outside CUDA (ex., via malloc) when it's known that no prior operations in the stream can be accessing the memory. Specifying this flag allows the driver to optimize the copy on certain platforms. Each memcopy operation in `opList` must have a valid srcAccessOrder setting, otherwise this API will return ::CUDA_ERROR_INVALID_VALUE.
    ///
    /// The ::CUmemcpyAttributes::flags field can be used to specify certain flags for copies. Setting the ::CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE flag indicates that the associated copies should preferably overlap with any compute work. Note that this flag is a hint and can be ignored depending on the platform and other parameters of the copy.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _async
    ///
    /// Note: _memcpy
    ///
    /// # Parameters
    ///
    /// - `numOps`: - Total number of memcpy operations.
    /// - `opList`: - Array of size `numOps` containing the actual memcpy operations.
    /// - `flags`: - Flags for future use, must be zero now.
    /// - `hStream`: - The stream to enqueue the operations in. Must not be default NULL stream.
    pub fn cuMemcpy3DBatchAsync_v2(
        numOps: size_t,
        opList: *mut CUDA_MEMCPY3D_BATCH_OP,
        flags: ::core::ffi::c_ulonglong,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Performs asynchronous memory copy operation with the specified attributes.
    ///
    /// Performs asynchronous memory copy operation where `dst` and `src` are the destination and source pointers respectively. `size` specifies the number of bytes to copy. `attr` specifies the attributes for the copy and `hStream` specifies the stream to enqueue the operation in.
    ///
    /// For more information regarding the attributes, please refer to CUmemcpyAttributes and it’s usage desciption in::cuMemcpyBatchAsync.
    ///
    /// # Parameters
    ///
    /// - `dst`: Destination device pointer.
    /// - `src`: Source device pointer.
    /// - `size`: Number of bytes to copy.
    /// - `attr`: Attributes for the copy.
    /// - `hStream`: Stream to enqueue the operation in.
    pub fn cuMemcpyWithAttributesAsync(
        dst: CUdeviceptr,
        src: CUdeviceptr,
        size: size_t,
        attr: *mut CUmemcpyAttributes,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Performs 3D memory copy with attributes asynchronously.
    ///
    /// Performs the copy operation specified in `op`. `flags` specifies the flags for the copy and `hStream` specifies the stream to enqueue the operation in.
    ///
    /// For more information regarding the operation, please refer to CUDA_MEMCPY3D_BATCH_OP and it’s usage desciption in::cuMemcpy3DBatchAsync.
    ///
    /// # Parameters
    ///
    /// - `op`: Operation to perform.
    /// - `flags`: Flags for the copy, must be zero now.
    /// - `hStream`: Stream to enqueue the operation in.
    pub fn cuMemcpy3DWithAttributesAsync(
        op: *mut CUDA_MEMCPY3D_BATCH_OP,
        flags: ::core::ffi::c_ulonglong,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Initializes device memory
    ///
    /// Sets the memory range of `N` 8-bit values to the specified value `uc`.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _memset
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemset
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: - Destination device pointer
    /// - `uc`: - Value to set
    /// - `N`: - Number of elements
    pub fn cuMemsetD8_v2(
        dstDevice: CUdeviceptr,
        uc: ::core::ffi::c_uchar,
        N: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Initializes device memory
    ///
    /// Sets the memory range of `N` 16-bit values to the specified value `us`. The `dstDevice` pointer must be two byte aligned.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _memset
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemset
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: - Destination device pointer
    /// - `us`: - Value to set
    /// - `N`: - Number of elements
    pub fn cuMemsetD16_v2(
        dstDevice: CUdeviceptr,
        us: ::core::ffi::c_ushort,
        N: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Initializes device memory
    ///
    /// Sets the memory range of `N` 32-bit values to the specified value `ui`. The `dstDevice` pointer must be four byte aligned.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _memset
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32Async, ::cudaMemset
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: - Destination device pointer
    /// - `ui`: - Value to set
    /// - `N`: - Number of elements
    pub fn cuMemsetD32_v2(
        dstDevice: CUdeviceptr,
        ui: ::core::ffi::c_uint,
        N: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Initializes device memory
    ///
    /// Sets the 2D memory range of `Width` 8-bit values to the specified value `uc`. `Height` specifies the number of rows to set, and `dstPitch` specifies the number of bytes between each row. This function performs fastest when the pitch is one that has been passed back by ::cuMemAllocPitch().
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _memset
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemset2D
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: - Destination device pointer
    /// - `dstPitch`: - Pitch of destination device pointer(Unused if `Height` is 1)
    /// - `uc`: - Value to set
    /// - `Width`: - Width of row
    /// - `Height`: - Number of rows
    pub fn cuMemsetD2D8_v2(
        dstDevice: CUdeviceptr,
        dstPitch: size_t,
        uc: ::core::ffi::c_uchar,
        Width: size_t,
        Height: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Initializes device memory
    ///
    /// Sets the 2D memory range of `Width` 16-bit values to the specified value `us`. `Height` specifies the number of rows to set, and `dstPitch` specifies the number of bytes between each row. The `dstDevice` pointer and `dstPitch` offset must be two byte aligned. This function performs fastest when the pitch is one that has been passed back by ::cuMemAllocPitch().
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _memset
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemset2D
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: - Destination device pointer
    /// - `dstPitch`: - Pitch of destination device pointer(Unused if `Height` is 1)
    /// - `us`: - Value to set
    /// - `Width`: - Width of row
    /// - `Height`: - Number of rows
    pub fn cuMemsetD2D16_v2(
        dstDevice: CUdeviceptr,
        dstPitch: size_t,
        us: ::core::ffi::c_ushort,
        Width: size_t,
        Height: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Initializes device memory
    ///
    /// Sets the 2D memory range of `Width` 32-bit values to the specified value `ui`. `Height` specifies the number of rows to set, and `dstPitch` specifies the number of bytes between each row. The `dstDevice` pointer and `dstPitch` offset must be four byte aligned. This function performs fastest when the pitch is one that has been passed back by ::cuMemAllocPitch().
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _memset
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async, ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32Async, ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32, ::cuMemsetD32Async, ::cudaMemset2D
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: - Destination device pointer
    /// - `dstPitch`: - Pitch of destination device pointer(Unused if `Height` is 1)
    /// - `ui`: - Value to set
    /// - `Width`: - Width of row
    /// - `Height`: - Number of rows
    pub fn cuMemsetD2D32_v2(
        dstDevice: CUdeviceptr,
        dstPitch: size_t,
        ui: ::core::ffi::c_uint,
        Width: size_t,
        Height: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets device memory.
    ///
    /// Sets the memory range of `N` 8-bit values to the specified value `uc`.
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: Destination device pointer.
    /// - `uc`: Value to set.
    /// - `N`: Number of elements.
    /// - `hStream`: Stream identifier.
    pub fn cuMemsetD8Async(
        dstDevice: CUdeviceptr,
        uc: ::core::ffi::c_uchar,
        N: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets device memory.
    ///
    /// Sets the memory range of `N` 16-bit values to the specified value `us`. The `dstDevice` pointer must be two byte aligned.
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: Destination device pointer.
    /// - `us`: Value to set.
    /// - `N`: Number of elements.
    /// - `hStream`: Stream identifier.
    pub fn cuMemsetD16Async(
        dstDevice: CUdeviceptr,
        us: ::core::ffi::c_ushort,
        N: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets device memory.
    ///
    /// Sets the memory range of `N` 32-bit values to the specified value `ui`. The `dstDevice` pointer must be four byte aligned.
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: Destination device pointer.
    /// - `ui`: Value to set.
    /// - `N`: Number of elements.
    /// - `hStream`: Stream identifier.
    pub fn cuMemsetD32Async(
        dstDevice: CUdeviceptr,
        ui: ::core::ffi::c_uint,
        N: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets device memory.
    ///
    /// Sets the 2D memory range of `Width` 8-bit values to the specified value `uc`. `Height` specifies the number of rows to set, and `dstPitch` specifies the number of bytes between each row. This function performs fastest when the pitch is one that has been passed back by cuMemAllocPitch().
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: Destination device pointer.
    /// - `dstPitch`: Pitch of destination device pointer(Unused if `Height` is 1).
    /// - `uc`: Value to set.
    /// - `Width`: Width of row.
    /// - `Height`: Number of rows.
    /// - `hStream`: Stream identifier.
    pub fn cuMemsetD2D8Async(
        dstDevice: CUdeviceptr,
        dstPitch: size_t,
        uc: ::core::ffi::c_uchar,
        Width: size_t,
        Height: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets device memory.
    ///
    /// Sets the 2D memory range of `Width` 16-bit values to the specified value `us`. `Height` specifies the number of rows to set, and `dstPitch` specifies the number of bytes between each row. The `dstDevice` pointer and `dstPitch` offset must be two byte aligned. This function performs fastest when the pitch is one that has been passed back by cuMemAllocPitch().
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: Destination device pointer.
    /// - `dstPitch`: Pitch of destination device pointer(Unused if `Height` is 1).
    /// - `us`: Value to set.
    /// - `Width`: Width of row.
    /// - `Height`: Number of rows.
    /// - `hStream`: Stream identifier.
    pub fn cuMemsetD2D16Async(
        dstDevice: CUdeviceptr,
        dstPitch: size_t,
        us: ::core::ffi::c_ushort,
        Width: size_t,
        Height: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets device memory.
    ///
    /// Sets the 2D memory range of `Width` 32-bit values to the specified value `ui`. `Height` specifies the number of rows to set, and `dstPitch` specifies the number of bytes between each row. The `dstDevice` pointer and `dstPitch` offset must be four byte aligned. This function performs fastest when the pitch is one that has been passed back by cuMemAllocPitch().
    ///
    /// # Parameters
    ///
    /// - `dstDevice`: Destination device pointer.
    /// - `dstPitch`: Pitch of destination device pointer(Unused if `Height` is 1).
    /// - `ui`: Value to set.
    /// - `Width`: Width of row.
    /// - `Height`: Number of rows.
    /// - `hStream`: Stream identifier.
    pub fn cuMemsetD2D32Async(
        dstDevice: CUdeviceptr,
        dstPitch: size_t,
        ui: ::core::ffi::c_uint,
        Width: size_t,
        Height: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a 1D or 2D CUDA array
    ///
    /// Creates a CUDA array according to the ::CUDA_ARRAY_DESCRIPTOR structure `pAllocateArray` and returns a handle to the new CUDA array in `*pHandle`. The ::CUDA_ARRAY_DESCRIPTOR is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///     typedef struct {
    ///         unsigned int Width;
    ///         unsigned int Height;
    ///         CUarray_format Format;
    ///         unsigned int NumChannels;
    ///     } CUDA_ARRAY_DESCRIPTOR;
    /// ```
    ///
    /// where:
    ///
    /// - `Width`, and `Height` are the width, and height of the CUDA array (in elements); the CUDA array is one-dimensional if height is 0, two-dimensional otherwise;
    /// - ::Format specifies the format of the elements; ::CUarray_format is defined as:
    ///
    ///
    ///
    /// ```text
    ///     typedef enum CUarray_format_enum {
    ///         CU_AD_FORMAT_UNSIGNED_INT8 = 0x01,
    ///         CU_AD_FORMAT_UNSIGNED_INT16 = 0x02,
    ///         CU_AD_FORMAT_UNSIGNED_INT32 = 0x03,
    ///         CU_AD_FORMAT_SIGNED_INT8 = 0x08,
    ///         CU_AD_FORMAT_SIGNED_INT16 = 0x09,
    ///         CU_AD_FORMAT_SIGNED_INT32 = 0x0a,
    ///         CU_AD_FORMAT_HALF = 0x10,
    ///         CU_AD_FORMAT_FLOAT = 0x20,
    ///         CU_AD_FORMAT_NV12 = 0xb0,
    ///         CU_AD_FORMAT_UNORM_INT8X1 = 0xc0,
    ///         CU_AD_FORMAT_UNORM_INT8X2 = 0xc1,
    ///         CU_AD_FORMAT_UNORM_INT8X4 = 0xc2,
    ///         CU_AD_FORMAT_UNORM_INT16X1 = 0xc3,
    ///         CU_AD_FORMAT_UNORM_INT16X2 = 0xc4,
    ///         CU_AD_FORMAT_UNORM_INT16X4 = 0xc5,
    ///         CU_AD_FORMAT_SNORM_INT8X1 = 0xc6,
    ///         CU_AD_FORMAT_SNORM_INT8X2 = 0xc7,
    ///         CU_AD_FORMAT_SNORM_INT8X4 = 0xc8,
    ///         CU_AD_FORMAT_SNORM_INT16X1 = 0xc9,
    ///         CU_AD_FORMAT_SNORM_INT16X2 = 0xca,
    ///         CU_AD_FORMAT_SNORM_INT16X4 = 0xcb,
    ///         CU_AD_FORMAT_BC1_UNORM = 0x91,
    ///         CU_AD_FORMAT_BC1_UNORM_SRGB = 0x92,
    ///         CU_AD_FORMAT_BC2_UNORM = 0x93,
    ///         CU_AD_FORMAT_BC2_UNORM_SRGB = 0x94,
    ///         CU_AD_FORMAT_BC3_UNORM = 0x95,
    ///         CU_AD_FORMAT_BC3_UNORM_SRGB = 0x96,
    ///         CU_AD_FORMAT_BC4_UNORM = 0x97,
    ///         CU_AD_FORMAT_BC4_SNORM = 0x98,
    ///         CU_AD_FORMAT_BC5_UNORM = 0x99,
    ///         CU_AD_FORMAT_BC5_SNORM = 0x9a,
    ///         CU_AD_FORMAT_BC6H_UF16 = 0x9b,
    ///         CU_AD_FORMAT_BC6H_SF16 = 0x9c,
    ///         CU_AD_FORMAT_BC7_UNORM = 0x9d,
    ///         CU_AD_FORMAT_BC7_UNORM_SRGB = 0x9e,
    ///         CU_AD_FORMAT_P010 = 0x9f,
    ///         CU_AD_FORMAT_P016 = 0xa1,
    ///         CU_AD_FORMAT_NV16 = 0xa2,
    ///         CU_AD_FORMAT_P210 = 0xa3,
    ///         CU_AD_FORMAT_P216 = 0xa4,
    ///         CU_AD_FORMAT_YUY2 = 0xa5,
    ///         CU_AD_FORMAT_Y210 = 0xa6,
    ///         CU_AD_FORMAT_Y216 = 0xa7,
    ///         CU_AD_FORMAT_AYUV = 0xa8,
    ///         CU_AD_FORMAT_Y410 = 0xa9,
    ///         CU_AD_FORMAT_Y416 = 0xb1,
    ///         CU_AD_FORMAT_Y444_PLANAR8 = 0xb2,
    ///         CU_AD_FORMAT_Y444_PLANAR10 = 0xb3,
    ///         CU_AD_FORMAT_YUV444_8bit_SemiPlanar = 0xb4,
    ///         CU_AD_FORMAT_YUV444_16bit_SemiPlanar = 0xb5,
    ///         CU_AD_FORMAT_UNORM_INT_101010_2 = 0x50,
    ///         CU_AD_FORMAT_UINT8_PACKED_422 = 0x51,
    ///         CU_AD_FORMAT_UINT8_PACKED_444 = 0x52,
    ///         CU_AD_FORMAT_UINT8_SEMIPLANAR_420 = 0x53,
    ///         CU_AD_FORMAT_UINT16_SEMIPLANAR_420 = 0x54,
    ///         CU_AD_FORMAT_UINT8_SEMIPLANAR_422 = 0x55,
    ///         CU_AD_FORMAT_UINT16_SEMIPLANAR_422 = 0x56,
    ///         CU_AD_FORMAT_UINT8_SEMIPLANAR_444 = 0x57,
    ///         CU_AD_FORMAT_UINT16_SEMIPLANAR_444 = 0x58,
    ///         CU_AD_FORMAT_UINT8_PLANAR_420 = 0x59,
    ///         CU_AD_FORMAT_UINT16_PLANAR_420 = 0x5a,
    ///         CU_AD_FORMAT_UINT8_PLANAR_422 = 0x5b,
    ///         CU_AD_FORMAT_UINT16_PLANAR_422 = 0x5c,
    ///         CU_AD_FORMAT_UINT8_PLANAR_444 = 0x5d,
    ///         CU_AD_FORMAT_UINT16_PLANAR_444 = 0x5e,
    ///    } CUarray_format;
    /// ```
    ///
    /// - `NumChannels` specifies the number of packed components per CUDA array element; it may be 1, 2, or 4;
    ///
    /// Here are examples of CUDA array descriptions:
    ///
    /// Description for a CUDA array of 2048 floats:
    ///
    ///
    ///
    /// ```text
    ///     CUDA_ARRAY_DESCRIPTOR desc;
    ///     desc.Format = CU_AD_FORMAT_FLOAT;
    ///     desc.NumChannels = 1;
    ///     desc.Width = 2048;
    ///     desc.Height = 1;
    /// ```
    ///
    /// Description for a 64 x 64 CUDA array of floats:
    ///
    ///
    ///
    /// ```text
    ///     CUDA_ARRAY_DESCRIPTOR desc;
    ///     desc.Format = CU_AD_FORMAT_FLOAT;
    ///     desc.NumChannels = 1;
    ///     desc.Width = 64;
    ///     desc.Height = 64;
    /// ```
    ///
    /// Description for a `width` x `height` CUDA array of 64-bit, 4x16-bit float16's:
    ///
    ///
    ///
    /// ```text
    ///     CUDA_ARRAY_DESCRIPTOR desc;
    ///     desc.Format = CU_AD_FORMAT_HALF;
    ///     desc.NumChannels = 4;
    ///     desc.Width = width;
    ///     desc.Height = height;
    /// ```
    ///
    /// Description for a `width` x `height` CUDA array of 16-bit elements, each of which is two 8-bit unsigned chars:
    ///
    ///
    ///
    /// ```text
    ///     CUDA_ARRAY_DESCRIPTOR arrayDesc;
    ///     desc.Format = CU_AD_FORMAT_UNSIGNED_INT8;
    ///     desc.NumChannels = 2;
    ///     desc.Width = width;
    ///     desc.Height = height;
    /// ```
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_OUT_OF_MEMORY, ::CUDA_ERROR_UNKNOWN
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMallocArray
    ///
    /// # Parameters
    ///
    /// - `pHandle`: - Returned array
    /// - `pAllocateArray`: - Array descriptor
    pub fn cuArrayCreate_v2(
        pHandle: *mut CUarray,
        pAllocateArray: *const CUDA_ARRAY_DESCRIPTOR,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get a 1D or 2D CUDA array descriptor
    ///
    /// Returns in `*pArrayDescriptor` a descriptor containing information on the format and dimensions of the CUDA array `hArray`. It is useful for subroutines that have been passed a CUDA array, but need to know the CUDA array parameters for validation or other purposes.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaArrayGetInfo
    ///
    /// # Parameters
    ///
    /// - `pArrayDescriptor`: - Returned array descriptor
    /// - `hArray`: - Array to get descriptor of
    pub fn cuArrayGetDescriptor_v2(
        pArrayDescriptor: *mut CUDA_ARRAY_DESCRIPTOR,
        hArray: CUarray,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the layout properties of a sparse CUDA array.
    ///
    /// Returns the layout properties of a sparse CUDA array in `sparseProperties` If the CUDA array is not allocated with flag [`CUDA_ARRAY3D_SPARSE`] [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] will be returned.
    ///
    /// If the returned value in [CUDA_ARRAY_SPARSE_PROPERTIES::flags](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__SPARSE__PROPERTIES__v1.html#structcuda__array__sparse__properties__v1_1a0e842bb64091fa47809112c700cb5f0a) contains [`CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL`], then [CUDA_ARRAY_SPARSE_PROPERTIES::miptailSize](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__SPARSE__PROPERTIES__v1.html#structcuda__array__sparse__properties__v1_1a895ecb42681678271b0edba05bf1dcd9) represents the total size of the array. Otherwise, it will be zero. Also, the returned value in [CUDA_ARRAY_SPARSE_PROPERTIES::miptailFirstLevel](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__SPARSE__PROPERTIES__v1.html#structcuda__array__sparse__properties__v1_1aedd0cca8fad1fcbb1789d537edd7e6b6) is always zero. Note that the `array` must have been allocated using cuArrayCreate or cuArray3DCreate. For CUDA arrays obtained using [`cuMipmappedArrayGetLevel`], [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] will be returned. Instead, [`cuMipmappedArrayGetSparseProperties`] must be used to obtain the sparse properties of the entire CUDA mipmapped array to which `array` belongs to.
    ///
    /// # Parameters
    ///
    /// - `sparseProperties`: Pointer to CUDA_ARRAY_SPARSE_PROPERTIES.
    /// - `array`: CUDA array to get the sparse properties of.
    pub fn cuArrayGetSparseProperties(
        sparseProperties: *mut CUDA_ARRAY_SPARSE_PROPERTIES,
        array: CUarray,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the layout properties of a sparse CUDA mipmapped array.
    ///
    /// Returns the sparse array layout properties in `sparseProperties` If the CUDA mipmapped array is not allocated with flag [`CUDA_ARRAY3D_SPARSE`] [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] will be returned.
    ///
    /// For non-layered CUDA mipmapped arrays, [CUDA_ARRAY_SPARSE_PROPERTIES::miptailSize](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__SPARSE__PROPERTIES__v1.html#structcuda__array__sparse__properties__v1_1a895ecb42681678271b0edba05bf1dcd9) returns the size of the mip tail region. The mip tail region includes all mip levels whose width, height or depth is less than that of the tile. For layered CUDA mipmapped arrays, if [CUDA_ARRAY_SPARSE_PROPERTIES::flags](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__SPARSE__PROPERTIES__v1.html#structcuda__array__sparse__properties__v1_1a0e842bb64091fa47809112c700cb5f0a) contains [`CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL`], then [CUDA_ARRAY_SPARSE_PROPERTIES::miptailSize](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__SPARSE__PROPERTIES__v1.html#structcuda__array__sparse__properties__v1_1a895ecb42681678271b0edba05bf1dcd9) specifies the size of the mip tail of all layers combined. Otherwise, [CUDA_ARRAY_SPARSE_PROPERTIES::miptailSize](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__SPARSE__PROPERTIES__v1.html#structcuda__array__sparse__properties__v1_1a895ecb42681678271b0edba05bf1dcd9) specifies mip tail size per layer. The returned value of [CUDA_ARRAY_SPARSE_PROPERTIES::miptailFirstLevel](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__SPARSE__PROPERTIES__v1.html#structcuda__array__sparse__properties__v1_1aedd0cca8fad1fcbb1789d537edd7e6b6) is valid only if [CUDA_ARRAY_SPARSE_PROPERTIES::miptailSize](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__SPARSE__PROPERTIES__v1.html#structcuda__array__sparse__properties__v1_1a895ecb42681678271b0edba05bf1dcd9) is non-zero.
    ///
    /// # Parameters
    ///
    /// - `sparseProperties`: Pointer to CUDA_ARRAY_SPARSE_PROPERTIES.
    /// - `mipmap`: CUDA mipmapped array to get the sparse properties of.
    pub fn cuMipmappedArrayGetSparseProperties(
        sparseProperties: *mut CUDA_ARRAY_SPARSE_PROPERTIES,
        mipmap: CUmipmappedArray,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the memory requirements of a CUDA array.
    ///
    /// Returns the memory requirements of a CUDA array in `memoryRequirements` If the CUDA array is not allocated with flag [`CUDA_ARRAY3D_DEFERRED_MAPPING`] [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] will be returned.
    ///
    /// The returned value in [CUDA_ARRAY_MEMORY_REQUIREMENTS::size](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__MEMORY__REQUIREMENTS__v1.html#structcuda__array__memory__requirements__v1_1a7a2851735a1d2c11af797f01b1d4969e) represents the total size of the CUDA array. The returned value in [CUDA_ARRAY_MEMORY_REQUIREMENTS::alignment](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__MEMORY__REQUIREMENTS__v1.html#structcuda__array__memory__requirements__v1_1a35c6c8106451b6313d1dffe9a28af755) represents the alignment necessary for mapping the CUDA array.
    ///
    /// # Parameters
    ///
    /// - `memoryRequirements`: Pointer to CUDA_ARRAY_MEMORY_REQUIREMENTS.
    /// - `array`: CUDA array to get the memory requirements of.
    /// - `device`: Device to get the memory requirements for.
    pub fn cuArrayGetMemoryRequirements(
        memoryRequirements: *mut CUDA_ARRAY_MEMORY_REQUIREMENTS,
        array: CUarray,
        device: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the memory requirements of a CUDA mipmapped array.
    ///
    /// Returns the memory requirements of a CUDA mipmapped array in `memoryRequirements` If the CUDA mipmapped array is not allocated with flag [`CUDA_ARRAY3D_DEFERRED_MAPPING`] [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] will be returned.
    ///
    /// The returned value in [CUDA_ARRAY_MEMORY_REQUIREMENTS::size](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__MEMORY__REQUIREMENTS__v1.html#structcuda__array__memory__requirements__v1_1a7a2851735a1d2c11af797f01b1d4969e) represents the total size of the CUDA mipmapped array. The returned value in [CUDA_ARRAY_MEMORY_REQUIREMENTS::alignment](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__MEMORY__REQUIREMENTS__v1.html#structcuda__array__memory__requirements__v1_1a35c6c8106451b6313d1dffe9a28af755)
    ///
    /// represents the alignment necessary for mapping the CUDA mipmapped
    ///
    /// array.
    ///
    /// # Parameters
    ///
    /// - `memoryRequirements`: Pointer to CUDA_ARRAY_MEMORY_REQUIREMENTS.
    /// - `mipmap`: CUDA mipmapped array to get the memory requirements of.
    /// - `device`: Device to get the memory requirements for.
    pub fn cuMipmappedArrayGetMemoryRequirements(
        memoryRequirements: *mut CUDA_ARRAY_MEMORY_REQUIREMENTS,
        mipmap: CUmipmappedArray,
        device: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets a CUDA array plane from a CUDA array.
    ///
    /// Returns in `pPlaneArray` a CUDA array that represents a single format plane of the CUDA array `hArray`.
    ///
    /// If `planeIdx` is greater than the maximum number of planes in this array or if the array does not have a multi-planar format e.g: [`CUarray_format_enum::CU_AD_FORMAT_NV12`], then [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] is returned.
    ///
    /// Note that if the `hArray` has format [`CUarray_format_enum::CU_AD_FORMAT_NV12`], then passing in 0 for `planeIdx` returns a CUDA array of the same size as `hArray` but with one channel and [`CUarray_format_enum::CU_AD_FORMAT_UNSIGNED_INT8`] as its format. If 1 is passed for `planeIdx`, then the returned CUDA array has half the height and width of `hArray` with two channels and [`CUarray_format_enum::CU_AD_FORMAT_UNSIGNED_INT8`] as its format.
    ///
    /// # Parameters
    ///
    /// - `pPlaneArray`: Returned CUDA array referenced by the `planeIdx`.
    /// - `hArray`: Multiplanar CUDA array.
    /// - `planeIdx`: Plane index.
    pub fn cuArrayGetPlane(
        pPlaneArray: *mut CUarray,
        hArray: CUarray,
        planeIdx: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys a CUDA array.
    ///
    /// Destroys the CUDA array `hArray`.
    ///
    /// # Parameters
    ///
    /// - `hArray`: - Array to destroy
    pub fn cuArrayDestroy(hArray: CUarray) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a 3D CUDA array
    ///
    /// Creates a CUDA array according to the ::CUDA_ARRAY3D_DESCRIPTOR structure `pAllocateArray` and returns a handle to the new CUDA array in `*pHandle`. The ::CUDA_ARRAY3D_DESCRIPTOR is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///     typedef struct {
    ///         unsigned int Width;
    ///         unsigned int Height;
    ///         unsigned int Depth;
    ///         CUarray_format Format;
    ///         unsigned int NumChannels;
    ///         unsigned int Flags;
    ///     } CUDA_ARRAY3D_DESCRIPTOR;
    /// ```
    ///
    /// where:
    ///
    /// - `Width`, `Height`, and `Depth` are the width, height, and depth of the CUDA array (in elements); the following types of CUDA arrays can be allocated:
    /// - A 1D array is allocated if `Height` and `Depth` extents are both zero.
    /// - A 2D array is allocated if only `Depth` extent is zero.
    /// - A 3D array is allocated if all three extents are non-zero.
    /// - A 1D layered CUDA array is allocated if only `Height` is zero and the ::CUDA_ARRAY3D_LAYERED flag is set. Each layer is a 1D array. The number of layers is determined by the depth extent.
    /// - A 2D layered CUDA array is allocated if all three extents are non-zero and the ::CUDA_ARRAY3D_LAYERED flag is set. Each layer is a 2D array. The number of layers is determined by the depth extent.
    /// - A cubemap CUDA array is allocated if all three extents are non-zero and the ::CUDA_ARRAY3D_CUBEMAP flag is set. `Width` must be equal to `Height`, and `Depth` must be six. A cubemap is a special type of 2D layered CUDA array, where the six layers represent the six faces of a cube. The order of the six layers in memory is the same as that listed in ::CUarray_cubemap_face.
    /// - A cubemap layered CUDA array is allocated if all three extents are non-zero, and both, ::CUDA_ARRAY3D_CUBEMAP and ::CUDA_ARRAY3D_LAYERED flags are set. `Width` must be equal to `Height`, and `Depth` must be a multiple of six. A cubemap layered CUDA array is a special type of 2D layered CUDA array that consists of a collection of cubemaps. The first six layers represent the first cubemap, the next six layers form the second cubemap, and so on.
    ///
    /// - ::Format specifies the format of the elements; ::CUarray_format is defined as:
    ///
    ///
    ///
    /// ```text
    ///     typedef enum CUarray_format_enum {
    ///         CU_AD_FORMAT_UNSIGNED_INT8 = 0x01,
    ///         CU_AD_FORMAT_UNSIGNED_INT16 = 0x02,
    ///         CU_AD_FORMAT_UNSIGNED_INT32 = 0x03,
    ///         CU_AD_FORMAT_SIGNED_INT8 = 0x08,
    ///         CU_AD_FORMAT_SIGNED_INT16 = 0x09,
    ///         CU_AD_FORMAT_SIGNED_INT32 = 0x0a,
    ///         CU_AD_FORMAT_HALF = 0x10,
    ///         CU_AD_FORMAT_FLOAT = 0x20,
    ///         CU_AD_FORMAT_NV12 = 0xb0,
    ///         CU_AD_FORMAT_UNORM_INT8X1 = 0xc0,
    ///         CU_AD_FORMAT_UNORM_INT8X2 = 0xc1,
    ///         CU_AD_FORMAT_UNORM_INT8X4 = 0xc2,
    ///         CU_AD_FORMAT_UNORM_INT16X1 = 0xc3,
    ///         CU_AD_FORMAT_UNORM_INT16X2 = 0xc4,
    ///         CU_AD_FORMAT_UNORM_INT16X4 = 0xc5,
    ///         CU_AD_FORMAT_SNORM_INT8X1 = 0xc6,
    ///         CU_AD_FORMAT_SNORM_INT8X2 = 0xc7,
    ///         CU_AD_FORMAT_SNORM_INT8X4 = 0xc8,
    ///         CU_AD_FORMAT_SNORM_INT16X1 = 0xc9,
    ///         CU_AD_FORMAT_SNORM_INT16X2 = 0xca,
    ///         CU_AD_FORMAT_SNORM_INT16X4 = 0xcb,
    ///         CU_AD_FORMAT_BC1_UNORM = 0x91,
    ///         CU_AD_FORMAT_BC1_UNORM_SRGB = 0x92,
    ///         CU_AD_FORMAT_BC2_UNORM = 0x93,
    ///         CU_AD_FORMAT_BC2_UNORM_SRGB = 0x94,
    ///         CU_AD_FORMAT_BC3_UNORM = 0x95,
    ///         CU_AD_FORMAT_BC3_UNORM_SRGB = 0x96,
    ///         CU_AD_FORMAT_BC4_UNORM = 0x97,
    ///         CU_AD_FORMAT_BC4_SNORM = 0x98,
    ///         CU_AD_FORMAT_BC5_UNORM = 0x99,
    ///         CU_AD_FORMAT_BC5_SNORM = 0x9a,
    ///         CU_AD_FORMAT_BC6H_UF16 = 0x9b,
    ///         CU_AD_FORMAT_BC6H_SF16 = 0x9c,
    ///         CU_AD_FORMAT_BC7_UNORM = 0x9d,
    ///         CU_AD_FORMAT_BC7_UNORM_SRGB = 0x9e,
    ///         CU_AD_FORMAT_P010 = 0x9f,
    ///         CU_AD_FORMAT_P016 = 0xa1,
    ///         CU_AD_FORMAT_NV16 = 0xa2,
    ///         CU_AD_FORMAT_P210 = 0xa3,
    ///         CU_AD_FORMAT_P216 = 0xa4,
    ///         CU_AD_FORMAT_YUY2 = 0xa5,
    ///         CU_AD_FORMAT_Y210 = 0xa6,
    ///         CU_AD_FORMAT_Y216 = 0xa7,
    ///         CU_AD_FORMAT_AYUV = 0xa8,
    ///         CU_AD_FORMAT_Y410 = 0xa9,
    ///         CU_AD_FORMAT_Y416 = 0xb1,
    ///         CU_AD_FORMAT_Y444_PLANAR8 = 0xb2,
    ///         CU_AD_FORMAT_Y444_PLANAR10 = 0xb3,
    ///         CU_AD_FORMAT_YUV444_8bit_SemiPlanar = 0xb4,
    ///         CU_AD_FORMAT_YUV444_16bit_SemiPlanar = 0xb5,
    ///         CU_AD_FORMAT_UNORM_INT_101010_2 = 0x50,
    ///     } CUarray_format;
    /// ```
    ///
    /// - `NumChannels` specifies the number of packed components per CUDA array element; it may be 1, 2, or 4;
    ///
    /// - ::Flags may be set to
    /// - ::CUDA_ARRAY3D_LAYERED to enable creation of layered CUDA arrays. If this flag is set, `Depth` specifies the number of layers, not the depth of a 3D array.
    /// - ::CUDA_ARRAY3D_SURFACE_LDST to enable surface references to be bound to the CUDA array. If this flag is not set, ::cuSurfRefSetArray will fail when attempting to bind the CUDA array to a surface reference.
    /// - ::CUDA_ARRAY3D_CUBEMAP to enable creation of cubemaps. If this flag is set, `Width` must be equal to `Height`, and `Depth` must be six. If the ::CUDA_ARRAY3D_LAYERED flag is also set, then `Depth` must be a multiple of six.
    /// - ::CUDA_ARRAY3D_TEXTURE_GATHER to indicate that the CUDA array will be used for texture gather. Texture gather can only be performed on 2D CUDA arrays.
    ///
    /// `Width`, `Height` and `Depth` must meet certain size requirements as listed in the following table. All values are specified in elements. Note that for brevity's sake, the full name of the device attribute is not specified. For ex., TEXTURE1D_WIDTH refers to the device attribute ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH.
    ///
    /// Note that 2D CUDA arrays have different size requirements if the ::CUDA_ARRAY3D_TEXTURE_GATHER flag is set. `Width` and `Height` must not be greater than ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH and ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT respectively, in that case.
    ///
    /// &lt;table> &lt;tr>&lt;td>&lt;b>CUDA array type&lt;/b>&lt;/td> &lt;td>&lt;b>Valid extents that must always be met&lt;br>{(width range in elements), (height range), (depth range)}&lt;/b>&lt;/td> &lt;td>&lt;b>Valid extents with CUDA_ARRAY3D_SURFACE_LDST set&lt;br> {(width range in elements), (height range), (depth range)}&lt;/b>&lt;/td>&lt;/tr> &lt;tr>&lt;td>1D&lt;/td> &lt;td>&lt;small>{ (1,TEXTURE1D_WIDTH), 0, 0 }&lt;/small>&lt;/td> &lt;td>&lt;small>{ (1,SURFACE1D_WIDTH), 0, 0 }&lt;/small>&lt;/td>&lt;/tr> &lt;tr>&lt;td>2D&lt;/td> &lt;td>&lt;small>{ (1,TEXTURE2D_WIDTH), (1,TEXTURE2D_HEIGHT), 0 }&lt;/small>&lt;/td> &lt;td>&lt;small>{ (1,SURFACE2D_WIDTH), (1,SURFACE2D_HEIGHT), 0 }&lt;/small>&lt;/td>&lt;/tr> &lt;tr>&lt;td>3D&lt;/td> &lt;td>&lt;small>{ (1,TEXTURE3D_WIDTH), (1,TEXTURE3D_HEIGHT), (1,TEXTURE3D_DEPTH) } &lt;br>OR&lt;br>{ (1,TEXTURE3D_WIDTH_ALTERNATE), (1,TEXTURE3D_HEIGHT_ALTERNATE), (1,TEXTURE3D_DEPTH_ALTERNATE) }&lt;/small>&lt;/td> &lt;td>&lt;small>{ (1,SURFACE3D_WIDTH), (1,SURFACE3D_HEIGHT), (1,SURFACE3D_DEPTH) }&lt;/small>&lt;/td>&lt;/tr> &lt;tr>&lt;td>1D Layered&lt;/td> &lt;td>&lt;small>{ (1,TEXTURE1D_LAYERED_WIDTH), 0, (1,TEXTURE1D_LAYERED_LAYERS) }&lt;/small>&lt;/td> &lt;td>&lt;small>{ (1,SURFACE1D_LAYERED_WIDTH), 0, (1,SURFACE1D_LAYERED_LAYERS) }&lt;/small>&lt;/td>&lt;/tr> &lt;tr>&lt;td>2D Layered&lt;/td> &lt;td>&lt;small>{ (1,TEXTURE2D_LAYERED_WIDTH), (1,TEXTURE2D_LAYERED_HEIGHT), (1,TEXTURE2D_LAYERED_LAYERS) }&lt;/small>&lt;/td> &lt;td>&lt;small>{ (1,SURFACE2D_LAYERED_WIDTH), (1,SURFACE2D_LAYERED_HEIGHT), (1,SURFACE2D_LAYERED_LAYERS) }&lt;/small>&lt;/td>&lt;/tr> &lt;tr>&lt;td>Cubemap&lt;/td> &lt;td>&lt;small>{ (1,TEXTURECUBEMAP_WIDTH), (1,TEXTURECUBEMAP_WIDTH), 6 }&lt;/small>&lt;/td> &lt;td>&lt;small>{ (1,SURFACECUBEMAP_WIDTH), (1,SURFACECUBEMAP_WIDTH), 6 }&lt;/small>&lt;/td>&lt;/tr> &lt;tr>&lt;td>Cubemap Layered&lt;/td> &lt;td>&lt;small>{ (1,TEXTURECUBEMAP_LAYERED_WIDTH), (1,TEXTURECUBEMAP_LAYERED_WIDTH), (1,TEXTURECUBEMAP_LAYERED_LAYERS) }&lt;/small>&lt;/td> &lt;td>&lt;small>{ (1,SURFACECUBEMAP_LAYERED_WIDTH), (1,SURFACECUBEMAP_LAYERED_WIDTH), (1,SURFACECUBEMAP_LAYERED_LAYERS) }&lt;/small>&lt;/td>&lt;/tr> &lt;/table>
    ///
    /// Here are examples of CUDA array descriptions:
    ///
    /// Description for a CUDA array of 2048 floats:
    ///
    ///
    ///
    /// ```text
    ///     CUDA_ARRAY3D_DESCRIPTOR desc;
    ///     desc.Format = CU_AD_FORMAT_FLOAT;
    ///     desc.NumChannels = 1;
    ///     desc.Width = 2048;
    ///     desc.Height = 0;
    ///     desc.Depth = 0;
    /// ```
    ///
    /// Description for a 64 x 64 CUDA array of floats:
    ///
    ///
    ///
    /// ```text
    ///     CUDA_ARRAY3D_DESCRIPTOR desc;
    ///     desc.Format = CU_AD_FORMAT_FLOAT;
    ///     desc.NumChannels = 1;
    ///     desc.Width = 64;
    ///     desc.Height = 64;
    ///     desc.Depth = 0;
    /// ```
    ///
    /// Description for a `width` x `height` x `depth` CUDA array of 64-bit, 4x16-bit float16's:
    ///
    ///
    ///
    /// ```text
    ///     CUDA_ARRAY3D_DESCRIPTOR desc;
    ///     desc.Format = CU_AD_FORMAT_HALF;
    ///     desc.NumChannels = 4;
    ///     desc.Width = width;
    ///     desc.Height = height;
    ///     desc.Depth = depth;
    /// ```
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_OUT_OF_MEMORY, ::CUDA_ERROR_UNKNOWN
    ///
    ///
    ///
    /// See also: ::cuArray3DGetDescriptor, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaMalloc3DArray
    ///
    /// # Parameters
    ///
    /// - `pHandle`: - Returned array
    /// - `pAllocateArray`: - 3D array descriptor
    pub fn cuArray3DCreate_v2(
        pHandle: *mut CUarray,
        pAllocateArray: *const CUDA_ARRAY3D_DESCRIPTOR,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get a 3D CUDA array descriptor
    ///
    /// Returns in `*pArrayDescriptor` a descriptor containing information on the format and dimensions of the CUDA array `hArray`. It is useful for subroutines that have been passed a CUDA array, but need to know the CUDA array parameters for validation or other purposes.
    ///
    /// This function may be called on 1D and 2D arrays, in which case the `Height` and/or `Depth` members of the descriptor struct will be set to 0.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_CONTEXT_IS_DESTROYED
    ///
    ///
    ///
    /// See also: ::cuArray3DCreate, ::cuArrayCreate, ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost, ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost, ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32, ::cudaArrayGetInfo
    ///
    /// # Parameters
    ///
    /// - `pArrayDescriptor`: - Returned 3D array descriptor
    /// - `hArray`: - 3D array to get descriptor of
    pub fn cuArray3DGetDescriptor_v2(
        pArrayDescriptor: *mut CUDA_ARRAY3D_DESCRIPTOR,
        hArray: CUarray,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a CUDA mipmapped array.
    ///
    /// Creates a CUDA mipmapped array according to the CUDA_ARRAY3D_DESCRIPTOR structure `pMipmappedArrayDesc` and returns a handle to the new CUDA mipmapped array in `*pHandle`. `numMipmapLevels` specifies the number of mipmap levels to be allocated. This value is clamped to the range \[1, 1 + floor(log2(max(width, height, depth)))\].
    ///
    /// The CUDA_ARRAY3D_DESCRIPTOR is defined as:
    ///
    /// `Width`, `Height` and `Depth` must meet certain size requirements as listed in the following table. All values are specified in elements. Note that for brevity’s sake, the full name of the device attribute is not specified. For ex., TEXTURE1D_MIPMAPPED_WIDTH refers to the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH`].
    ///
    /// # Parameters
    ///
    /// - `pHandle`: Returned mipmapped array.
    /// - `pMipmappedArrayDesc`: mipmapped array descriptor.
    /// - `numMipmapLevels`: Number of mipmap levels.
    pub fn cuMipmappedArrayCreate(
        pHandle: *mut CUmipmappedArray,
        pMipmappedArrayDesc: *const CUDA_ARRAY3D_DESCRIPTOR,
        numMipmapLevels: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets a mipmap level of a CUDA mipmapped array.
    ///
    /// Returns in `*pLevelArray` a CUDA array that represents a single mipmap level of the CUDA mipmapped array `hMipmappedArray`.
    ///
    /// If `level` is greater than the maximum number of levels in this mipmapped array, [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] is returned.
    ///
    /// # Parameters
    ///
    /// - `pLevelArray`: Returned mipmap level CUDA array.
    /// - `hMipmappedArray`: CUDA mipmapped array.
    /// - `level`: Mipmap level.
    pub fn cuMipmappedArrayGetLevel(
        pLevelArray: *mut CUarray,
        hMipmappedArray: CUmipmappedArray,
        level: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys a CUDA mipmapped array.
    ///
    /// Destroys the CUDA mipmapped array `hMipmappedArray`.
    ///
    /// # Parameters
    ///
    /// - `hMipmappedArray`: - Mipmapped array to destroy
    pub fn cuMipmappedArrayDestroy(hMipmappedArray: CUmipmappedArray) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Retrieve handle for an address range.
    ///
    /// Get a handle of the specified type to an address range. When requesting CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD, address range obtained by a prior call to either cuMemAlloc or [`cuMemAddressReserve`] is supported if the [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED`] device attribute returns true. If the address range was obtained via [`cuMemAddressReserve`], it must also be fully mapped via [`cuMemMap`]. Address range obtained by a prior call to either cuMemAllocHost or [`cuMemHostAlloc`] is supported if the [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_HOST_ALLOC_DMA_BUF_SUPPORTED`] device attribute returns true.
    ///
    /// As of CUDA 13.0, querying support for address range obtained by calling cuMemAllocHost or [`cuMemHostAlloc`] using the [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED`] device attribute is deprecated.
    ///
    /// Users must ensure the `dptr` and `size` are aligned to the host page size.
    ///
    /// The `handle` will be interpreted as a pointer to an integer to store the dma_buf file descriptor. Users must ensure the entire address range is backed and mapped when the address range is allocated by [`cuMemAddressReserve`]. All the physical allocations backing the address range must be resident on the same device and have identical allocation properties. Users are also expected to retrieve a new handle every time the underlying physical allocation(s) corresponding to a previously queried VA range are changed.
    ///
    /// For CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD, users may set flags to [`CUmemRangeFlags_enum::CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE`]. Which when set on a supported platform, will give a DMA_BUF handle mapped via PCIE BAR1 or will return an error otherwise.
    ///
    /// If the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_DMA_BUF_MMAP_SUPPORTED`] is set and a CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD is requested for a device memory range then the returned dmabuf file descriptor may be passed as the file descriptor argument to the mmap() system call.
    ///
    /// For device memory on x86 systems the mapping will be a write combined mapping. On coherent ARM platforms these mappings will be regular cached memory. On all other platforms these mappings will be uncached.
    ///
    /// # Parameters
    ///
    /// - `handle`: Pointer to the location where the returned handle will be stored.
    /// - `dptr`: Pointer to a valid CUDA device allocation. Must be aligned to host page size.
    /// - `size`: Length of the address range. Must be aligned to host page size.
    /// - `handleType`: Type of handle requested (defines type and size of the `handle` output parameter).
    /// - `flags`: When requesting CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD the value could be [`CUmemRangeFlags_enum::CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE`], otherwise 0.
    pub fn cuMemGetHandleForAddressRange(
        handle: *mut ::core::ffi::c_void,
        dptr: CUdeviceptr,
        size: size_t,
        handleType: CUmemRangeHandleType,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
impl CUmemDecompressAlgorithm_enum {
    /// Decompression is unsupported.
    pub const CU_MEM_DECOMPRESS_UNSUPPORTED: CUmemDecompressAlgorithm_enum = CUmemDecompressAlgorithm_enum(
        0,
    );
    /// Deflate is supported.
    pub const CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE: CUmemDecompressAlgorithm_enum = CUmemDecompressAlgorithm_enum(
        1,
    );
    /// Snappy is supported.
    pub const CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY: CUmemDecompressAlgorithm_enum = CUmemDecompressAlgorithm_enum(
        2,
    );
    /// LZ4 is supported.
    pub const CU_MEM_DECOMPRESS_ALGORITHM_LZ4: CUmemDecompressAlgorithm_enum = CUmemDecompressAlgorithm_enum(
        4,
    );
}
/// Bitmasks for CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemDecompressAlgorithm_enum(pub ::core::ffi::c_uint);
pub use self::CUmemDecompressAlgorithm_enum as CUmemDecompressAlgorithm;
/// Structure describing the parameters that compose a single decompression operation.
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUmemDecompressParams_st {
    /// The number of bytes to be read and decompressed from ::CUmemDecompressParams_st.src.
    pub srcNumBytes: size_t,
    /// The number of bytes that the decompression operation will be expected to write to ::CUmemDecompressParams_st.dst. This value is optional; if present, it may be used by the CUDA driver as a heuristic for scheduling the individual decompression operations.
    pub dstNumBytes: size_t,
    /// After the decompression operation has completed, the actual number of bytes written to ::CUmemDecompressParams.dst will be recorded as a 32-bit unsigned integer in the memory at this address.
    pub dstActBytes: *mut cuuint32_t,
    /// Pointer to a buffer of at least ::CUmemDecompressParams_st.srcNumBytes compressed bytes.
    pub src: *const ::core::ffi::c_void,
    /// Pointer to a buffer where the decompressed data will be written. The number of bytes written to this location will be recorded in the memory pointed to by ::CUmemDecompressParams_st.dstActBytes
    pub dst: *mut ::core::ffi::c_void,
    /// The decompression algorithm to use.
    pub algo: CUmemDecompressAlgorithm,
    /// These bytes are unused and must be zeroed. This ensures compatibility if additional fields are added in the future.
    pub padding: [::core::ffi::c_uchar; 20usize],
}
impl Default for CUmemDecompressParams_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Structure describing the parameters that compose a single decompression operation.
pub type CUmemDecompressParams = CUmemDecompressParams_st;
singe_loader::functions! { crate::DRIVER;
    /// Submit a batch of `count` independent decompression operations.
    ///
    /// Each of the `count` decompression operations is described by a single entry in the `paramsArray` array. Once the batch has been submitted, the function will return, and decompression will happen asynchronously with respect to the CPU. To the work completion tracking mechanisms in the CUDA driver, the batch will be considered a single unit of work and processed according to stream semantics, i.e., it is not possible to query the completion of individual decompression operations within a batch.
    ///
    /// The memory pointed to by each of [CUmemDecompressParams.src](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemDecompressParams.html#structcumemdecompressparams_1a4d390c15ec5ed068f0912e42077ae0e0), [CUmemDecompressParams.dst](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemDecompressParams.html#structcumemdecompressparams_1a39077e823122cfcfab6aeca53093c88c), and [CUmemDecompressParams.dstActBytes](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemDecompressParams.html#structcumemdecompressparams_1adf7e9b52dd81aa6c0ed689eeab86d1a7), must be capable of usage with the hardware decompress feature. That is, for each of said pointers, the pointer attribute [`CUpointer_attribute_enum::CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE`] should give a non-zero value. To ensure this, the memory backing the pointers should have been allocated using one of the following CUDA memory allocators.
    ///
    /// # Parameters
    ///
    /// - `paramsArray`: The array of structures describing the independent decompression operations.
    /// - `count`: The number of entries in `paramsArray` array.
    /// - `flags`: Must be 0.
    /// - `errorIndex`: The index into `paramsArray` of the decompression operation for which the error returned by this function pertains to. If `index` is SIZE_MAX and the value returned is not [`cudaError_enum::CUDA_SUCCESS`], then the error returned by this function should be considered a general error that does not pertain to a particular decompression operation. May be `NULL`, in which case, no index will be recorded in the event of error.
    /// - `stream`: The stream where the work will be enqueued.
    pub fn cuMemBatchDecompressAsync(
        paramsArray: *mut CUmemDecompressParams,
        count: size_t,
        flags: ::core::ffi::c_uint,
        errorIndex: *mut size_t,
        stream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Allocate an address range reservation.
    ///
    /// Reserves a virtual address range based on the given parameters, giving the starting address of the range in `ptr`. This API requires a system that supports UVA. The size and address parameters must be a multiple of the host page size and the alignment must be a power of two or zero for default alignment. If `addr` is 0, then the driver chooses the address at which to place the start of the reservation whereas when it is non-zero then the driver treats it as a hint about where to place the reservation.
    ///
    /// # Parameters
    ///
    /// - `ptr`: Resulting pointer to start of virtual address range allocated.
    /// - `size`: Size of the reserved virtual address range requested.
    /// - `alignment`: Alignment of the reserved virtual address range requested.
    /// - `addr`: Hint address for the start of the address range.
    /// - `flags`: Currently unused, must be zero.
    pub fn cuMemAddressReserve(
        ptr: *mut CUdeviceptr,
        size: size_t,
        alignment: size_t,
        addr: CUdeviceptr,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Free an address range reservation.
    ///
    /// Frees a virtual address range reserved by cuMemAddressReserve. The size must match what was given to memAddressReserve and the ptr given must match what was returned from memAddressReserve.
    ///
    /// # Parameters
    ///
    /// - `ptr`: Starting address of the virtual address range to free.
    /// - `size`: Size of the virtual address region to free.
    pub fn cuMemAddressFree(ptr: CUdeviceptr, size: size_t) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Create a CUDA memory handle representing a memory allocation of a given size described by the given properties.
    ///
    /// This creates a memory allocation on the target device specified through the `prop` structure. The created allocation will not have any device or host mappings. The generic memory `handle` for the allocation can be mapped to the address space of calling process via [`cuMemMap`]. This handle cannot be transmitted directly to other processes (see [`cuMemExportToShareableHandle`]). On Windows, the caller must also pass an LPSECURITYATTRIBUTE in `prop` to be associated with this handle which limits or allows access to this handle for a recipient process (see [CUmemAllocationProp::win32HandleMetaData](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemAllocationProp__v1.html#structcumemallocationprop__v1_1a542262ad88e1d00f02b306c641270168) for more). The `size` of this allocation must be a multiple of the value given via [`cuMemGetAllocationGranularity`] with the [`CUmemAllocationGranularity_flags_enum::CU_MEM_ALLOC_GRANULARITY_MINIMUM`] flag. To create a CPU allocation that doesn’t target any specific NUMA nodes, applications must set [CUmemAllocationProp::CUmemLocation::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemAllocationProp__v1.html#structcumemallocationprop__v1_1a574c7287583cd07f23efc94d444087b1) to [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST`]. ::CUmemAllocationProp::CUmemLocation::id is ignored for HOST allocations. HOST allocations are not IPC capable and [CUmemAllocationProp::requestedHandleTypes](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemAllocationProp__v1.html#structcumemallocationprop__v1_1ae2e852e72e5d2053b771fbac49495efd) must be 0, any other value will result in [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`]. To create a CPU allocation targeting a specific host NUMA node, applications must set [CUmemAllocationProp::CUmemLocation::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemAllocationProp__v1.html#structcumemallocationprop__v1_1a574c7287583cd07f23efc94d444087b1) to [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`] and ::CUmemAllocationProp::CUmemLocation::id must specify the NUMA ID of the CPU. On systems where NUMA is not available ::CUmemAllocationProp::CUmemLocation::id must be set to 0. Specifying [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT`] as the [CUmemLocation::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemLocation__v1.html#structcumemlocation__v1_1aa34fc29f2a55d501f00f912d92152d1b) will result in [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`]. Specifying [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`] as the [CUmemLocation::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemLocation__v1.html#structcumemlocation__v1_1aa34fc29f2a55d501f00f912d92152d1b) will localize the allocation to the specified locality domain. ::CUmemAllocationProp::CUmemLocation::localized.deviceId must specify the device ID. ::CUmemAllocationProp::CUmemLocation::localized.localityDomainId must specify the locality domain ID. The locality domain ID must be a valid locality domain ID for the specified device. See also [`cuDeviceGetAttribute`] with the attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_COUNT`].
    ///
    /// Applications that intend to use [`CUmemAllocationHandleType_enum::CU_MEM_HANDLE_TYPE_FABRIC`] based memory sharing must ensure: (1) `nvidia-caps-imex-channels` character device is created by the driver and is listed under /proc/devices (2) have at least one IMEX channel file accessible by the user launching the application.
    ///
    /// When exporter and importer CUDA processes have been granted access to the same IMEX channel, they can securely share memory.
    ///
    /// The IMEX channel security model works on a per user basis. Which means all processes under a user can share memory if the user has access to a valid IMEX channel. When multi-user isolation is desired, a separate IMEX channel is required for each user.
    ///
    /// These channel files exist in /dev/nvidia-caps-imex-channels/channel\* and can be created using standard OS native calls like mknod on Linux. For example: To create channel0 with the major number from /proc/devices users can execute the following command: `mknod /dev/nvidia-caps-imex-channels/channel0 c &lt;major number> 0`
    ///
    /// If [CUmemAllocationProp::allocFlags::usage](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemAllocationProp__v1.html#structcumemallocationprop__v1_1affdae8fc56d42a203bb8a7629df3ac51) contains [`CU_MEM_CREATE_USAGE_TILE_POOL`] flag then the memory allocation is intended only to be used as backing tile pool for sparse CUDA arrays and sparse CUDA mipmapped arrays. (see [`cuMemMapArrayAsync`]).
    ///
    /// # Parameters
    ///
    /// - `handle`: Value of handle returned. All operations on this allocation are to be performed using this handle.
    /// - `size`: Size of the allocation requested.
    /// - `prop`: Properties of the allocation to create.
    /// - `flags`: flags for future use, must be zero now.
    pub fn cuMemCreate(
        handle: *mut CUmemGenericAllocationHandle,
        size: size_t,
        prop: *const CUmemAllocationProp,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Release a memory handle representing a memory allocation which was previously allocated through cuMemCreate.
    ///
    /// Frees the memory that was allocated on a device through cuMemCreate.
    ///
    /// The memory allocation will be freed when all outstanding mappings to the memory are unmapped and when all outstanding references to the handle (including it’s shareable counterparts) are also released. The generic memory handle can be freed when there are still outstanding mappings made with this handle. Each time a recipient process imports a shareable handle, it needs to pair it with [`cuMemRelease`] for the handle to be freed. If `handle` is not a valid handle the behavior is undefined.
    ///
    /// # Parameters
    ///
    /// - `handle`: Value of handle which was returned previously by cuMemCreate.
    pub fn cuMemRelease(handle: CUmemGenericAllocationHandle) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Maps an allocation handle to a reserved virtual address range.
    ///
    /// Maps bytes of memory represented by `handle` starting from byte `offset` to `size` to address range `addr`, `addr` + `size`. This range must be an address reservation previously reserved with [`cuMemAddressReserve`], and `offset` + `size` must be less than the size of the memory allocation. Both `ptr`, `size`, and `offset` must be a multiple of the value given via [`cuMemGetAllocationGranularity`] with the [`CUmemAllocationGranularity_flags_enum::CU_MEM_ALLOC_GRANULARITY_MINIMUM`] flag. If `handle` represents a multicast object, `ptr`, `size` and `offset` must be aligned to the value returned by [`cuMulticastGetGranularity`] with the flag ::CU_MULTICAST_MINIMUM_GRANULARITY. For best performance however, it is recommended that `ptr`, `size` and `offset` be aligned to the value returned by [`cuMulticastGetGranularity`] with the flag ::CU_MULTICAST_RECOMMENDED_GRANULARITY.
    ///
    /// When `handle` represents a multicast object, this call may fail if the devices added via [`cuMulticastAddDevice`] do not belong to the same clique.
    ///
    /// When `handle` represents a multicast object, this call may return [`CUresult::CUDA_ERROR_ILLEGAL_STATE`] if the system configuration is in an illegal state. In such cases, to continue using multicast, verify that the system configuration is in a valid state and all required driver daemons are running properly.
    ///
    /// Please note calling [`cuMemMap`] does not make the address accessible, the caller needs to update accessibility of a contiguous mapped VA range by calling [`cuMemSetAccess`].
    ///
    /// Once a recipient process obtains a shareable memory handle from [`cuMemImportFromShareableHandle`], the process must use [`cuMemMap`] to map the memory into its address ranges before setting accessibility with [`cuMemSetAccess`].
    ///
    /// [`cuMemMap`] can only create mappings on VA range reservations that are not currently mapped.
    ///
    /// # Parameters
    ///
    /// - `ptr`: Address where memory will be mapped.
    /// - `size`: Size of the memory mapping.
    /// - `offset`: - Offset into the memory represented by
    /// - `handle` from which to start mapping
    /// - Note: currently must be zero.
    /// - `handle`: Handle to a shareable memory.
    /// - `flags`: flags for future use, must be zero now.
    pub fn cuMemMap(
        ptr: CUdeviceptr,
        size: size_t,
        offset: size_t,
        handle: CUmemGenericAllocationHandle,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Maps or unmaps subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays.
    ///
    /// Performs map or unmap operations on subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays. Each operation is specified by a CUarrayMapInfo entry in the `mapInfoList` array of size `count`. The structure CUarrayMapInfo is defined as follow:
    ///
    /// where [CUarrayMapInfo::resourceType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a8cf3c7ba97c834ab8b0fcfb50fec578c) specifies the type of resource to be operated on. If [CUarrayMapInfo::resourceType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a8cf3c7ba97c834ab8b0fcfb50fec578c) is set to ::CUresourcetype::CU_RESOURCE_TYPE_ARRAY then CUarrayMapInfo::resource::array must be set to a valid sparse CUDA array handle. The CUDA array must be either a 2D, 2D layered or 3D CUDA array and must have been allocated using cuArrayCreate or cuArray3DCreate with the flag [`CUDA_ARRAY3D_SPARSE`] or [`CUDA_ARRAY3D_DEFERRED_MAPPING`]. For CUDA arrays obtained using [`cuMipmappedArrayGetLevel`], [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] will be returned. If [CUarrayMapInfo::resourceType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a8cf3c7ba97c834ab8b0fcfb50fec578c) is set to ::CUresourcetype::CU_RESOURCE_TYPE_MIPMAPPED_ARRAY then CUarrayMapInfo::resource::mipmap must be set to a valid sparse CUDA mipmapped array handle. The CUDA mipmapped array must be either a 2D, 2D layered or 3D CUDA mipmapped array and must have been allocated using [`cuMipmappedArrayCreate`] with the flag [`CUDA_ARRAY3D_SPARSE`] or [`CUDA_ARRAY3D_DEFERRED_MAPPING`].
    ///
    /// [CUarrayMapInfo::subresourceType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a7a2fe272bd8e44af2386f1c20c3d3c68) specifies the type of subresource within the resource. ::CUarraySparseSubresourceType_enum is defined as:
    ///
    /// where ::CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL indicates a sparse-miplevel which spans at least one tile in every dimension. The remaining miplevels which are too small to span at least one tile in any dimension constitute the mip tail region as indicated by ::CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL subresource type.
    ///
    /// If [CUarrayMapInfo::subresourceType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a7a2fe272bd8e44af2386f1c20c3d3c68) is set to ::CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL then CUarrayMapInfo::subresource::sparseLevel struct must contain valid array subregion offsets and extents. The [CUarrayMapInfo::subresource::sparseLevel::offsetX](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1aefe372bb107f7bc89cfcca0a857b33d3), [CUarrayMapInfo::subresource::sparseLevel::offsetY](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a98a37a828dc2814543c410c01e93b6dd) and [CUarrayMapInfo::subresource::sparseLevel::offsetZ](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1ad5dd8de9c3bd4c486a951c2784eb1c56) must specify valid X, Y and Z offsets respectively. The [CUarrayMapInfo::subresource::sparseLevel::extentWidth](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a50dd4e7049b30f74a5edfd393824f7f8), [CUarrayMapInfo::subresource::sparseLevel::extentHeight](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1acee9af385a8d55412462af044e2014f2) and [CUarrayMapInfo::subresource::sparseLevel::extentDepth](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1aace61d37825a0eabdd76649628e38e56) must specify valid width, height and depth extents respectively. These offsets and extents must be aligned to the corresponding tile dimension. For CUDA mipmapped arrays [CUarrayMapInfo::subresource::sparseLevel::level](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1aa8236fa42f04cd67abd14cb1ef0fca86) must specify a valid mip level index. Otherwise, must be zero. For layered CUDA arrays and layered CUDA mipmapped arrays [CUarrayMapInfo::subresource::sparseLevel::layer](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a843b7856a03e69ad18eec27ccb40b222) must specify a valid layer index. Otherwise, must be zero. [CUarrayMapInfo::subresource::sparseLevel::offsetZ](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1ad5dd8de9c3bd4c486a951c2784eb1c56) must be zero and [CUarrayMapInfo::subresource::sparseLevel::extentDepth](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1aace61d37825a0eabdd76649628e38e56) must be set to 1 for 2D and 2D layered CUDA arrays and CUDA mipmapped arrays. Tile extents can be obtained by calling [`cuArrayGetSparseProperties`] and [`cuMipmappedArrayGetSparseProperties`]
    ///
    /// If [CUarrayMapInfo::subresourceType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a7a2fe272bd8e44af2386f1c20c3d3c68) is set to ::CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL then CUarrayMapInfo::subresource::miptail struct must contain valid mip tail offset in [CUarrayMapInfo::subresource::miptail::offset](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a4aee5e358272af897aeaf8b44fd15bdb) and size in [CUarrayMapInfo::subresource::miptail::size](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1abb22d0785912f6bd26802bbd6c31a7ec). Both, mip tail offset and mip tail size must be aligned to the tile size. For layered CUDA mipmapped arrays which don’t have the flag [`CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL`] set in [CUDA_ARRAY_SPARSE_PROPERTIES::flags](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__ARRAY__SPARSE__PROPERTIES__v1.html#structcuda__array__sparse__properties__v1_1a0e842bb64091fa47809112c700cb5f0a) as returned by [`cuMipmappedArrayGetSparseProperties`], [CUarrayMapInfo::subresource::miptail::layer](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a843b7856a03e69ad18eec27ccb40b222) must specify a valid layer index. Otherwise, must be zero.
    ///
    /// If CUarrayMapInfo::resource::array or CUarrayMapInfo::resource::mipmap was created with [`CUDA_ARRAY3D_DEFERRED_MAPPING`] flag set the [CUarrayMapInfo::subresourceType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a7a2fe272bd8e44af2386f1c20c3d3c68) and the contents of CUarrayMapInfo::subresource will be ignored.
    ///
    /// [CUarrayMapInfo::memOperationType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1add139e9655407264f2aeb812cec0f19e) specifies the type of operation. [CUmemOperationType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gae7469bd2e035fc9c937e84490fdcd349) is defined as:
    ///
    /// If [CUarrayMapInfo::memOperationType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1add139e9655407264f2aeb812cec0f19e) is set to ::CUmemOperationType::CU_MEM_OPERATION_TYPE_UNMAP then an unmapping operation is performed. CUarrayMapInfo::memHandle must be NULL.
    ///
    /// [CUarrayMapInfo::deviceBitMask](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1af2d14f719018cc1daa786f7fd0652c2c) specifies the list of devices that must map or unmap physical memory. Currently, this mask must have exactly one bit set, and the corresponding device must match the device associated with the stream. If [CUarrayMapInfo::memOperationType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1add139e9655407264f2aeb812cec0f19e) is set to ::CUmemOperationType::CU_MEM_OPERATION_TYPE_MAP, the device must also match the device associated with the tile pool memory allocation as specified by CUarrayMapInfo::memHandle.
    ///
    /// [CUarrayMapInfo::flags](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1a2e36982c16390693a56807d0b8e6380f) and [CUarrayMapInfo::reserved](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUarrayMapInfo__v1.html#structcuarraymapinfo__v1_1acf7014dc4a157928de12563d0181ceba)[] are unused and must be set to zero.
    ///
    /// # Parameters
    ///
    /// - `mapInfoList`: List of CUarrayMapInfo.
    /// - `count`: Count of CUarrayMapInfo in `mapInfoList`.
    /// - `hStream`: Stream identifier for the stream to use for map or unmap operations.
    pub fn cuMemMapArrayAsync(
        mapInfoList: *mut CUarrayMapInfo,
        count: ::core::ffi::c_uint,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Unmap the backing memory of a given address range.
    ///
    /// The range must be the entire contiguous address range that was mapped to. In other words, [`cuMemUnmap`] cannot unmap a sub-range of an address range mapped by [`cuMemCreate`] / [`cuMemMap`]. Any backing memory allocations will be freed if there are no existing mappings and there are no unreleased memory handles.
    ///
    /// When [`cuMemUnmap`] returns successfully the address range is converted to an address reservation and can be used for a future calls to [`cuMemMap`]. Any new mapping to this virtual address will need to have access granted through [`cuMemSetAccess`], as all mappings start with no accessibility setup.
    ///
    /// # Parameters
    ///
    /// - `ptr`: Starting address for the virtual address range to unmap.
    /// - `size`: Size of the virtual address range to unmap.
    pub fn cuMemUnmap(ptr: CUdeviceptr, size: size_t) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Set the access flags for each location specified in `desc` for the given virtual address range.
    ///
    /// Given the virtual address range via `ptr` and `size`, and the locations in the array given by `desc` and `count`, set the access flags for the target locations. The range must be a fully mapped address range containing all allocations created by [`cuMemMap`] / [`cuMemCreate`]. Users cannot specify [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`] accessibility for allocations created on with other location types. Note: When ::CUmemAccessDesc::CUmemLocation::type is [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`], ::CUmemAccessDesc::CUmemLocation::id is ignored. When setting the access flags for a virtual address range mapping a multicast object, `ptr` and `size` must be aligned to the value returned by [`cuMulticastGetGranularity`] with the flag ::CU_MULTICAST_MINIMUM_GRANULARITY. For best performance however, it is recommended that `ptr` and `size` be aligned to the value returned by [`cuMulticastGetGranularity`] with the flag ::CU_MULTICAST_RECOMMENDED_GRANULARITY.
    ///
    /// # Parameters
    ///
    /// - `ptr`: Starting address for the virtual address range.
    /// - `size`: Length of the virtual address range.
    /// - `desc`: - Array of ::CUmemAccessDesc that describe how to change the
    /// - mapping for each location specified
    /// - `count`: Number of CUmemAccessDesc in `desc`.
    pub fn cuMemSetAccess(
        ptr: CUdeviceptr,
        size: size_t,
        desc: *const CUmemAccessDesc,
        count: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get the access `flags` set for the given `location` and `ptr`.
    ///
    /// # Parameters
    ///
    /// - `flags`: Flags set for this location.
    /// - `location`: Location in which to check the flags for.
    /// - `ptr`: Address in which to check the access flags for.
    pub fn cuMemGetAccess(
        flags: *mut ::core::ffi::c_ulonglong,
        location: *const CUmemLocation,
        ptr: CUdeviceptr,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Exports an allocation to a requested shareable handle type.
    ///
    /// Given a CUDA memory handle, create a shareable memory allocation handle that can be used to share the memory with other processes. The recipient process can convert the shareable handle back into a CUDA memory handle using [`cuMemImportFromShareableHandle`] and map it with [`cuMemMap`]. The implementation of what this handle is and how it can be transferred is defined by the requested handle type in `handleType`
    ///
    /// Once all shareable handles are closed and the allocation is released, the allocated memory referenced will be released back to the OS and uses of the CUDA handle afterward will lead to undefined behavior.
    ///
    /// This API can also be used in conjunction with other APIs (e.g. Vulkan, OpenGL) that support importing memory from the shareable type.
    ///
    /// # Parameters
    ///
    /// - `shareableHandle`: Pointer to the location in which to store the requested handle type.
    /// - `handle`: CUDA handle for the memory allocation.
    /// - `handleType`: Type of shareable handle requested (defines type and size of the `shareableHandle` output parameter).
    /// - `flags`: Reserved, must be zero.
    pub fn cuMemExportToShareableHandle(
        shareableHandle: *mut ::core::ffi::c_void,
        handle: CUmemGenericAllocationHandle,
        handleType: CUmemAllocationHandleType,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Imports an allocation from a requested shareable handle type.
    ///
    /// If the current process cannot support the memory described by this shareable handle, this API will error as [`cudaError_enum::CUDA_ERROR_NOT_SUPPORTED`].
    ///
    /// If `shHandleType` is [`CUmemAllocationHandleType_enum::CU_MEM_HANDLE_TYPE_FABRIC`] and the importer process has not been granted access to the same IMEX channel as the exporter process, this API will error as [`cudaError_enum::CUDA_ERROR_NOT_PERMITTED`].
    ///
    /// # Parameters
    ///
    /// - `handle`: CUDA Memory handle for the memory allocation.
    /// - `osHandle`: Shareable Handle representing the memory allocation that is to be imported.
    /// - `shHandleType`: handle type of the exported handle [CUmemAllocationHandleType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga450a23153d86fce0afe30e25d63caef9).
    pub fn cuMemImportFromShareableHandle(
        handle: *mut CUmemGenericAllocationHandle,
        osHandle: *mut ::core::ffi::c_void,
        shHandleType: CUmemAllocationHandleType,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Calculates either the minimal or recommended granularity.
    ///
    /// Calculates either the minimal or recommended granularity for a given allocation specification and returns it in granularity. This granularity can be used as a multiple for alignment, size, or address mapping.
    ///
    /// # Parameters
    ///
    /// - `granularity`: Returned granularity.
    /// - `prop`: Property for which to determine the granularity for.
    /// - `option`: Determines which granularity to return.
    pub fn cuMemGetAllocationGranularity(
        granularity: *mut size_t,
        prop: *const CUmemAllocationProp,
        option: CUmemAllocationGranularity_flags,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Retrieve the contents of the property structure defining properties for this handle.
    ///
    /// # Parameters
    ///
    /// - `prop`: Pointer to a properties structure which will hold the information about this handle.
    /// - `handle`: Handle which to perform the query on.
    pub fn cuMemGetAllocationPropertiesFromHandle(
        prop: *mut CUmemAllocationProp,
        handle: CUmemGenericAllocationHandle,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Given an address `addr`, returns the allocation handle of the backing memory allocation.
    ///
    /// The handle is guaranteed to be the same handle value used to map the memory. If the address requested is not mapped, the function will fail. The returned handle must be released with corresponding number of calls to [`cuMemRelease`].
    ///
    /// # Parameters
    ///
    /// - `handle`: CUDA Memory handle for the backing memory allocation.
    /// - `addr`: Memory address to query, that has been mapped previously.
    pub fn cuMemRetainAllocationHandle(
        handle: *mut CUmemGenericAllocationHandle,
        addr: *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Frees memory with stream ordered semantics.
    ///
    /// Inserts a free operation into `hStream`. The allocation must not be accessed after stream execution reaches the free. After this API returns, accessing the memory from any subsequent work launched on the GPU or querying its pointer attributes results in undefined behavior.
    ///
    /// # Parameters
    ///
    /// - `dptr`: memory to free.
    /// - `hStream`: The stream establishing the stream ordering contract.
    pub fn cuMemFreeAsync(dptr: CUdeviceptr, hStream: CUstream) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Allocates memory with stream ordered semantics.
    ///
    /// Inserts an allocation operation into `hStream`. A pointer to the allocated memory is returned immediately in \*dptr. The allocation must not be accessed until the allocation operation completes. The allocation comes from the memory pool current to the stream’s device.
    ///
    /// # Parameters
    ///
    /// - `dptr`: Returned device pointer.
    /// - `bytesize`: Number of bytes to allocate.
    /// - `hStream`: The stream establishing the stream ordering contract and the memory pool to allocate from.
    pub fn cuMemAllocAsync(
        dptr: *mut CUdeviceptr,
        bytesize: size_t,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Tries to release memory back to the OS.
    ///
    /// Releases memory back to the OS until the pool contains fewer than minBytesToKeep reserved bytes, or there is no more memory that the allocator can safely release. The allocator cannot release OS allocations that back outstanding asynchronous allocations. The OS allocations may happen at different granularity from the user allocations.
    ///
    /// # Parameters
    ///
    /// - `pool`: The memory pool to trim.
    /// - `minBytesToKeep`: If the pool has less than minBytesToKeep reserved, the TrimTo operation is a no-op. Otherwise the pool will be guaranteed to have at least minBytesToKeep bytes reserved after the operation.
    pub fn cuMemPoolTrimTo(pool: CUmemoryPool, minBytesToKeep: size_t) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets attributes of a memory pool.
    ///
    /// Supported attributes are.
    ///
    /// # Parameters
    ///
    /// - `pool`: The memory pool to modify.
    /// - `attr`: The attribute to modify.
    /// - `value`: Pointer to the value to assign.
    pub fn cuMemPoolSetAttribute(
        pool: CUmemoryPool,
        attr: CUmemPool_attribute,
        value: *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets attributes of a memory pool.
    ///
    /// Supported attributes are:
    ///
    /// The following properties can be also be queried on imported and default pools.
    ///
    /// # Parameters
    ///
    /// - `pool`: The memory pool to get attributes of.
    /// - `attr`: The attribute to get.
    /// - `value`: Retrieved value.
    pub fn cuMemPoolGetAttribute(
        pool: CUmemoryPool,
        attr: CUmemPool_attribute,
        value: *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Controls visibility of pools between devices.
    ///
    /// # Parameters
    ///
    /// - `pool`: The pool being modified.
    /// - `map`: Array of access descriptors. Each descriptor instructs the access to enable for a single gpu.
    /// - `count`: Number of descriptors in the map array.
    pub fn cuMemPoolSetAccess(
        pool: CUmemoryPool,
        map: *const CUmemAccessDesc,
        count: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the accessibility of a pool from a device.
    ///
    /// Returns the accessibility of the pool’s memory from the specified location.
    ///
    /// # Parameters
    ///
    /// - `flags`: the accessibility of the pool from the specified location.
    /// - `memPool`: the pool being queried.
    /// - `location`: the location accessing the pool.
    pub fn cuMemPoolGetAccess(
        flags: *mut CUmemAccess_flags,
        memPool: CUmemoryPool,
        location: *mut CUmemLocation,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a memory pool.
    ///
    /// Creates a CUDA memory pool and returns the handle in `pool`. The `poolProps` determines the properties of the pool such as the backing device and IPC capabilities.
    ///
    /// To create a memory pool for HOST memory not targeting a specific NUMA node, applications must set set ::CUmemPoolProps::CUmemLocation::type to [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST`]. ::CUmemPoolProps::CUmemLocation::id is ignored for such pools. Pools created with the type [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST`] are not IPC capable and [CUmemPoolProps::handleTypes](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemPoolProps__v1.html#structcumempoolprops__v1_1a69e75d604b122dbd39a8e3e3eacbe660) must be 0, any other values will result in [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`]. To create a memory pool targeting a specific host NUMA node, applications must set ::CUmemPoolProps::CUmemLocation::type to [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`] and ::CUmemPoolProps::CUmemLocation::id must specify the NUMA ID of the host memory node. Specifying [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT`] as the ::CUmemPoolProps::CUmemLocation::type will result in [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`]. To create a memory pool targeting a specific device locality domain, applications must set ::CUmemPoolProps::CUmemLocation::type to [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`], ::CUmemPoolProps::CUmemLocation::localized.deviceId must specify the device ID, and ::CUmemPoolProps::CUmemLocation::localized.localityDomainId must specify the locality domain ID. The locality domain ID must be a valid locality domain ID for the specified device. See also [`cuDeviceGetAttribute`] with the attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_COUNT`].
    ///
    /// By default, the pool’s memory will be accessible from the device it is allocated on. In the case of pools created with [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`] or [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST`], their default accessibility will be from the host CPU. Applications can control the maximum size of the pool by specifying a non-zero value for [CUmemPoolProps::maxSize](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemPoolProps__v1.html#structcumempoolprops__v1_1a0f9278cc88653f1eee70ab6a7a2ad7f3). If set to 0, the maximum size of the pool will default to a system dependent value.
    ///
    /// Applications that intend to use [`CUmemAllocationHandleType_enum::CU_MEM_HANDLE_TYPE_FABRIC`] based memory sharing must ensure: (1) `nvidia-caps-imex-channels` character device is created by the driver and is listed under /proc/devices (2) have at least one IMEX channel file accessible by the user launching the application.
    ///
    /// When exporter and importer CUDA processes have been granted access to the same IMEX channel, they can securely share memory.
    ///
    /// The IMEX channel security model works on a per user basis. Which means all processes under a user can share memory if the user has access to a valid IMEX channel. When multi-user isolation is desired, a separate IMEX channel is required for each user.
    ///
    /// These channel files exist in /dev/nvidia-caps-imex-channels/channel\* and can be created using standard OS native calls like mknod on Linux. For example: To create channel0 with the major number from /proc/devices users can execute the following command: `mknod /dev/nvidia-caps-imex-channels/channel0 c &lt;major number> 0`
    ///
    /// To create a managed memory pool, applications must set ::CUmemPoolProps::CUmemAllocationType to [`CUmemAllocationType::CU_MEM_ALLOCATION_TYPE_MANAGED`]. ::CUmemPoolProps::CUmemAllocationHandleType must also be set to [`CUmemAllocationHandleType::CU_MEM_HANDLE_TYPE_NONE`] since IPC is not supported. For managed memory pools, ::CUmemPoolProps::CUmemLocation will be treated as the preferred location for all allocations created from the pool. An application can also set [`CUmemLocationType::CU_MEM_LOCATION_TYPE_NONE`] to indicate no preferred location. [CUmemPoolProps::maxSize](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemPoolProps__v1.html#structcumempoolprops__v1_1a0f9278cc88653f1eee70ab6a7a2ad7f3) must be set to zero for managed memory pools. [CUmemPoolProps::usage](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmemPoolProps__v1.html#structcumempoolprops__v1_1a81dcd809a228c4346f8e732bb8e9070b) should be zero as decompress for managed memory is not supported. For managed memory pools, all devices on the system must have non-zero ::concurrentManagedAccess. If not, this call returns [`CUresult::CUDA_ERROR_NOT_SUPPORTED`].
    pub fn cuMemPoolCreate(
        pool: *mut CUmemoryPool,
        poolProps: *const CUmemPoolProps,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys the specified memory pool.
    ///
    /// If any pointers obtained from this pool haven’t been freed or the pool has free operations that haven’t completed when [`cuMemPoolDestroy`] is invoked, the function will return immediately and the resources associated with the pool will be released automatically once there are no more outstanding allocations.
    ///
    /// Destroying the current mempool of a device sets the default mempool of that device as the current mempool for that device.
    pub fn cuMemPoolDestroy(pool: CUmemoryPool) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the default memory pool for a given location and allocation type.
    ///
    /// The memory location can be of one of [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE`], [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST`], [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`], or [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`]. The allocation type can be one of [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_PINNED`] or [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_MANAGED`]. When the allocation type is [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_MANAGED`], the location type can also be [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_NONE`] to indicate no preferred location for the managed memory pool. [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_MANAGED`] can not be used with [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`].
    pub fn cuMemGetDefaultMemPool(
        pool_out: *mut CUmemoryPool,
        location: *mut CUmemLocation,
        type_: CUmemAllocationType,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the current memory pool for a memory location and of a particular allocation type.
    ///
    /// The memory location can be of one of [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE`], [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST`] or [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`], [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`], or [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`]. The allocation type can be one of [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_PINNED`] or [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_MANAGED`]. When the allocation type is [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_MANAGED`], the location type can also be [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_NONE`] to indicate no preferred location for the managed memory pool. [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_MANAGED`] can not be used with [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`]. In all other cases, the call returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`]
    ///
    /// Returns the last pool provided to [`cuMemSetMemPool`] or [`cuDeviceSetMemPool`] for this location and allocation type or the location’s default memory pool if [`cuMemSetMemPool`] or [`cuDeviceSetMemPool`] for that allocType and location has never been called. By default the current mempool of a location is the default mempool for a device. Otherwise the returned pool must have been set with [`cuDeviceSetMemPool`].
    pub fn cuMemGetMemPool(
        pool: *mut CUmemoryPool,
        location: *mut CUmemLocation,
        type_: CUmemAllocationType,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the current memory pool for a memory location and allocation type.
    ///
    /// The memory location can be of one of [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE`], [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST`] or [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`], [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`]. The allocation type can be one of [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_PINNED`] or [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_MANAGED`]. When the allocation type is [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_MANAGED`], the location type can also be [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_NONE`] to indicate no preferred location for the managed memory pool. In all other cases, the call returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`].
    ///
    /// When a memory pool is set as the current memory pool, the location parameter should be the same as the location of the pool. The location and allocation type specified must match those of the pool otherwise [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] is returned. By default, a memory location’s current memory pool is its default memory pool that can be obtained via [`cuMemGetDefaultMemPool`]. If the location type is [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE`] and the allocation type is [`CUmemAllocationType_enum::CU_MEM_ALLOCATION_TYPE_PINNED`], then this API is the equivalent of calling [`cuDeviceSetMemPool`] with the location id as the device. For further details on the implications, please refer to the documentation for [`cuDeviceSetMemPool`].
    pub fn cuMemSetMemPool(
        location: *mut CUmemLocation,
        type_: CUmemAllocationType,
        pool: CUmemoryPool,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Allocates memory from a specified pool with stream ordered semantics.
    ///
    /// Inserts an allocation operation into `hStream`. A pointer to the allocated memory is returned immediately in \*dptr. The allocation must not be accessed until the allocation operation completes. The allocation comes from the specified memory pool.
    ///
    /// # Parameters
    ///
    /// - `dptr`: Returned device pointer.
    /// - `bytesize`: Number of bytes to allocate.
    /// - `pool`: The pool to allocate from.
    /// - `hStream`: The stream establishing the stream ordering semantic.
    pub fn cuMemAllocFromPoolAsync(
        dptr: *mut CUdeviceptr,
        bytesize: size_t,
        pool: CUmemoryPool,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Exports a memory pool to the requested handle type.
    ///
    /// Given an IPC capable mempool, create an OS handle to share the pool with another process. A recipient process can convert the shareable handle into a mempool with [`cuMemPoolImportFromShareableHandle`]. Individual pointers can then be shared with the [`cuMemPoolExportPointer`] and [`cuMemPoolImportPointer`] APIs. The implementation of what the shareable handle is and how it can be transferred is defined by the requested handle type.
    ///
    /// # Parameters
    ///
    /// - `handle_out`: Returned OS handle.
    /// - `pool`: pool to export.
    /// - `handleType`: the type of handle to create.
    /// - `flags`: must be 0.
    pub fn cuMemPoolExportToShareableHandle(
        handle_out: *mut ::core::ffi::c_void,
        pool: CUmemoryPool,
        handleType: CUmemAllocationHandleType,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// imports a memory pool from a shared handle.
    ///
    /// Specific allocations can be imported from the imported pool with cuMemPoolImportPointer.
    ///
    /// If `handleType` is [`CUmemAllocationHandleType_enum::CU_MEM_HANDLE_TYPE_FABRIC`] and the importer process has not been granted access to the same IMEX channel as the exporter process, this API will error as [`cudaError_enum::CUDA_ERROR_NOT_PERMITTED`].
    ///
    /// # Parameters
    ///
    /// - `pool_out`: Returned memory pool.
    /// - `handle`: OS handle of the pool to open.
    /// - `handleType`: The type of handle being imported.
    /// - `flags`: must be 0.
    pub fn cuMemPoolImportFromShareableHandle(
        pool_out: *mut CUmemoryPool,
        handle: *mut ::core::ffi::c_void,
        handleType: CUmemAllocationHandleType,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Export data to share a memory pool allocation between processes.
    ///
    /// Constructs `shareData_out` for sharing a specific allocation from an already shared memory pool. The recipient process can import the allocation with the [`cuMemPoolImportPointer`] api. The data is not a handle and may be shared through any IPC mechanism.
    ///
    /// # Parameters
    ///
    /// - `shareData_out`: Returned export data.
    /// - `ptr`: pointer to memory being exported.
    pub fn cuMemPoolExportPointer(
        shareData_out: *mut CUmemPoolPtrExportData,
        ptr: CUdeviceptr,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Import a memory pool allocation from another process.
    ///
    /// Returns in `ptr_out` a pointer to the imported memory. The imported memory must not be accessed before the allocation operation completes in the exporting process. The imported memory must be freed from all importing processes before being freed in the exporting process. The pointer may be freed with cuMemFree or cuMemFreeAsync. If cuMemFreeAsync is used, the free must be completed on the importing process before the free operation on the exporting process.
    ///
    /// # Parameters
    ///
    /// - `ptr_out`: pointer to imported memory.
    /// - `pool`: pool from which to import.
    /// - `shareData`: data specifying the memory to import.
    pub fn cuMemPoolImportPointer(
        ptr_out: *mut CUdeviceptr,
        pool: CUmemoryPool,
        shareData: *mut CUmemPoolPtrExportData,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Create a generic allocation handle representing a multicast object described by the given properties.
    ///
    /// This creates a multicast object as described by `prop`. The number of participating devices is specified by [CUmulticastObjectProp::numDevices](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmulticastObjectProp__v1.html#structcumulticastobjectprop__v1_1ae5d44c9262847a6c74e4ae37acdc7478). Devices can be added to the multicast object via [`cuMulticastAddDevice`]. All participating devices must be added to the multicast object before memory can be bound to it. Memory is bound to the multicast object via [`cuMulticastBindMem`], [`cuMulticastBindMem_v2`], [`cuMulticastBindAddr`], or [`cuMulticastBindAddr_v2`]. and can be unbound via [`cuMulticastUnbind`]. The total amount of memory that can be bound per device is specified by :[CUmulticastObjectProp::size](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmulticastObjectProp__v1.html#structcumulticastobjectprop__v1_1aa45dfd715e2e442fcc7e43f5ce2f8a46). This size must be a multiple of the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`]. For best performance however, the size should be aligned to the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`].
    ///
    /// After all participating devices have been added, multicast objects can also be mapped to a device’s virtual address space using the virtual memory management APIs (see [`cuMemMap`] and [`cuMemSetAccess`]). Multicast objects can also be shared with other processes by requesting a shareable handle via [`cuMemExportToShareableHandle`]. Note that the desired types of shareable handles must be specified in the bitmask [CUmulticastObjectProp::handleTypes](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmulticastObjectProp__v1.html#structcumulticastobjectprop__v1_1a705cc17eda91d960e96982f2fda52d55). Multicast objects can be released using the virtual memory management API [`cuMemRelease`].
    ///
    /// # Parameters
    ///
    /// - `mcHandle`: Value of handle returned.
    /// - `prop`: Properties of the multicast object to create.
    pub fn cuMulticastCreate(
        mcHandle: *mut CUmemGenericAllocationHandle,
        prop: *const CUmulticastObjectProp,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Associate a device to a multicast object.
    ///
    /// Associates a device to a multicast object. The added device will be a part of the multicast team of size specified by [CUmulticastObjectProp::numDevices](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUmulticastObjectProp__v1.html#structcumulticastobjectprop__v1_1ae5d44c9262847a6c74e4ae37acdc7478) during [`cuMulticastCreate`]. The association of the device to the multicast object is permanent during the life time of the multicast object. All devices must be added to the multicast team before any memory can be bound to any device in the team. Any calls to [`cuMulticastBindMem`], [`cuMulticastBindMem_v2`], [`cuMulticastBindAddr`], or [`cuMulticastBindAddr_v2`] will block until all devices have been added. Similarly all devices must be added to the multicast team before a virtual address range can be mapped to the multicast object. A call to [`cuMemMap`] will block until all devices have been added.
    ///
    /// This call may fail with [`cudaError_enum::CUDA_ERROR_INVALID_DEVICE`] if the device specified by `dev` does not belong to the same clique as the other devices previously added to this multicast object.
    ///
    /// # Parameters
    ///
    /// - `mcHandle`: Handle representing a multicast object.
    /// - `dev`: Device that will be associated to the multicast object.
    pub fn cuMulticastAddDevice(
        mcHandle: CUmemGenericAllocationHandle,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Bind a memory allocation represented by a handle to a multicast object.
    ///
    /// Binds a memory allocation specified by `memHandle` and created via [`cuMemCreate`] to a multicast object represented by `mcHandle` and created via [`cuMulticastCreate`]. The intended `size` of the bind, the offset in the multicast range `mcOffset` as well as the offset in the memory `memOffset` must be a multiple of the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`]. For best performance however, `size`, `mcOffset` and `memOffset` should be aligned to the granularity of the memory allocation(see ::cuMemGetAllocationGranularity) or to the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`].
    ///
    /// The `size` + `memOffset` cannot be larger than the size of the allocated memory. Similarly the `size` + `mcOffset` cannot be larger than the size of the multicast object.
    ///
    /// On systems with Rubin+ (SM_107+) GPUs, `memOffset` may be aligned to 256 instead of the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] or [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`]. In such a case the `size` + `memOffset` cannot be larger than the size of the allocated memory. Similarly the `size` + `mcOffset` + the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] cannot be larger than the size of the than the size of the multicast object. The next available mcOffset for the next bind will be mcOffset + size + the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`].
    ///
    /// Also note that the ability to accept a `memOffset` that is not aligned to the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] or [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`] is limited by HW resources and may result in error [`cudaError_enum::CUDA_ERROR_MULTICAST_RESOURCE_FULL`]
    ///
    /// The memory allocation must have beeen created on one of the devices that was added to the multicast team via [`cuMulticastAddDevice`]. Externally shareable as well as imported multicast objects can be bound only to externally shareable memory. Note that this call will return [`CUresult::CUDA_ERROR_OUT_OF_MEMORY`] if there are insufficient resources required to perform the bind. This call may also return [`CUresult::CUDA_ERROR_SYSTEM_NOT_READY`] if the necessary system software is not initialized or running.
    ///
    /// This call may fail if the devices added via [`cuMulticastAddDevice`] do not belong to the same clique.
    ///
    /// This call may return [`CUresult::CUDA_ERROR_ILLEGAL_STATE`] if the system configuration is in an illegal state. In such cases, to continue using multicast, verify that the system configuration is in a valid state and all required driver daemons are running properly.
    ///
    /// # Parameters
    ///
    /// - `mcHandle`: Handle representing a multicast object.
    /// - `mcOffset`: Offset into the multicast object for attachment.
    /// - `memHandle`: Handle representing a memory allocation.
    /// - `memOffset`: Offset into the memory for attachment.
    /// - `size`: Size of the memory that will be bound to the multicast object.
    /// - `flags`: Flags for future use, must be zero for now.
    pub fn cuMulticastBindMem(
        mcHandle: CUmemGenericAllocationHandle,
        mcOffset: size_t,
        memHandle: CUmemGenericAllocationHandle,
        memOffset: size_t,
        size: size_t,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Bind a memory allocation represented by a handle to a multicast object.
    ///
    /// Binds a memory allocation specified by `memHandle` and created via [`cuMemCreate`] to a multicast object represented by `mcHandle` and created via [`cuMulticastCreate`]. The binding will be applicable for the device `dev`. The intended `size` of the bind, the offset in the multicast range `mcOffset` as well as the offset in the memory `memOffset` must be a multiple of the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`]. For best performance however, `size`, `mcOffset` and `memOffset` should be aligned to the granularity of the memory allocation(see ::cuMemGetAllocationGranularity) or to the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`].
    ///
    /// The `size` + `memOffset` cannot be larger than the size of the allocated memory. Similarly the `size` + `mcOffset` cannot be larger than the size of the multicast object.
    ///
    /// On systems with Rubin+ (SM_107+) GPUs, `memOffset` may be aligned to 256 instead of the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] or [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`]. In such a case the `size` + `memOffset` cannot be larger than the size of the allocated memory. Similarly the `size` + `mcOffset` + the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] cannot be larger than the size of the than the size of the multicast object. The next available mcOffset for the next bind will be mcOffset + size + the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`].
    ///
    /// Also note that the ability to accept a `memOffset` that is not aligned to the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] or [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`] is limited by HW resources and may result in error [`cudaError_enum::CUDA_ERROR_MULTICAST_RESOURCE_FULL`]
    ///
    /// The memory allocation must have beeen created on one of the devices that was added to the multicast team via [`cuMulticastAddDevice`]. For device memory, i.e., type [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE`], the memory allocation must have been created on the device specified by `dev`. For host NUMA memory, i.e., type [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`], the memory allocation must have been created on the CPU NUMA node closest to `dev`. That is, the value returned when querying [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID`] for `dev`, must be the CPU NUMA node where the memory was allocated. In both cases, the device named by `dev` must have been added to the multicast team via [`cuMulticastAddDevice`]. Externally shareable as well as imported multicast objects can be bound only to externally shareable memory. Note that this call will return [`CUresult::CUDA_ERROR_OUT_OF_MEMORY`] if there are insufficient resources required to perform the bind. This call may also return [`CUresult::CUDA_ERROR_SYSTEM_NOT_READY`] if the necessary system software is not initialized or running.
    ///
    /// This call may fail if the devices added via [`cuMulticastAddDevice`] do not belong to the same clique.
    ///
    /// This call may return [`CUresult::CUDA_ERROR_ILLEGAL_STATE`] if the system configuration is in an illegal state. In such cases, to continue using multicast, verify that the system configuration is in a valid state and all required driver daemons are running properly.
    ///
    /// # Parameters
    ///
    /// - `mcHandle`: Handle representing a multicast object.
    /// - `dev`: The device that for which the multicast memory binding will be applicable.
    /// - `mcOffset`: Offset into the multicast object for attachment.
    /// - `memHandle`: Handle representing a memory allocation.
    /// - `memOffset`: Offset into the memory for attachment.
    /// - `size`: Size of the memory that will be bound to the multicast object.
    /// - `flags`: Flags for future use, must be zero for now.
    pub fn cuMulticastBindMem_v2(
        mcHandle: CUmemGenericAllocationHandle,
        dev: CUdevice,
        mcOffset: size_t,
        memHandle: CUmemGenericAllocationHandle,
        memOffset: size_t,
        size: size_t,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Bind a memory allocation represented by a virtual address to a multicast object.
    ///
    /// Binds a memory allocation specified by its mapped address `memptr` to a multicast object represented by `mcHandle`. The memory must have been allocated via [`cuMemCreate`] or ::cudaMallocAsync. The intended `size` of the bind, the offset in the multicast range `mcOffset` and `memptr` must be a multiple of the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`]. For best performance however, `size`, `mcOffset` and `memptr` should be aligned to the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`].
    ///
    /// The `size` cannot be larger than the size of the allocated memory. Similarly the `size` + `mcOffset` cannot be larger than the total size of the multicast object.
    ///
    /// On systems with Rubin+ (SM_107+) GPUs, `memptr` may be aligned to 256 instead of the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] or [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`]. In such a case the `size` + `memptr` cannot be larger than the size of the allocated memory. Similarly the `size` + `mcOffset` + the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] cannot be larger than the size of the than the size of the multicast object. The next available mcOffset for the next bind will be mcOffset + size + the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`]
    ///
    /// Also note that the ability to accept a `memptr` that is not aligned to the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] or [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`] is limited by HW resources and may result in error [`cudaError_enum::CUDA_ERROR_MULTICAST_RESOURCE_FULL`]
    ///
    /// The memory allocation must have beeen created on one of the devices that was added to the multicast team via [`cuMulticastAddDevice`]. Externally shareable as well as imported multicast objects can be bound only to externally shareable memory. Note that this call will return [`CUresult::CUDA_ERROR_OUT_OF_MEMORY`] if there are insufficient resources required to perform the bind. This call may also return [`CUresult::CUDA_ERROR_SYSTEM_NOT_READY`] if the necessary system software is not initialized or running.
    ///
    /// This call may fail if the devices added via [`cuMulticastAddDevice`] do not belong to the same clique.
    ///
    /// This call may return [`CUresult::CUDA_ERROR_ILLEGAL_STATE`] if the system configuration is in an illegal state. In such cases, to continue using multicast, verify that the system configuration is in a valid state and all required driver daemons are running properly.
    ///
    /// # Parameters
    ///
    /// - `mcHandle`: Handle representing a multicast object.
    /// - `mcOffset`: Offset into multicast va range for attachment.
    /// - `memptr`: Virtual address of the memory allocation.
    /// - `size`: Size of memory that will be bound to the multicast object.
    /// - `flags`: Flags for future use, must be zero now.
    pub fn cuMulticastBindAddr(
        mcHandle: CUmemGenericAllocationHandle,
        mcOffset: size_t,
        memptr: CUdeviceptr,
        size: size_t,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Bind a memory allocation represented by a virtual address to a multicast object.
    ///
    /// Binds a memory allocation specified by its mapped address `memptr` to a multicast object represented by `mcHandle`. The binding will be applicable for the device `dev`. The memory must have been allocated via [`cuMemCreate`] or ::cudaMallocAsync. The intended `size` of the bind, the offset in the multicast range `mcOffset` and `memptr` must be a multiple of the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`]. For best performance however, `size`, `mcOffset` and `memptr` should be aligned to the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`].
    ///
    /// The `size` cannot be larger than the size of the allocated memory. Similarly the `size` + `mcOffset` cannot be larger than the total size of the multicast object.
    ///
    /// On systems with Rubin+ (SM_107+) GPUs, `memptr` may be aligned to 256 instead of the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] or [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`]. In such a case the `size` + `memptr` cannot be larger than the size of the allocated memory. Similarly the `size` + `mcOffset` + the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] cannot be larger than the size of the than the size of the multicast object. The next available mcOffset for the next bind will be mcOffset + size + the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`]
    ///
    /// Also note that the ability to accept a `memptr` that is not aligned to the value returned by [`cuMulticastGetGranularity`] with the flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`] or [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_RECOMMENDED`] is limited by HW resources and may result in error [`cudaError_enum::CUDA_ERROR_MULTICAST_RESOURCE_FULL`]
    ///
    /// For device memory, i.e., type [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE`], the memory allocation must have been created on the device specified by `dev`. For host NUMA memory, i.e., type [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`], the memory allocation must have been created on the CPU NUMA node closest to `dev`. That is, the value returned when querying [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID`] for `dev`, must be the CPU NUMA node where the memory was allocated. In both cases, the device named by `dev` must have been added to the multicast team via [`cuMulticastAddDevice`]. Externally shareable as well as imported multicast objects can be bound only to externally shareable memory. Note that this call will return [`CUresult::CUDA_ERROR_OUT_OF_MEMORY`] if there are insufficient resources required to perform the bind. This call may also return [`CUresult::CUDA_ERROR_SYSTEM_NOT_READY`] if the necessary system software is not initialized or running.
    ///
    /// This call may fail if the devices added via [`cuMulticastAddDevice`] do not belong to the same clique.
    ///
    /// This call may return [`CUresult::CUDA_ERROR_ILLEGAL_STATE`] if the system configuration is in an illegal state. In such cases, to continue using multicast, verify that the system configuration is in a valid state and all required driver daemons are running properly.
    ///
    /// # Parameters
    ///
    /// - `mcHandle`: Handle representing a multicast object.
    /// - `dev`: The device that for which the multicast memory binding will be applicable.
    /// - `mcOffset`: Offset into multicast va range for attachment.
    /// - `memptr`: Virtual address of the memory allocation.
    /// - `size`: Size of memory that will be bound to the multicast object.
    /// - `flags`: Flags for future use, must be zero now.
    pub fn cuMulticastBindAddr_v2(
        mcHandle: CUmemGenericAllocationHandle,
        dev: CUdevice,
        mcOffset: size_t,
        memptr: CUdeviceptr,
        size: size_t,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Unbind any memory allocations bound to a multicast object at a given offset and upto a given size.
    ///
    /// Unbinds any memory allocations hosted on `dev` and bound to a multicast object at `mcOffset` and upto a given `size`. The intended `size` of the unbind and the offset in the multicast range ( `mcOffset` ) must be a multiple of the value returned by [`cuMulticastGetGranularity`] flag [`CUmulticastGranularity_flags_enum::CU_MULTICAST_GRANULARITY_MINIMUM`]. The `size` + `mcOffset` cannot be larger than the total size of the multicast object.
    ///
    /// # Parameters
    ///
    /// - `mcHandle`: Handle representing a multicast object.
    /// - `dev`: Device that hosts the memory allocation.
    /// - `mcOffset`: Offset into the multicast object.
    /// - `size`: Desired size to unbind.
    pub fn cuMulticastUnbind(
        mcHandle: CUmemGenericAllocationHandle,
        dev: CUdevice,
        mcOffset: size_t,
        size: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Calculates either the minimal or recommended granularity for multicast object.
    ///
    /// Calculates either the minimal or recommended granularity for a given set of multicast object properties and returns it in granularity. This granularity can be used as a multiple for size, bind offsets and address mappings of the multicast object.
    ///
    /// # Parameters
    ///
    /// - `granularity`: Returned granularity.
    /// - `prop`: Properties of the multicast object.
    /// - `option`: Determines which granularity to return.
    pub fn cuMulticastGetGranularity(
        granularity: *mut size_t,
        prop: *const CUmulticastObjectProp,
        option: CUmulticastGranularity_flags,
    ) -> CUresult;
}
impl CUcliqueType_enum {
    /// Unicast pointer clique.
    pub const CU_CLIQUE_TYPE_UNICAST_POINTER: CUcliqueType_enum = CUcliqueType_enum(0);
    /// Multicast pointer clique.
    pub const CU_CLIQUE_TYPE_MULTICAST_POINTER: CUcliqueType_enum = CUcliqueType_enum(1);
    /// Unicast logical endpoint clique.
    pub const CU_CLIQUE_TYPE_UNICAST_LOGICAL_ENDPOINT: CUcliqueType_enum = CUcliqueType_enum(
        2,
    );
    /// Multicast logical endpoint clique.
    pub const CU_CLIQUE_TYPE_MULTICAST_LOGICAL_ENDPOINT: CUcliqueType_enum = CUcliqueType_enum(
        3,
    );
}
/// Fabric clique types
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcliqueType_enum(pub ::core::ffi::c_uint);
pub use self::CUcliqueType_enum as CUcliqueType;
/// Fabric clique information
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcliqueInfo_st {
    /// Type of the fabric clique
    pub type_: CUcliqueType,
    /// ID of the fabric clique
    pub id: ::core::ffi::c_uint,
}
impl Default for CUcliqueInfo_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Fabric clique information.
pub type CUcliqueInfo = CUcliqueInfo_st;
singe_loader::functions! { crate::DRIVER;
    /// Retrieves the fabric cluster UUID.
    ///
    /// Retrieves the fabric cluster UUID for the given device.
    ///
    /// # Parameters
    ///
    /// - `uuid`: Fabric cluster UUID.
    /// - `dev`: Device for which the fabric cluster UUID is requested.
    pub fn cuDeviceGetFabricClusterUuid(uuid: *mut CUuuid, dev: CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Retrieves the number of fabric cliques.
    ///
    /// Retrieves the number of fabric cliques that the device is part of.
    ///
    /// # Parameters
    ///
    /// - `count`: Number of fabric cliques that the device is part of.
    /// - `dev`: Device for which the number of fabric cliques is requested.
    pub fn cuDeviceGetCliqueCount(count: *mut size_t, dev: CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Retrieves fabric clique information.
    ///
    /// Returns the fabric clique information for the cliques that the device is a part of. User must specify the size of the `cliqueInfo` array in `count`. The same parameter `count` will return the actual number of entries updated in the `cliqueInfo` array.
    ///
    /// # Parameters
    ///
    /// - `cliqueInfo`: Array to store the fabric clique information.
    /// - `count`: Input: Size of the `cliqueInfo` array. Output: Number of entries updated in the `cliqueInfo` array.
    /// - `dev`: Device for which the clique information is requested.
    pub fn cuDeviceGetCliqueInfo(
        cliqueInfo: *mut CUcliqueInfo,
        count: *mut size_t,
        dev: CUdevice,
    ) -> CUresult;
}
/// An ID that represents a logical endpoint.
pub type CUlogicalEndpointId = cuuint32_t;
impl CUlogicalEndpointIpcHandleType_enum {
    /// Does not request an IPC handle for the logical endpoint.
    pub const CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_NONE: CUlogicalEndpointIpcHandleType_enum = CUlogicalEndpointIpcHandleType_enum(
        0,
    );
    /// Uses a fabric handle to share the logical endpoint.
    pub const CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_FABRIC: CUlogicalEndpointIpcHandleType_enum = CUlogicalEndpointIpcHandleType_enum(
        1,
    );
}
/// IPC handle types that can be requested/queried for a given logical endpoint
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlogicalEndpointIpcHandleType_enum(pub ::core::ffi::c_uint);
pub use self::CUlogicalEndpointIpcHandleType_enum as CUlogicalEndpointIpcHandleType;
/// Fabric handle for a logical endpoint
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlogicalEndpointFabricHandle_st {
    /// Opaque bytes of the fabric handle used to share a logical endpoint.
    pub data: [::core::ffi::c_uchar; 64usize],
}
impl Default for CUlogicalEndpointFabricHandle_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Fabric handle for a logical endpoint.
pub type CUlogicalEndpointFabricHandle = CUlogicalEndpointFabricHandle_st;
impl CUlogicalEndpointType_enum {
    /// No valid logical endpoint type is selected.
    pub const CU_LOGICAL_ENDPOINT_TYPE_INVALID: CUlogicalEndpointType_enum = CUlogicalEndpointType_enum(
        0,
    );
    /// Selects one device as the destination logical endpoint.
    pub const CU_LOGICAL_ENDPOINT_TYPE_UNICAST: CUlogicalEndpointType_enum = CUlogicalEndpointType_enum(
        1,
    );
    /// Selects a multicast group as the destination logical endpoint.
    pub const CU_LOGICAL_ENDPOINT_TYPE_MULTICAST: CUlogicalEndpointType_enum = CUlogicalEndpointType_enum(
        2,
    );
}
/// Logical endpoint type
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlogicalEndpointType_enum(pub ::core::ffi::c_uint);
pub use self::CUlogicalEndpointType_enum as CUlogicalEndpointType;
impl CUlogicalEndpointFlag_enum {
    /// Default flag for logical endpoint construction.
    pub const CU_LOGICAL_ENDPOINT_FLAG_NONE: CUlogicalEndpointFlag_enum = CUlogicalEndpointFlag_enum(
        0,
    );
    /// Indicate the programmer’s intention to use counted operations with the logical endpoint.
    pub const CU_LOGICAL_ENDPOINT_FLAG_COUNTED_OPS: CUlogicalEndpointFlag_enum = CUlogicalEndpointFlag_enum(
        1,
    );
}
/// Flags for ::CUlogicalEndpointProp
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlogicalEndpointFlag_enum(pub ::core::ffi::c_uint);
pub use self::CUlogicalEndpointFlag_enum as CUlogicalEndpointFlag;
/// Properties of a logical endpoint construction
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUlogicalEndpointProp_struct {
    /// Type of the logical endpoint defined in ::CUlogicalEndpointType
    pub type_: CUlogicalEndpointType,
    /// Anonymous native member. See [`CUlogicalEndpointProp_struct__bindgen_ty_1`] for its fields.
    pub __bindgen_anon_1: CUlogicalEndpointProp_struct__bindgen_ty_1,
    /// Size of the logical endpoint
    pub size: ::core::ffi::c_ulonglong,
    /// A bitmask of IPC handle types defined in ::CUlogicalEndpointIpcHandleType
    pub ipcHandleTypes: ::core::ffi::c_uint,
    /// A bitmask of flags defined in ::CUlogicalEndpointFlag
    pub flags: ::core::ffi::c_uint,
}
/// Anonymous native union in [`CUlogicalEndpointProp_struct`]. Its members share the same storage.
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUlogicalEndpointProp_struct__bindgen_ty_1 {
    /// Owner-device properties for a unicast logical endpoint.
    pub unicast: CUlogicalEndpointProp_struct__bindgen_ty_1__bindgen_ty_1,
    /// Multicast-object properties for a multicast logical endpoint.
    pub multicast: CUlogicalEndpointProp_struct__bindgen_ty_1__bindgen_ty_2,
}
/// Native layout of the `unicast` member of [`CUlogicalEndpointProp_struct__bindgen_ty_1`].
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlogicalEndpointProp_struct__bindgen_ty_1__bindgen_ty_1 {
    /// Owner device of the unicast logical endpoint
    pub device: CUdevice,
}
/// Native layout of the `multicast` member of [`CUlogicalEndpointProp_struct__bindgen_ty_1`].
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlogicalEndpointProp_struct__bindgen_ty_1__bindgen_ty_2 {
    /// Number of devices in the multicast logical endpoint team
    pub numDevices: ::core::ffi::c_uint,
}
impl Default for CUlogicalEndpointProp_struct__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUlogicalEndpointProp_struct {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Properties of a logical endpoint construction.
pub type CUlogicalEndpointProp = CUlogicalEndpointProp_struct;
singe_loader::functions! { crate::DRIVER;
    /// Reserves a range of logical endpoint ids.
    ///
    /// Reserves a range of logical endpoint ids starting at `*baseLeId` and extending for `count`. The reserved ids can be used to create or import logical endpoints via [`cuLogicalEndpointCreate`] or [`cuLogicalEndpointImport`] respectively.
    ///
    /// # Parameters
    ///
    /// - `baseLeId`: If [`cuLogicalEndpointIdReserve`] returns [`CUresult::CUDA_SUCCESS`], \*baseLeId contains the base logical endpoint id of the reserved logical endpoint id range.
    /// - `count`: The number of logical endpoint ids to reserve.
    pub fn cuLogicalEndpointIdReserve(
        baseLeId: *mut CUlogicalEndpointId,
        count: cuuint32_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Releases a range of logical endpoint ids.
    ///
    /// Releases up to `count` logical endpoint ids starting at `baseLeId`. The range of ids represented by [`baseLeId`, `baseLeId` + `count`) must all be previously reserved. All logical endpoints in the range must be destroyed before they can be released.
    ///
    /// # Parameters
    ///
    /// - `baseLeId`: First logical endpoint id to be released back to the system.
    /// - `count`: Number of logical endpoint ids to release back to the system.
    pub fn cuLogicalEndpointIdRelease(
        baseLeId: CUlogicalEndpointId,
        count: cuuint32_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a logical endpoint with the requested properties and associates it with the logical endpoint id.
    ///
    /// This creates a logical endpoint as described by `prop`. The number of participating devices is determined by the [CUlogicalEndpointProp::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUlogicalEndpointProp.html#structculogicalendpointprop_1ad1eeea7a8e5f814385197b3c4125680e). If the type is [`CUlogicalEndpointType::CU_LOGICAL_ENDPOINT_TYPE_UNICAST`] then ::CUlogicalEndpointProp::unicast::device specifies the owner device of the unicast logical endpoint. If the type is [`CUlogicalEndpointType::CU_LOGICAL_ENDPOINT_TYPE_MULTICAST`] then ::CUlogicalEndpointProp::multicast::numDevices specifies the number of devices in the multicast logical endpoint team.
    ///
    /// Devices can be added to a multicast logical endpoint via [`cuLogicalEndpointAddDevice`]. After all the participating devices have been added, a call to [`cuLogicalEndpointQuery`] must be made to ensure that the logical endpoint is ready for memory binding and access.
    ///
    /// A unicast logical endpoint does not have a notion of adding devices via [`cuLogicalEndpointAddDevice`]. However, a call to [`cuLogicalEndpointQuery`] must still be made to ensure that the logical endpoint is ready for memory binding and access.
    ///
    /// Memory is bound to the logical endpoint via either [`cuLogicalEndpointBindAddr`] or [`cuLogicalEndpointBindMem`], and can be unbound via [`cuLogicalEndpointUnbind`]. The total amount of memory that can be bound per device is specified by [CUlogicalEndpointProp::size](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUlogicalEndpointProp.html#structculogicalendpointprop_1a3b553dde52f259ef1f08cdad07e4f82d). This size must be a multiple of the value for `bindAlignment` as returned by [`cuLogicalEndpointGetLimits`]. The maximum size for the logical endpoint cannot exceed the value for `maxSize` as returned by [`cuLogicalEndpointGetLimits`]. The bind alignment and maximum size depend on the properties of the logical endpoint.
    ///
    /// # Parameters
    ///
    /// - `leId`: Logical endpoint id that will be associated with the newly created logical endpoint.
    /// - `prop`: Properties of the logical endpoint to create.
    pub fn cuLogicalEndpointCreate(
        leId: CUlogicalEndpointId,
        prop: *const CUlogicalEndpointProp,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Associates a device to a multicast logical endpoint.
    ///
    /// Associates a device to a logical endpoint. The type of the logical endpoint must be [`CUlogicalEndpointType::CU_LOGICAL_ENDPOINT_TYPE_MULTICAST`]. The added device will be a part of the multicast team of size specified by CUlogicalEndpointProp::multicast::numDevices during [`cuLogicalEndpointCreate`]. The association of the device to the multicast logical endpoint is permanent during the life time of the multicast logical endpoint. All devices must be added to the multicast logical endpoint before any memory can be bound to any device in the team. A multicast logical endpoint will not be ready for use until all devices have been added. User can query whether the logical endpoint is ready for use via [`cuLogicalEndpointQuery`].
    ///
    /// This call may fail with [`cudaError_enum::CUDA_ERROR_INVALID_DEVICE`] if the device specified by `dev` does not belong to the same clique as the other devices previously added to this multicast logical endpoint.
    ///
    /// # Parameters
    ///
    /// - `leId`: Logical endpoint id representing a multicast logical endpoint.
    /// - `dev`: Device that will be associated with the multicast logical endpoint.
    pub fn cuLogicalEndpointAddDevice(
        leId: CUlogicalEndpointId,
        dev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Removes the association of the logical endpoint from the logical endpoint id.
    ///
    /// Removes the association between the logical endpoint id and the logical endpoint resources. Any memory bound by this process to any device associated with the logical endpoint will be unbound. If this was the last reference to the logical endpoint, all associated resources will be destroyed.
    ///
    /// # Parameters
    ///
    /// - `leId`: Logical endpoint id of the logical endpoint to be destroyed.
    pub fn cuLogicalEndpointDestroy(leId: CUlogicalEndpointId) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Bind a memory allocation represented by a virtual address to a logical endpoint.
    ///
    /// Binds the memory allocation specified by its mapped address `ptr` to a logical endpoint represented by `leId` at the offset `offset`. The memory must have been allocated via [`cuMemCreate`] or ::cudaMallocAsync. The intended `size` of the bind, the `offset` in the logical endpoint range and `ptr` must be multiples of the value for `bindAlignment` as returned by [`cuLogicalEndpointGetLimits`].
    ///
    /// The `size` cannot be larger than the size of the allocated memory. Similarly the `size` + `offset` cannot be larger than the total size of the logical endpoint.
    ///
    /// For device memory, i.e., type [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE`], the memory allocation must have been created on the device specified by `dev`. For host NUMA memory, i.e., type [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`], the memory allocation must have been created on the CPU NUMA node closest to `dev`. That is, the value returned when querying [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID`] for `dev`, must be the CPU NUMA node where the memory was allocated.
    ///
    /// For multicast endpoints, the device named by `dev` must have been added to the multicast team via [`cuLogicalEndpointAddDevice`].
    ///
    /// For unicast endpoints the device named by `dev` must be the owner device specified during [`cuLogicalEndpointCreate`] via ::CUlogicalEndpointProp::unicast::device.
    ///
    /// Externally shareable as well as imported multicast endpoints can be bound only to externally shareable memory. Imported unicast endpoints cannot be bound to any memory.
    ///
    /// This call will return [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] if [`cuLogicalEndpointQuery`] has not been called for the logical endpoint to ensure that the endpoint is ready for memory binding.
    ///
    /// Note that this call will return [`cudaError_enum::CUDA_ERROR_OUT_OF_MEMORY`] if there are insufficient resources required to perform the bind. This call may also return [`cudaError_enum::CUDA_ERROR_SYSTEM_NOT_READY`] if the necessary system software is not initialized or running. This call may return [`cudaError_enum::CUDA_ERROR_ILLEGAL_STATE`] if the system configuration is in an illegal state. In such cases, to continue using logical endpoints, verify that the system configuration is in a valid state and all required driver daemons are running properly.
    ///
    /// # Parameters
    ///
    /// - `leId`: Logical endpoint to which memory will be associated.
    /// - `dev`: Device on which the memory will be bound to the logical endpoint.
    /// - `offset`: Offset into the logical endpoint space.
    /// - `ptr`: Virtual address of the memory allocation.
    /// - `size`: Size of memory that will be bound to the logical endpoint.
    /// - `flags`: Flags for future use, must be zero for now.
    pub fn cuLogicalEndpointBindAddr(
        leId: CUlogicalEndpointId,
        dev: CUdevice,
        offset: cuuint64_t,
        ptr: *mut ::core::ffi::c_void,
        size: cuuint64_t,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Binds memory object represented by a handle to the logical endpoint.
    ///
    /// Binds the memory allocation specified by `memHandle` to a logical endpoint represented by `leId` at the offset `offset`. The memory must have been allocated via [`cuMemCreate`]. The intended `size` of the bind, the offset in the logical endpoint range `offset` and the offset in the memory handle `memOffset` must be multiples of the value for `bindAlignment` as returned by [`cuLogicalEndpointGetLimits`].
    ///
    /// The `size` + `memOffset` cannot be larger than the size of the allocated memory. Similarly the `size` + `offset` cannot be larger than the total size of the logical endpoint.
    ///
    /// For device memory, i.e., type [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_DEVICE`], the memory allocation must have been created on the device specified by `dev`. For host NUMA memory, i.e., type [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_HOST_NUMA`], the memory allocation must have been created on the CPU NUMA node closest to `dev`. That is, the value returned when querying [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID`] for `dev`, must be the CPU NUMA node where the memory was allocated.
    ///
    /// For multicast endpoints, the device named by `dev` must have been added to the multicast team via [`cuLogicalEndpointAddDevice`].
    ///
    /// For unicast endpoints the device named by `dev` must be the owner device specified during [`cuLogicalEndpointCreate`] via ::CUlogicalEndpointProp::unicast::device.
    ///
    /// Externally shareable as well as imported multicast endpoints can be bound only to externally shareable memory. Imported unicast endpoints cannot be bound to any memory.
    ///
    /// This call will return [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] if [`cuLogicalEndpointQuery`] has not been called for the logical endpoint to ensure that the endpoint is ready for memory binding.
    ///
    /// Note that this call will return [`cudaError_enum::CUDA_ERROR_OUT_OF_MEMORY`] if there are insufficient resources required to perform the bind. This call may also return [`cudaError_enum::CUDA_ERROR_SYSTEM_NOT_READY`] if the necessary system software is not initialized or running. This call may return [`cudaError_enum::CUDA_ERROR_ILLEGAL_STATE`] if the system configuration is in an illegal state. In such cases, to continue using logical endpoints, verify that the system configuration is in a valid state and all required driver daemons are running properly.
    ///
    /// # Parameters
    ///
    /// - `leId`: Logical endpoint to which memory will be associated.
    /// - `dev`: Device on which the memory will be bound to the logical endpoint.
    /// - `offset`: Offset into the logical endpoint space.
    /// - `memHandle`: Handle representing a memory allocation.
    /// - `memOffset`: Offset into the memory for the attachment.
    /// - `size`: Size of memory that will be bound to the logical endpoint.
    /// - `flags`: Flags for future use, must be zero for now.
    pub fn cuLogicalEndpointBindMem(
        leId: CUlogicalEndpointId,
        dev: CUdevice,
        offset: cuuint64_t,
        memHandle: CUmemGenericAllocationHandle,
        memOffset: cuuint64_t,
        size: cuuint64_t,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Unbinds any binding at offset from the logical endpoint.
    ///
    /// Unbinds any memory allocations bound to the logical endpoint on `dev` at `offset` and up to the given `size`. The intended `size` of the unbind and the offset in the logical endpoint range `offset` must be multiples of the value for `bindAlignment` as returned by [`cuLogicalEndpointGetLimits`].
    ///
    /// # Parameters
    ///
    /// - `leId`: Logical endpoint id representing a logical endpoint.
    /// - `dev`: Device on which the memory is bound to the logical endpoint.
    /// - `offset`: Offset into the logical endpoint.
    /// - `size`: Desired size to unbind.
    pub fn cuLogicalEndpointUnbind(
        leId: CUlogicalEndpointId,
        dev: CUdevice,
        offset: cuuint64_t,
        size: cuuint64_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Exports a logical endpoint associated with leId to an IPC handle.
    ///
    /// Given a logical endpoint id `leId`, create a shareable handle `handle` that can be used to share the logical endpoint with other processes. The recipient process can convert the shareable handle back into a logical endpoint id using [`cuLogicalEndpointImport`]. The implementation of what this `handle` is and how it can be transfered is defined by the requested handle type in `handletype`.
    ///
    /// # Parameters
    ///
    /// - `handle`: Pointer to the location in which to store the requested handle type.
    /// - `leId`: Logical endpoint id of logical endpoint.
    /// - `handleType`: Type of shareable handle requested. Defines type and size of the handle output parameter.
    pub fn cuLogicalEndpointExport(
        handle: *mut ::core::ffi::c_void,
        leId: CUlogicalEndpointId,
        handleType: CUlogicalEndpointIpcHandleType,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Imports a logical endpoint from the given IPC handle and associates it with a logical endpoint id.
    ///
    /// Imports a logical endpoint from the given IPC `handle` and associates it with the logical endpoint id specified by `leId`.
    ///
    /// If the current process cannot support the logical endpoint described by the shareable handle, this API will error as [`cudaError_enum::CUDA_ERROR_NOT_SUPPORTED`]. If `handle` is of type [`CUlogicalEndpointIpcHandleType::CU_LOGICAL_ENDPOINT_IPC_HANDLE_TYPE_FABRIC`] and the importer process does not have access permissions, then [`cudaError_enum::CUDA_ERROR_NOT_PERMITTED`] will be returned.
    ///
    /// # Parameters
    ///
    /// - `leId`: Logical endpoint id that will be used to access the exported logical endpoint.
    /// - `handle`: Shareable handle representing the logical endpoint that is to be imported.
    /// - `handleType`: Handle type of the exported handle.
    pub fn cuLogicalEndpointImport(
        leId: CUlogicalEndpointId,
        handle: *const ::core::ffi::c_void,
        handleType: CUlogicalEndpointIpcHandleType,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Calculates the minimum alignment and the maximum size for the given logical endpoint properties.
    ///
    /// The `bindAlignment` can be used as a multiple for size and bind offset values. The `maxSize` is the maximum size of the logical endpoint. If `maxSize` is less than [CUlogicalEndpointProp](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUlogicalEndpointProp.html#structculogicalendpointprop):size the user must adjust the request to the smaller value.
    ///
    /// # Parameters
    ///
    /// - `bindAlignment`: Minimum alignment granularity of the proposed logical endpoint.
    /// - `maxSize`: Maximum size of the logical endpoint.
    /// - `prop`: Properties of the logical endpoint.
    pub fn cuLogicalEndpointGetLimits(
        bindAlignment: *mut cuuint64_t,
        maxSize: *mut cuuint64_t,
        prop: *const CUlogicalEndpointProp,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Determines if all logical endpoints in the range have been successfully constructed.
    ///
    /// Queries the driver to determine if all logical endpoints in the given range starting at `leId` and extending for `count` have been successfully constructed.
    ///
    /// Provides a mechanism to ensure that it is safe to begin using a logical endpoint ID. Using a logical endpoint ID before verifying that it is fully constructed can result in undefined behavior.
    ///
    /// This is not a blocking API, it returns immediately with a `queryStatus` of 0 if any logical endpoint ID in the given range is not fully constructed, and a non-zero value otherwise.
    ///
    /// Construction of a multicast logical endpoint may fail here if the devices added via [`cuLogicalEndpointAddDevice`] do not belong to the same clique.
    ///
    /// This API may return [`cudaError_enum::CUDA_ERROR_ILLEGAL_STATE`] if no devices are found on which this logical endpoint can be accessed.
    ///
    /// # Parameters
    ///
    /// - `leId`: First logical endpoint ID to be queried.
    /// - `count`: Number of logical endpoints IDs to be queried.
    /// - `queryStatus`: Status of the logical endpoints. Returns 0 if any logical endpoint in the given range is not fully constructed, and non-zero if all logical endpoints in the given range are fully constructed.
    pub fn cuLogicalEndpointQuery(
        leId: CUlogicalEndpointId,
        count: cuuint32_t,
        queryStatus: *mut ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns information about a pointer.
    ///
    /// The supported attributes are:
    ///
    /// Note that for most allocations in the unified virtual address space the host and device pointer for accessing the allocation will be the same. The exceptions to this are.
    ///
    /// # Parameters
    ///
    /// - `data`: Returned pointer attribute value.
    /// - `attribute`: Pointer attribute to query.
    /// - `ptr`: Pointer.
    pub fn cuPointerGetAttribute(
        data: *mut ::core::ffi::c_void,
        attribute: CUpointer_attribute,
        ptr: CUdeviceptr,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Prefetches memory to the specified destination location
    ///
    /// Prefetches memory to the specified destination location.  `devPtr` is the base device pointer of the memory to be prefetched and `location` specifies the destination location. `count` specifies the number of bytes to copy. `hStream` is the stream in which the operation is enqueued. The memory range must refer to managed memory allocated via ::cuMemAllocManaged, via ::cuMemAllocFromPool from a managed memory pool or declared via __managed__ variables.
    ///
    /// Specifying ::CU_MEM_LOCATION_TYPE_DEVICE for ::CUmemLocation::type will prefetch memory to GPU specified by device ordinal ::CUmemLocation::id which must have non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. Additionally, `hStream` must be associated with a device that has a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. Specifying ::CU_MEM_LOCATION_TYPE_HOST as ::CUmemLocation::type will prefetch data to host memory. Applications can request prefetching memory to a specific host NUMA node by specifying ::CU_MEM_LOCATION_TYPE_HOST_NUMA for ::CUmemLocation::type and a valid host NUMA node id in ::CUmemLocation::id Users can also request prefetching memory to the host NUMA node closest to the current thread's CPU by specifying ::CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT for ::CUmemLocation::type. Note when ::CUmemLocation::type is etiher ::CU_MEM_LOCATION_TYPE_HOST OR ::CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT, ::CUmemLocation::id will be ignored. Prefetching to ::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN locations is not supported.
    ///
    /// The start address and end address of the memory range will be rounded down and rounded up respectively to be aligned to CPU page size before the prefetch operation is enqueued in the stream.
    ///
    /// If no physical memory has been allocated for this region, then this memory region will be populated and mapped on the destination device. If there's insufficient memory to prefetch the desired region, the Unified Memory driver may evict pages from other ::cuMemAllocManaged allocations to host memory in order to make room. Device memory allocated using ::cuMemAlloc or ::cuArrayCreate will not be evicted.
    ///
    /// By default, any mappings to the previous location of the migrated pages are removed and mappings for the new location are only setup on the destination location. The exact behavior however also depends on the settings applied to this memory range via ::cuMemAdvise as described below:
    ///
    /// If ::CU_MEM_ADVISE_SET_READ_MOSTLY was set on any subset of this memory range, then that subset will create a read-only copy of the pages on destination location. If however the destination location is a host NUMA node, then any pages of that subset that are already in another host NUMA node will be transferred to the destination.
    ///
    /// If ::CU_MEM_ADVISE_SET_PREFERRED_LOCATION was called on any subset of this memory range, then the pages will be migrated to `location` even if `location` is not the preferred location of any pages in the memory range.
    ///
    /// If ::CU_MEM_ADVISE_SET_ACCESSED_BY was called on any subset of this memory range, then mappings to those pages from all the appropriate processors are updated to refer to the new location if establishing such a mapping is possible. Otherwise, those mappings are cleared.
    ///
    /// Note that this API is not required for functionality and only serves to improve performance by allowing the application to migrate data to a suitable location before it is accessed. Memory accesses to this range are always coherent and are allowed even when the data is actively being migrated.
    ///
    /// Note that this function is asynchronous with respect to the host and all work on other devices.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_DEVICE, ::CUDA_ERROR_NOT_SUPPORTED,
    ///
    /// Note: _async
    ///
    /// Note: _null_stream
    ///
    ///
    ///
    /// See also: ::cuMemcpy, ::cuMemcpyPeer, ::cuMemcpyAsync, ::cuMemcpy3DPeerAsync, ::cuMemAdvise, ::cudaMemPrefetchAsync
    ///
    /// # Parameters
    ///
    /// - `devPtr`: - Pointer to be prefetched
    /// - `count`: - Size in bytes
    /// - `location`: - Location to prefetch to
    /// - `flags`: - flags for future use, must be zero now.
    /// - `hStream`: - Stream to enqueue prefetch operation
    pub fn cuMemPrefetchAsync_v2(
        devPtr: CUdeviceptr,
        count: size_t,
        location: CUmemLocation,
        flags: ::core::ffi::c_uint,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Advise about the usage of a given memory range
    ///
    /// Advise the Unified Memory subsystem about the usage pattern for the memory range starting at `devPtr` with a size of `count` bytes. The start address and end address of the memory range will be rounded down and rounded up respectively to be aligned to CPU page size before the advice is applied. The memory range must refer to managed memory allocated via ::cuMemAllocManaged or declared via __managed__ variables. The memory range could also refer to system-allocated pageable memory provided it represents a valid, host-accessible region of memory and all additional constraints imposed by `advice` as outlined below are also satisfied. Specifying an invalid system-allocated pageable memory range results in an error being returned.
    ///
    /// The `advice` parameter can take the following values:
    /// - ::CU_MEM_ADVISE_SET_READ_MOSTLY: This implies that the data is mostly going to be read from and only occasionally written to. Any read accesses from any processor to this region will create a read-only copy of at least the accessed pages in that processor's memory. Additionally, if ::cuMemPrefetchAsync is called on this region, it will create a read-only copy of the data on the destination processor. If the target location for ::cuMemPrefetchAsync is a host NUMA node and a read-only copy already exists on another host NUMA node, that copy will be migrated to the targeted host NUMA node. If any processor writes to this region, all copies of the corresponding page will be invalidated except for the one where the write occurred. If the writing processor is the CPU and the preferred location of the page is a host NUMA node, then the page will also be migrated to that host NUMA node. The `location` argument is ignored for this advice. Note that for a page to be read-duplicated, the accessing processor must either be the CPU or a GPU that has a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. Also, if a context is created on a device that does not have the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS set, then read-duplication will not occur until all such contexts are destroyed. If the memory region refers to valid system-allocated pageable memory, then the accessing device must have a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS for a read-only copy to be created on that device. Note however that if the accessing device also has a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, then setting this advice will not create a read-only copy when that device accesses this memory region.
    ///
    /// - ::CU_MEM_ADVISE_UNSET_READ_MOSTLY:  Undoes the effect of ::CU_MEM_ADVISE_SET_READ_MOSTLY and also prevents the Unified Memory driver from attempting heuristic read-duplication on the memory range. Any read-duplicated copies of the data will be collapsed into a single copy. The location for the collapsed copy will be the preferred location if the page has a preferred location and one of the read-duplicated copies was resident at that location. Otherwise, the location chosen is arbitrary. Note: The `location` argument is ignored for this advice.
    ///
    /// - ::CU_MEM_ADVISE_SET_PREFERRED_LOCATION: This advice sets the preferred location for the data to be the memory belonging to `location`. When ::CUmemLocation::type is ::CU_MEM_LOCATION_TYPE_HOST, ::CUmemLocation::id is ignored and the preferred location is set to be host memory. To set the preferred location to a specific host NUMA node, applications must set ::CUmemLocation::type to ::CU_MEM_LOCATION_TYPE_HOST_NUMA and ::CUmemLocation::id must specify the NUMA ID of the host NUMA node. If ::CUmemLocation::type is set to ::CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT, ::CUmemLocation::id will be ignored and the the host NUMA node closest to the calling thread's CPU will be used as the preferred location. If ::CUmemLocation::type is a ::CU_MEM_LOCATION_TYPE_DEVICE, then ::CUmemLocation::id must be a valid device ordinal and the device must have a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. A ::CUmemLocation::type of ::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN is unsupported. Setting the preferred location does not cause data to migrate to that location immediately. Instead, it guides the migration policy when a fault occurs on that memory region. If the data is already in its preferred location and the faulting processor can establish a mapping without requiring the data to be migrated, then data migration will be avoided. On the other hand, if the data is not in its preferred location or if a direct mapping cannot be established, then it will be migrated to the processor accessing it. It is important to note that setting the preferred location does not prevent data prefetching done using ::cuMemPrefetchAsync. Having a preferred location can override the page thrash detection and resolution logic in the Unified Memory driver. Normally, if a page is detected to be constantly thrashing between for example host and device memory, the page may eventually be pinned to host memory by the Unified Memory driver. But if the preferred location is set as device memory, then the page will continue to thrash indefinitely. If ::CU_MEM_ADVISE_SET_READ_MOSTLY is also set on this memory region or any subset of it, then the policies associated with that advice will override the policies of this advice, unless read accesses from `location` will not result in a read-only copy being created on that procesor as outlined in description for the advice ::CU_MEM_ADVISE_SET_READ_MOSTLY. If the memory region refers to valid system-allocated pageable memory, and ::CUmemLocation::type is CU_MEM_LOCATION_TYPE_DEVICE then ::CUmemLocation::id must be a valid device that has a non-zero alue for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS.
    ///
    /// - ::CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION: Undoes the effect of ::CU_MEM_ADVISE_SET_PREFERRED_LOCATION and changes the preferred location to none. The `location` argument is ignored for this advice.
    ///
    /// - ::CU_MEM_ADVISE_SET_ACCESSED_BY: This advice implies that the data will be accessed by processor `location`. The ::CUmemLocation::type must be either ::CU_MEM_LOCATION_TYPE_DEVICE with ::CUmemLocation::id representing a valid device ordinal or ::CU_MEM_LOCATION_TYPE_HOST and ::CUmemLocation::id will be ignored. All other location types are invalid. If ::CUmemLocation::id is a GPU, then the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS must be non-zero. This advice does not cause data migration and has no impact on the location of the data per se. Instead, it causes the data to always be mapped in the specified processor's page tables, as long as the location of the data permits a mapping to be established. If the data gets migrated for any reason, the mappings are updated accordingly. This advice is recommended in scenarios where data locality is not important, but avoiding faults is. Consider for example a system containing multiple GPUs with peer-to-peer access enabled, where the data located on one GPU is occasionally accessed by peer GPUs. In such scenarios, migrating data over to the other GPUs is not as important because the accesses are infrequent and the overhead of migration may be too high. But preventing faults can still help improve performance, and so having a mapping set up in advance is useful. Note that on CPU access of this data, the data may be migrated to host memory because the CPU typically cannot access device memory directly. Any GPU that had the ::CU_MEM_ADVISE_SET_ACCESSED_BY flag set for this data will now have its mapping updated to point to the page in host memory. If ::CU_MEM_ADVISE_SET_READ_MOSTLY is also set on this memory region or any subset of it, then the policies associated with that advice will override the policies of this advice. Additionally, if the preferred location of this memory region or any subset of it is also `location`, then the policies associated with ::CU_MEM_ADVISE_SET_PREFERRED_LOCATION will override the policies of this advice. If the memory region refers to valid system-allocated pageable memory, and ::CUmemLocation::type is ::CU_MEM_LOCATION_TYPE_DEVICE then device in ::CUmemLocation::id must have a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS. Additionally, if ::CUmemLocation::id has a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, then this call has no effect.
    ///
    /// - ::CU_MEM_ADVISE_UNSET_ACCESSED_BY: Undoes the effect of ::CU_MEM_ADVISE_SET_ACCESSED_BY. Any mappings to the data from `location` may be removed at any time causing accesses to result in non-fatal page faults. If the memory region refers to valid system-allocated pageable memory, and ::CUmemLocation::type is ::CU_MEM_LOCATION_TYPE_DEVICE then device in ::CUmemLocation::id must have a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS. Additionally, if ::CUmemLocation::id has a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, then this call has no effect.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_DEVICE, ::CUDA_ERROR_NOT_SUPPORTED
    ///
    /// Note: _async
    ///
    /// Note: _null_stream
    ///
    ///
    ///
    /// See also: ::cuMemcpy, ::cuMemcpyPeer, ::cuMemcpyAsync, ::cuMemcpy3DPeerAsync, ::cuMemPrefetchAsync, ::cudaMemAdvise
    ///
    /// # Parameters
    ///
    /// - `devPtr`: - Pointer to memory to set the advice for
    /// - `count`: - Size in bytes of the memory range
    /// - `advice`: - Advice to be applied for the specified memory range
    /// - `location`: - location to apply the advice for
    pub fn cuMemAdvise_v2(
        devPtr: CUdeviceptr,
        count: size_t,
        advice: CUmem_advise,
        location: CUmemLocation,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Performs a batch of memory prefetches asynchronously.
    ///
    /// Performs a batch of memory prefetches. The batch as a whole executes in stream order but operations within a batch are not guaranteed to execute in any specific order. All devices in the system must have a non-zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`] otherwise the API will return an error.
    ///
    /// The semantics of the individual prefetch operations are as described in cuMemPrefetchAsync.
    ///
    /// Performs memory prefetch on address ranges specified in `dptrs` and `sizes`. Both arrays must be of the same length as specified by `count`. Each memory range specified must refer to managed memory allocated via [`cuMemAllocManaged`] or declared via **managed** variables or it may also refer to system-allocated memory when all devices have a non-zero value for [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`]. The prefetch location for every operation in the batch is specified in the `prefetchLocs` array. Each entry in this array can apply to more than one operation. This can be done by specifying in the `prefetchLocIdxs` array, the index of the first prefetch operation that the corresponding entry in the `prefetchLocs` array applies to. Both `prefetchLocs` and `prefetchLocIdxs` must be of the same length as specified by `numPrefetchLocs`. For example, if a batch has 10 prefetches listed in dptrs/sizes, the first 4 of which are to be prefetched to one location and the remaining 6 are to be prefetched to another, then `numPrefetchLocs` will be 2, `prefetchLocIdxs` will be {0, 4} and `prefetchLocs` will contain the two locations. Note the first entry in `prefetchLocIdxs` must always be 0. Also, each entry must be greater than the previous entry and the last entry should be less than `count`. Furthermore, `numPrefetchLocs` must be lesser than or equal to `count`.
    ///
    /// # Parameters
    ///
    /// - `dptrs`: Array of pointers to be prefetched.
    /// - `sizes`: Array of sizes for memory prefetch operations.
    /// - `count`: Size of `dptrs` and `sizes` arrays.
    /// - `prefetchLocs`: Array of locations to prefetch to.
    /// - `prefetchLocIdxs`: Array of indices to specify which operands each entry in the `prefetchLocs` array applies to. The locations specified in prefetchLocs\[k\] will be applied to copies starting from prefetchLocIdxs\[k\] through prefetchLocIdxs\[k+1\] - 1. Also prefetchLocs\[numPrefetchLocs - 1\] will apply to prefetches starting from prefetchLocIdxs\[numPrefetchLocs - 1\] through count - 1.
    /// - `numPrefetchLocs`: Size of `prefetchLocs` and `prefetchLocIdxs` arrays.
    /// - `flags`: Flags reserved for future use. Must be zero.
    /// - `hStream`: The stream to enqueue the operations in. Must not be legacy NULL stream.
    pub fn cuMemPrefetchBatchAsync(
        dptrs: *mut CUdeviceptr,
        sizes: *mut size_t,
        count: size_t,
        prefetchLocs: *mut CUmemLocation,
        prefetchLocIdxs: *mut size_t,
        numPrefetchLocs: size_t,
        flags: ::core::ffi::c_ulonglong,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Performs a batch of memory discards asynchronously.
    ///
    /// Performs a batch of memory discards. The batch as a whole executes in stream order but operations within a batch are not guaranteed to execute in any specific order. All devices in the system must have a non-zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`] otherwise the API will return an error.
    ///
    /// Discarding a memory range informs the driver that the contents of that range are no longer useful. Discarding memory ranges allows the driver to optimize certain data migrations and can also help reduce memory pressure. This operation can be undone on any part of the range by either writing to it or prefetching it via cuMemPrefetchAsync or cuMemPrefetchBatchAsync. Reading from a discarded range, without a subsequent write or prefetch to that part of the range, will return an indeterminate value. Note that any reads, writes or prefetches to any part of the memory range that occur simultaneously with the discard operation result in undefined behavior.
    ///
    /// Performs memory discard on address ranges specified in `dptrs` and `sizes`. Both arrays must be of the same length as specified by `count`. Each memory range specified must refer to managed memory allocated via [`cuMemAllocManaged`] or declared via **managed** variables or it may also refer to system-allocated memory when all devices have a non-zero value for [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`].
    ///
    /// # Parameters
    ///
    /// - `dptrs`: Array of pointers to be discarded.
    /// - `sizes`: Array of sizes for memory discard operations.
    /// - `count`: Size of `dptrs` and `sizes` arrays.
    /// - `flags`: Flags reserved for future use. Must be zero.
    /// - `hStream`: The stream to enqueue the operations in. Must not be legacy NULL stream.
    pub fn cuMemDiscardBatchAsync(
        dptrs: *mut CUdeviceptr,
        sizes: *mut size_t,
        count: size_t,
        flags: ::core::ffi::c_ulonglong,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Performs a batch of memory discards and prefetches asynchronously.
    ///
    /// Performs a batch of memory discards followed by prefetches. The batch as a whole executes in stream order but operations within a batch are not guaranteed to execute in any specific order. All devices in the system must have a non-zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`] otherwise the API will return an error.
    ///
    /// Calling cuMemDiscardAndPrefetchBatchAsync is semantically equivalent to calling cuMemDiscardBatchAsync followed by cuMemPrefetchBatchAsync, but is more optimal. For more details on what discarding and prefetching imply, please refer to cuMemDiscardBatchAsync and cuMemPrefetchBatchAsync respectively. Note that any reads, writes or prefetches to any part of the memory range that occur simultaneously with this combined discard+prefetch operation result in undefined behavior.
    ///
    /// Performs memory discard and prefetch on address ranges specified in `dptrs` and `sizes`. Both arrays must be of the same length as specified by `count`. Each memory range specified must refer to managed memory allocated via [`cuMemAllocManaged`] or declared via **managed** variables or it may also refer to system-allocated memory when all devices have a non-zero value for [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`]. Every operation in the batch has to be associated with a valid location to prefetch the address range to and specified in the `prefetchLocs` array. Each entry in this array can apply to more than one operation. This can be done by specifying in the `prefetchLocIdxs` array, the index of the first operation that the corresponding entry in the `prefetchLocs` array applies to. Both `prefetchLocs` and `prefetchLocIdxs` must be of the same length as specified by `numPrefetchLocs`. For example, if a batch has 10 operations listed in dptrs/sizes, the first 6 of which are to be prefetched to one location and the remaining 4 are to be prefetched to another, then `numPrefetchLocs` will be 2, `prefetchLocIdxs` will be {0, 6} and `prefetchLocs` will contain the two set of locations. Note the first entry in `prefetchLocIdxs` must always be 0. Also, each entry must be greater than the previous entry and the last entry should be less than `count`. Furthermore, `numPrefetchLocs` must be lesser than or equal to `count`.
    ///
    /// # Parameters
    ///
    /// - `dptrs`: Array of pointers to be discarded.
    /// - `sizes`: Array of sizes for memory discard operations.
    /// - `count`: Size of `dptrs` and `sizes` arrays.
    /// - `prefetchLocs`: Array of locations to prefetch to.
    /// - `prefetchLocIdxs`: Array of indices to specify which operands each entry in the `prefetchLocs` array applies to. The locations specified in prefetchLocs\[k\] will be applied to operations starting from prefetchLocIdxs\[k\] through prefetchLocIdxs\[k+1\] - 1. Also prefetchLocs\[numPrefetchLocs - 1\] will apply to copies starting from prefetchLocIdxs\[numPrefetchLocs - 1\] through count - 1.
    /// - `numPrefetchLocs`: Size of `prefetchLocs` and `prefetchLocIdxs` arrays.
    /// - `flags`: Flags reserved for future use. Must be zero.
    /// - `hStream`: The stream to enqueue the operations in. Must not be legacy NULL stream.
    pub fn cuMemDiscardAndPrefetchBatchAsync(
        dptrs: *mut CUdeviceptr,
        sizes: *mut size_t,
        count: size_t,
        prefetchLocs: *mut CUmemLocation,
        prefetchLocIdxs: *mut size_t,
        numPrefetchLocs: size_t,
        flags: ::core::ffi::c_ulonglong,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets residency information for a memory address range.
    ///
    /// Retrieves memory location information for the specified address range starting at `ptr` with size `size`. The API summarizes the location information with a granularity specified by `summaryGranularity`. For each summary region, the API determines the most common location by sampling memory at intervals defined by `samplingGranularity` within that region.
    ///
    /// The location information is returned in the `location_out` array, with one entry per summary region. The total number of locations returned will be ceil(size/summaryGranularity). The user is expected to allocate the `location_out` array with sufficient memory.
    ///
    /// For example, with an address range of 1GB, a `summaryGranularity` of 128MB, and a `samplingGranularity` of 2MB, the function will:
    ///
    /// When the memory is not resident on any processor, the call returns [`cudaError_enum::CUDA_SUCCESS`] and the returned location type for that interval is [`CUmemLocationType_enum::CU_MEM_LOCATION_TYPE_NONE`].
    ///
    /// The memory range must refer to one of the following:
    ///
    /// All devices on the system must have non-zero value of device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`]. If not, this call returns [`cudaError_enum::CUDA_ERROR_NOT_SUPPORTED`].
    ///
    /// # Parameters
    ///
    /// - `ptr`: Starting address of the memory range to query.
    /// - `size`: Size in bytes of the memory range to query.
    /// - `summaryGranularity`: Granularity in bytes at which to summarize location information.
    /// - `samplingGranularity`: Granularity in bytes at which to sample memory within each summary region.
    /// - `location_out`: Array to store location information, one entry per summary region.
    pub fn cuMemGetLocationInfo(
        ptr: CUdeviceptr,
        size: size_t,
        summaryGranularity: size_t,
        samplingGranularity: size_t,
        location_out: *mut CUmemLocation,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Query an attribute of a given memory range.
    ///
    /// Query an attribute about the memory range starting at `devPtr` with a size of `count` bytes. The memory range must refer to managed memory allocated via [`cuMemAllocManaged`] or declared via **managed** variables.
    ///
    /// The `attribute` parameter can take the following values.
    ///
    /// # Parameters
    ///
    /// - `data`: A pointers to a memory location where the result of each attribute query will be written to.
    /// - `dataSize`: Array containing the size of data.
    /// - `attribute`: The attribute to query.
    /// - `devPtr`: Start of the range to query.
    /// - `count`: Size of the range to query.
    pub fn cuMemRangeGetAttribute(
        data: *mut ::core::ffi::c_void,
        dataSize: size_t,
        attribute: CUmem_range_attribute,
        devPtr: CUdeviceptr,
        count: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Query attributes of a given memory range.
    ///
    /// Query attributes of the memory range starting at `devPtr` with a size of `count` bytes. The memory range must refer to managed memory allocated via [`cuMemAllocManaged`] or declared via **managed** variables. The `attributes` array will be interpreted to have `numAttributes` entries. The `dataSizes` array will also be interpreted to have `numAttributes` entries. The results of the query will be stored in `data`.
    ///
    /// The list of supported attributes are given below. Please refer to [`cuMemRangeGetAttribute`] for attribute descriptions and restrictions.
    ///
    /// # Parameters
    ///
    /// - `data`: A two-dimensional array containing pointers to memory locations where the result of each attribute query will be written to.
    /// - `dataSizes`: Array containing the sizes of each result.
    /// - `attributes`: An array of attributes to query (numAttributes and the number of attributes in this array should match).
    /// - `numAttributes`: Number of attributes to query.
    /// - `devPtr`: Start of the range to query.
    /// - `count`: Size of the range to query.
    pub fn cuMemRangeGetAttributes(
        data: *mut *mut ::core::ffi::c_void,
        dataSizes: *mut size_t,
        attributes: *mut CUmem_range_attribute,
        numAttributes: size_t,
        devPtr: CUdeviceptr,
        count: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Set attributes on a previously allocated memory region.
    ///
    /// The supported attributes are.
    ///
    /// # Parameters
    ///
    /// - `value`: Pointer to memory containing the value to be set.
    /// - `attribute`: Pointer attribute to set.
    /// - `ptr`: Pointer to a memory region allocated using CUDA memory allocation APIs.
    pub fn cuPointerSetAttribute(
        value: *const ::core::ffi::c_void,
        attribute: CUpointer_attribute,
        ptr: CUdeviceptr,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns information about a pointer.
    ///
    /// The supported attributes are (refer to [`cuPointerGetAttribute`] for attribute descriptions and restrictions):
    ///
    /// Unlike [`cuPointerGetAttribute`], this function will not return an error when the `ptr` encountered is not a valid CUDA pointer. Instead, the attributes are assigned default NULL values and [`CUresult::CUDA_SUCCESS`] is returned.
    ///
    /// If `ptr` was not allocated by, mapped by, or registered with a [`CUcontext`] which uses UVA (Unified Virtual Addressing), [`cudaError_enum::CUDA_ERROR_INVALID_CONTEXT`] is returned.
    ///
    /// # Parameters
    ///
    /// - `numAttributes`: Number of attributes to query.
    /// - `attributes`: An array of attributes to query (numAttributes and the number of attributes in this array should match).
    /// - `data`: A two-dimensional array containing pointers to memory locations where the result of each attribute query will be written to.
    /// - `ptr`: Pointer to query.
    pub fn cuPointerGetAttributes(
        numAttributes: ::core::ffi::c_uint,
        attributes: *mut CUpointer_attribute,
        data: *mut *mut ::core::ffi::c_void,
        ptr: CUdeviceptr,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Create a stream.
    ///
    /// Creates a stream and returns a handle in `phStream`. The `Flags` argument determines behaviors of the stream.
    ///
    /// Valid values for `Flags` are.
    ///
    /// # Parameters
    ///
    /// - `phStream`: Returned newly created stream.
    /// - `Flags`: Parameters for stream creation.
    pub fn cuStreamCreate(
        phStream: *mut CUstream,
        Flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Create a stream with the given priority.
    ///
    /// Creates a stream with the specified priority and returns a handle in `phStream`. This affects the scheduling priority of work in the stream. Priorities provide a hint to preferentially run work with higher priority when possible, but do not preempt already-running work or provide any other functional guarantee on execution order.
    ///
    /// `priority` follows a convention where lower numbers represent higher priorities. ‘0’ represents default priority. The range of meaningful numerical priorities can be queried using [`cuCtxGetStreamPriorityRange`]. If the specified priority is outside the numerical range returned by [`cuCtxGetStreamPriorityRange`], it will automatically be clamped to the lowest or the highest number in the range.
    ///
    /// # Parameters
    ///
    /// - `phStream`: Returned newly created stream.
    /// - `flags`: Flags for stream creation. See [`cuStreamCreate`] for a list of valid flags.
    /// - `priority`: Stream priority. Lower numbers represent higher priorities. See [`cuCtxGetStreamPriorityRange`] for more information about meaningful stream priorities that can be passed.
    pub fn cuStreamCreateWithPriority(
        phStream: *mut CUstream,
        flags: ::core::ffi::c_uint,
        priority: ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Begins capture to CIG on a stream.
    ///
    /// Support for CIG streams with D3D12 can be determined using [`cuDeviceGetAttribute`] with [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_D3D12_CIG_STREAMS_SUPPORTED`].
    ///
    /// Begin CIG (CUDA in Graphics) capture on `hStream` for the graphics API as provided in `streamCigCaptureParams`. When a stream is in CIG capture mode, all operations pushed into the stream will not be executed, but will instead be captured into a graphics API command list/command buffer. All kernel launches and memory copy/memory set operations on the CIG stream will be recorded. When the command list is executed by the graphics API, all the stream’s operations will execute in order along with other graphics API commands in the command list.
    ///
    /// CIG stream capture may not be initiated if `stream` is CU_STREAM_LEGACY. Capture must be ended on the same stream in which it was initiated, and it may only be initiated if the stream is not already in CIG capture mode.
    ///
    /// The context must be also created in CIG mode previously, otherwise this operation will fail and [`cudaError_enum::CUDA_ERROR_INVALID_CONTEXT`] will be returned.
    ///
    /// Data from the graphics client can be shared with CUDA via the `streamSharedData` in `streamCigCaptureParams`. The format of `streamSharedData` is dependent on the type of the graphics client. For D3D12, `streamSharedData` is an ID3D12CommandList object pointer. The command list must be in ready state for recording commands whenever kernels are launched on the stream. The command list provided must belong to the graphics API device that the CIG context was created with, otherwise the behavior will be undefined.
    ///
    /// The stream object may not be destroyed until its associated command list has finished executing on the GPU. The command list/command buffer used for capture may not be submitted for execution before a call to cuStreamEndCaptureToCig is made on the associated stream.
    ///
    /// Graphics resources to be accessed by work recorded on the CIG stream must use UAV barriers on the command list prior to recording work that accesses them on the stream.
    ///
    /// Resubmission of the same recorded command list is not allowed. Further more, care must be taken for the order of execution of the recorded CUDA work with regards to other CUDA work submitted under the same CIG context. Out-of-order execution can lead to device hangs or exceptions.
    ///
    /// CIG capture mode operates similarly to [`cuStreamBeginCapture_v2`] with the [`CUstreamCaptureMode::CU_STREAM_CAPTURE_MODE_RELAXED`] option. There are additional limitations to streams in CIG capture mode. The following functions are not allowed for CIG streams whether directly or indirectly via a recorded graph launch: [`cuLaunchHostFunc`] [`cuStreamAddCallback`] [`cuStreamSynchronize`] cuStreamWaitValue32 cuStreamWaitValue64 cuStreamBatchMemOp cuStreamBeginCapture [`cuStreamBeginCaptureToGraph`] [`cuMemAllocAsync`] [`cuMemFreeAsync`].
    ///
    /// # Parameters
    ///
    /// - `hStream`: Stream in which to initiate capture to CIG.
    /// - `streamCigCaptureParams`: CIG capture parameters.
    pub fn cuStreamBeginCaptureToCig(
        hStream: CUstream,
        streamCigCaptureParams: *mut CUstreamCigCaptureParams,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Ends CIG capture on a stream.
    ///
    /// End CIG capture on `hStream`. Capture must have been initiated on `hStream` via a call to cuStreamBeginCaptureToCig. Once this function is called, `hStream` will exit CIG capture mode and return to its original state, thus removing all CIG stream restrictions. Also, the command list/command buffer that was associated with `hStream` in the previous call to cuStreamBeginCaptureToCig is now allowed to be submitted for execution on the graphics API. However, the stream may not be destroyed until execution of the command list is fully done on the GPU. This requirements extends also to all streams dependent on the CIG stream (e.g. via event waits).
    ///
    /// # Parameters
    ///
    /// - `hStream`: - Stream to end CIG capture
    pub fn cuStreamEndCaptureToCig(hStream: CUstream) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Query the priority of a given stream.
    ///
    /// Query the priority of a stream created using [`cuStreamCreate`], [`cuStreamCreateWithPriority`] or [`cuGreenCtxStreamCreate`] and return the priority in `priority`. Note that if the stream was created with a priority outside the numerical range returned by [`cuCtxGetStreamPriorityRange`], this function returns the clamped priority. See [`cuStreamCreateWithPriority`] for details about priority clamping.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Handle to the stream to be queried.
    /// - `priority`: Pointer to a signed integer in which the stream’s priority is returned.
    pub fn cuStreamGetPriority(
        hStream: CUstream,
        priority: *mut ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the device handle of the stream.
    ///
    /// Returns in `*device` the device handle of the stream.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Handle to the stream to be queried.
    /// - `device`: Returns the device to which a stream belongs.
    pub fn cuStreamGetDevice(hStream: CUstream, device: *mut CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Query the flags of a given stream.
    ///
    /// Query the flags of a stream created using [`cuStreamCreate`], [`cuStreamCreateWithPriority`] or [`cuGreenCtxStreamCreate`] and return the flags in `flags`.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Handle to the stream to be queried.
    /// - `flags`: Pointer to an unsigned integer in which the stream’s flags are returned The value returned in `flags` is a logical ‘OR’ of all flags that were used while creating this stream. See [`cuStreamCreate`] for the list of valid flags.
    pub fn cuStreamGetFlags(
        hStream: CUstream,
        flags: *mut ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the unique Id associated with the stream handle supplied.
    ///
    /// Returns in `streamId` the unique Id which is associated with the given stream handle. The Id is unique for the life of the program.
    ///
    /// The stream handle `hStream` can refer to any of the following.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Handle to the stream to be queried.
    /// - `streamId`: Pointer to store the Id of the stream.
    pub fn cuStreamGetId(
        hStream: CUstream,
        streamId: *mut ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Query the context associated with a stream.
    ///
    /// Returns the CUDA context that the stream is associated with.
    ///
    /// If the stream was created via the API [`cuGreenCtxStreamCreate`], the returned context is equivalent to the one returned by [`cuCtxFromGreenCtx`] on the green context associated with the stream at creation time.
    ///
    /// The stream handle `hStream` can refer to any of the following.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Handle to the stream to be queried.
    /// - `pctx`: Returned context associated with the stream.
    pub fn cuStreamGetCtx(hStream: CUstream, pctx: *mut CUcontext) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Query the contexts associated with a stream.
    ///
    /// Returns the contexts that the stream is associated with.
    ///
    /// If the stream is associated with a green context, the API returns the green context in `pGreenCtx` and the primary context of the associated device in `pCtx`.
    ///
    /// If the stream is associated with a regular context, the API returns the regular context in `pCtx` and NULL in `pGreenCtx`.
    ///
    /// The stream handle `hStream` can refer to any of the following.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Handle to the stream to be queried.
    /// - `pCtx`: Returned regular context associated with the stream.
    /// - `pGreenCtx`: Returned green context if the stream is associated with a green context or NULL if not.
    pub fn cuStreamGetCtx_v2(
        hStream: CUstream,
        pCtx: *mut CUcontext,
        pGreenCtx: *mut CUgreenCtx,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Make a compute stream wait on an event.
    ///
    /// Makes all future work submitted to `hStream` wait for all work captured in `hEvent`. See [`cuEventRecord`] for details on what is captured by an event. The synchronization will be performed efficiently on the device when applicable. `hEvent` may be from a different context or device than `hStream`.
    ///
    /// flags include.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Stream to wait.
    /// - `hEvent`: Event to wait on (may not be NULL).
    /// - `Flags`: See ::CUevent_capture_flags.
    pub fn cuStreamWaitEvent(
        hStream: CUstream,
        hEvent: CUevent,
        Flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Add a callback to a compute stream.
    ///
    /// Adds a callback to be called on the host after all currently enqueued items in the stream have completed. For each cuStreamAddCallback call, the callback will be executed exactly once. The callback will block later work in the stream until it is finished.
    ///
    /// The callback may be passed [`cudaError_enum::CUDA_SUCCESS`] or an error code. In the event of a device error, all subsequently executed callbacks will receive an appropriate [CUresult](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gac6c391505e117393cc2558fff6bfc2e9).
    ///
    /// Callbacks must not make any CUDA API calls. Attempting to use a CUDA API will result in [`cudaError_enum::CUDA_ERROR_NOT_PERMITTED`]. Callbacks must not perform any synchronization that may depend on outstanding device work or other callbacks that are not mandated to run earlier. Callbacks without a mandated order (in independent streams) execute in undefined order and may be serialized.
    ///
    /// For the purposes of Unified Memory, callback execution makes a number of guarantees.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Stream to add callback to.
    /// - `callback`: The function to call once preceding stream operations are complete.
    /// - `userData`: User specified data to be passed to the callback function.
    /// - `flags`: Reserved for future use, must be 0.
    pub fn cuStreamAddCallback(
        hStream: CUstream,
        callback: CUstreamCallback,
        userData: *mut ::core::ffi::c_void,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Begins graph capture on a stream
    ///
    /// Begin graph capture on `hStream`. When a stream is in capture mode, all operations pushed into the stream will not be executed, but will instead be captured into a graph, which will be returned via ::cuStreamEndCapture. Capture may not be initiated if `stream` is CU_STREAM_LEGACY. Capture must be ended on the same stream in which it was initiated, and it may only be initiated if the stream is not already in capture mode. The capture mode may be queried via ::cuStreamIsCapturing. A unique id representing the capture sequence may be queried via ::cuStreamGetCaptureInfo.
    ///
    /// If `mode` is not ::CU_STREAM_CAPTURE_MODE_RELAXED, ::cuStreamEndCapture must be called on this stream from the same thread.
    ///
    ///
    ///
    ///
    ///
    /// Note: Kernels captured using this API must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE
    ///
    ///
    ///
    /// See also: ::cuStreamCreate, ::cuStreamIsCapturing, ::cuStreamEndCapture, ::cuThreadExchangeStreamCaptureMode
    ///
    /// # Parameters
    ///
    /// - `hStream`: - Stream in which to initiate capture
    /// - `mode`: - Controls the interaction of this capture sequence with other API calls that are potentially unsafe. For more details see ::cuThreadExchangeStreamCaptureMode.
    pub fn cuStreamBeginCapture_v2(
        hStream: CUstream,
        mode: CUstreamCaptureMode,
    ) -> CUresult;
}
impl CUgraphRecaptureStatus_enum {
    /// Node is eligible for update in an instantiated graph.
    pub const CU_GRAPH_RECAPTURE_ELIGIBLE_FOR_UPDATE: CUgraphRecaptureStatus_enum = CUgraphRecaptureStatus_enum(
        0,
    );
    /// Parameter changes in the node cannot be applied to an instantiated graph.
    pub const CU_GRAPH_RECAPTURE_INELIGIBLE_FOR_UPDATE: CUgraphRecaptureStatus_enum = CUgraphRecaptureStatus_enum(
        1,
    );
    /// Error while attempting to recapture the node.
    ///
    /// The recapture will be ended regardless of the return value from the callback.
    pub const CU_GRAPH_RECAPTURE_ERROR: CUgraphRecaptureStatus_enum = CUgraphRecaptureStatus_enum(
        2,
    );
}
/// Whether a recaptured node can update an existing executable graph, or encountered an error.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgraphRecaptureStatus_enum(pub ::core::ffi::c_uint);
pub use self::CUgraphRecaptureStatus_enum as CUgraphRecaptureStatus;
/// Callback function invoked when node parameter mismatches are detected while recapturing to an existing graph.
///
/// Parameter struct pointers are only valid within the callback.
pub type CUgraphRecaptureCallback = ::core::option::Option<
    unsafe extern "C" fn(
        data: *mut ::core::ffi::c_void,
        node: CUgraphNode,
        originalParams: *const CUgraphNodeParams,
        recaptureParams: *const CUgraphNodeParams,
        status: CUgraphRecaptureStatus,
    ) -> CUresult,
>;
singe_loader::functions! { crate::DRIVER;
    /// Begin graph capture on a stream to an existing graph.
    ///
    /// Begin graph capture on `hStream` to the existing `hGraph`. The node creation order while recapturing the graph must be identical to the original graph. The recapture will fail immediately for:
    ///
    /// Any other node parameter mismatches during recapture can be configured to call the function provided in `callbackFunc`. The recapture will fail immediately if the callback returns anything other than [`CUresult::CUDA_SUCCESS`].
    ///
    /// If the recapture fails for any reason, the `graph` will be in an undefined state and should be destroyed.
    ///
    /// See cuStreamBeginCapture for additional detail on beginning the capture.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Stream in which to initiate capture.
    /// - `mode`: Controls the interaction of this capture sequence with other API calls that are potentially unsafe. For more details see [`cuThreadExchangeStreamCaptureMode`].
    /// - `hGraph`: Existing CUDA graph to be captured into.
    /// - `callbackFunc`: Function that will be called for all parameter mismatches from the original graph.
    /// - `userData`: A generic pointer to user data that is passed into the callback function.
    pub fn cuStreamBeginRecaptureToGraph(
        hStream: CUstream,
        mode: CUstreamCaptureMode,
        hGraph: CUgraph,
        callbackFunc: CUgraphRecaptureCallback,
        userData: *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Begins graph capture on a stream to an existing graph.
    ///
    /// Begin graph capture on `hStream`, placing new nodes into an existing graph. When a stream is in capture mode, all operations pushed into the stream will not be executed, but will instead be captured into `hGraph`. The graph will not be instantiable until the user calls [`cuStreamEndCapture`].
    ///
    /// Capture may not be initiated if `stream` is CU_STREAM_LEGACY. Capture must be ended on the same stream in which it was initiated, and it may only be initiated if the stream is not already in capture mode. The capture mode may be queried via [`cuStreamIsCapturing`]. A unique id representing the capture sequence may be queried via cuStreamGetCaptureInfo.
    ///
    /// If `mode` is not [`CUstreamCaptureMode::CU_STREAM_CAPTURE_MODE_RELAXED`], [`cuStreamEndCapture`] must be called on this stream from the same thread.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Stream in which to initiate capture.
    /// - `hGraph`: Graph to capture into.
    /// - `dependencies`: Dependencies of the first node captured in the stream. Can be NULL if numDependencies is 0.
    /// - `dependencyData`: Optional array of data associated with each dependency.
    /// - `numDependencies`: Number of dependencies.
    /// - `mode`: Controls the interaction of this capture sequence with other API calls that are potentially unsafe. For more details see [`cuThreadExchangeStreamCaptureMode`].
    pub fn cuStreamBeginCaptureToGraph(
        hStream: CUstream,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        dependencyData: *const CUgraphEdgeData,
        numDependencies: size_t,
        mode: CUstreamCaptureMode,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Swaps the stream capture interaction mode for a thread.
    ///
    /// Sets the calling thread’s stream capture interaction mode to the value contained in `*mode`, and overwrites `*mode` with the previous mode for the thread. To facilitate deterministic behavior across function or module boundaries, callers are encouraged to use this API in a push-pop fashion:
    ///
    /// During stream capture (see cuStreamBeginCapture), some actions, such as a call to ::cudaMalloc, may be unsafe. In the case of ::cudaMalloc, the operation is not enqueued asynchronously to a stream, and is not observed by stream capture. Therefore, if the sequence of operations captured via cuStreamBeginCapture depended on the allocation being replayed whenever the graph is launched, the captured graph would be invalid.
    ///
    /// Therefore, stream capture places restrictions on API calls that can be made within or concurrently to a cuStreamBeginCapture-[`cuStreamEndCapture`] sequence. This behavior can be controlled via this API and flags to cuStreamBeginCapture.
    ///
    /// A thread’s mode is one of the following.
    ///
    /// # Parameters
    ///
    /// - `mode`: - Pointer to mode value to swap with the current mode
    pub fn cuThreadExchangeStreamCaptureMode(mode: *mut CUstreamCaptureMode) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Ends capture on a stream, returning the captured graph.
    ///
    /// End capture on `hStream`, returning the captured graph via `phGraph`. Capture must have been initiated on `hStream` via a call to cuStreamBeginCapture. If capture was invalidated, due to a violation of the rules of stream capture, then a NULL graph will be returned.
    ///
    /// If the `mode` argument to cuStreamBeginCapture was not [`CUstreamCaptureMode::CU_STREAM_CAPTURE_MODE_RELAXED`], this call must be from the same thread as cuStreamBeginCapture.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Stream to query.
    /// - `phGraph`: The captured graph.
    pub fn cuStreamEndCapture(hStream: CUstream, phGraph: *mut CUgraph) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a stream’s capture status.
    ///
    /// Return the capture status of `hStream` via `captureStatus`. After a successful call, `*captureStatus` will contain one of the following:
    ///
    /// Note that, if this is called on [CU_STREAM_LEGACY](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gaa53e8210837f039dd6434a3a4c3324aa) (the “null stream”) while a blocking stream in the same context is capturing, it will return [`cudaError_enum::CUDA_ERROR_STREAM_CAPTURE_IMPLICIT`] and `*captureStatus` is unspecified after the call. The blocking stream capture is not invalidated.
    ///
    /// When a blocking stream is capturing, the legacy stream is in an unusable state until the blocking stream capture is terminated. The legacy stream is not supported for stream capture, but attempted use would have an implicit dependency on the capturing stream(s).
    ///
    /// # Parameters
    ///
    /// - `hStream`: Stream to query.
    /// - `captureStatus`: Returns the stream’s capture status.
    pub fn cuStreamIsCapturing(
        hStream: CUstream,
        captureStatus: *mut CUstreamCaptureStatus,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Query a stream's capture state
    ///
    /// Query stream state related to stream capture.
    ///
    /// If called on ::CU_STREAM_LEGACY (the "null stream") while a stream not created with ::CU_STREAM_NON_BLOCKING is capturing, returns ::CUDA_ERROR_STREAM_CAPTURE_IMPLICIT.
    ///
    /// Valid data (other than capture status) is returned only if both of the following are true:
    /// - the call returns CUDA_SUCCESS
    /// - the returned capture status is ::CU_STREAM_CAPTURE_STATUS_ACTIVE
    ///
    /// If `edgeData_out` is non-NULL then `dependencies_out` must be as well. If `dependencies_out` is non-NULL and `edgeData_out` is NULL, but there is non-zero edge data for one or more of the current stream dependencies, the call will return ::CUDA_ERROR_LOSSY_QUERY.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_STREAM_CAPTURE_IMPLICIT, ::CUDA_ERROR_LOSSY_QUERY
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuStreamBeginCapture, ::cuStreamIsCapturing, ::cuStreamUpdateCaptureDependencies
    ///
    /// # Parameters
    ///
    /// - `hStream`: - The stream to query
    /// - `captureStatus_out`: - Location to return the capture status of the stream; required
    /// - `id_out`: - Optional location to return an id for the capture sequence, which is unique over the lifetime of the process
    /// - `graph_out`: - Optional location to return the graph being captured into. All operations other than destroy and node removal are permitted on the graph while the capture sequence is in progress. This API does not transfer ownership of the graph, which is transferred or destroyed at ::cuStreamEndCapture. Note that the graph handle may be invalidated before end of capture for certain errors. Nodes that are or become unreachable from the original stream at ::cuStreamEndCapture due to direct actions on the graph do not trigger ::CUDA_ERROR_STREAM_CAPTURE_UNJOINED.
    /// - `dependencies_out`: - Optional location to store a pointer to an array of nodes. The next node to be captured in the stream will depend on this set of nodes, absent operations such as event wait which modify this set. The array pointer is valid until the next API call which operates on the stream or until the capture is terminated. The node handles may be copied out and are valid until they or the graph is destroyed. The driver-owned array may also be passed directly to APIs that operate on the graph (not the stream) without copying.
    /// - `edgeData_out`: - Optional location to store a pointer to an array of graph edge data. This array parallels `dependencies_out`; the next node to be added has an edge to `dependencies_out\[i\]` with annotation `edgeData_out\[i\]` for each `i`. The array pointer is valid until the next API call which operates on the stream or until the capture is terminated.
    /// - `numDependencies_out`: - Optional location to store the size of the array returned in dependencies_out.
    pub fn cuStreamGetCaptureInfo_v3(
        hStream: CUstream,
        captureStatus_out: *mut CUstreamCaptureStatus,
        id_out: *mut cuuint64_t,
        graph_out: *mut CUgraph,
        dependencies_out: *mut *const CUgraphNode,
        edgeData_out: *mut *const CUgraphEdgeData,
        numDependencies_out: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Update the set of dependencies in a capturing stream
    ///
    /// Modifies the dependency set of a capturing stream. The dependency set is the set of nodes that the next captured node in the stream will depend on along with the edge data for those dependencies.
    ///
    /// Valid flags are ::CU_STREAM_ADD_CAPTURE_DEPENDENCIES and ::CU_STREAM_SET_CAPTURE_DEPENDENCIES. These control whether the set passed to the API is added to the existing set or replaces it. A flags value of 0 defaults to ::CU_STREAM_ADD_CAPTURE_DEPENDENCIES.
    ///
    /// Nodes that are removed from the dependency set via this API do not result in ::CUDA_ERROR_STREAM_CAPTURE_UNJOINED if they are unreachable from the stream at ::cuStreamEndCapture.
    ///
    /// Returns ::CUDA_ERROR_ILLEGAL_STATE if the stream is not capturing.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_ILLEGAL_STATE
    ///
    ///
    ///
    /// See also: ::cuStreamBeginCapture, ::cuStreamGetCaptureInfo
    ///
    /// # Parameters
    ///
    /// - `hStream`: - The stream to update
    /// - `dependencies`: - The set of dependencies to add
    /// - `dependencyData`: - Optional array of data associated with each dependency.
    /// - `numDependencies`: - The size of the dependencies array
    /// - `flags`: - See above
    pub fn cuStreamUpdateCaptureDependencies_v2(
        hStream: CUstream,
        dependencies: *mut CUgraphNode,
        dependencyData: *const CUgraphEdgeData,
        numDependencies: size_t,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Attach memory to a stream asynchronously.
    ///
    /// Enqueues an operation in `hStream` to specify stream association of `length` bytes of memory starting from `dptr`. This function is a stream-ordered operation, meaning that it is dependent on, and will only take effect when, previous work in stream has completed. Any previous association is automatically replaced.
    ///
    /// `dptr` must point to one of the following types of memories:
    ///
    /// For managed allocations, `length` must be either zero or the entire allocation’s size. Both indicate that the entire allocation’s stream association is being changed. Currently, it is not possible to change stream association for a portion of a managed allocation.
    ///
    /// For pageable host allocations, `length` must be non-zero.
    ///
    /// The stream association is specified using `flags` which must be one of [CUmemAttach_flags](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga17c5d5f9b585aa2d6f121847d1a78f4c). If the [`CUmemAttach_flags_enum::CU_MEM_ATTACH_GLOBAL`] flag is specified, the memory can be accessed by any stream on any device. If the [`CUmemAttach_flags_enum::CU_MEM_ATTACH_HOST`] flag is specified, the program makes a guarantee that it won’t access the memory on the device from any stream on a device that has a zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`]. If the [`CUmemAttach_flags_enum::CU_MEM_ATTACH_SINGLE`] flag is specified and `hStream` is associated with a device that has a zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`], the program makes a guarantee that it will only access the memory on the device from `hStream`. It is illegal to attach singly to the NULL stream, because the NULL stream is a virtual global stream and not a specific stream. An error will be returned in this case.
    ///
    /// When memory is associated with a single stream, the Unified Memory system will allow CPU access to this memory region so long as all operations in `hStream` have completed, regardless of whether other streams are active. In effect, this constrains exclusive ownership of the managed memory region by an active GPU to per-stream activity instead of whole-GPU activity.
    ///
    /// Accessing memory on the device from streams that are not associated with it will produce undefined results. No error checking is performed by the Unified Memory system to ensure that kernels launched into other streams do not access this region.
    ///
    /// It is a program’s responsibility to order calls to [`cuStreamAttachMemAsync`] via events, synchronization or other means to ensure legal access to memory at all times. Data visibility and coherency will be changed appropriately for all kernels which follow a stream-association change.
    ///
    /// If `hStream` is destroyed while data is associated with it, the association is removed and the association reverts to the default visibility of the allocation as specified at [`cuMemAllocManaged`]. For **managed** variables, the default association is always [`CUmemAttach_flags_enum::CU_MEM_ATTACH_GLOBAL`]. Note that destroying a stream is an asynchronous operation, and as a result, the change to default association won’t happen until all work in the stream has completed.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Stream in which to enqueue the attach operation.
    /// - `dptr`: Pointer to memory (must be a pointer to managed memory or to a valid host-accessible region of system-allocated pageable memory).
    /// - `length`: Length of memory.
    /// - `flags`: Must be one of [CUmemAttach_flags](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga17c5d5f9b585aa2d6f121847d1a78f4c).
    pub fn cuStreamAttachMemAsync(
        hStream: CUstream,
        dptr: CUdeviceptr,
        length: size_t,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Determine status of a compute stream.
    ///
    /// Returns [`cudaError_enum::CUDA_SUCCESS`] if all operations in the stream specified by `hStream` have completed, or [`cudaError_enum::CUDA_ERROR_NOT_READY`] if not.
    ///
    /// For the purposes of Unified Memory, a return value of [`cudaError_enum::CUDA_SUCCESS`] is equivalent to having called [`cuStreamSynchronize`].
    ///
    /// # Parameters
    ///
    /// - `hStream`: - Stream to query status of
    pub fn cuStreamQuery(hStream: CUstream) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Wait until a stream’s tasks are completed.
    ///
    /// Waits until the device has completed all operations in the stream specified by `hStream`. If the context was created with the [`CUctx_flags_enum::CU_CTX_SCHED_BLOCKING_SYNC`] flag, the CPU thread will block until the stream is finished with all of its tasks.
    ///
    /// # Parameters
    ///
    /// - `hStream`: - Stream to wait for
    pub fn cuStreamSynchronize(hStream: CUstream) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys a stream
    ///
    /// Destroys the stream specified by `hStream`.
    ///
    /// In case the device is still doing work in the stream `hStream` when ::cuStreamDestroy() is called, the function will return immediately and the resources associated with `hStream` will be released automatically once the device has completed all work in `hStream`.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE ::CUDA_ERROR_EXTERNAL_DEVICE
    ///
    ///
    ///
    /// See also: ::cuStreamCreate, ::cuStreamWaitEvent, ::cuStreamQuery, ::cuStreamSynchronize, ::cuStreamAddCallback, ::cudaStreamDestroy
    ///
    /// # Parameters
    ///
    /// - `hStream`: - Stream to destroy
    pub fn cuStreamDestroy_v2(hStream: CUstream) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies attributes from source stream to destination stream.
    ///
    /// Copies attributes from source stream `src` to destination stream `dst`. Both streams must have the same context.
    ///
    /// # Parameters
    ///
    /// - `dst`: Destination stream.
    /// - `src`: Source stream For list of attributes see CUstreamAttrID.
    pub fn cuStreamCopyAttributes(dst: CUstream, src: CUstream) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Queries stream attribute.
    ///
    /// Queries attribute `attr` from `hStream` and stores it in corresponding member of `value_out`.
    pub fn cuStreamGetAttribute(
        hStream: CUstream,
        attr: CUstreamAttrID,
        value_out: *mut CUstreamAttrValue,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets stream attribute.
    ///
    /// Sets attribute `attr` on `hStream` from corresponding attribute of `value`. The updated attribute will be applied to subsequent work submitted to the stream. It will not affect previously submitted work.
    pub fn cuStreamSetAttribute(
        hStream: CUstream,
        attr: CUstreamAttrID,
        value: *const CUstreamAttrValue,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates an event.
    ///
    /// Creates an event \*phEvent for the current context with the flags specified via `Flags`. Valid flags include.
    ///
    /// # Parameters
    ///
    /// - `phEvent`: Returns newly created event.
    /// - `Flags`: Event creation flags.
    pub fn cuEventCreate(phEvent: *mut CUevent, Flags: ::core::ffi::c_uint) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Records an event.
    ///
    /// Captures in `hEvent` the contents of `hStream` at the time of this call. `hEvent` and `hStream` must be from the same context otherwise [`cudaError_enum::CUDA_ERROR_INVALID_HANDLE`] is returned. Calls such as [`cuEventQuery`] or [`cuStreamWaitEvent`] will then examine or wait for completion of the work that was captured. Uses of `hStream` after this call do not modify `hEvent`. See note on default stream behavior for what is captured in the default case.
    ///
    /// [`cuEventRecord`] can be called multiple times on the same event and will overwrite the previously captured state. Other APIs such as [`cuStreamWaitEvent`] use the most recently captured state at the time of the API call, and are not affected by later calls to [`cuEventRecord`]. Before the first call to [`cuEventRecord`], an event represents an empty set of work, so for example [`cuEventQuery`] would return [`cudaError_enum::CUDA_SUCCESS`].
    ///
    /// # Parameters
    ///
    /// - `hEvent`: Event to record.
    /// - `hStream`: Stream to record event for.
    pub fn cuEventRecord(hEvent: CUevent, hStream: CUstream) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Records an event.
    ///
    /// Captures in `hEvent` the contents of `hStream` at the time of this call. `hEvent` and `hStream` must be from the same context otherwise [`cudaError_enum::CUDA_ERROR_INVALID_HANDLE`] is returned. Calls such as [`cuEventQuery`] or [`cuStreamWaitEvent`] will then examine or wait for completion of the work that was captured. Uses of `hStream` after this call do not modify `hEvent`. See note on default stream behavior for what is captured in the default case.
    ///
    /// [`cuEventRecordWithFlags`] can be called multiple times on the same event and will overwrite the previously captured state. Other APIs such as [`cuStreamWaitEvent`] use the most recently captured state at the time of the API call, and are not affected by later calls to [`cuEventRecordWithFlags`]. Before the first call to [`cuEventRecordWithFlags`], an event represents an empty set of work, so for example [`cuEventQuery`] would return [`cudaError_enum::CUDA_SUCCESS`].
    ///
    /// flags include.
    ///
    /// # Parameters
    ///
    /// - `hEvent`: Event to record.
    /// - `hStream`: Stream to record event for.
    /// - `flags`: See ::CUevent_capture_flags.
    pub fn cuEventRecordWithFlags(
        hEvent: CUevent,
        hStream: CUstream,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Queries an event’s status.
    ///
    /// Queries the status of all work currently captured by `hEvent`. See [`cuEventRecord`] for details on what is captured by an event.
    ///
    /// Returns [`cudaError_enum::CUDA_SUCCESS`] if all captured work has been completed, or [`cudaError_enum::CUDA_ERROR_NOT_READY`] if any captured work is incomplete.
    ///
    /// For the purposes of Unified Memory, a return value of [`cudaError_enum::CUDA_SUCCESS`] is equivalent to having called [`cuEventSynchronize`].
    ///
    /// # Parameters
    ///
    /// - `hEvent`: - Event to query
    pub fn cuEventQuery(hEvent: CUevent) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Waits for an event to complete.
    ///
    /// Waits until the completion of all work currently captured in `hEvent`. See [`cuEventRecord`] for details on what is captured by an event.
    ///
    /// Waiting for an event that was created with the [`CUevent_flags_enum::CU_EVENT_BLOCKING_SYNC`] flag will cause the calling CPU thread to block until the event has been completed by the device. If the [`CUevent_flags_enum::CU_EVENT_BLOCKING_SYNC`] flag has not been set, then the CPU thread will busy-wait until the event has been completed by the device.
    ///
    /// # Parameters
    ///
    /// - `hEvent`: - Event to wait for
    pub fn cuEventSynchronize(hEvent: CUevent) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys an event
    ///
    /// Destroys the event specified by `hEvent`.
    ///
    /// An event may be destroyed before it is complete (i.e., while ::cuEventQuery() would return ::CUDA_ERROR_NOT_READY). In this case, the call does not block on completion of the event, and any associated resources will automatically be released asynchronously at completion.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_HANDLE
    ///
    ///
    ///
    /// See also: ::cuEventCreate, ::cuEventRecord, ::cuEventQuery, ::cuEventSynchronize, ::cuEventElapsedTime, ::cudaEventDestroy
    ///
    /// # Parameters
    ///
    /// - `hEvent`: - Event to destroy
    pub fn cuEventDestroy_v2(hEvent: CUevent) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Computes the elapsed time between two events
    ///
    /// Computes the elapsed time between two events (in milliseconds with a resolution of around 0.5 microseconds). Note this API is not guaranteed to return the latest errors for pending work. As such this API is intended to serve as an elapsed time calculation only and any polling for completion on the events to be compared should be done with ::cuEventQuery instead.
    ///
    /// If either event was last recorded in a non-NULL stream, the resulting time may be greater than expected (even if both used the same stream handle). This happens because the ::cuEventRecord() operation takes place asynchronously and there is no guarantee that the measured latency is actually just between the two events. Any number of other different stream operations could execute in between the two measured events, thus altering the timing in a significant way.
    ///
    /// If ::cuEventRecord() has not been called on either event then ::CUDA_ERROR_INVALID_HANDLE is returned. If ::cuEventRecord() has been called on both events but one or both of them has not yet been completed (that is, ::cuEventQuery() would return ::CUDA_ERROR_NOT_READY on at least one of the events), ::CUDA_ERROR_NOT_READY is returned. If either event was created with the ::CU_EVENT_DISABLE_TIMING flag, then this function will return ::CUDA_ERROR_INVALID_HANDLE.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_NOT_READY, ::CUDA_ERROR_UNKNOWN
    ///
    ///
    ///
    /// See also: ::cuEventCreate, ::cuEventRecord, ::cuEventQuery, ::cuEventSynchronize, ::cuEventDestroy, ::cudaEventElapsedTime
    ///
    /// # Parameters
    ///
    /// - `pMilliseconds`: - Time between `hStart` and `hEnd` in ms
    /// - `hStart`: - Starting event
    /// - `hEnd`: - Ending event
    pub fn cuEventElapsedTime_v2(
        pMilliseconds: *mut f32,
        hStart: CUevent,
        hEnd: CUevent,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Imports an external memory object.
    ///
    /// Imports an externally allocated memory object and returns a handle to that in `extMem_out`.
    ///
    /// The properties of the handle being imported must be described in `memHandleDesc`. The CUDA_EXTERNAL_MEMORY_HANDLE_DESC structure is defined as follows:
    ///
    /// where [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ad4e3663348d28278d066980b422ab70e) specifies the type of handle being imported. [CUexternalMemoryHandleType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gabca0bdde9a33c47058b5c97f21e2edd8) is defined as:
    ///
    /// If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ad4e3663348d28278d066980b422ab70e) is [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD`], then [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::fd](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a2e9d6e106e308d36e9cc29116d9959ec) must be a valid file descriptor referencing a memory object. Ownership of the file descriptor is transferred to the CUDA driver when the handle is imported successfully. Performing any operations on the file descriptor after it is imported results in undefined behavior.
    ///
    /// If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ad4e3663348d28278d066980b422ab70e) is [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32`], then exactly one of [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a362b8ca729aa8b9256845d710b6e9cb5) and [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ae624f58523f45aeb074e67f552cad52b) must not be NULL. If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a362b8ca729aa8b9256845d710b6e9cb5) is not NULL, then it must represent a valid shared NT handle that references a memory object. Ownership of this handle is not transferred to CUDA after the import operation, so the application must release the handle using the appropriate system call. If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ae624f58523f45aeb074e67f552cad52b) is not NULL, then it must point to a NULL-terminated array of UTF-16 characters that refers to a memory object.
    ///
    /// If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ad4e3663348d28278d066980b422ab70e) is [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT`], then [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a362b8ca729aa8b9256845d710b6e9cb5) must be non-NULL and [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ae624f58523f45aeb074e67f552cad52b) must be NULL. The handle specified must be a globally shared KMT handle. This handle does not hold a reference to the underlying object, and thus will be invalid when all references to the memory object are destroyed.
    ///
    /// If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ad4e3663348d28278d066980b422ab70e) is [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP`], then exactly one of [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a362b8ca729aa8b9256845d710b6e9cb5) and [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ae624f58523f45aeb074e67f552cad52b) must not be NULL. If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a362b8ca729aa8b9256845d710b6e9cb5) is not NULL, then it must represent a valid shared NT handle that is returned by ID3D12Device::CreateSharedHandle when referring to a ID3D12Heap object. This handle holds a reference to the underlying object. If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ae624f58523f45aeb074e67f552cad52b) is not NULL, then it must point to a NULL-terminated array of UTF-16 characters that refers to a ID3D12Heap object.
    ///
    /// If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ad4e3663348d28278d066980b422ab70e) is [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE`], then exactly one of [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a362b8ca729aa8b9256845d710b6e9cb5) and [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ae624f58523f45aeb074e67f552cad52b) must not be NULL. If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a362b8ca729aa8b9256845d710b6e9cb5) is not NULL, then it must represent a valid shared NT handle that is returned by ID3D12Device::CreateSharedHandle when referring to a ID3D12Resource object. This handle holds a reference to the underlying object. If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ae624f58523f45aeb074e67f552cad52b) is not NULL, then it must point to a NULL-terminated array of UTF-16 characters that refers to a ID3D12Resource object.
    ///
    /// If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ad4e3663348d28278d066980b422ab70e) is [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE`], then [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a362b8ca729aa8b9256845d710b6e9cb5) must represent a valid shared NT handle that is returned by IDXGIResource1::CreateSharedHandle when referring to a ID3D11Resource object. If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ae624f58523f45aeb074e67f552cad52b) is not NULL, then it must point to a NULL-terminated array of UTF-16 characters that refers to a ID3D11Resource object.
    ///
    /// If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ad4e3663348d28278d066980b422ab70e) is [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT`], then [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a362b8ca729aa8b9256845d710b6e9cb5) must represent a valid shared KMT handle that is returned by IDXGIResource::GetSharedHandle when referring to a ID3D11Resource object and [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ae624f58523f45aeb074e67f552cad52b) must be NULL.
    ///
    /// If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ad4e3663348d28278d066980b422ab70e) is [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`], then [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::nvSciBufObject](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a8090da2b272e5d8624edcfb145c59eca) must be non-NULL and reference a valid NvSciBuf object. If the NvSciBuf object imported into CUDA is also mapped by other drivers, then the application must use [`cuWaitExternalSemaphoresAsync`] or [`cuSignalExternalSemaphoresAsync`] as appropriate barriers to maintain coherence between CUDA and the other drivers. See [`CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC`] and [`CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC`] for memory synchronization.
    ///
    /// If [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ad4e3663348d28278d066980b422ab70e) is [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_DMABUF_FD`], then [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::fd](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a2e9d6e106e308d36e9cc29116d9959ec) must be a valid file descriptor referencing a dma_buf object and [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::flags](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a44d7c253f6b6f34e46b8726496e425c9) must be zero. Importing a dma_buf object is supported only on Tegra platform starting with Thor series. Mapping an imported dma_buf object as CUDA mipmapped array using [`cuExternalMemoryGetMappedMipmappedArray`] is not supported.
    ///
    /// The size of the memory object must be specified in [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::size](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a36570cee9bbfa12b3f34d0d1d98029ce).
    ///
    /// Specifying the flag [`CUDA_EXTERNAL_MEMORY_DEDICATED`] in [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::flags](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1a44d7c253f6b6f34e46b8726496e425c9) indicates that the resource is a dedicated resource. The definition of what a dedicated resource is outside the scope of this extension. This flag must be set if [CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__HANDLE__DESC__v1.html#structcuda__external__memory__handle__desc__v1_1ad4e3663348d28278d066980b422ab70e) is one of the following: [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE`] [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE`] [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT`].
    ///
    /// # Parameters
    ///
    /// - `extMem_out`: Returned handle to an external memory object.
    /// - `memHandleDesc`: Memory import handle descriptor.
    pub fn cuImportExternalMemory(
        extMem_out: *mut CUexternalMemory,
        memHandleDesc: *const CUDA_EXTERNAL_MEMORY_HANDLE_DESC,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Maps a buffer onto an imported memory object.
    ///
    /// Maps a buffer onto an imported memory object and returns a device pointer in `devPtr`.
    ///
    /// The properties of the buffer being mapped must be described in `bufferDesc`. The CUDA_EXTERNAL_MEMORY_BUFFER_DESC structure is defined as follows:
    ///
    /// where [CUDA_EXTERNAL_MEMORY_BUFFER_DESC::offset](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__BUFFER__DESC__v1.html#structcuda__external__memory__buffer__desc__v1_1a734130661fb389658d29d10ed6cf41cd) is the offset in the memory object where the buffer’s base address is. [CUDA_EXTERNAL_MEMORY_BUFFER_DESC::size](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__BUFFER__DESC__v1.html#structcuda__external__memory__buffer__desc__v1_1ab736c75bec5e1461f565e95500c8227f) is the size of the buffer. [CUDA_EXTERNAL_MEMORY_BUFFER_DESC::flags](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__BUFFER__DESC__v1.html#structcuda__external__memory__buffer__desc__v1_1a86aad4fc1ddac67d953daddec0a5c94a) must be zero.
    ///
    /// The offset and size have to be suitably aligned to match the requirements of the external API. Mapping two buffers whose ranges overlap may or may not result in the same virtual address being returned for the overlapped portion. In such cases, the application must ensure that all accesses to that region from the GPU are volatile. Otherwise writes made via one address are not guaranteed to be visible via the other address, even if they’re issued by the same thread. It is recommended that applications map the combined range instead of mapping separate buffers and then apply the appropriate offsets to the returned pointer to derive the individual buffers.
    ///
    /// The returned pointer `devPtr` must be freed using cuMemFree.
    ///
    /// # Parameters
    ///
    /// - `devPtr`: Returned device pointer to buffer.
    /// - `extMem`: Handle to external memory object.
    /// - `bufferDesc`: Buffer descriptor.
    pub fn cuExternalMemoryGetMappedBuffer(
        devPtr: *mut CUdeviceptr,
        extMem: CUexternalMemory,
        bufferDesc: *const CUDA_EXTERNAL_MEMORY_BUFFER_DESC,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Maps a CUDA mipmapped array onto an external memory object.
    ///
    /// Maps a CUDA mipmapped array onto an external object and returns a handle to it in `mipmap`.
    ///
    /// The properties of the CUDA mipmapped array being mapped must be described in `mipmapDesc`. The structure CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC is defined as follows:
    ///
    /// where [CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC::offset](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__MIPMAPPED__ARRAY__DESC__v1.html#structcuda__external__memory__mipmapped__array__desc__v1_1ac4a2c246eab269279434d8153d6e15aa) is the offset in the memory object where the base level of the mipmap chain is. [CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC::arrayDesc](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__MIPMAPPED__ARRAY__DESC__v1.html#structcuda__external__memory__mipmapped__array__desc__v1_1a7c3e0998380d9922a9fcddadeecd186d) describes the format, dimensions and type of the base level of the mipmap chain. For further details on these parameters, please refer to the documentation for [`cuMipmappedArrayCreate`]. Note that if the mipmapped array is bound as a color target in the graphics API, then the flag [`CUDA_ARRAY3D_COLOR_ATTACHMENT`] must be specified in ::CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC::arrayDesc::Flags. [CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC::numLevels](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__MIPMAPPED__ARRAY__DESC__v1.html#structcuda__external__memory__mipmapped__array__desc__v1_1a938185e3178ee0fb5920ac104035b321) specifies the total number of levels in the mipmap chain.
    ///
    /// If `extMem` was imported from a handle of type [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`], then [CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC::numLevels](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__MEMORY__MIPMAPPED__ARRAY__DESC__v1.html#structcuda__external__memory__mipmapped__array__desc__v1_1a938185e3178ee0fb5920ac104035b321) must be equal to 1.
    ///
    /// Mapping `extMem` imported from a handle of type [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_DMABUF_FD`], is not supported.
    ///
    /// The returned CUDA mipmapped array must be freed using [`cuMipmappedArrayDestroy`].
    ///
    /// # Parameters
    ///
    /// - `mipmap`: Returned CUDA mipmapped array.
    /// - `extMem`: Handle to external memory object.
    /// - `mipmapDesc`: CUDA array descriptor.
    pub fn cuExternalMemoryGetMappedMipmappedArray(
        mipmap: *mut CUmipmappedArray,
        extMem: CUexternalMemory,
        mipmapDesc: *const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys an external memory object.
    ///
    /// Destroys the specified external memory object. Any existing buffers and CUDA mipmapped arrays mapped onto this object must no longer be used and must be explicitly freed using cuMemFree and [`cuMipmappedArrayDestroy`] respectively.
    ///
    /// # Parameters
    ///
    /// - `extMem`: - External memory object to be destroyed
    pub fn cuDestroyExternalMemory(extMem: CUexternalMemory) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Imports an external semaphore.
    ///
    /// Imports an externally allocated synchronization object and returns a handle to that in `extSem_out`.
    ///
    /// The properties of the handle being imported must be described in `semHandleDesc`. The CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC is defined as follows:
    ///
    /// where [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1acf32b96f55beec6f904b2455effed87d) specifies the type of handle being imported. [CUexternalSemaphoreHandleType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gafecb27c44dbd154273d24d35896a2920) is defined as:
    ///
    /// If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1acf32b96f55beec6f904b2455effed87d) is [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD`], then [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::fd](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a90b7304a1421d26bb064bf4e0b66b3ce) must be a valid file descriptor referencing a synchronization object. Ownership of the file descriptor is transferred to the CUDA driver when the handle is imported successfully. Performing any operations on the file descriptor after it is imported results in undefined behavior.
    ///
    /// If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1acf32b96f55beec6f904b2455effed87d) is [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32`], then exactly one of [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a460e285314871e0bcccada6ddf78bdd5) and [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a156f86d10677dbd7a943969cb9b3f7ea) must not be NULL. If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a460e285314871e0bcccada6ddf78bdd5) is not NULL, then it must represent a valid shared NT handle that references a synchronization object. Ownership of this handle is not transferred to CUDA after the import operation, so the application must release the handle using the appropriate system call. If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a156f86d10677dbd7a943969cb9b3f7ea) is not NULL, then it must name a valid synchronization object.
    ///
    /// If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1acf32b96f55beec6f904b2455effed87d) is [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT`], then [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a460e285314871e0bcccada6ddf78bdd5) must be non-NULL and [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a156f86d10677dbd7a943969cb9b3f7ea) must be NULL. The handle specified must be a globally shared KMT handle. This handle does not hold a reference to the underlying object, and thus will be invalid when all references to the synchronization object are destroyed.
    ///
    /// If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1acf32b96f55beec6f904b2455effed87d) is [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE`], then exactly one of [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a460e285314871e0bcccada6ddf78bdd5) and [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a156f86d10677dbd7a943969cb9b3f7ea) must not be NULL. If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a460e285314871e0bcccada6ddf78bdd5) is not NULL, then it must represent a valid shared NT handle that is returned by ID3D12Device::CreateSharedHandle when referring to a ID3D12Fence object. This handle holds a reference to the underlying object. If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a156f86d10677dbd7a943969cb9b3f7ea) is not NULL, then it must name a valid synchronization object that refers to a valid ID3D12Fence object.
    ///
    /// If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1acf32b96f55beec6f904b2455effed87d) is [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE`], then [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a460e285314871e0bcccada6ddf78bdd5) represents a valid shared NT handle that is returned by ID3D11Fence::CreateSharedHandle. If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a156f86d10677dbd7a943969cb9b3f7ea) is not NULL, then it must name a valid synchronization object that refers to a valid ID3D11Fence object.
    ///
    /// If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1acf32b96f55beec6f904b2455effed87d) is [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`], then [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::nvSciSyncObj](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1ab723f8210fdb7fe17b51cd9019ce109d) represents a valid NvSciSyncObj.
    ///
    /// [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX`], then [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a460e285314871e0bcccada6ddf78bdd5) represents a valid shared NT handle that is returned by IDXGIResource1::CreateSharedHandle when referring to a IDXGIKeyedMutex object. If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a156f86d10677dbd7a943969cb9b3f7ea) is not NULL, then it must name a valid synchronization object that refers to a valid IDXGIKeyedMutex object.
    ///
    /// If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1acf32b96f55beec6f904b2455effed87d) is [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT`], then [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a460e285314871e0bcccada6ddf78bdd5) represents a valid shared KMT handle that is returned by IDXGIResource::GetSharedHandle when referring to a IDXGIKeyedMutex object and [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a156f86d10677dbd7a943969cb9b3f7ea) must be NULL.
    ///
    /// If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1acf32b96f55beec6f904b2455effed87d) is [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD`], then [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::fd](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a90b7304a1421d26bb064bf4e0b66b3ce) must be a valid file descriptor referencing a synchronization object. Ownership of the file descriptor is transferred to the CUDA driver when the handle is imported successfully. Performing any operations on the file descriptor after it is imported results in undefined behavior.
    ///
    /// If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1acf32b96f55beec6f904b2455effed87d) is [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32`], then exactly one of [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a460e285314871e0bcccada6ddf78bdd5) and [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a156f86d10677dbd7a943969cb9b3f7ea) must not be NULL. If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a460e285314871e0bcccada6ddf78bdd5) is not NULL, then it must represent a valid shared NT handle that references a synchronization object. Ownership of this handle is not transferred to CUDA after the import operation, so the application must release the handle using the appropriate system call. If [CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__HANDLE__DESC__v1.html#structcuda__external__semaphore__handle__desc__v1_1a156f86d10677dbd7a943969cb9b3f7ea) is not NULL, then it must name a valid synchronization object.
    ///
    /// # Parameters
    ///
    /// - `extSem_out`: Returned handle to an external semaphore.
    /// - `semHandleDesc`: Semaphore import handle descriptor.
    pub fn cuImportExternalSemaphore(
        extSem_out: *mut CUexternalSemaphore,
        semHandleDesc: *const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Signals a set of external semaphore objects.
    ///
    /// Enqueues a signal operation on a set of externally allocated semaphore object in the specified stream. The operations will be executed when all prior operations in the stream complete.
    ///
    /// The exact semantics of signaling a semaphore depends on the type of the object.
    ///
    /// If the semaphore object is any one of the following types: [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT`] then signaling the semaphore will set it to the signaled state.
    ///
    /// If the semaphore object is any one of the following types: [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32`] then the semaphore will be set to the value specified in [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::fence::value](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__SIGNAL__PARAMS__v1.html#structcuda__external__semaphore__signal__params__v1_1acc09a37125bfd6f700e12983a22738e6).
    ///
    /// If the semaphore object is of the type [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`] this API sets [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::nvSciSync::fence](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__SIGNAL__PARAMS__v1.html#structcuda__external__semaphore__signal__params__v1_1aeeaaad5a8fe7b0313c18aa4cc0ee2560) to a value that can be used by subsequent waiters of the same NvSciSync object to order operations with those currently submitted in `stream`. Such an update will overwrite previous contents of [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::nvSciSync::fence](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__SIGNAL__PARAMS__v1.html#structcuda__external__semaphore__signal__params__v1_1aeeaaad5a8fe7b0313c18aa4cc0ee2560). By default, signaling such an external semaphore object causes appropriate memory synchronization operations to be performed over all external memory objects that are imported as [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`]. This ensures that any subsequent accesses made by other importers of the same set of NvSciBuf memory object(s) are coherent. These operations can be skipped by specifying the flag [`CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC`], which can be used as a performance optimization when data coherency is not required. But specifying this flag in scenarios where data coherency is required results in undefined behavior. Also, for semaphore object of the type [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`], if the NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags in [`cuDeviceGetNvSciSyncAttributes`] to CUDA_NVSCISYNC_ATTR_SIGNAL, this API will return [`CUresult::CUDA_ERROR_NOT_SUPPORTED`]. NvSciSyncFence associated with semaphore object of the type [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`] can be deterministic. For this the NvSciSyncAttrList used to create the semaphore object must have value of NvSciSyncAttrKey_RequireDeterministicFences key set to true. Deterministic fences allow users to enqueue a wait over the semaphore object even before corresponding signal is enqueued. For such a semaphore object, CUDA guarantees that each signal operation will increment the fence value by ‘1’. Users are expected to track count of signals enqueued on the semaphore object and insert waits accordingly. When such a semaphore object is signaled from multiple streams, due to concurrent stream execution, it is possible that the order in which the semaphore gets signaled is indeterministic. This could lead to waiters of the semaphore getting unblocked incorrectly. Users are expected to handle such situations, either by not using the same semaphore object with deterministic fence support enabled in different streams or by adding explicit dependency amongst such streams so that the semaphore is signaled in order. NvSciSyncFence associated with semaphore object of the type [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`] can be timestamp enabled. For this the NvSciSyncAttrList used to create the object must have the value of NvSciSyncAttrKey_WaiterRequireTimestamps key set to true. Timestamps are emitted asynchronously by the GPU and CUDA saves the GPU timestamp in the corresponding NvSciSyncFence at the time of signal on GPU. Users are expected to convert GPU clocks to CPU clocks using appropriate scaling functions. Users are expected to wait for the completion of the fence before extracting timestamp using appropriate NvSciSync APIs. Users are expected to ensure that there is only one outstanding timestamp enabled fence per CUDA-NvSciSync object at any point of time, failing which leads to undefined behavior. Extracting the timestamp before the corresponding fence is signalled could lead to undefined behavior. Timestamp extracted via appropriate NvSciSync API would be in microseconds.
    ///
    /// If the semaphore object is any one of the following types: [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT`] then the keyed mutex will be released with the key specified in ::CUDA_EXTERNAL_SEMAPHORE_PARAMS::params::keyedmutex::key.
    ///
    /// # Parameters
    ///
    /// - `extSemArray`: Set of external semaphores to be signaled.
    /// - `paramsArray`: Array of semaphore parameters.
    /// - `numExtSems`: Number of semaphores to signal.
    /// - `stream`: Stream to enqueue the signal operations in.
    pub fn cuSignalExternalSemaphoresAsync(
        extSemArray: *const CUexternalSemaphore,
        paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,
        numExtSems: ::core::ffi::c_uint,
        stream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Waits on a set of external semaphore objects.
    ///
    /// Enqueues a wait operation on a set of externally allocated semaphore object in the specified stream. The operations will be executed when all prior operations in the stream complete.
    ///
    /// The exact semantics of waiting on a semaphore depends on the type of the object.
    ///
    /// If the semaphore object is any one of the following types: [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT`] then waiting on the semaphore will wait until the semaphore reaches the signaled state. The semaphore will then be reset to the unsignaled state. Therefore for every signal operation, there can only be one wait operation.
    ///
    /// If the semaphore object is any one of the following types: [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32`] then waiting on the semaphore will wait until the value of the semaphore is greater than or equal to [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS::params::fence::value](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__WAIT__PARAMS__v1.html#structcuda__external__semaphore__wait__params__v1_1a88ca51398134e22437eedca531fcb420).
    ///
    /// If the semaphore object is of the type [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`] then, waiting on the semaphore will wait until the [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::nvSciSync::fence](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__SIGNAL__PARAMS__v1.html#structcuda__external__semaphore__signal__params__v1_1aeeaaad5a8fe7b0313c18aa4cc0ee2560) is signaled by the signaler of the NvSciSyncObj that was associated with this semaphore object. By default, waiting on such an external semaphore object causes appropriate memory synchronization operations to be performed over all external memory objects that are imported as [`CUexternalMemoryHandleType_enum::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`]. This ensures that any subsequent accesses made by other importers of the same set of NvSciBuf memory object(s) are coherent. These operations can be skipped by specifying the flag [`CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC`], which can be used as a performance optimization when data coherency is not required. But specifying this flag in scenarios where data coherency is required results in undefined behavior. Also, for semaphore object of the type [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`], if the NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags in [`cuDeviceGetNvSciSyncAttributes`] to CUDA_NVSCISYNC_ATTR_WAIT, this API will return [`CUresult::CUDA_ERROR_NOT_SUPPORTED`].
    ///
    /// If the semaphore object is any one of the following types: [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX`], [`CUexternalSemaphoreHandleType_enum::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT`] then the keyed mutex will be acquired when it is released with the key specified in [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS::params::keyedmutex::key](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__WAIT__PARAMS__v1.html#structcuda__external__semaphore__wait__params__v1_1a642d788e3027cd2677096b86b79f80ca) or until the timeout specified by [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS::params::keyedmutex::timeoutMs](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__EXTERNAL__SEMAPHORE__WAIT__PARAMS__v1.html#structcuda__external__semaphore__wait__params__v1_1a3cb25740325fda8d63d4cfeed7f52844) has lapsed. The timeout interval can either be a finite value specified in milliseconds or an infinite value. In case an infinite value is specified the timeout never elapses. The windows INFINITE macro must be used to specify infinite timeout.
    ///
    /// # Parameters
    ///
    /// - `extSemArray`: External semaphores to be waited on.
    /// - `paramsArray`: Array of semaphore parameters.
    /// - `numExtSems`: Number of semaphores to wait on.
    /// - `stream`: Stream to enqueue the wait operations in.
    pub fn cuWaitExternalSemaphoresAsync(
        extSemArray: *const CUexternalSemaphore,
        paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,
        numExtSems: ::core::ffi::c_uint,
        stream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys an external semaphore.
    ///
    /// Destroys an external semaphore object and releases any references to the underlying resource. Any outstanding signals or waits must have completed before the semaphore is destroyed.
    ///
    /// # Parameters
    ///
    /// - `extSem`: - External semaphore to be destroyed
    pub fn cuDestroyExternalSemaphore(extSem: CUexternalSemaphore) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Wait on a memory location
    ///
    /// Enqueues a synchronization of the stream on the given memory location. Work ordered after the operation will block until the given condition on the memory is satisfied. By default, the condition is to wait for (int32_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other condition types can be specified via `flags`.
    ///
    /// If the memory was registered via ::cuMemHostRegister(), the device pointer should be obtained with ::cuMemHostGetDevicePointer(). This function cannot be used with managed memory (::cuMemAllocManaged).
    ///
    /// Support for CU_STREAM_WAIT_VALUE_NOR can be queried with ::cuDeviceGetAttribute() and ::CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2.
    ///
    ///
    ///
    /// Note: Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_NOT_SUPPORTED
    ///
    ///
    ///
    /// See also: ::cuStreamWaitValue64, ::cuStreamWriteValue32, ::cuStreamWriteValue64, ::cuStreamBatchMemOp, ::cuMemHostRegister, ::cuStreamWaitEvent
    ///
    /// # Parameters
    ///
    /// - `stream`: The stream to synchronize on the memory location.
    /// - `addr`: The memory location to wait on.
    /// - `value`: The value to compare with the memory location.
    /// - `flags`: See ::CUstreamWaitValue_flags.
    pub fn cuStreamWaitValue32_v2(
        stream: CUstream,
        addr: CUdeviceptr,
        value: cuuint32_t,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Wait on a memory location
    ///
    /// Enqueues a synchronization of the stream on the given memory location. Work ordered after the operation will block until the given condition on the memory is satisfied. By default, the condition is to wait for (int64_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other condition types can be specified via `flags`.
    ///
    /// If the memory was registered via ::cuMemHostRegister(), the device pointer should be obtained with ::cuMemHostGetDevicePointer().
    ///
    /// Support for this can be queried with ::cuDeviceGetAttribute() and ::CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS.
    ///
    ///
    ///
    /// Note: Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_NOT_SUPPORTED
    ///
    ///
    ///
    /// See also: ::cuStreamWaitValue32, ::cuStreamWriteValue32, ::cuStreamWriteValue64, ::cuStreamBatchMemOp, ::cuMemHostRegister, ::cuStreamWaitEvent
    ///
    /// # Parameters
    ///
    /// - `stream`: The stream to synchronize on the memory location.
    /// - `addr`: The memory location to wait on.
    /// - `value`: The value to compare with the memory location.
    /// - `flags`: See ::CUstreamWaitValue_flags.
    pub fn cuStreamWaitValue64_v2(
        stream: CUstream,
        addr: CUdeviceptr,
        value: cuuint64_t,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Write a value to memory
    ///
    /// Write a value to memory.
    ///
    /// If the memory was registered via ::cuMemHostRegister(), the device pointer should be obtained with ::cuMemHostGetDevicePointer(). This function cannot be used with managed memory (::cuMemAllocManaged).
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_NOT_SUPPORTED
    ///
    ///
    ///
    /// See also: ::cuStreamWriteValue64, ::cuStreamWaitValue32, ::cuStreamWaitValue64, ::cuStreamBatchMemOp, ::cuMemHostRegister, ::cuEventRecord
    ///
    /// # Parameters
    ///
    /// - `stream`: The stream to do the write in.
    /// - `addr`: The device address to write to.
    /// - `value`: The value to write.
    /// - `flags`: See ::CUstreamWriteValue_flags.
    pub fn cuStreamWriteValue32_v2(
        stream: CUstream,
        addr: CUdeviceptr,
        value: cuuint32_t,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Write a value to memory
    ///
    /// Write a value to memory.
    ///
    /// If the memory was registered via ::cuMemHostRegister(), the device pointer should be obtained with ::cuMemHostGetDevicePointer().
    ///
    /// Support for this can be queried with ::cuDeviceGetAttribute() and ::CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_NOT_SUPPORTED
    ///
    ///
    ///
    /// See also: ::cuStreamWriteValue32, ::cuStreamWaitValue32, ::cuStreamWaitValue64, ::cuStreamBatchMemOp, ::cuMemHostRegister, ::cuEventRecord
    ///
    /// # Parameters
    ///
    /// - `stream`: The stream to do the write in.
    /// - `addr`: The device address to write to.
    /// - `value`: The value to write.
    /// - `flags`: See ::CUstreamWriteValue_flags.
    pub fn cuStreamWriteValue64_v2(
        stream: CUstream,
        addr: CUdeviceptr,
        value: cuuint64_t,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Batch operations to synchronize the stream via memory operations
    ///
    /// This is a batch version of ::cuStreamWaitValue32() and ::cuStreamWriteValue32(). Batching operations may avoid some performance overhead in both the API call and the device execution versus adding them to the stream in separate API calls. The operations are enqueued in the order they appear in the array.
    ///
    /// See ::CUstreamBatchMemOpType for the full set of supported operations, and ::cuStreamWaitValue32(), ::cuStreamWaitValue64(), ::cuStreamWriteValue32(), and ::cuStreamWriteValue64() for details of specific operations.
    ///
    /// See related APIs for details on querying support for specific operations.
    ///
    ///
    ///
    /// Note: Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_NOT_SUPPORTED
    ///
    ///
    ///
    /// See also: ::cuStreamWaitValue32, ::cuStreamWaitValue64, ::cuStreamWriteValue32, ::cuStreamWriteValue64, ::cuMemHostRegister
    ///
    /// # Parameters
    ///
    /// - `stream`: The stream to enqueue the operations in.
    /// - `count`: The number of operations in the array. Must be less than 256.
    /// - `paramArray`: The types and parameters of the individual operations.
    /// - `flags`: Reserved for future expansion; must be 0.
    pub fn cuStreamBatchMemOp_v2(
        stream: CUstream,
        count: ::core::ffi::c_uint,
        paramArray: *mut CUstreamBatchMemOpParams,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns information about a function.
    ///
    /// Returns in `*pi` the integer value of the attribute `attrib` on the kernel given by `hfunc`. The supported attributes are:
    ///
    /// With a few execeptions, function attributes may also be queried on unloaded function handles returned from [`cuModuleEnumerateFunctions`]. [`cudaError_enum::CUDA_ERROR_FUNCTION_NOT_LOADED`] is returned if the attribute requires a fully loaded function but the function is not loaded. The loading state of a function may be queried using ::cuFuncIsloaded. [`cuFuncLoad`] may be called to explicitly load a function before querying the following attributes that require the function to be loaded.
    ///
    /// # Parameters
    ///
    /// - `pi`: Returned attribute value.
    /// - `attrib`: Attribute requested.
    /// - `hfunc`: Function to query attribute of.
    pub fn cuFuncGetAttribute(
        pi: *mut ::core::ffi::c_int,
        attrib: CUfunction_attribute,
        hfunc: CUfunction,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets information about a function.
    ///
    /// This call sets the value of a specified attribute `attrib` on the kernel given by `hfunc` to an integer value specified by `val` This function returns [`CUresult::CUDA_SUCCESS`] if the new value of the attribute could be successfully set. If the set fails, this call will return an error. Not all attributes can have values set. Attempting to set a value on a read-only attribute will result in an error ([`CUresult::CUDA_ERROR_INVALID_VALUE`])
    ///
    /// Supported attributes for the cuFuncSetAttribute call are.
    ///
    /// # Parameters
    ///
    /// - `hfunc`: Function to query attribute of.
    /// - `attrib`: Attribute requested.
    /// - `value`: The value to set.
    pub fn cuFuncSetAttribute(
        hfunc: CUfunction,
        attrib: CUfunction_attribute,
        value: ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the preferred cache configuration for a device function.
    ///
    /// On devices where the L1 cache and shared memory use the same hardware resources, this sets through `config` the preferred cache configuration for the device function `hfunc`. This is only a preference. The driver will use the requested configuration if possible, but it is free to choose a different configuration if required to execute `hfunc`. Any context-wide preference set via [`cuCtxSetCacheConfig`] will be overridden by this per-function setting unless the per-function setting is [`CUfunc_cache_enum::CU_FUNC_CACHE_PREFER_NONE`]. In that case, the current context-wide setting will be used.
    ///
    /// This setting does nothing on devices where the size of the L1 cache and shared memory are fixed.
    ///
    /// Launching a kernel with a different preference than the most recent preference setting may insert a device-side synchronization point.
    ///
    /// The supported cache configurations are.
    ///
    /// # Parameters
    ///
    /// - `hfunc`: Kernel to configure cache for.
    /// - `config`: Requested cache configuration.
    pub fn cuFuncSetCacheConfig(hfunc: CUfunction, config: CUfunc_cache) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a module handle.
    ///
    /// Returns in `*hmod` the handle of the module that function `hfunc` is located in. The lifetime of the module corresponds to the lifetime of the context it was loaded in or until the module is explicitly unloaded.
    ///
    /// The CUDA runtime manages its own modules loaded into the primary context. If the handle returned by this API refers to a module loaded by the CUDA runtime, calling [`cuModuleUnload`] on that module will result in undefined behavior.
    ///
    /// # Parameters
    ///
    /// - `hmod`: Returned module handle.
    /// - `hfunc`: Function to retrieve module for.
    pub fn cuFuncGetModule(hmod: *mut CUmodule, hfunc: CUfunction) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the function name for a [`CUfunction`] handle.
    ///
    /// Returns in `**name` the function name associated with the function handle `hfunc`. The function name is returned as a null-terminated string. The returned name is only valid when the function handle is valid. If the module is unloaded or reloaded, one must call the API again to get the updated name. This API may return a mangled name if the function is not declared as having C linkage. If either `**name` or `hfunc` is NULL, [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] is returned.
    ///
    /// # Parameters
    ///
    /// - `name`: The returned name of the function.
    /// - `hfunc`: The function handle to retrieve the name for.
    pub fn cuFuncGetName(
        name: *mut *const ::core::ffi::c_char,
        hfunc: CUfunction,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the offset and size of a kernel parameter in the device-side parameter layout.
    ///
    /// Queries the kernel parameter at `paramIndex` into `func's` list of parameters, and returns in `paramOffset` and `paramSize` the offset and size, respectively, where the parameter will reside in the device-side parameter layout. This information can be used to update kernel node parameters from the device via ::cudaGraphKernelNodeSetParam() and ::cudaGraphKernelNodeUpdatesApply(). `paramIndex` must be less than the number of parameters that `func` takes. `paramSize` can be set to NULL if only the parameter offset is desired.
    ///
    /// # Parameters
    ///
    /// - `func`: The function to query.
    /// - `paramIndex`: The parameter index to query.
    /// - `paramOffset`: Returns the offset into the device-side parameter layout at which the parameter resides.
    /// - `paramSize`: Optionally returns the size of the parameter in the device-side parameter layout.
    pub fn cuFuncGetParamInfo(
        func: CUfunction,
        paramIndex: size_t,
        paramOffset: *mut size_t,
        paramSize: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the number of parameters used by the function.
    ///
    /// Queries the number of kernel parameters used by `func` and returns it in `paramCount`.
    ///
    /// # Parameters
    ///
    /// - `func`: The function to query.
    /// - `paramCount`: Returns the number of parameters used by the function.
    pub fn cuFuncGetParamCount(func: CUfunction, paramCount: *mut size_t) -> CUresult;
}
impl CUfunctionLoadingState_enum {
    /// The function has not yet been loaded onto the device.
    pub const CU_FUNCTION_LOADING_STATE_UNLOADED: CUfunctionLoadingState_enum = CUfunctionLoadingState_enum(
        0,
    );
    /// The function is loaded onto the device.
    pub const CU_FUNCTION_LOADING_STATE_LOADED: CUfunctionLoadingState_enum = CUfunctionLoadingState_enum(
        1,
    );
    /// End marker for native function-loading states.
    pub const CU_FUNCTION_LOADING_STATE_MAX: CUfunctionLoadingState_enum = CUfunctionLoadingState_enum(
        2,
    );
}
/// Whether the native code for a CUDA function has been loaded onto the device.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUfunctionLoadingState_enum(pub ::core::ffi::c_uint);
pub use self::CUfunctionLoadingState_enum as CUfunctionLoadingState;
singe_loader::functions! { crate::DRIVER;
    /// Returns if the function is loaded.
    ///
    /// Returns in `state` the loading state of `function`.
    ///
    /// # Parameters
    ///
    /// - `state`: returned loading state.
    /// - `function`: the function to check.
    pub fn cuFuncIsLoaded(
        state: *mut CUfunctionLoadingState,
        function: CUfunction,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Loads a function.
    ///
    /// Finalizes function loading for `function`. Calling this API with a fully loaded function has no effect.
    ///
    /// # Parameters
    ///
    /// - `function`: - the function to load
    pub fn cuFuncLoad(function: CUfunction) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Launches a CUDA function [`CUfunction`] or a CUDA kernel [`CUkernel`].
    ///
    /// Invokes the function [`CUfunction`] or the kernel [`CUkernel`] `f` on a `gridDimX` x `gridDimY` x `gridDimZ` grid of blocks. Each block contains `blockDimX` x `blockDimY` x `blockDimZ` threads.
    ///
    /// `sharedMemBytes` sets the amount of dynamic shared memory that will be available to each thread block.
    ///
    /// Kernel parameters to `f` can be specified in one of two ways:
    ///
    /// 1) Kernel parameters can be specified via `kernelParams`. If `f` has N parameters, then `kernelParams` needs to be an array of N pointers. Each of `kernelParams`\[0\] through `kernelParams`\[N-1\] must point to a region of memory from which the actual kernel parameter will be copied. The number of kernel parameters and their offsets and sizes do not need to be specified as that information is retrieved directly from the kernel’s image.
    ///
    /// 2) Kernel parameters can also be packaged by the application into a single buffer that is passed in via the `extra` parameter. This places the burden on the application of knowing each kernel parameter’s size and alignment/padding within the buffer. Here is an example of using the `extra` parameter in this manner:
    ///
    /// The `extra` parameter exists to allow [`cuLaunchKernel`] to take additional less commonly used arguments. `extra` specifies a list of names of extra settings and their corresponding values. Each extra setting name is immediately followed by the corresponding value. The list must be terminated with either NULL or [CU_LAUNCH_PARAM_END](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gad5c11cff5adfa5a69d66829399653532).
    ///
    /// The error [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] will be returned if kernel parameters are specified with both `kernelParams` and `extra` (i.e. both `kernelParams` and `extra` are non-NULL).
    ///
    /// Calling [`cuLaunchKernel`] invalidates the persistent function state set through the following deprecated APIs: [`cuFuncSetBlockShape`], [`cuFuncSetSharedSize`], [`cuParamSetSize`], [`cuParamSeti`], [`cuParamSetf`], [`cuParamSetv`].
    ///
    /// Note that to use [`cuLaunchKernel`], the kernel `f` must either have been compiled with toolchain version 3.2 or later so that it will contain kernel parameter information, or have no kernel parameters. If either of these conditions is not met, then [`cuLaunchKernel`] will return [`cudaError_enum::CUDA_ERROR_INVALID_IMAGE`].
    ///
    /// Note that the API can also be used to launch context-less kernel [`CUkernel`] by querying the handle using [`cuLibraryGetKernel`] and then passing it to the API by casting to [`CUfunction`]. Here, the context to launch the kernel on will either be taken from the specified stream `hStream` or the current context in case of NULL stream.
    ///
    /// # Parameters
    ///
    /// - `f`: Function [`CUfunction`] or Kernel [`CUkernel`] to launch.
    /// - `gridDimX`: Width of grid in blocks.
    /// - `gridDimY`: Height of grid in blocks.
    /// - `gridDimZ`: Depth of grid in blocks.
    /// - `blockDimX`: X dimension of each thread block.
    /// - `blockDimY`: Y dimension of each thread block.
    /// - `blockDimZ`: Z dimension of each thread block.
    /// - `sharedMemBytes`: Dynamic shared-memory size per thread block in bytes.
    /// - `hStream`: Stream identifier.
    /// - `kernelParams`: Array of pointers to kernel parameters.
    /// - `extra`: Extra options.
    pub fn cuLaunchKernel(
        f: CUfunction,
        gridDimX: ::core::ffi::c_uint,
        gridDimY: ::core::ffi::c_uint,
        gridDimZ: ::core::ffi::c_uint,
        blockDimX: ::core::ffi::c_uint,
        blockDimY: ::core::ffi::c_uint,
        blockDimZ: ::core::ffi::c_uint,
        sharedMemBytes: ::core::ffi::c_uint,
        hStream: CUstream,
        kernelParams: *mut *mut ::core::ffi::c_void,
        extra: *mut *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Launches a CUDA function [`CUfunction`] or a CUDA kernel [`CUkernel`] with launch-time configuration.
    ///
    /// Invokes the function [`CUfunction`] or the kernel [`CUkernel`] `f` with the specified launch-time configuration `config`.
    ///
    /// The [CUlaunchConfig](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUlaunchConfig.html#structculaunchconfig) structure is defined as:
    ///
    /// where:
    ///
    /// Launch-time configuration is specified by adding entries to [CUlaunchConfig::attrs](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUlaunchConfig.html#structculaunchconfig_1a89bd86e2a9d67c421d5ad9650e57f375). Each entry is an attribute ID and a corresponding attribute value.
    ///
    /// The [CUlaunchAttribute](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUlaunchAttribute.html#structculaunchattribute) structure is defined as:
    ///
    /// An example of using the `config` parameter:
    ///
    /// The [CUlaunchAttributeID](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga6f6565b334be6bb3134868e10bbdd331) enum is defined as:
    ///
    /// and the corresponding [CUlaunchAttributeValue](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/unionCUlaunchAttributeValue.html#unionculaunchattributevalue) union as :
    ///
    /// Setting [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_COOPERATIVE`] to a non-zero value causes the kernel launch to be a cooperative launch, with exactly the same usage and semantics of [`cuLaunchCooperativeKernel`].
    ///
    /// Setting [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION`] to a non-zero values causes the kernel to use programmatic means to resolve its stream dependency — enabling the CUDA runtime to opportunistically allow the grid’s execution to overlap with the previous kernel in the stream, if that kernel requests the overlap.
    ///
    /// [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT`] records an event along with the kernel launch. Event recorded through this launch attribute is guaranteed to only trigger after all block in the associated kernel trigger the event. A block can trigger the event through PTX launchdep.release or CUDA builtin function cudaTriggerProgrammaticLaunchCompletion(). A trigger can also be inserted at the beginning of each block’s execution if triggerAtBlockStart is set to non-0. Note that dependents (including the CPU thread calling [`cuEventSynchronize`]) are not guaranteed to observe the release precisely when it is released. For example, [`cuEventSynchronize`] may only observe the event trigger long after the associated kernel has completed. This recording type is primarily meant for establishing programmatic dependency between device tasks. The event supplied must not be an interprocess or interop event. The event must disable timing (i.e. created with [`CUevent_flags_enum::CU_EVENT_DISABLE_TIMING`] flag set).
    ///
    /// [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT`] records an event along with the kernel launch. Nominally, the event is triggered once all blocks of the kernel have begun execution. Currently this is a best effort. If a kernel B has a launch completion dependency on a kernel A, B may wait until A is complete. Alternatively, blocks of B may begin before all blocks of A have begun, for example:
    ///
    /// Exercise caution if such an ordering inversion could lead to deadlock. The event supplied must not be an interprocess or interop event. The event must disable timing (i.e. must be created with the [`CUevent_flags_enum::CU_EVENT_DISABLE_TIMING`] flag set).
    ///
    /// Setting [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE`] to 1 on a captured launch causes the resulting kernel node to be device-updatable. This attribute is specific to graphs, and passing it to a launch in a non-capturing stream results in an error. Passing a value other than 0 or 1 is not allowed.
    ///
    /// On success, a handle will be returned via ::CUlaunchAttributeValue::deviceUpdatableKernelNode::devNode which can be passed to the various device-side update functions to update the node’s kernel parameters from within another kernel. For more information on the types of device updates that can be made, as well as the relevant limitations thereof, see ::cudaGraphKernelNodeUpdatesApply.
    ///
    /// Kernel nodes which are device-updatable have additional restrictions compared to regular kernel nodes. Firstly, device-updatable nodes cannot be removed from their graph via [`cuGraphDestroyNode`]. Additionally, once opted-in to this functionality, a node cannot opt out, and any attempt to set the attribute to 0 will result in an error. Graphs containing one or more device-updatable node also do not allow multiple instantiation.
    ///
    /// [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION`] allows the kernel launch to specify a preferred substitute cluster dimension. Blocks may be grouped according to either the dimensions specified with this attribute (grouped into a “preferred substitute cluster”), or the one specified with [`CUlaunchAttributeID_enum::CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION`]
    ///
    /// attribute (grouped into a “regular
    ///
    /// cluster”). The cluster dimensions of a “preferred substitute cluster” shall be an integer multiple greater than zero of the regular cluster dimensions. The device will attempt - on a best-effort basis - to group thread blocks into preferred clusters over grouping them into regular clusters. When it deems necessary (primarily when the device temporarily runs out of physical resources to launch the larger preferred clusters), the device may switch to launch the regular clusters instead to attempt to utilize as much of the physical device resources as possible.
    ///
    /// Each type of cluster will have its enumeration / coordinate setup as if the grid consists solely of its type of cluster. For example, if the preferred substitute cluster dimensions double the regular cluster dimensions, there might be simultaneously a regular cluster indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and (3,0,0) and groups their blocks.
    ///
    /// This attribute will only take effect when a regular cluster dimension has been specified. The preferred substitute The preferred substitute cluster dimension must be an integer multiple greater than zero of the regular cluster dimension and must divide the grid. It must also be no more than `maxBlocksPerCluster`, if it is set in the kernel’s `__launch_bounds__`. Otherwise it must be less than the maximum value the driver can support. Otherwise, setting this attribute to a value physically unable to fit on any particular device is permitted.
    ///
    /// The effect of other attributes is consistent with their effect when set via persistent APIs.
    ///
    /// See [`cuStreamSetAttribute`] for
    ///
    /// See [`cuFuncSetAttribute`] for
    ///
    /// Kernel parameters to `f` can be specified in the same ways that they can be using [`cuLaunchKernel`].
    ///
    /// Note that the API can also be used to launch context-less kernel [`CUkernel`] by querying the handle using [`cuLibraryGetKernel`] and then passing it to the API by casting to [`CUfunction`]. Here, the context to launch the kernel on will either be taken from the specified stream [CUlaunchConfig::hStream](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUlaunchConfig.html#structculaunchconfig_1a8bbdd01ea0d4d380fad9e8be14fb928b) or the current context in case of NULL stream.
    ///
    /// # Parameters
    ///
    /// - `config`: Config to launch.
    /// - `f`: Function [`CUfunction`] or Kernel [`CUkernel`] to launch.
    /// - `kernelParams`: Array of pointers to kernel parameters.
    /// - `extra`: Extra options.
    pub fn cuLaunchKernelEx(
        config: *const CUlaunchConfig,
        f: CUfunction,
        kernelParams: *mut *mut ::core::ffi::c_void,
        extra: *mut *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Launches a CUDA function [`CUfunction`] or a CUDA kernel [`CUkernel`] where thread blocks can cooperate and synchronize as they execute.
    ///
    /// Invokes the function [`CUfunction`] or the kernel [`CUkernel`] `f` on a `gridDimX` x `gridDimY` x `gridDimZ` grid of blocks. Each block contains `blockDimX` x `blockDimY` x `blockDimZ` threads.
    ///
    /// `sharedMemBytes` sets the amount of dynamic shared memory that will be available to each thread block.
    ///
    /// The device on which this kernel is invoked must have a non-zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH`].
    ///
    /// The total number of blocks launched cannot exceed the maximum number of blocks per multiprocessor as returned by [`cuOccupancyMaxActiveBlocksPerMultiprocessor`] (or [`cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`]) times the number of multiprocessors as specified by the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`].
    ///
    /// The kernel cannot make use of CUDA dynamic parallelism.
    ///
    /// Kernel parameters must be specified via `kernelParams`. If `f` has N parameters, then `kernelParams` needs to be an array of N pointers. Each of `kernelParams`\[0\] through `kernelParams`\[N-1\] must point to a region of memory from which the actual kernel parameter will be copied. The number of kernel parameters and their offsets and sizes do not need to be specified as that information is retrieved directly from the kernel’s image.
    ///
    /// Calling [`cuLaunchCooperativeKernel`] sets persistent function state that is the same as function state set through [`cuLaunchKernel`] API
    ///
    /// When the kernel `f` is launched via [`cuLaunchCooperativeKernel`], the previous block shape, shared size and parameter info associated with `f` is overwritten.
    ///
    /// Note that to use [`cuLaunchCooperativeKernel`], the kernel `f` must either have been compiled with toolchain version 3.2 or later so that it will contain kernel parameter information, or have no kernel parameters. If either of these conditions is not met, then [`cuLaunchCooperativeKernel`] will return [`cudaError_enum::CUDA_ERROR_INVALID_IMAGE`].
    ///
    /// Note that the API can also be used to launch context-less kernel [`CUkernel`] by querying the handle using [`cuLibraryGetKernel`] and then passing it to the API by casting to [`CUfunction`]. Here, the context to launch the kernel on will either be taken from the specified stream `hStream` or the current context in case of NULL stream.
    ///
    /// # Parameters
    ///
    /// - `f`: Function [`CUfunction`] or Kernel [`CUkernel`] to launch.
    /// - `gridDimX`: Width of grid in blocks.
    /// - `gridDimY`: Height of grid in blocks.
    /// - `gridDimZ`: Depth of grid in blocks.
    /// - `blockDimX`: X dimension of each thread block.
    /// - `blockDimY`: Y dimension of each thread block.
    /// - `blockDimZ`: Z dimension of each thread block.
    /// - `sharedMemBytes`: Dynamic shared-memory size per thread block in bytes.
    /// - `hStream`: Stream identifier.
    /// - `kernelParams`: Array of pointers to kernel parameters.
    pub fn cuLaunchCooperativeKernel(
        f: CUfunction,
        gridDimX: ::core::ffi::c_uint,
        gridDimY: ::core::ffi::c_uint,
        gridDimZ: ::core::ffi::c_uint,
        blockDimX: ::core::ffi::c_uint,
        blockDimY: ::core::ffi::c_uint,
        blockDimZ: ::core::ffi::c_uint,
        sharedMemBytes: ::core::ffi::c_uint,
        hStream: CUstream,
        kernelParams: *mut *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Enqueues a host function call in a stream.
    ///
    /// Enqueues a host function to run in a stream. The function will be called after currently enqueued work and will block work added after it.
    ///
    /// The host function must not make any CUDA API calls. Attempting to use a CUDA API may result in [`cudaError_enum::CUDA_ERROR_NOT_PERMITTED`], but this is not required. The host function must not perform any synchronization that may depend on outstanding CUDA work not mandated to run earlier. Host functions without a mandated order (such as in independent streams) execute in undefined order and may be serialized.
    ///
    /// For the purposes of Unified Memory, execution makes a number of guarantees:
    ///
    /// Note that, in contrast to [`cuStreamAddCallback`], the function will not be called in the event of an error in the CUDA context.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Stream to enqueue function call in.
    /// - `fn_`: The function to call once preceding stream operations are complete.
    /// - `userData`: User-specified data to be passed to the function.
    pub fn cuLaunchHostFunc(
        hStream: CUstream,
        fn_: CUhostFn,
        userData: *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Enqueues a host function call in a stream.
    ///
    /// Enqueues a host function to run in a stream. The function will be called after currently enqueued work and will block work added after it.
    ///
    /// The host function must not make any CUDA API calls. Attempting to use a CUDA API may result in [`cudaError_enum::CUDA_ERROR_NOT_PERMITTED`], but this is not required. The host function must not perform any synchronization that may depend on outstanding CUDA work not mandated to run earlier. Host functions without a mandated order (such as in independent streams) execute in undefined order and may be serialized.
    ///
    /// For the purposes of Unified Memory, execution makes a number of guarantees:
    ///
    /// Note that, in contrast to [`cuStreamAddCallback`], the function will not be called in the event of an error in the CUDA context.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Stream to enqueue function call in.
    /// - `fn_`: The function to call once preceding stream operations are complete.
    /// - `userData`: User-specified data to be passed to the function.
    /// - `syncMode`: Synchronization mode for the host function.
    pub fn cuLaunchHostFunc_v2(
        hStream: CUstream,
        fn_: CUhostFn,
        userData: *mut ::core::ffi::c_void,
        syncMode: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the block-dimensions for the function.
    ///
    /// Specifies the `x`, `y`, and `z` dimensions of the thread blocks that are created when the kernel given by `hfunc` is launched.
    ///
    /// # Parameters
    ///
    /// - `hfunc`: Kernel to specify dimensions of.
    /// - `x`: X dimension.
    /// - `y`: Y dimension.
    /// - `z`: Z dimension.
    #[deprecated]
    pub fn cuFuncSetBlockShape(
        hfunc: CUfunction,
        x: ::core::ffi::c_int,
        y: ::core::ffi::c_int,
        z: ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the dynamic shared-memory size for the function.
    ///
    /// Sets through `bytes` the amount of dynamic shared memory that will be available to each thread block when the kernel given by `hfunc` is launched.
    ///
    /// # Parameters
    ///
    /// - `hfunc`: Kernel to specify dynamic shared-memory size for.
    /// - `bytes`: Dynamic shared-memory size per thread in bytes.
    #[deprecated]
    pub fn cuFuncSetSharedSize(
        hfunc: CUfunction,
        bytes: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the parameter size for the function.
    ///
    /// Sets through `numbytes` the total size in bytes needed by the function parameters of the kernel corresponding to `hfunc`.
    ///
    /// # Parameters
    ///
    /// - `hfunc`: Kernel to set parameter size for.
    /// - `numbytes`: Size of parameter list in bytes.
    #[deprecated]
    pub fn cuParamSetSize(hfunc: CUfunction, numbytes: ::core::ffi::c_uint) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Adds an integer parameter to the function’s argument list.
    ///
    /// Sets an integer parameter that will be specified the next time the kernel corresponding to `hfunc` will be invoked. `offset` is a byte offset.
    ///
    /// # Parameters
    ///
    /// - `hfunc`: Kernel to add parameter to.
    /// - `offset`: Offset to add parameter to argument list.
    /// - `value`: Value of parameter.
    #[deprecated]
    pub fn cuParamSeti(
        hfunc: CUfunction,
        offset: ::core::ffi::c_int,
        value: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Adds a floating-point parameter to the function’s argument list.
    ///
    /// Sets a floating-point parameter that will be specified the next time the kernel corresponding to `hfunc` will be invoked. `offset` is a byte offset.
    ///
    /// # Parameters
    ///
    /// - `hfunc`: Kernel to add parameter to.
    /// - `offset`: Offset to add parameter to argument list.
    /// - `value`: Value of parameter.
    #[deprecated]
    pub fn cuParamSetf(
        hfunc: CUfunction,
        offset: ::core::ffi::c_int,
        value: f32,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Adds arbitrary data to the function’s argument list.
    ///
    /// Copies an arbitrary amount of data (specified in `numbytes`) from `ptr` into the parameter space of the kernel corresponding to `hfunc`. `offset` is a byte offset.
    ///
    /// # Parameters
    ///
    /// - `hfunc`: Kernel to add data to.
    /// - `offset`: Offset to add data to argument list.
    /// - `ptr`: Pointer to arbitrary data.
    /// - `numbytes`: Size of data to copy in bytes.
    #[deprecated]
    pub fn cuParamSetv(
        hfunc: CUfunction,
        offset: ::core::ffi::c_int,
        ptr: *mut ::core::ffi::c_void,
        numbytes: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Launches a CUDA function.
    ///
    /// Invokes the kernel `f` on a 1 x 1 x 1 grid of blocks. The block contains the number of threads specified by a previous call to [`cuFuncSetBlockShape`].
    ///
    /// The block shape, dynamic shared memory size, and parameter information must be set using [`cuFuncSetBlockShape`], [`cuFuncSetSharedSize`], [`cuParamSetSize`], [`cuParamSeti`], [`cuParamSetf`], and [`cuParamSetv`] prior to calling this function.
    ///
    /// Launching a function via [`cuLaunchKernel`] invalidates the function’s block shape, dynamic shared memory size, and parameter information. After launching via cuLaunchKernel, this state must be re-initialized prior to calling this function. Failure to do so results in undefined behavior.
    ///
    /// # Parameters
    ///
    /// - `f`: - Kernel to launch
    #[deprecated]
    pub fn cuLaunch(f: CUfunction) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Launches a CUDA function.
    ///
    /// Invokes the kernel `f` on a `grid_width` x `grid_height` grid of blocks. Each block contains the number of threads specified by a previous call to [`cuFuncSetBlockShape`].
    ///
    /// The block shape, dynamic shared memory size, and parameter information must be set using [`cuFuncSetBlockShape`], [`cuFuncSetSharedSize`], [`cuParamSetSize`], [`cuParamSeti`], [`cuParamSetf`], and [`cuParamSetv`] prior to calling this function.
    ///
    /// Launching a function via [`cuLaunchKernel`] invalidates the function’s block shape, dynamic shared memory size, and parameter information. After launching via cuLaunchKernel, this state must be re-initialized prior to calling this function. Failure to do so results in undefined behavior.
    ///
    /// # Parameters
    ///
    /// - `f`: Kernel to launch.
    /// - `grid_width`: Width of grid in blocks.
    /// - `grid_height`: Height of grid in blocks.
    #[deprecated]
    pub fn cuLaunchGrid(
        f: CUfunction,
        grid_width: ::core::ffi::c_int,
        grid_height: ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Launches a CUDA function.
    ///
    /// Invokes the kernel `f` on a `grid_width` x `grid_height` grid of blocks. Each block contains the number of threads specified by a previous call to [`cuFuncSetBlockShape`].
    ///
    /// The block shape, dynamic shared memory size, and parameter information must be set using [`cuFuncSetBlockShape`], [`cuFuncSetSharedSize`], [`cuParamSetSize`], [`cuParamSeti`], [`cuParamSetf`], and [`cuParamSetv`] prior to calling this function.
    ///
    /// Launching a function via [`cuLaunchKernel`] invalidates the function’s block shape, dynamic shared memory size, and parameter information. After launching via cuLaunchKernel, this state must be re-initialized prior to calling this function. Failure to do so results in undefined behavior.
    ///
    /// # Parameters
    ///
    /// - `f`: Kernel to launch.
    /// - `grid_width`: Width of grid in blocks.
    /// - `grid_height`: Height of grid in blocks.
    /// - `hStream`: Stream identifier.
    #[deprecated]
    pub fn cuLaunchGridAsync(
        f: CUfunction,
        grid_width: ::core::ffi::c_int,
        grid_height: ::core::ffi::c_int,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Launches CUDA functions on multiple devices where thread blocks can cooperate and synchronize as they execute.
    ///
    /// Invokes kernels as specified in the `launchParamsList` array where each element of the array specifies all the parameters required to perform a single kernel launch. These kernels can cooperate and synchronize as they execute. The size of the array is specified by `numDevices`.
    ///
    /// No two kernels can be launched on the same device. All the devices targeted by this multi-device launch must be identical. All devices must have a non-zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH`].
    ///
    /// All kernels launched must be identical with respect to the compiled code. Note that any **device**, **constant** or **managed** variables present in the module that owns the kernel launched on each device, are independently instantiated on every device. It is the application’s responsibility to ensure these variables are initialized and used appropriately.
    ///
    /// The size of the grids as specified in blocks, the size of the blocks themselves and the amount of shared memory used by each thread block must also match across all launched kernels.
    ///
    /// The streams used to launch these kernels must have been created via either [`cuStreamCreate`] or [`cuStreamCreateWithPriority`]. The NULL stream or [CU_STREAM_LEGACY](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gaa53e8210837f039dd6434a3a4c3324aa) or [CU_STREAM_PER_THREAD](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga02e40b82600f62c42ed29abb150f857c) cannot be used.
    ///
    /// The total number of blocks launched per kernel cannot exceed the maximum number of blocks per multiprocessor as returned by [`cuOccupancyMaxActiveBlocksPerMultiprocessor`] (or [`cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`]) times the number of multiprocessors as specified by the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`]. Since the total number of blocks launched per device has to match across all devices, the maximum number of blocks that can be launched per device will be limited by the device with the least number of multiprocessors.
    ///
    /// The kernels cannot make use of CUDA dynamic parallelism.
    ///
    /// The CUDA_LAUNCH_PARAMS structure is defined as:
    ///
    /// By default, the kernel won’t begin execution on any GPU until all prior work in all the specified streams has completed. This behavior can be overridden by specifying the flag [`CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC`]. When this flag is specified, each kernel will only wait for prior work in the stream corresponding to that GPU to complete before it begins execution.
    ///
    /// Similarly, by default, any subsequent work pushed in any of the specified streams will not begin execution until the kernels on all GPUs have completed. This behavior can be overridden by specifying the flag [`CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC`]. When this flag is specified, any subsequent work pushed in any of the specified streams will only wait for the kernel launched on the GPU corresponding to that stream to complete before it begins execution.
    ///
    /// Calling [`cuLaunchCooperativeKernelMultiDevice`] sets persistent function state that is the same as function state set through [`cuLaunchKernel`] API when called individually for each element in `launchParamsList`.
    ///
    /// When kernels are launched via [`cuLaunchCooperativeKernelMultiDevice`], the previous block shape, shared size and parameter info associated with each [CUDA_LAUNCH_PARAMS::function](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__LAUNCH__PARAMS__v1.html#structcuda__launch__params__v1_1aad25005328ba7debf0f5bd2d39a5363c) in `launchParamsList` is overwritten.
    ///
    /// Note that to use [`cuLaunchCooperativeKernelMultiDevice`], the kernels must either have been compiled with toolchain version 3.2 or later so that it will contain kernel parameter information, or have no kernel parameters. If either of these conditions is not met, then [`cuLaunchCooperativeKernelMultiDevice`] will return [`cudaError_enum::CUDA_ERROR_INVALID_IMAGE`].
    ///
    /// # Parameters
    ///
    /// - `launchParamsList`: List of launch parameters, one per device.
    /// - `numDevices`: Size of the `launchParamsList` array.
    /// - `flags`: Flags to control launch behavior.
    #[deprecated]
    pub fn cuLaunchCooperativeKernelMultiDevice(
        launchParamsList: *mut CUDA_LAUNCH_PARAMS,
        numDevices: ::core::ffi::c_uint,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Adds a texture-reference to the function’s argument list.
    ///
    /// Makes the CUDA array or linear memory bound to the texture reference `hTexRef` available to a device program as a texture. In this version of CUDA, the texture-reference must be obtained via [`cuModuleGetTexRef`] and the `texunit` parameter must be set to [`CU_PARAM_TR_DEFAULT`].
    ///
    /// # Parameters
    ///
    /// - `hfunc`: Kernel to add texture-reference to.
    /// - `texunit`: Texture unit (must be [`CU_PARAM_TR_DEFAULT`]).
    /// - `hTexRef`: Texture-reference to add to argument list.
    #[deprecated]
    pub fn cuParamSetTexRef(
        hfunc: CUfunction,
        texunit: ::core::ffi::c_int,
        hTexRef: CUtexref,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the shared memory configuration for a device function.
    ///
    /// On devices with configurable shared memory banks, this function will force all subsequent launches of the specified device function to have the given shared memory bank size configuration. On any given launch of the function, the shared memory configuration of the device will be temporarily changed if needed to suit the function’s preferred configuration. Changes in shared memory configuration between subsequent launches of functions, may introduce a device side synchronization point.
    ///
    /// Any per-function setting of shared memory bank size set via [`cuFuncSetSharedMemConfig`] will override the context wide setting set with [`cuCtxSetSharedMemConfig`].
    ///
    /// Changing the shared memory bank size will not increase shared memory usage or affect occupancy of kernels, but may have major effects on performance. Larger bank sizes will allow for greater potential bandwidth to shared memory, but will change what kinds of accesses to shared memory will result in bank conflicts.
    ///
    /// This function will do nothing on devices with fixed shared memory bank size.
    ///
    /// The supported bank configurations are.
    ///
    /// # Parameters
    ///
    /// - `hfunc`: kernel to be given a shared memory config.
    /// - `config`: requested shared memory configuration.
    #[deprecated]
    pub fn cuFuncSetSharedMemConfig(
        hfunc: CUfunction,
        config: CUsharedconfig,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a graph.
    ///
    /// Creates an empty graph, which is returned via `phGraph`.
    ///
    /// # Parameters
    ///
    /// - `phGraph`: Returns newly created graph.
    /// - `flags`: Graph creation flags, must be 0.
    pub fn cuGraphCreate(phGraph: *mut CUgraph, flags: ::core::ffi::c_uint) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a kernel execution node and adds it to a graph
    ///
    /// Creates a new kernel execution node and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies` and arguments specified in `nodeParams`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// The CUDA_KERNEL_NODE_PARAMS structure is defined as:
    ///
    ///
    ///
    ///
    ///
    /// ```text
    ///   typedef struct CUDA_KERNEL_NODE_PARAMS_st {
    ///       CUfunction func;
    ///       unsigned int gridDimX;
    ///       unsigned int gridDimY;
    ///       unsigned int gridDimZ;
    ///       unsigned int blockDimX;
    ///       unsigned int blockDimY;
    ///       unsigned int blockDimZ;
    ///       unsigned int sharedMemBytes;
    ///       void **kernelParams;
    ///       void **extra;
    ///       CUkernel kern;
    ///       CUcontext ctx;
    ///   } CUDA_KERNEL_NODE_PARAMS;
    /// ```
    ///
    /// When the graph is launched, the node will invoke kernel `func` on a (`gridDimX` x `gridDimY` x `gridDimZ)` grid of blocks. Each block contains (`blockDimX` x `blockDimY` x `blockDimZ)` threads.
    ///
    /// `sharedMemBytes` sets the amount of dynamic shared memory that will be available to each thread block.
    ///
    /// Kernel parameters to `func` can be specified in one of two ways:
    ///
    /// 1) Kernel parameters can be specified via `kernelParams`. If the kernel has N parameters, then `kernelParams` needs to be an array of N pointers. Each pointer, from `kernelParams\[0\]` to `kernelParams\[N-1\]`, points to the region of memory from which the actual parameter will be copied. The number of kernel parameters and their offsets and sizes do not need to be specified as that information is retrieved directly from the kernel's image.
    ///
    /// 2) Kernel parameters for non-cooperative kernels can also be packaged by the application into a single buffer that is passed in via `extra`. This places the burden on the application of knowing each kernel parameter's size and alignment/padding within the buffer. The `extra` parameter exists to allow this function to take additional less commonly used arguments. `extra` specifies a list of names of extra settings and their corresponding values. Each extra setting name is immediately followed by the corresponding value. The list must be terminated with either NULL or CU_LAUNCH_PARAM_END.
    ///
    /// - ::CU_LAUNCH_PARAM_END, which indicates the end of the `extra` array;
    /// - ::CU_LAUNCH_PARAM_BUFFER_POINTER, which specifies that the next value in `extra` will be a pointer to a buffer containing all the kernel parameters for launching kernel `func`;
    /// - ::CU_LAUNCH_PARAM_BUFFER_SIZE, which specifies that the next value in `extra` will be a pointer to a size_t containing the size of the buffer specified with ::CU_LAUNCH_PARAM_BUFFER_POINTER;
    ///
    /// The error ::CUDA_ERROR_INVALID_VALUE will be returned if kernel parameters are specified with both `kernelParams` and `extra` (i.e. both `kernelParams` and `extra` are non-NULL). ::CUDA_ERROR_INVALID_VALUE will be returned if `extra` is used for a cooperative kernel.
    ///
    /// The `kernelParams` or `extra` array, as well as the argument values it points to, are copied during this call.
    ///
    ///
    ///
    /// Note: Kernels launched using graphs must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphAddNode, ::cuLaunchKernel, ::cuLaunchCooperativeKernel, ::cuGraphKernelNodeGetParams, ::cuGraphKernelNodeSetParams, ::cuGraphCreate, ::cuGraphDestroyNode, ::cuGraphAddChildGraphNode, ::cuGraphAddEmptyNode, ::cuGraphAddHostNode, ::cuGraphAddMemcpyNode, ::cuGraphAddMemsetNode
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: - Returns newly created node
    /// - `hGraph`: - Graph to which to add the node
    /// - `dependencies`: - Dependencies of the node
    /// - `numDependencies`: - Number of dependencies
    /// - `nodeParams`: - Parameters for the GPU execution node
    pub fn cuGraphAddKernelNode_v2(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a kernel node's parameters
    ///
    /// Returns the parameters of kernel node `hNode` in `nodeParams`. The `kernelParams` or `extra` array returned in `nodeParams`, as well as the argument values it points to, are owned by the node. This memory remains valid until the node is destroyed or its parameters are modified, and should not be modified directly. Use ::cuGraphKernelNodeSetParams to update the parameters of this node.
    ///
    /// The params will contain either `kernelParams` or `extra`, according to which of these was most recently set on the node.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphNodeGetParams, ::cuLaunchKernel, ::cuGraphAddKernelNode, ::cuGraphKernelNodeSetParams
    ///
    /// # Parameters
    ///
    /// - `hNode`: - Node to get the parameters for
    /// - `nodeParams`: - Pointer to return the parameters
    pub fn cuGraphKernelNodeGetParams_v2(
        hNode: CUgraphNode,
        nodeParams: *mut CUDA_KERNEL_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets a kernel node's parameters
    ///
    /// Sets the parameters of kernel node `hNode` to `nodeParams`.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_OUT_OF_MEMORY
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphNodeSetParams, ::cuLaunchKernel, ::cuGraphAddKernelNode, ::cuGraphKernelNodeGetParams
    ///
    /// # Parameters
    ///
    /// - `hNode`: - Node to set the parameters for
    /// - `nodeParams`: - Parameters to copy
    pub fn cuGraphKernelNodeSetParams_v2(
        hNode: CUgraphNode,
        nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a memcpy node and adds it to a graph.
    ///
    /// Creates a new memcpy node and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// When the graph is launched, the node will perform the memcpy described by `copyParams`. See cuMemcpy3D() for a description of the structure and its restrictions.
    ///
    /// Memcpy nodes have some additional restrictions with regards to managed memory, if the system contains at least one device which has a zero value for the device attribute [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`]. If one or more of the operands refer to managed memory, then using the memory type [`CUmemorytype_enum::CU_MEMORYTYPE_UNIFIED`] is disallowed for those operand(s). The managed memory will be treated as residing on either the host or the device, depending on which memory type is specified.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    /// - `copyParams`: Parameters for the memory copy.
    /// - `ctx`: Context on which to run the node.
    pub fn cuGraphAddMemcpyNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        copyParams: *const CUDA_MEMCPY3D,
        ctx: CUcontext,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a memcpy node’s parameters.
    ///
    /// Returns the parameters of memcpy node `hNode` in `nodeParams`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the parameters for.
    /// - `nodeParams`: Pointer to return the parameters.
    pub fn cuGraphMemcpyNodeGetParams(
        hNode: CUgraphNode,
        nodeParams: *mut CUDA_MEMCPY3D,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets a memcpy node’s parameters.
    ///
    /// Sets the parameters of memcpy node `hNode` to `nodeParams`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to set the parameters for.
    /// - `nodeParams`: Parameters to copy.
    pub fn cuGraphMemcpyNodeSetParams(
        hNode: CUgraphNode,
        nodeParams: *const CUDA_MEMCPY3D,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a memset node and adds it to a graph.
    ///
    /// Creates a new memset node and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// The element size must be 1, 2, or 4 bytes. When the graph is launched, the node will perform the memset described by `memsetParams`.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    /// - `memsetParams`: Parameters for the memory set.
    /// - `ctx`: Context on which to run the node.
    pub fn cuGraphAddMemsetNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        memsetParams: *const CUDA_MEMSET_NODE_PARAMS,
        ctx: CUcontext,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a memset node’s parameters.
    ///
    /// Returns the parameters of memset node `hNode` in `nodeParams`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the parameters for.
    /// - `nodeParams`: Pointer to return the parameters.
    pub fn cuGraphMemsetNodeGetParams(
        hNode: CUgraphNode,
        nodeParams: *mut CUDA_MEMSET_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets a memset node’s parameters.
    ///
    /// Sets the parameters of memset node `hNode` to `nodeParams`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to set the parameters for.
    /// - `nodeParams`: Parameters to copy.
    pub fn cuGraphMemsetNodeSetParams(
        hNode: CUgraphNode,
        nodeParams: *const CUDA_MEMSET_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a host execution node and adds it to a graph.
    ///
    /// Creates a new CPU execution node and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies` and arguments specified in `nodeParams`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// When the graph is launched, the node will invoke the specified CPU function. Host nodes are not supported under MPS with pre-Volta GPUs.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    /// - `nodeParams`: Parameters for the host node.
    pub fn cuGraphAddHostNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        nodeParams: *const CUDA_HOST_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a host node’s parameters.
    ///
    /// Returns the parameters of host node `hNode` in `nodeParams`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the parameters for.
    /// - `nodeParams`: Pointer to return the parameters.
    pub fn cuGraphHostNodeGetParams(
        hNode: CUgraphNode,
        nodeParams: *mut CUDA_HOST_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets a host node’s parameters.
    ///
    /// Sets the parameters of host node `hNode` to `nodeParams`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to set the parameters for.
    /// - `nodeParams`: Parameters to copy.
    pub fn cuGraphHostNodeSetParams(
        hNode: CUgraphNode,
        nodeParams: *const CUDA_HOST_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a child graph node and adds it to a graph.
    ///
    /// Creates a new node which executes an embedded graph, and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// If `childGraph` contains allocation nodes, free nodes, or conditional nodes, this call will return an error.
    ///
    /// The node executes an embedded child graph. The child graph is cloned in this call.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    /// - `childGraph`: The graph to clone into this node.
    pub fn cuGraphAddChildGraphNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        childGraph: CUgraph,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets a handle to the embedded graph of a child graph node.
    ///
    /// Gets a handle to the embedded graph in a child graph node. This call does not clone the graph. Changes to the graph will be reflected in the node, and the node retains ownership of the graph.
    ///
    /// Allocation and free nodes cannot be added to the returned graph. Attempting to do so will return an error.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the embedded graph for.
    /// - `phGraph`: Location to store a handle to the graph.
    pub fn cuGraphChildGraphNodeGetGraph(
        hNode: CUgraphNode,
        phGraph: *mut CUgraph,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates an empty node and adds it to a graph.
    ///
    /// Creates a new node which performs no operation, and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// An empty node performs no operation during execution, but can be used for transitive ordering. For example, a phased execution graph with 2 groups of n nodes with a barrier between them can be represented using an empty node and 2\*n dependency edges, rather than no empty node and n^2 dependency edges.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    pub fn cuGraphAddEmptyNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates an event record node and adds it to a graph.
    ///
    /// Creates a new event record node and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies` and event specified in `event`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// Each launch of the graph will record `event` to capture execution of the node’s dependencies.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    /// - `event`: Event for the node.
    pub fn cuGraphAddEventRecordNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        event: CUevent,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the event associated with an event record node.
    ///
    /// Returns the event of event record node `hNode` in `event_out`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the event for.
    /// - `event_out`: Pointer to return the event.
    pub fn cuGraphEventRecordNodeGetEvent(
        hNode: CUgraphNode,
        event_out: *mut CUevent,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets an event record node’s event.
    ///
    /// Sets the event of event record node `hNode` to `event`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to set the event for.
    /// - `event`: Event to use.
    pub fn cuGraphEventRecordNodeSetEvent(
        hNode: CUgraphNode,
        event: CUevent,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates an event wait node and adds it to a graph.
    ///
    /// Creates a new event wait node and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies` and event specified in `event`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// The graph node will wait for all work captured in `event`. See [`cuEventRecord`] for details on what is captured by an event. `event` may be from a different context or device than the launch stream.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    /// - `event`: Event for the node.
    pub fn cuGraphAddEventWaitNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        event: CUevent,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the event associated with an event wait node.
    ///
    /// Returns the event of event wait node `hNode` in `event_out`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the event for.
    /// - `event_out`: Pointer to return the event.
    pub fn cuGraphEventWaitNodeGetEvent(
        hNode: CUgraphNode,
        event_out: *mut CUevent,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets an event wait node’s event.
    ///
    /// Sets the event of event wait node `hNode` to `event`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to set the event for.
    /// - `event`: Event to use.
    pub fn cuGraphEventWaitNodeSetEvent(hNode: CUgraphNode, event: CUevent) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates an external semaphore signal node and adds it to a graph.
    ///
    /// Creates a new external semaphore signal node and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies` and arguments specified in `nodeParams`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// Performs a signal operation on a set of externally allocated semaphore objects when the node is launched. The operation(s) will occur after all of the node’s dependencies have completed.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    /// - `nodeParams`: Parameters for the node.
    pub fn cuGraphAddExternalSemaphoresSignalNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns an external semaphore signal node’s parameters.
    ///
    /// Returns the parameters of an external semaphore signal node `hNode` in `params_out`. The `extSemArray` and `paramsArray` returned in `params_out`, are owned by the node. This memory remains valid until the node is destroyed or its parameters are modified, and should not be modified directly. Use [`cuGraphExternalSemaphoresSignalNodeSetParams`] to update the parameters of this node.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the parameters for.
    /// - `params_out`: Pointer to return the parameters.
    pub fn cuGraphExternalSemaphoresSignalNodeGetParams(
        hNode: CUgraphNode,
        params_out: *mut CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets an external semaphore signal node’s parameters.
    ///
    /// Sets the parameters of an external semaphore signal node `hNode` to `nodeParams`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to set the parameters for.
    /// - `nodeParams`: Parameters to copy.
    pub fn cuGraphExternalSemaphoresSignalNodeSetParams(
        hNode: CUgraphNode,
        nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates an external semaphore wait node and adds it to a graph.
    ///
    /// Creates a new external semaphore wait node and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies` and arguments specified in `nodeParams`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// Performs a wait operation on a set of externally allocated semaphore objects when the node is launched. The node’s dependencies will not be launched until the wait operation has completed.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    /// - `nodeParams`: Parameters for the node.
    pub fn cuGraphAddExternalSemaphoresWaitNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns an external semaphore wait node’s parameters.
    ///
    /// Returns the parameters of an external semaphore wait node `hNode` in `params_out`. The `extSemArray` and `paramsArray` returned in `params_out`, are owned by the node. This memory remains valid until the node is destroyed or its parameters are modified, and should not be modified directly. Use [`cuGraphExternalSemaphoresSignalNodeSetParams`] to update the parameters of this node.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the parameters for.
    /// - `params_out`: Pointer to return the parameters.
    pub fn cuGraphExternalSemaphoresWaitNodeGetParams(
        hNode: CUgraphNode,
        params_out: *mut CUDA_EXT_SEM_WAIT_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets an external semaphore wait node’s parameters.
    ///
    /// Sets the parameters of an external semaphore wait node `hNode` to `nodeParams`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to set the parameters for.
    /// - `nodeParams`: Parameters to copy.
    pub fn cuGraphExternalSemaphoresWaitNodeSetParams(
        hNode: CUgraphNode,
        nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a batch memory operation node and adds it to a graph.
    ///
    /// Creates a new batch memory operation node and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies` and arguments specified in `nodeParams`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// When the node is added, the paramArray inside `nodeParams` is copied and therefore it can be freed after the call returns.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    /// - `nodeParams`: Parameters for the node.
    pub fn cuGraphAddBatchMemOpNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a batch mem op node’s parameters.
    ///
    /// Returns the parameters of batch mem op node `hNode` in `nodeParams_out`. The `paramArray` returned in `nodeParams_out` is owned by the node. This memory remains valid until the node is destroyed or its parameters are modified, and should not be modified directly. Use [`cuGraphBatchMemOpNodeSetParams`] to update the parameters of this node.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the parameters for.
    /// - `nodeParams_out`: Pointer to return the parameters.
    pub fn cuGraphBatchMemOpNodeGetParams(
        hNode: CUgraphNode,
        nodeParams_out: *mut CUDA_BATCH_MEM_OP_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets a batch mem op node’s parameters.
    ///
    /// Sets the parameters of batch mem op node `hNode` to `nodeParams`.
    ///
    /// The paramArray inside `nodeParams` is copied and therefore it can be freed after the call returns.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to set the parameters for.
    /// - `nodeParams`: Parameters to copy.
    pub fn cuGraphBatchMemOpNodeSetParams(
        hNode: CUgraphNode,
        nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the parameters for a batch mem op node in the given graphExec.
    ///
    /// Sets the parameters of a batch mem op node in an executable graph `hGraphExec`. The node is identified by the corresponding node `hNode` in the non-executable graph, from which the executable graph was instantiated.
    ///
    /// The following fields on operations may be modified on an executable graph:
    ///
    /// op.waitValue.address op.waitValue.value\[64\] op.waitValue.flags bits corresponding to wait type (i.e. [`CUstreamWaitValue_flags::CU_STREAM_WAIT_VALUE_FLUSH`] bit cannot be modified) op.writeValue.address op.writeValue.value\[64\]
    ///
    /// Other fields, such as the context, count or type of operations, and other types of operations such as membars, may not be modified.
    ///
    /// `hNode` must not have been removed from the original graph.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. `hNode` is also not modified by this call.
    ///
    /// The paramArray inside `nodeParams` is copied and therefore it can be freed after the call returns.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to set the specified node.
    /// - `hNode`: Batch mem op node from the graph from which graphExec was instantiated.
    /// - `nodeParams`: Updated Parameters to set.
    pub fn cuGraphExecBatchMemOpNodeSetParams(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates an allocation node and adds it to a graph.
    ///
    /// Creates a new allocation node and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies` and arguments specified in `nodeParams`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// When [`cuGraphAddMemAllocNode`] creates an allocation node, it returns the address of the allocation in `nodeParams.dptr`. The allocation’s address remains fixed across instantiations and launches.
    ///
    /// If the allocation is freed in the same graph, by creating a free node using [`cuGraphAddMemFreeNode`], the allocation can be accessed by nodes ordered after the allocation node but before the free node. These allocations cannot be freed outside the owning graph, and they can only be freed once in the owning graph.
    ///
    /// If the allocation is not freed in the same graph, then it can be accessed not only by nodes in the graph which are ordered after the allocation node, but also by stream operations ordered after the graph’s execution but before the allocation is freed.
    ///
    /// Allocations which are not freed in the same graph can be freed by:
    ///
    /// It is not possible to free an allocation in both the owning graph and another graph. If the allocation is freed in the same graph, a free node cannot be added to another graph. If the allocation is freed in another graph, a free node can no longer be added to the owning graph.
    ///
    /// The following restrictions apply to graphs which contain allocation and/or memory free nodes.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    /// - `nodeParams`: Parameters for the node.
    pub fn cuGraphAddMemAllocNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        nodeParams: *mut CUDA_MEM_ALLOC_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a memory alloc node’s parameters.
    ///
    /// Returns the parameters of a memory alloc node `hNode` in `params_out`. The `poolProps` and `accessDescs` returned in `params_out`, are owned by the node. This memory remains valid until the node is destroyed. The returned parameters must not be modified.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the parameters for.
    /// - `params_out`: Pointer to return the parameters.
    pub fn cuGraphMemAllocNodeGetParams(
        hNode: CUgraphNode,
        params_out: *mut CUDA_MEM_ALLOC_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a memory free node and adds it to a graph.
    ///
    /// Creates a new memory free node and adds it to `hGraph` with `numDependencies` dependencies specified via `dependencies` and arguments specified in `nodeParams`. It is possible for `numDependencies` to be 0, in which case the node will be placed at the root of the graph. `dependencies` may not have any duplicate entries. A handle to the new node will be returned in `phGraphNode`.
    ///
    /// [`cuGraphAddMemFreeNode`] will return [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] if the user attempts to free:
    ///
    /// The following restrictions apply to graphs which contain allocation and/or memory free nodes.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `numDependencies`: Number of dependencies.
    /// - `dptr`: Address of memory to free.
    pub fn cuGraphAddMemFreeNode(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        numDependencies: size_t,
        dptr: CUdeviceptr,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a memory free node’s parameters.
    ///
    /// Returns the address of a memory free node `hNode` in `dptr_out`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the parameters for.
    /// - `dptr_out`: Pointer to return the device address.
    pub fn cuGraphMemFreeNodeGetParams(
        hNode: CUgraphNode,
        dptr_out: *mut CUdeviceptr,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Free unused memory that was cached on the specified device for use with graphs back to the OS.
    ///
    /// Blocks which are not in use by a graph that is either currently executing or scheduled to execute are freed back to the operating system.
    ///
    /// # Parameters
    ///
    /// - `device`: - The device for which cached memory should be freed.
    pub fn cuDeviceGraphMemTrim(device: CUdevice) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Query asynchronous allocation attributes related to graphs.
    ///
    /// Valid attributes are.
    ///
    /// # Parameters
    ///
    /// - `device`: Specifies the scope of the query.
    /// - `attr`: attribute to get.
    /// - `value`: retrieved value.
    pub fn cuDeviceGetGraphMemAttribute(
        device: CUdevice,
        attr: CUgraphMem_attribute,
        value: *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Set asynchronous allocation attributes related to graphs.
    ///
    /// Valid attributes are.
    ///
    /// # Parameters
    ///
    /// - `device`: Specifies the scope of the query.
    /// - `attr`: attribute to get.
    /// - `value`: pointer to value to set.
    pub fn cuDeviceSetGraphMemAttribute(
        device: CUdevice,
        attr: CUgraphMem_attribute,
        value: *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Clones a graph.
    ///
    /// This function creates a copy of `originalGraph` and returns it in `phGraphClone`. All parameters are copied into the cloned graph. The original graph may be modified after this call without affecting the clone.
    ///
    /// Child graph nodes in the original graph are recursively copied into the clone.
    ///
    /// # Parameters
    ///
    /// - `phGraphClone`: Returns newly created cloned graph.
    /// - `originalGraph`: Graph to clone.
    pub fn cuGraphClone(phGraphClone: *mut CUgraph, originalGraph: CUgraph) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Finds a cloned version of a node.
    ///
    /// This function returns the node in `hClonedGraph` corresponding to `hOriginalNode` in the original graph.
    ///
    /// `hClonedGraph` must have been cloned from `hOriginalGraph` via [`cuGraphClone`]. `hOriginalNode` must have been in `hOriginalGraph` at the time of the call to [`cuGraphClone`], and the corresponding cloned node in `hClonedGraph` must not have been removed. The cloned node is then returned via `phClonedNode`.
    ///
    /// # Parameters
    ///
    /// - `phNode`: Returns handle to the cloned node.
    /// - `hOriginalNode`: Handle to the original node.
    /// - `hClonedGraph`: Cloned graph to query.
    pub fn cuGraphNodeFindInClone(
        phNode: *mut CUgraphNode,
        hOriginalNode: CUgraphNode,
        hClonedGraph: CUgraph,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a node’s type.
    ///
    /// Returns the node type of `hNode` in `type`.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to query.
    /// - `type_`: Pointer to return the node type.
    pub fn cuGraphNodeGetType(
        hNode: CUgraphNode,
        type_: *mut CUgraphNodeType,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the graph that contains a given graph node.
    ///
    /// Returns the graph that contains `hNode` in `*phGraph`. If `hNode` is in a child graph, the child graph it is in is returned.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to query.
    pub fn cuGraphNodeGetContainingGraph(
        hNode: CUgraphNode,
        phGraph: *mut CUgraph,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the local node id of a given graph node.
    ///
    /// Returns the node id of `hNode` in `*nodeId`. The nodeId matches that referenced by [`cuGraphDebugDotPrint`]. The local nodeId and graphId together can uniquely identify the node.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to query.
    /// - `nodeId`: Pointer to return the nodeId.
    pub fn cuGraphNodeGetLocalId(
        hNode: CUgraphNode,
        nodeId: *mut ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns an id used by tools to identify a given node.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to query.
    pub fn cuGraphNodeGetToolsId(
        hNode: CUgraphNode,
        toolsNodeId: *mut ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the id of a given graph.
    ///
    /// Returns the id of `hGraph` in `*graphId`. The value in `*graphId` will match that referenced by [`cuGraphDebugDotPrint`].
    ///
    /// # Parameters
    ///
    /// - `hGraph`: Graph to query.
    pub fn cuGraphGetId(hGraph: CUgraph, graphId: *mut ::core::ffi::c_uint) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the id of a given graph exec.
    ///
    /// Returns the id of `hGraphExec` in `*graphId`. The value in `*graphId` will match that referenced by [`cuGraphDebugDotPrint`].
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: Graph to query.
    pub fn cuGraphExecGetId(
        hGraphExec: CUgraphExec,
        graphId: *mut ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a graph’s nodes.
    ///
    /// Returns a list of `hGraph's` nodes. `nodes` may be NULL, in which case this function will return the number of nodes in `numNodes`. Otherwise, `numNodes` entries will be filled in. If `numNodes` is higher than the actual number of nodes, the remaining entries in `nodes` will be set to NULL, and the number of nodes actually obtained will be returned in `numNodes`.
    ///
    /// # Parameters
    ///
    /// - `hGraph`: Graph to query.
    /// - `nodes`: Pointer to return the nodes.
    /// - `numNodes`: See description.
    pub fn cuGraphGetNodes(
        hGraph: CUgraph,
        nodes: *mut CUgraphNode,
        numNodes: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a graph’s root nodes.
    ///
    /// Returns a list of `hGraph's` root nodes. `rootNodes` may be NULL, in which case this function will return the number of root nodes in `numRootNodes`. Otherwise, `numRootNodes` entries will be filled in. If `numRootNodes` is higher than the actual number of root nodes, the remaining entries in `rootNodes` will be set to NULL, and the number of nodes actually obtained will be returned in `numRootNodes`.
    ///
    /// # Parameters
    ///
    /// - `hGraph`: Graph to query.
    /// - `rootNodes`: Pointer to return the root nodes.
    /// - `numRootNodes`: See description.
    pub fn cuGraphGetRootNodes(
        hGraph: CUgraph,
        rootNodes: *mut CUgraphNode,
        numRootNodes: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a graph's dependency edges
    ///
    /// Returns a list of `hGraph's` dependency edges. Edges are returned via corresponding indices in `from`, `to` and `edgeData`; that is, the node in `to\[i\]` has a dependency on the node in `from\[i\]` with data `edgeData\[i\]`. `from` and `to` may both be NULL, in which case this function only returns the number of edges in `numEdges`. Otherwise, `numEdges` entries will be filled in. If `numEdges` is higher than the actual number of edges, the remaining entries in `from` and `to` will be set to NULL, and the number of edges actually returned will be written to `numEdges`. `edgeData` may alone be NULL, in which case the edges must all have default (zeroed) edge data. Attempting a lossy query via NULL `edgeData` will result in ::CUDA_ERROR_LOSSY_QUERY. If `edgeData` is non-NULL then `from` and `to` must be as well.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_LOSSY_QUERY, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphGetNodes, ::cuGraphGetRootNodes, ::cuGraphAddDependencies, ::cuGraphRemoveDependencies, ::cuGraphNodeGetDependencies, ::cuGraphNodeGetDependentNodes
    ///
    /// # Parameters
    ///
    /// - `hGraph`: - Graph to get the edges from
    /// - `from`: - Location to return edge endpoints
    /// - `to`: - Location to return edge endpoints
    /// - `edgeData`: - Optional location to return edge data
    /// - `numEdges`: - See description
    pub fn cuGraphGetEdges_v2(
        hGraph: CUgraph,
        from: *mut CUgraphNode,
        to: *mut CUgraphNode,
        edgeData: *mut CUgraphEdgeData,
        numEdges: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a node's dependencies
    ///
    /// Returns a list of `node's` dependencies. `dependencies` may be NULL, in which case this function will return the number of dependencies in `numDependencies`. Otherwise, `numDependencies` entries will be filled in. If `numDependencies` is higher than the actual number of dependencies, the remaining entries in `dependencies` will be set to NULL, and the number of nodes actually obtained will be returned in `numDependencies`.
    ///
    /// Note that if an edge has non-zero (non-default) edge data and `edgeData` is NULL, this API will return ::CUDA_ERROR_LOSSY_QUERY. If `edgeData` is non-NULL, then `dependencies` must be as well.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_LOSSY_QUERY, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphNodeGetDependentNodes, ::cuGraphGetNodes, ::cuGraphGetRootNodes, ::cuGraphGetEdges, ::cuGraphAddDependencies, ::cuGraphRemoveDependencies
    ///
    /// # Parameters
    ///
    /// - `hNode`: - Node to query
    /// - `dependencies`: - Pointer to return the dependencies
    /// - `edgeData`: - Optional array to return edge data for each dependency
    /// - `numDependencies`: - See description
    pub fn cuGraphNodeGetDependencies_v2(
        hNode: CUgraphNode,
        dependencies: *mut CUgraphNode,
        edgeData: *mut CUgraphEdgeData,
        numDependencies: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a node's dependent nodes
    ///
    /// Returns a list of `node's` dependent nodes. `dependentNodes` may be NULL, in which case this function will return the number of dependent nodes in `numDependentNodes`. Otherwise, `numDependentNodes` entries will be filled in. If `numDependentNodes` is higher than the actual number of dependent nodes, the remaining entries in `dependentNodes` will be set to NULL, and the number of nodes actually obtained will be returned in `numDependentNodes`.
    ///
    /// Note that if an edge has non-zero (non-default) edge data and `edgeData` is NULL, this API will return ::CUDA_ERROR_LOSSY_QUERY.  If `edgeData` is non-NULL, then `dependentNodes` must be as well.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_LOSSY_QUERY, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphNodeGetDependencies, ::cuGraphGetNodes, ::cuGraphGetRootNodes, ::cuGraphGetEdges, ::cuGraphAddDependencies, ::cuGraphRemoveDependencies
    ///
    /// # Parameters
    ///
    /// - `hNode`: - Node to query
    /// - `dependentNodes`: - Pointer to return the dependent nodes
    /// - `edgeData`: - Optional pointer to return edge data for dependent nodes
    /// - `numDependentNodes`: - See description
    pub fn cuGraphNodeGetDependentNodes_v2(
        hNode: CUgraphNode,
        dependentNodes: *mut CUgraphNode,
        edgeData: *mut CUgraphEdgeData,
        numDependentNodes: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Adds dependency edges to a graph
    ///
    /// The number of dependencies to be added is defined by `numDependencies` Elements in `from` and `to` at corresponding indices define a dependency. Each node in `from` and `to` must belong to `hGraph`.
    ///
    /// If `numDependencies` is 0, elements in `from` and `to` will be ignored. Specifying an existing dependency will return an error.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphRemoveDependencies, ::cuGraphGetEdges, ::cuGraphNodeGetDependencies, ::cuGraphNodeGetDependentNodes
    ///
    /// # Parameters
    ///
    /// - `hGraph`: - Graph to which dependencies are added
    /// - `from`: - Array of nodes that provide the dependencies
    /// - `to`: - Array of dependent nodes
    /// - `edgeData`: - Optional array of edge data. If NULL, default (zeroed) edge data is assumed.
    /// - `numDependencies`: - Number of dependencies to be added
    pub fn cuGraphAddDependencies_v2(
        hGraph: CUgraph,
        from: *const CUgraphNode,
        to: *const CUgraphNode,
        edgeData: *const CUgraphEdgeData,
        numDependencies: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Removes dependency edges from a graph
    ///
    /// The number of `dependencies` to be removed is defined by `numDependencies`. Elements in `from` and `to` at corresponding indices define a dependency. Each node in `from` and `to` must belong to `hGraph`.
    ///
    /// If `numDependencies` is 0, elements in `from` and `to` will be ignored. Specifying an edge that does not exist in the graph, with data matching `edgeData`, results in an error. `edgeData` is nullable, which is equivalent to passing default (zeroed) data for each edge.
    ///
    /// Dependencies cannot be removed from graphs which contain allocation or free nodes. Any attempt to do so will return an error.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphAddDependencies, ::cuGraphGetEdges, ::cuGraphNodeGetDependencies, ::cuGraphNodeGetDependentNodes
    ///
    /// # Parameters
    ///
    /// - `hGraph`: - Graph from which to remove dependencies
    /// - `from`: - Array of nodes that provide the dependencies
    /// - `to`: - Array of dependent nodes
    /// - `edgeData`: - Optional array of edge data. If NULL, edge data is assumed to be default (zeroed).
    /// - `numDependencies`: - Number of dependencies to be removed
    pub fn cuGraphRemoveDependencies_v2(
        hGraph: CUgraph,
        from: *const CUgraphNode,
        to: *const CUgraphNode,
        edgeData: *const CUgraphEdgeData,
        numDependencies: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Remove a node from the graph.
    ///
    /// Removes `hNode` from its graph. This operation also severs any dependencies of other nodes on `hNode` and vice versa.
    ///
    /// Nodes which belong to a graph which contains allocation or free nodes cannot be destroyed. Any attempt to do so will return an error.
    ///
    /// # Parameters
    ///
    /// - `hNode`: - Node to remove
    pub fn cuGraphDestroyNode(hNode: CUgraphNode) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates an executable graph from a graph
    ///
    /// Instantiates `hGraph` as an executable graph. The graph is validated for any structural constraints or intra-node constraints which were not previously validated. If instantiation is successful, a handle to the instantiated graph is returned in `phGraphExec`.
    ///
    /// The `flags` parameter controls the behavior of instantiation and subsequent graph launches.  Valid flags are:
    ///
    /// - ::CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH, which configures a graph containing memory allocation nodes to automatically free any unfreed memory allocations before the graph is relaunched.
    ///
    /// - ::CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH, which configures the graph for launch from the device. If this flag is passed, the executable graph handle returned can be used to launch the graph from both the host and device. This flag can only be used on platforms which support unified addressing. This flag cannot be used in conjunction with ::CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH.
    ///
    /// - ::CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY, which causes the graph to use the priorities from the per-node attributes rather than the priority of the launch stream during execution. Note that priorities are only available on kernel nodes, and are copied from stream priority during stream capture.
    ///
    /// If `hGraph` contains any allocation or free nodes, there can be at most one executable graph in existence for that graph at a time. An attempt to instantiate a second executable graph before destroying the first with ::cuGraphExecDestroy will result in an error. The same also applies if `hGraph` contains any device-updatable kernel nodes.
    ///
    /// If `hGraph` contains kernels which call device-side cudaGraphLaunch() from multiple contexts, this will result in an error.
    ///
    /// Graphs instantiated for launch on the device have additional restrictions which do not apply to host graphs:
    ///
    /// - The graph's nodes must reside on a single context.
    /// - The graph can only contain kernel nodes, memcpy nodes, memset nodes, and child graph nodes.
    /// - The graph cannot be empty and must contain at least one kernel, memcpy, or memset node. Operation-specific restrictions are outlined below.
    /// - Kernel nodes:
    /// - Use of CUDA Dynamic Parallelism is not permitted.
    /// - Cooperative launches are permitted as long as MPS is not in use.
    /// - Memcpy nodes:
    /// - Only copies involving device memory and/or pinned device-mapped host memory are permitted.
    /// - Copies involving CUDA arrays are not permitted.
    /// - Both operands must be accessible from the current context, and the current context must match the context of other nodes in the graph.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphInstantiate, ::cuGraphCreate, ::cuGraphUpload, ::cuGraphLaunch, ::cuGraphExecDestroy
    ///
    /// # Parameters
    ///
    /// - `phGraphExec`: - Returns instantiated graph
    /// - `hGraph`: - Graph to instantiate
    /// - `flags`: - Flags to control instantiation.  See ::CUgraphInstantiate_flags.
    pub fn cuGraphInstantiateWithFlags(
        phGraphExec: *mut CUgraphExec,
        hGraph: CUgraph,
        flags: ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates an executable graph from a graph.
    ///
    /// Instantiates `hGraph` as an executable graph according to the `instantiateParams` structure. The graph is validated for any structural constraints or intra-node constraints which were not previously validated. If instantiation is successful, a handle to the instantiated graph is returned in `phGraphExec`.
    ///
    /// `instantiateParams` controls the behavior of instantiation and subsequent graph launches, as well as returning more detailed information in the event of an error. [CUDA_GRAPH_INSTANTIATE_PARAMS](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__GRAPH__INSTANTIATE__PARAMS.html#structcuda__graph__instantiate__params) is defined as:
    ///
    /// The `flags` field controls the behavior of instantiation and subsequent graph launches. Valid flags are:
    ///
    /// If `hGraph` contains any allocation or free nodes, there can be at most one executable graph in existence for that graph at a time. An attempt to instantiate a second executable graph before destroying the first with [`cuGraphExecDestroy`] will result in an error. The same also applies if `hGraph` contains any device-updatable kernel nodes.
    ///
    /// If `hGraph` contains kernels which call device-side cudaGraphLaunch() from multiple contexts, this will result in an error.
    ///
    /// Graphs instantiated for launch on the device have additional restrictions which do not apply to host graphs:
    ///
    /// In the event of an error, the `result_out` and `hErrNode_out` fields will contain more information about the nature of the error. Possible error reporting includes:
    ///
    /// If instantiation is successful, `result_out` will be set to [`CUgraphInstantiateResult_enum::CUDA_GRAPH_INSTANTIATE_SUCCESS`], and `hErrNode_out` will be set to NULL.
    ///
    /// # Parameters
    ///
    /// - `phGraphExec`: Returns instantiated graph.
    /// - `hGraph`: Graph to instantiate.
    /// - `instantiateParams`: Instantiation parameters.
    pub fn cuGraphInstantiateWithParams(
        phGraphExec: *mut CUgraphExec,
        hGraph: CUgraph,
        instantiateParams: *mut CUDA_GRAPH_INSTANTIATE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Query the instantiation flags of an executable graph.
    ///
    /// Returns the flags that were passed to instantiation for the given executable graph. [`CUgraphInstantiate_flags_enum::CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD`] will not be returned by this API as it does not affect the resulting executable graph.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph to query.
    /// - `flags`: Returns the instantiation flags.
    pub fn cuGraphExecGetFlags(
        hGraphExec: CUgraphExec,
        flags: *mut cuuint64_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the parameters for a kernel node in the given graphExec
    ///
    /// Sets the parameters of a kernel node in an executable graph `hGraphExec`. The node is identified by the corresponding node `hNode` in the non-executable graph, from which the executable graph was instantiated.
    ///
    /// `hNode` must not have been removed from the original graph. All `nodeParams` fields may change, but the following restrictions apply to `func` updates:
    ///
    /// - The owning context of the function cannot change.
    /// - A node whose function originally did not use CUDA dynamic parallelism cannot be updated to a function which uses CDP
    /// - A node whose function originally did not make device-side update calls cannot be updated to a function which makes device-side update calls.
    /// - If `hGraphExec` was not instantiated for device launch, a node whose function originally did not use device-side cudaGraphLaunch() cannot be updated to a function which uses device-side cudaGraphLaunch() unless the node resides on the same context as nodes which contained such calls at instantiate-time. If no such calls were present at instantiation, these updates cannot be performed at all.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. `hNode` is also not modified by this call.
    ///
    /// If `hNode` is a device-updatable kernel node, the next upload/launch of `hGraphExec` will overwrite any previous device-side updates. Additionally, applying host updates to a device-updatable kernel node while it is being updated from the device will result in undefined behavior.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE,
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphExecNodeSetParams, ::cuGraphAddKernelNode, ::cuGraphKernelNodeSetParams, ::cuGraphExecMemcpyNodeSetParams, ::cuGraphExecMemsetNodeSetParams, ::cuGraphExecHostNodeSetParams, ::cuGraphExecChildGraphNodeSetParams, ::cuGraphExecEventRecordNodeSetEvent, ::cuGraphExecEventWaitNodeSetEvent, ::cuGraphExecExternalSemaphoresSignalNodeSetParams, ::cuGraphExecExternalSemaphoresWaitNodeSetParams, ::cuGraphExecUpdate, ::cuGraphInstantiate
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: - The executable graph in which to set the specified node
    /// - `hNode`: - kernel node from the graph from which graphExec was instantiated
    /// - `nodeParams`: - Updated Parameters to set
    pub fn cuGraphExecKernelNodeSetParams_v2(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the parameters for a memcpy node in the given graphExec.
    ///
    /// Updates the work represented by `hNode` in `hGraphExec` as though `hNode` had contained `copyParams` at instantiation. hNode must remain in the graph which was used to instantiate `hGraphExec`. Changed edges to and from hNode are ignored.
    ///
    /// The source and destination memory in `copyParams` must be allocated from the same contexts as the original source and destination memory. Both the instantiation-time memory operands and the memory operands in `copyParams` must be 1-dimensional. Zero-length operations are not supported.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. hNode is also not modified by this call.
    ///
    /// Returns [`CUresult::CUDA_ERROR_INVALID_VALUE`] if the memory operands’ mappings changed or either the original or new memory operands are multidimensional.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to set the specified node.
    /// - `hNode`: Memcpy node from the graph which was used to instantiate graphExec.
    /// - `copyParams`: The updated parameters to set.
    /// - `ctx`: Context on which to run the node.
    pub fn cuGraphExecMemcpyNodeSetParams(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        copyParams: *const CUDA_MEMCPY3D,
        ctx: CUcontext,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the parameters for a memset node in the given graphExec.
    ///
    /// Updates the work represented by `hNode` in `hGraphExec` as though `hNode` had contained `memsetParams` at instantiation. hNode must remain in the graph which was used to instantiate `hGraphExec`. Changed edges to and from hNode are ignored.
    ///
    /// Zero sized operations are not supported.
    ///
    /// The new destination pointer in memsetParams must be to the same kind of allocation as the original destination pointer and have the same context association and device mapping as the original destination pointer.
    ///
    /// Both the value and pointer address may be updated.
    ///
    /// Changing other aspects of the memset (width, height, element size or pitch) may cause the update to be rejected. Specifically, for 2d memsets, all dimension changes are rejected. For 1d memsets, changes in height are explicitly rejected and other changes are opportunistically allowed if the resulting work maps onto the work resources already allocated for the node.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. hNode is also not modified by this call.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to set the specified node.
    /// - `hNode`: Memset node from the graph which was used to instantiate graphExec.
    /// - `memsetParams`: The updated parameters to set.
    /// - `ctx`: Context on which to run the node.
    pub fn cuGraphExecMemsetNodeSetParams(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        memsetParams: *const CUDA_MEMSET_NODE_PARAMS,
        ctx: CUcontext,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the parameters for a host node in the given graphExec.
    ///
    /// Updates the work represented by `hNode` in `hGraphExec` as though `hNode` had contained `nodeParams` at instantiation. hNode must remain in the graph which was used to instantiate `hGraphExec`. Changed edges to and from hNode are ignored.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. hNode is also not modified by this call.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to set the specified node.
    /// - `hNode`: Host node from the graph which was used to instantiate graphExec.
    /// - `nodeParams`: The updated parameters to set.
    pub fn cuGraphExecHostNodeSetParams(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        nodeParams: *const CUDA_HOST_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Updates node parameters in the child graph node in the given graphExec.
    ///
    /// Updates the work represented by `hNode` in `hGraphExec` as though the nodes contained in `hNode's` graph had the parameters contained in `childGraph's` nodes at instantiation. `hNode` must remain in the graph which was used to instantiate `hGraphExec`. Changed edges to and from `hNode` are ignored.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. `hNode` is also not modified by this call.
    ///
    /// The topology of `childGraph`, as well as the node insertion order, must match that of the graph contained in `hNode`. See cuGraphExecUpdate() for a list of restrictions on what can be updated in an instantiated graph. The update is recursive, so child graph nodes contained within the top level child graph will also be updated.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to set the specified node.
    /// - `hNode`: Host node from the graph which was used to instantiate graphExec.
    /// - `childGraph`: The graph supplying the updated parameters.
    pub fn cuGraphExecChildGraphNodeSetParams(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        childGraph: CUgraph,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the event for an event record node in the given graphExec.
    ///
    /// Sets the event of an event record node in an executable graph `hGraphExec`. The node is identified by the corresponding node `hNode` in the non-executable graph, from which the executable graph was instantiated.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. `hNode` is also not modified by this call.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to set the specified node.
    /// - `hNode`: event record node from the graph from which graphExec was instantiated.
    /// - `event`: Updated event to use.
    pub fn cuGraphExecEventRecordNodeSetEvent(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        event: CUevent,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the event for an event wait node in the given graphExec.
    ///
    /// Sets the event of an event wait node in an executable graph `hGraphExec`. The node is identified by the corresponding node `hNode` in the non-executable graph, from which the executable graph was instantiated.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. `hNode` is also not modified by this call.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to set the specified node.
    /// - `hNode`: event wait node from the graph from which graphExec was instantiated.
    /// - `event`: Updated event to use.
    pub fn cuGraphExecEventWaitNodeSetEvent(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        event: CUevent,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the parameters for an external semaphore signal node in the given graphExec.
    ///
    /// Sets the parameters of an external semaphore signal node in an executable graph `hGraphExec`. The node is identified by the corresponding node `hNode` in the non-executable graph, from which the executable graph was instantiated.
    ///
    /// `hNode` must not have been removed from the original graph.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. `hNode` is also not modified by this call.
    ///
    /// Changing `nodeParams->numExtSems` is not supported.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to set the specified node.
    /// - `hNode`: semaphore signal node from the graph from which graphExec was instantiated.
    /// - `nodeParams`: Updated Parameters to set.
    pub fn cuGraphExecExternalSemaphoresSignalNodeSetParams(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the parameters for an external semaphore wait node in the given graphExec.
    ///
    /// Sets the parameters of an external semaphore wait node in an executable graph `hGraphExec`. The node is identified by the corresponding node `hNode` in the non-executable graph, from which the executable graph was instantiated.
    ///
    /// `hNode` must not have been removed from the original graph.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. `hNode` is also not modified by this call.
    ///
    /// Changing `nodeParams->numExtSems` is not supported.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to set the specified node.
    /// - `hNode`: semaphore wait node from the graph from which graphExec was instantiated.
    /// - `nodeParams`: Updated Parameters to set.
    pub fn cuGraphExecExternalSemaphoresWaitNodeSetParams(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Enables or disables the specified node in the given graphExec.
    ///
    /// Sets `hNode` to be either enabled or disabled. Disabled nodes are functionally equivalent to empty nodes until they are reenabled. Existing node parameters are not affected by disabling/enabling the node.
    ///
    /// The node is identified by the corresponding node `hNode` in the non-executable graph, from which the executable graph was instantiated.
    ///
    /// `hNode` must not have been removed from the original graph.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. `hNode` is also not modified by this call.
    ///
    /// If `hNode` is a device-updatable kernel node, the next upload/launch of `hGraphExec` will overwrite any previous device-side updates. Additionally, applying host updates to a device-updatable kernel node while it is being updated from the device will result in undefined behavior.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to set the specified node.
    /// - `hNode`: Node from the graph from which graphExec was instantiated.
    /// - `isEnabled`: Node is enabled if != 0, otherwise the node is disabled.
    pub fn cuGraphNodeSetEnabled(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        isEnabled: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Query whether a node in the given graphExec is enabled.
    ///
    /// Sets isEnabled to 1 if `hNode` is enabled, or 0 if `hNode` is disabled.
    ///
    /// The node is identified by the corresponding node `hNode` in the non-executable graph, from which the executable graph was instantiated.
    ///
    /// `hNode` must not have been removed from the original graph.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to set the specified node.
    /// - `hNode`: Node from the graph from which graphExec was instantiated.
    /// - `isEnabled`: Location to return the enabled status of the node.
    pub fn cuGraphNodeGetEnabled(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        isEnabled: *mut ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Uploads an executable graph in a stream.
    ///
    /// Uploads `hGraphExec` to the device in `hStream` without executing it. Uploads of the same `hGraphExec` will be serialized. Each upload is ordered behind both any previous work in `hStream` and any previous launches of `hGraphExec`. Uses memory cached by `stream` to back the allocations owned by `hGraphExec`.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: Executable graph to upload.
    /// - `hStream`: Stream in which to upload the graph.
    pub fn cuGraphUpload(hGraphExec: CUgraphExec, hStream: CUstream) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Launches an executable graph in a stream.
    ///
    /// Executes `hGraphExec` in `hStream`. Only one instance of `hGraphExec` may be executing at a time. Each launch is ordered behind both any previous work in `hStream` and any previous launches of `hGraphExec`. To execute a graph concurrently, it must be instantiated multiple times into multiple executable graphs.
    ///
    /// If any allocations created by `hGraphExec` remain unfreed (from a previous launch) and `hGraphExec` was not instantiated with [`CUgraphInstantiate_flags_enum::CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`], the launch will fail with [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`].
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: Executable graph to launch.
    /// - `hStream`: Stream in which to launch the graph.
    pub fn cuGraphLaunch(hGraphExec: CUgraphExec, hStream: CUstream) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys an executable graph.
    ///
    /// Destroys the executable graph specified by `hGraphExec`, as well as all of its executable nodes. If the executable graph is in-flight, it will not be terminated, but rather freed asynchronously on completion.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: - Executable graph to destroy
    pub fn cuGraphExecDestroy(hGraphExec: CUgraphExec) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys a graph.
    ///
    /// Destroys the graph specified by `hGraph`, as well as all of its nodes.
    ///
    /// # Parameters
    ///
    /// - `hGraph`: - Graph to destroy
    pub fn cuGraphDestroy(hGraph: CUgraph) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Check whether an executable graph can be updated with a graph and perform the update if possible
    ///
    /// Updates the node parameters in the instantiated graph specified by `hGraphExec` with the node parameters in a topologically identical graph specified by `hGraph`.
    ///
    /// Limitations:
    ///
    /// - Kernel nodes:
    /// - The owning context of the function cannot change.
    /// - A node whose function originally did not use CUDA dynamic parallelism cannot be updated to a function which uses CDP.
    /// - A node whose function originally did not make device-side update calls cannot be updated to a function which makes device-side update calls.
    /// - A cooperative node cannot be updated to a non-cooperative node, and vice-versa.
    /// - If the graph was instantiated with CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY, the priority attribute cannot change. Equality is checked on the originally requested priority values, before they are clamped to the device's supported range.
    /// - If `hGraphExec` was not instantiated for device launch, a node whose function originally did not use device-side cudaGraphLaunch() cannot be updated to a function which uses device-side cudaGraphLaunch() unless the node resides on the same context as nodes which contained such calls at instantiate-time. If no such calls were present at instantiation, these updates cannot be performed at all.
    /// - Neither `hGraph` nor `hGraphExec` may contain device-updatable kernel nodes.
    /// - Memset and memcpy nodes:
    /// - The CUDA device(s) to which the operand(s) was allocated/mapped cannot change.
    /// - The source/destination memory must be allocated from the same contexts as the original source/destination memory.
    /// - For 2d memsets, only address and assigned value may be updated.
    /// - For 1d memsets, updating dimensions is also allowed, but may fail if the resulting operation doesn't map onto the work resources already allocated for the node.
    /// - Additional memcpy node restrictions:
    /// - Changing either the source or destination memory type(i.e. CU_MEMORYTYPE_DEVICE, CU_MEMORYTYPE_ARRAY, etc.) is not supported.
    /// - External semaphore wait nodes and record nodes:
    /// - Changing the number of semaphores is not supported.
    /// - Conditional nodes:
    /// - Changing node parameters is not supported.
    /// - Changing parameters of nodes within the conditional body graph is subject to the rules above.
    /// - Conditional handle flags and default values are updated as part of the graph update.
    ///
    /// Note:  The API may add further restrictions in future releases.  The return code should always be checked.
    ///
    /// cuGraphExecUpdate sets the result member of `resultInfo` to CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED under the following conditions:
    /// - The count of nodes directly in `hGraphExec` and `hGraph` differ, in which case resultInfo->errorNode is set to NULL.
    /// - `hGraph` has more exit nodes than `hGraph`, in which case resultInfo->errorNode is set to one of the exit nodes in hGraph.
    /// - A node in `hGraph` has a different number of dependencies than the node from `hGraphExec` it is paired with, in which case resultInfo->errorNode is set to the node from `hGraph`.
    /// - A node in `hGraph` has a dependency that does not match with the corresponding dependency of the paired node from `hGraphExec`. resultInfo->errorNode will be set to the node from `hGraph`. resultInfo->errorFromNode will be set to the mismatched dependency. The dependencies are paired based on edge order and a dependency does not match when the nodes are already paired based on other edges examined in the graph.
    ///
    /// cuGraphExecUpdate sets the result member of `resultInfo` to:
    /// - CU_GRAPH_EXEC_UPDATE_ERROR if passed an invalid value.
    /// - CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED if the graph topology changed
    /// - CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED if the type of a node changed, in which case `hErrorNode_out` is set to the node from `hGraph`.
    /// - CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE if the function changed in an unsupported way(see note above), in which case `hErrorNode_out` is set to the node from `hGraph`
    /// - CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED if any parameters to a node changed in a way that is not supported, in which case `hErrorNode_out` is set to the node from `hGraph`.
    /// - CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED if any attributes of a node changed in a way that is not supported, in which case `hErrorNode_out` is set to the node from `hGraph`.
    /// - CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED if something about a node is unsupported, like the node's type or configuration, in which case `hErrorNode_out` is set to the node from `hGraph`
    ///
    /// If the update fails for a reason not listed above, the result member of `resultInfo` will be set to CU_GRAPH_EXEC_UPDATE_ERROR. If the update succeeds, the result member will be set to CU_GRAPH_EXEC_UPDATE_SUCCESS.
    ///
    /// cuGraphExecUpdate returns CUDA_SUCCESS when the updated was performed successfully.  It returns CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE if the graph update was not performed because it included changes which violated constraints specific to instantiated graph update.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE,
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphInstantiate
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The instantiated graph to be updated
    /// - `hGraph`: The graph containing the updated parameters
    /// - `resultInfo`: the error info structure
    pub fn cuGraphExecUpdate_v2(
        hGraphExec: CUgraphExec,
        hGraph: CUgraph,
        resultInfo: *mut CUgraphExecUpdateResultInfo,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Copies attributes from source node to destination node.
    ///
    /// Copies attributes from source node `src` to destination node `dst`. Both node must have the same context.
    ///
    /// # Parameters
    ///
    /// - `dst`: Destination node.
    /// - `src`: Source node For list of attributes see CUkernelNodeAttrID.
    pub fn cuGraphKernelNodeCopyAttributes(
        dst: CUgraphNode,
        src: CUgraphNode,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Queries node attribute.
    ///
    /// Queries attribute `attr` from node `hNode` and stores it in corresponding member of `value_out`.
    pub fn cuGraphKernelNodeGetAttribute(
        hNode: CUgraphNode,
        attr: CUkernelNodeAttrID,
        value_out: *mut CUkernelNodeAttrValue,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets node attribute.
    ///
    /// Sets attribute `attr` on node `hNode` from corresponding attribute of `value`.
    pub fn cuGraphKernelNodeSetAttribute(
        hNode: CUgraphNode,
        attr: CUkernelNodeAttrID,
        value: *const CUkernelNodeAttrValue,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Write a DOT file describing graph structure.
    ///
    /// Using the provided `hGraph`, write to `path` a DOT formatted description of the graph. By default this includes the graph topology, node types, node id, kernel names and memcpy direction. `flags` can be specified to write more detailed information about each node type such as parameter values, kernel attributes, node and function handles.
    ///
    /// # Parameters
    ///
    /// - `hGraph`: The graph to create a DOT file from.
    /// - `path`: The path to write the DOT file to.
    /// - `flags`: Flags from CUgraphDebugDot_flags for specifying which additional node information to write.
    pub fn cuGraphDebugDotPrint(
        hGraph: CUgraph,
        path: *const ::core::ffi::c_char,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Create a user object.
    ///
    /// Create a user object with the specified destructor callback and initial reference count. The initial references are owned by the caller.
    ///
    /// Destructor callbacks cannot make CUDA API calls and should avoid blocking behavior, as they are executed by a shared internal thread. Another thread may be signaled to perform such actions, if it does not block forward progress of tasks scheduled through CUDA.
    ///
    /// See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.
    ///
    /// # Parameters
    ///
    /// - `object_out`: Location to return the user object handle.
    /// - `ptr`: The pointer to pass to the destroy function.
    /// - `destroy`: Callback to free the user object when it is no longer in use.
    /// - `initialRefcount`: The initial refcount to create the object with, typically 1. The initial references are owned by the calling thread.
    /// - `flags`: Currently it is required to pass [`CUuserObject_flags_enum::CU_USER_OBJECT_NO_DESTRUCTOR_SYNC`], which is the only defined flag. This indicates that the destroy callback cannot be waited on by any CUDA API. Users requiring synchronization of the callback should signal its completion manually.
    pub fn cuUserObjectCreate(
        object_out: *mut CUuserObject,
        ptr: *mut ::core::ffi::c_void,
        destroy: CUhostFn,
        initialRefcount: ::core::ffi::c_uint,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Retain a reference to a user object.
    ///
    /// Retains new references to a user object. The new references are owned by the caller.
    ///
    /// See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.
    ///
    /// # Parameters
    ///
    /// - `object`: The object to retain.
    /// - `count`: The number of references to retain, typically 1. Must be nonzero and not larger than INT_MAX.
    pub fn cuUserObjectRetain(
        object: CUuserObject,
        count: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Release a reference to a user object.
    ///
    /// Releases user object references owned by the caller. The object’s destructor is invoked if the reference count reaches zero.
    ///
    /// It is undefined behavior to release references not owned by the caller, or to use a user object handle after all references are released.
    ///
    /// See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.
    ///
    /// # Parameters
    ///
    /// - `object`: The object to release.
    /// - `count`: The number of references to release, typically 1. Must be nonzero and not larger than INT_MAX.
    pub fn cuUserObjectRelease(
        object: CUuserObject,
        count: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Retain a reference to a user object from a graph.
    ///
    /// Creates or moves user object references that will be owned by a CUDA graph.
    ///
    /// See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.
    ///
    /// # Parameters
    ///
    /// - `graph`: The graph to associate the reference with.
    /// - `object`: The user object to retain a reference for.
    /// - `count`: The number of references to add to the graph, typically 1. Must be nonzero and not larger than INT_MAX.
    /// - `flags`: The optional flag [`CUuserObjectRetain_flags_enum::CU_GRAPH_USER_OBJECT_MOVE`] transfers references from the calling thread, rather than create new references. Pass 0 to create new references.
    pub fn cuGraphRetainUserObject(
        graph: CUgraph,
        object: CUuserObject,
        count: ::core::ffi::c_uint,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Release a user object reference from a graph.
    ///
    /// Releases user object references owned by a graph.
    ///
    /// See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.
    ///
    /// # Parameters
    ///
    /// - `graph`: The graph that will release the reference.
    /// - `object`: The user object to release a reference for.
    /// - `count`: The number of references to release, typically 1. Must be nonzero and not larger than INT_MAX.
    pub fn cuGraphReleaseUserObject(
        graph: CUgraph,
        object: CUuserObject,
        count: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Adds a node of arbitrary type to a graph
    ///
    /// Creates a new node in `hGraph` described by `nodeParams` with `numDependencies` dependencies specified via `dependencies`. `numDependencies` may be 0. `dependencies` may be null if `numDependencies` is 0. `dependencies` may not have any duplicate entries.
    ///
    /// `nodeParams` is a tagged union. The node type should be specified in the `type` field, and type-specific parameters in the corresponding union member. All unused bytes - that is, `reserved0` and all bytes past the utilized union member - must be set to zero. It is recommended to use brace initialization or memset to ensure all bytes are initialized.
    ///
    /// Note that for some node types, `nodeParams` may contain "out parameters" which are modified during the call, such as `nodeParams->alloc.dptr`.
    ///
    /// A handle to the new node will be returned in `phGraphNode`.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_NOT_SUPPORTED
    ///
    /// Note: _graph_thread_safety
    ///
    ///
    ///
    /// See also: ::cuGraphCreate, ::cuGraphNodeSetParams, ::cuGraphExecNodeSetParams
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: - Returns newly created node
    /// - `hGraph`: - Graph to which to add the node
    /// - `dependencies`: - Dependencies of the node
    /// - `dependencyData`: - Optional edge data for the dependencies. If NULL, the data is assumed to be default (zeroed) for all dependencies.
    /// - `numDependencies`: - Number of dependencies
    /// - `nodeParams`: - Specification of the node
    pub fn cuGraphAddNode_v2(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        dependencyData: *const CUgraphEdgeData,
        numDependencies: size_t,
        nodeParams: *mut CUgraphNodeParams,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Adds a node of arbitrary type to a graph.
    ///
    /// Creates a new node in `hGraph` described by `nodeParams` with `numDependencies` dependencies specified via `dependencies`. `numDependencies` may be 0. `dependencies` may be null if `numDependencies` is 0. `dependencies` may not have any duplicate entries.
    ///
    /// `nodeParams` is a tagged union. The node type should be specified in the `type` field, and type-specific parameters in the corresponding union member. All unused bytes - that is, `reserved0` and all bytes past the utilized union member - must be set to zero. It is recommended to use brace initialization or memset to ensure all bytes are initialized.
    ///
    /// Note that for some node types, `nodeParams` may contain “out parameters” which are modified during the call, such as `nodeParams->alloc.dptr`.
    ///
    /// For kernel nodes, if both the kernel node’s [`CUfunction`] and ctx are non-NULL, the underlying device context of ctx must match the device context that the [`CUfunction`] was loaded into; otherwise the call returns [`cudaError_enum::CUDA_ERROR_INVALID_CONTEXT`].
    ///
    /// A handle to the new node will be returned in `phGraphNode`.
    ///
    /// # Parameters
    ///
    /// - `phGraphNode`: Returns newly created node.
    /// - `hGraph`: Graph to which to add the node.
    /// - `dependencies`: Dependencies of the node.
    /// - `dependencyData`: Optional edge data for the dependencies. If NULL, the data is assumed to be default (zeroed) for all dependencies.
    /// - `numDependencies`: Number of dependencies.
    /// - `nodeParams`: Specification of the node.
    pub fn cuGraphAddNode_v3(
        phGraphNode: *mut CUgraphNode,
        hGraph: CUgraph,
        dependencies: *const CUgraphNode,
        dependencyData: *const CUgraphEdgeData,
        numDependencies: size_t,
        nodeParams: *mut CUgraphNodeParams,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Update a graph node’s parameters.
    ///
    /// Sets the parameters of graph node `hNode` to `nodeParams`. The node type specified by `nodeParams->type` must match the type of `hNode`. `nodeParams` must be fully initialized and all unused bytes (reserved, padding) zeroed.
    ///
    /// Modifying parameters is not supported for node types [`CUgraphNodeType::CU_GRAPH_NODE_TYPE_MEM_ALLOC`] and [`CUgraphNodeType::CU_GRAPH_NODE_TYPE_MEM_FREE`].
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to set the parameters for.
    /// - `nodeParams`: Parameters to copy.
    pub fn cuGraphNodeSetParams(
        hNode: CUgraphNode,
        nodeParams: *mut CUgraphNodeParams,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Update a graph node’s parameters.
    ///
    /// Sets the parameters of graph node `hNode` to `nodeParams`. The node type specified by `nodeParams->type` must match the type of `hNode`. `nodeParams` must be fully initialized and all unused bytes (reserved, padding) zeroed.
    ///
    /// Modifying parameters is not supported for node types [`CUgraphNodeType::CU_GRAPH_NODE_TYPE_MEM_ALLOC`] and [`CUgraphNodeType::CU_GRAPH_NODE_TYPE_MEM_FREE`].
    ///
    /// For kernel nodes, if both the kernel node’s [`CUfunction`] and ctx are non-NULL, the underlying device context of ctx must match the device context that the [`CUfunction`] was loaded into; otherwise the call returns [`cudaError_enum::CUDA_ERROR_INVALID_CONTEXT`].
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to set the parameters for.
    /// - `nodeParams`: Parameters to copy.
    pub fn cuGraphNodeSetParams_v2(
        hNode: CUgraphNode,
        nodeParams: *mut CUgraphNodeParams,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Return a graph node’s parameters.
    ///
    /// Returns the parameters of graph node `hNode` in `*nodeParams`.
    ///
    /// Any pointers returned in `*nodeParams` point to driver-owned memory associated with the node. This memory remains valid until the node is destroyed. Any memory pointed to from `*nodeParams` must not be modified.
    ///
    /// The returned parameters are a description of the node, but may not be identical to the struct provided at creation and may not be suitable for direct creation of identical nodes. This is because parameters may be partially unspecified and filled in by the driver at creation, may reference non-copyable handles, or may describe ownership semantics or other parameters that govern behavior of node creation but are not part of the final functional descriptor.
    ///
    /// # Parameters
    ///
    /// - `hNode`: Node to get the parameters for.
    /// - `nodeParams`: Pointer to return the parameters.
    pub fn cuGraphNodeGetParams(
        hNode: CUgraphNode,
        nodeParams: *mut CUgraphNodeParams,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Update a graph node’s parameters in an instantiated graph.
    ///
    /// Sets the parameters of a node in an executable graph `hGraphExec`. The node is identified by the corresponding node `hNode` in the non-executable graph from which the executable graph was instantiated. `hNode` must not have been removed from the original graph.
    ///
    /// The modifications only affect future launches of `hGraphExec`. Already enqueued or running launches of `hGraphExec` are not affected by this call. `hNode` is also not modified by this call.
    ///
    /// Allowed changes to parameters on executable graphs are as follows.
    ///
    /// # Parameters
    ///
    /// - `hGraphExec`: The executable graph in which to update the specified node.
    /// - `hNode`: Corresponding node from the graph from which graphExec was instantiated.
    /// - `nodeParams`: Updated Parameters to set.
    pub fn cuGraphExecNodeSetParams(
        hGraphExec: CUgraphExec,
        hNode: CUgraphNode,
        nodeParams: *mut CUgraphNodeParams,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Create a conditional handle.
    ///
    /// Creates a conditional handle associated with `hGraph`.
    ///
    /// The conditional handle must be associated with a conditional node in this graph or one of its children.
    ///
    /// Handles not associated with a conditional node may cause graph instantiation to fail.
    ///
    /// Handles can only be set from the context with which they are associated.
    ///
    /// # Parameters
    ///
    /// - `pHandle_out`: Pointer used to return the handle to the caller.
    /// - `hGraph`: Graph which will contain the conditional node using this handle.
    /// - `ctx`: Context for the handle and associated conditional node.
    /// - `defaultLaunchValue`: Optional initial value for the conditional variable. Applied at the beginning of each graph execution if CU_GRAPH_COND_ASSIGN_DEFAULT is set in `flags`.
    /// - `flags`: Currently must be CU_GRAPH_COND_ASSIGN_DEFAULT or 0.
    pub fn cuGraphConditionalHandleCreate(
        pHandle_out: *mut CUgraphConditionalHandle,
        hGraph: CUgraph,
        ctx: CUcontext,
        defaultLaunchValue: ::core::ffi::c_uint,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns occupancy of a function.
    ///
    /// Returns in `*numBlocks` the number of the maximum active blocks per streaming multiprocessor.
    ///
    /// Note that the API can also be used with context-less kernel [`CUkernel`] by querying the handle using [`cuLibraryGetKernel`] and then passing it to the API by casting to [`CUfunction`]. Here, the context to use for calculations will be the current context.
    ///
    /// # Parameters
    ///
    /// - `numBlocks`: Returned occupancy.
    /// - `func`: Kernel for which occupancy is calculated.
    /// - `blockSize`: Block size the kernel is intended to be launched with.
    /// - `dynamicSMemSize`: Per-block dynamic shared memory usage intended, in bytes.
    pub fn cuOccupancyMaxActiveBlocksPerMultiprocessor(
        numBlocks: *mut ::core::ffi::c_int,
        func: CUfunction,
        blockSize: ::core::ffi::c_int,
        dynamicSMemSize: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns occupancy of a function.
    ///
    /// Returns in `*numBlocks` the number of the maximum active blocks per streaming multiprocessor.
    ///
    /// The `Flags` parameter controls how special cases are handled. The valid flags are:
    ///
    /// Note that the API can also be with launch context-less kernel [`CUkernel`] by querying the handle using [`cuLibraryGetKernel`] and then passing it to the API by casting to [`CUfunction`]. Here, the context to use for calculations will be the current context.
    ///
    /// # Parameters
    ///
    /// - `numBlocks`: Returned occupancy.
    /// - `func`: Kernel for which occupancy is calculated.
    /// - `blockSize`: Block size the kernel is intended to be launched with.
    /// - `dynamicSMemSize`: Per-block dynamic shared memory usage intended, in bytes.
    /// - `flags`: Requested behavior for the occupancy calculator.
    pub fn cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
        numBlocks: *mut ::core::ffi::c_int,
        func: CUfunction,
        blockSize: ::core::ffi::c_int,
        dynamicSMemSize: size_t,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Suggest a launch configuration with reasonable occupancy.
    ///
    /// Returns in `*blockSize` a reasonable block size that can achieve the maximum occupancy (or, the maximum number of active warps with the fewest blocks per multiprocessor), and in `*minGridSize` the minimum grid size to achieve the maximum occupancy.
    ///
    /// If `blockSizeLimit` is 0, the configurator will use the maximum block size permitted by the device / function instead.
    ///
    /// If per-block dynamic shared memory allocation is not needed, the user should leave both `blockSizeToDynamicSMemSize` and `dynamicSMemSize` as 0.
    ///
    /// If per-block dynamic shared memory allocation is needed, then if the dynamic shared memory size is constant regardless of block size, the size should be passed through `dynamicSMemSize`, and `blockSizeToDynamicSMemSize` should be NULL.
    ///
    /// Otherwise, if the per-block dynamic shared memory size varies with different block sizes, the user needs to provide a unary function through `blockSizeToDynamicSMemSize` that computes the dynamic shared memory needed by `func` for any given block size. `dynamicSMemSize` is ignored. An example signature is:
    ///
    /// Note that the API can also be used with context-less kernel [`CUkernel`] by querying the handle using [`cuLibraryGetKernel`] and then passing it to the API by casting to [`CUfunction`]. Here, the context to use for calculations will be the current context.
    ///
    /// # Parameters
    ///
    /// - `minGridSize`: Returned minimum grid size needed to achieve the maximum occupancy.
    /// - `blockSize`: Returned maximum block size that can achieve the maximum occupancy.
    /// - `func`: Kernel for which launch configuration is calculated.
    /// - `blockSizeToDynamicSMemSize`: A function that calculates how much per-block dynamic shared memory `func` uses based on the block size.
    /// - `dynamicSMemSize`: Dynamic shared memory usage intended, in bytes.
    /// - `blockSizeLimit`: The maximum block size `func` is designed to handle.
    pub fn cuOccupancyMaxPotentialBlockSize(
        minGridSize: *mut ::core::ffi::c_int,
        blockSize: *mut ::core::ffi::c_int,
        func: CUfunction,
        blockSizeToDynamicSMemSize: CUoccupancyB2DSize,
        dynamicSMemSize: size_t,
        blockSizeLimit: ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Suggest a launch configuration with reasonable occupancy.
    ///
    /// An extended version of [`cuOccupancyMaxPotentialBlockSize`]. In addition to arguments passed to [`cuOccupancyMaxPotentialBlockSize`], [`cuOccupancyMaxPotentialBlockSizeWithFlags`] also takes a `Flags` parameter.
    ///
    /// The `Flags` parameter controls how special cases are handled. The valid flags are:
    ///
    /// Note that the API can also be used with context-less kernel [`CUkernel`] by querying the handle using [`cuLibraryGetKernel`] and then passing it to the API by casting to [`CUfunction`]. Here, the context to use for calculations will be the current context.
    ///
    /// # Parameters
    ///
    /// - `minGridSize`: Returned minimum grid size needed to achieve the maximum occupancy.
    /// - `blockSize`: Returned maximum block size that can achieve the maximum occupancy.
    /// - `func`: Kernel for which launch configuration is calculated.
    /// - `blockSizeToDynamicSMemSize`: A function that calculates how much per-block dynamic shared memory `func` uses based on the block size.
    /// - `dynamicSMemSize`: Dynamic shared memory usage intended, in bytes.
    /// - `blockSizeLimit`: The maximum block size `func` is designed to handle.
    /// - `flags`: Options.
    pub fn cuOccupancyMaxPotentialBlockSizeWithFlags(
        minGridSize: *mut ::core::ffi::c_int,
        blockSize: *mut ::core::ffi::c_int,
        func: CUfunction,
        blockSizeToDynamicSMemSize: CUoccupancyB2DSize,
        dynamicSMemSize: size_t,
        blockSizeLimit: ::core::ffi::c_int,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns dynamic shared memory available per block when launching `numBlocks` blocks on SM.
    ///
    /// Returns in `*dynamicSmemSize` the maximum size of dynamic shared memory to allow `numBlocks` blocks per SM.
    ///
    /// Note that the API can also be used with context-less kernel [`CUkernel`] by querying the handle using [`cuLibraryGetKernel`] and then passing it to the API by casting to [`CUfunction`]. Here, the context to use for calculations will be the current context.
    ///
    /// # Parameters
    ///
    /// - `dynamicSmemSize`: Returned maximum dynamic shared memory.
    /// - `func`: Kernel function for which occupancy is calculated.
    /// - `numBlocks`: Number of blocks to fit on SM.
    /// - `blockSize`: Size of the blocks.
    pub fn cuOccupancyAvailableDynamicSMemPerBlock(
        dynamicSmemSize: *mut size_t,
        func: CUfunction,
        numBlocks: ::core::ffi::c_int,
        blockSize: ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Given the kernel function (`func`) and launch configuration (`config`), return the maximum cluster size in `*clusterSize`.
    ///
    /// The cluster dimensions in `config` are ignored. If func has a required cluster size set (see ::cudaFuncGetAttributes / [`cuFuncGetAttribute`]),`*clusterSize` will reflect the required cluster size.
    ///
    /// By default this function will always return a value that’s portable on future hardware. A higher value may be returned if the kernel function allows non-portable cluster sizes.
    ///
    /// This function will respect the compile time launch bounds.
    ///
    /// Note that the API can also be used with context-less kernel [`CUkernel`] by querying the handle using [`cuLibraryGetKernel`] and then passing it to the API by casting to [`CUfunction`]. Here, the context to use for calculations will either be taken from the specified stream `config->hStream` or the current context in case of NULL stream.
    ///
    /// # Parameters
    ///
    /// - `clusterSize`: Returned maximum cluster size that can be launched for the given kernel function and launch configuration.
    /// - `func`: Kernel function for which maximum cluster size is calculated.
    /// - `config`: Launch configuration for the given kernel function.
    pub fn cuOccupancyMaxPotentialClusterSize(
        clusterSize: *mut ::core::ffi::c_int,
        func: CUfunction,
        config: *const CUlaunchConfig,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Given the kernel function (`func`) and launch configuration (`config`), return the maximum number of clusters that could co-exist on the target device in `*numClusters`.
    ///
    /// If the function has required cluster size already set (see ::cudaFuncGetAttributes / [`cuFuncGetAttribute`]), the cluster size from config must either be unspecified or match the required size. Without required sizes, the cluster size must be specified in config, else the function will return an error.
    ///
    /// Note that various attributes of the kernel function may affect occupancy calculation. Runtime environment may affect how the hardware schedules the clusters, so the calculated occupancy is not guaranteed to be achievable.
    ///
    /// Note that the API can also be used with context-less kernel [`CUkernel`] by querying the handle using [`cuLibraryGetKernel`] and then passing it to the API by casting to [`CUfunction`]. Here, the context to use for calculations will either be taken from the specified stream `config->hStream` or the current context in case of NULL stream.
    ///
    /// # Parameters
    ///
    /// - `numClusters`: Returned maximum number of clusters that could co-exist on the target device.
    /// - `func`: Kernel function for which maximum number of clusters are calculated.
    /// - `config`: Launch configuration for the given kernel function.
    pub fn cuOccupancyMaxActiveClusters(
        numClusters: *mut ::core::ffi::c_int,
        func: CUfunction,
        config: *const CUlaunchConfig,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Binds an array as a texture reference.
    ///
    /// Binds the CUDA array `hArray` to the texture reference `hTexRef`. Any previous address or CUDA array state associated with the texture reference is superseded by this function. `Flags` must be set to [`CU_TRSA_OVERRIDE_FORMAT`]. Any CUDA array previously bound to `hTexRef` is unbound.
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: Texture reference to bind.
    /// - `hArray`: Array to bind.
    /// - `Flags`: Options (must be [`CU_TRSA_OVERRIDE_FORMAT`]).
    #[deprecated]
    pub fn cuTexRefSetArray(
        hTexRef: CUtexref,
        hArray: CUarray,
        Flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Binds a mipmapped array to a texture reference.
    ///
    /// Binds the CUDA mipmapped array `hMipmappedArray` to the texture reference `hTexRef`. Any previous address or CUDA array state associated with the texture reference is superseded by this function. `Flags` must be set to [`CU_TRSA_OVERRIDE_FORMAT`]. Any CUDA array previously bound to `hTexRef` is unbound.
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: Texture reference to bind.
    /// - `hMipmappedArray`: Mipmapped array to bind.
    /// - `Flags`: Options (must be [`CU_TRSA_OVERRIDE_FORMAT`]).
    #[deprecated]
    pub fn cuTexRefSetMipmappedArray(
        hTexRef: CUtexref,
        hMipmappedArray: CUmipmappedArray,
        Flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Binds an address as a texture reference
    ///
    ///
    ///
    /// Deprecated:
    ///
    /// Binds a linear address range to the texture reference `hTexRef`. Any previous address or CUDA array state associated with the texture reference is superseded by this function. Any memory previously bound to `hTexRef` is unbound.
    ///
    /// Since the hardware enforces an alignment requirement on texture base addresses, ::cuTexRefSetAddress() passes back a byte offset in `*ByteOffset` that must be applied to texture fetches in order to read from the desired memory. This offset must be divided by the texel size and passed to kernels that read from the texture so they can be applied to the ::tex1Dfetch() function.
    ///
    /// If the device memory pointer was returned from ::cuMemAlloc(), the offset is guaranteed to be 0 and NULL may be passed as the `ByteOffset` parameter.
    ///
    /// The total number of elements (or texels) in the linear address range cannot exceed ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH. The number of elements is computed as (`bytes` / bytesPerElement), where bytesPerElement is determined from the data format and number of components set using ::cuTexRefSetFormat().
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    ///
    ///
    /// See also: ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray, ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat, ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray, ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat
    ///
    /// # Parameters
    ///
    /// - `ByteOffset`: - Returned byte offset
    /// - `hTexRef`: - Texture reference to bind
    /// - `dptr`: - Device pointer to bind
    /// - `bytes`: - Size of memory to bind in bytes
    #[deprecated]
    pub fn cuTexRefSetAddress_v2(
        ByteOffset: *mut size_t,
        hTexRef: CUtexref,
        dptr: CUdeviceptr,
        bytes: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Binds an address as a 2D texture reference
    ///
    ///
    ///
    /// Deprecated:
    ///
    /// Binds a linear address range to the texture reference `hTexRef`. Any previous address or CUDA array state associated with the texture reference is superseded by this function. Any memory previously bound to `hTexRef` is unbound.
    ///
    /// Using a ::tex2D() function inside a kernel requires a call to either ::cuTexRefSetArray() to bind the corresponding texture reference to an array, or ::cuTexRefSetAddress2D() to bind the texture reference to linear memory.
    ///
    /// Function calls to ::cuTexRefSetFormat() cannot follow calls to ::cuTexRefSetAddress2D() for the same texture reference.
    ///
    /// It is required that `dptr` be aligned to the appropriate hardware-specific texture alignment. You can query this value using the device attribute ::CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT. If an unaligned `dptr` is supplied, ::CUDA_ERROR_INVALID_VALUE is returned.
    ///
    /// `Pitch` has to be aligned to the hardware-specific texture pitch alignment. This value can be queried using the device attribute ::CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT. If an unaligned `Pitch` is supplied, ::CUDA_ERROR_INVALID_VALUE is returned.
    ///
    /// Width and Height, which are specified in elements (or texels), cannot exceed ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH and ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT respectively. `Pitch`, which is specified in bytes, cannot exceed ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    ///
    ///
    /// See also: ::cuTexRefSetAddress, ::cuTexRefSetAddressMode, ::cuTexRefSetArray, ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat, ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray, ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: - Texture reference to bind
    /// - `desc`: - Descriptor of CUDA array
    /// - `dptr`: - Device pointer to bind
    /// - `Pitch`: - Line pitch in bytes
    #[deprecated]
    pub fn cuTexRefSetAddress2D_v3(
        hTexRef: CUtexref,
        desc: *const CUDA_ARRAY_DESCRIPTOR,
        dptr: CUdeviceptr,
        Pitch: size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the format for a texture reference.
    ///
    /// Specifies the format of the data to be read by the texture reference `hTexRef`. `fmt` and `NumPackedComponents` are exactly analogous to the ::Format and ::NumChannels members of the CUDA_ARRAY_DESCRIPTOR structure: They specify the format of each component and the number of components per array element.
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: Texture reference.
    /// - `fmt`: Format to set.
    /// - `NumPackedComponents`: Number of components per array element.
    #[deprecated]
    pub fn cuTexRefSetFormat(
        hTexRef: CUtexref,
        fmt: CUarray_format,
        NumPackedComponents: ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the addressing mode for a texture reference.
    ///
    /// Specifies the addressing mode `am` for the given dimension `dim` of the texture reference `hTexRef`. If `dim` is zero, the addressing mode is applied to the first parameter of the functions used to fetch from the texture; if `dim` is 1, the second, and so on. [CUaddress_mode](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gac925457ee7128d6251071f6ff7608887) is defined as:
    ///
    /// Note that this call has no effect if `hTexRef` is bound to linear memory. Also, if the flag, [`CU_TRSF_NORMALIZED_COORDINATES`], is not set, the only supported address mode is [`CUaddress_mode_enum::CU_TR_ADDRESS_MODE_CLAMP`].
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: Texture reference.
    /// - `dim`: Dimension.
    /// - `am`: Addressing mode to set.
    #[deprecated]
    pub fn cuTexRefSetAddressMode(
        hTexRef: CUtexref,
        dim: ::core::ffi::c_int,
        am: CUaddress_mode,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the filtering mode for a texture reference.
    ///
    /// Specifies the filtering mode `fm` to be used when reading memory through the texture reference `hTexRef`. ::CUfilter_mode_enum is defined as:
    ///
    /// Note that this call has no effect if `hTexRef` is bound to linear memory.
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: Texture reference.
    /// - `fm`: Filtering mode to set.
    #[deprecated]
    pub fn cuTexRefSetFilterMode(hTexRef: CUtexref, fm: CUfilter_mode) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the mipmap filtering mode for a texture reference.
    ///
    /// Specifies the mipmap filtering mode `fm` to be used when reading memory through the texture reference `hTexRef`. ::CUfilter_mode_enum is defined as:
    ///
    /// Note that this call has no effect if `hTexRef` is not bound to a mipmapped array.
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: Texture reference.
    /// - `fm`: Filtering mode to set.
    #[deprecated]
    pub fn cuTexRefSetMipmapFilterMode(hTexRef: CUtexref, fm: CUfilter_mode) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the mipmap level bias for a texture reference.
    ///
    /// Specifies the mipmap level bias `bias` to be added to the specified mipmap level when reading memory through the texture reference `hTexRef`.
    ///
    /// Note that this call has no effect if `hTexRef` is not bound to a mipmapped array.
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: Texture reference.
    /// - `bias`: Mipmap level bias.
    #[deprecated]
    pub fn cuTexRefSetMipmapLevelBias(hTexRef: CUtexref, bias: f32) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the mipmap min/max mipmap level clamps for a texture reference.
    ///
    /// Specifies the min/max mipmap level clamps, `minMipmapLevelClamp` and `maxMipmapLevelClamp` respectively, to be used when reading memory through the texture reference `hTexRef`.
    ///
    /// Note that this call has no effect if `hTexRef` is not bound to a mipmapped array.
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: Texture reference.
    /// - `minMipmapLevelClamp`: Mipmap min level clamp.
    /// - `maxMipmapLevelClamp`: Mipmap max level clamp.
    #[deprecated]
    pub fn cuTexRefSetMipmapLevelClamp(
        hTexRef: CUtexref,
        minMipmapLevelClamp: f32,
        maxMipmapLevelClamp: f32,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the maximum anisotropy for a texture reference.
    ///
    /// Specifies the maximum anisotropy `maxAniso` to be used when reading memory through the texture reference `hTexRef`.
    ///
    /// Note that this call has no effect if `hTexRef` is bound to linear memory.
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: Texture reference.
    /// - `maxAniso`: Maximum anisotropy.
    #[deprecated]
    pub fn cuTexRefSetMaxAnisotropy(
        hTexRef: CUtexref,
        maxAniso: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the border color for a texture reference.
    ///
    /// Specifies the value of the RGBA color via the `pBorderColor` to the texture reference `hTexRef`. The color value supports only float type and holds color components in the following sequence: pBorderColor\[0\] holds ‘R’ component pBorderColor\[1\] holds ‘G’ component pBorderColor\[2\] holds ‘B’ component pBorderColor\[3\] holds ‘A’ component
    ///
    /// Note that the color values can be set only when the Address mode is set to [`CUaddress_mode::CU_TR_ADDRESS_MODE_BORDER`] using [`cuTexRefSetAddressMode`]. Applications using integer border color values have to “reinterpret_cast” their values to float.
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: Texture reference.
    /// - `pBorderColor`: RGBA color.
    #[deprecated]
    pub fn cuTexRefSetBorderColor(hTexRef: CUtexref, pBorderColor: *mut f32) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the flags for a texture reference.
    ///
    /// Specifies optional flags via `Flags` to specify the behavior of data returned through the texture reference `hTexRef`. The valid flags are.
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: Texture reference.
    /// - `Flags`: Optional flags to set.
    #[deprecated]
    pub fn cuTexRefSetFlags(hTexRef: CUtexref, Flags: ::core::ffi::c_uint) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the address associated with a texture reference
    ///
    ///
    ///
    /// Deprecated:
    ///
    /// Returns in `*pdptr` the base address bound to the texture reference `hTexRef`, or returns ::CUDA_ERROR_INVALID_VALUE if the texture reference is not bound to any device memory range.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE
    ///
    ///
    ///
    /// See also: ::cuTexRefSetAddress, ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray, ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat, ::cuTexRefGetAddressMode, ::cuTexRefGetArray, ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat
    ///
    /// # Parameters
    ///
    /// - `pdptr`: - Returned device address
    /// - `hTexRef`: - Texture reference
    #[deprecated]
    pub fn cuTexRefGetAddress_v2(pdptr: *mut CUdeviceptr, hTexRef: CUtexref) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the array bound to a texture reference.
    ///
    /// Returns in `*phArray` the CUDA array bound to the texture reference `hTexRef`, or returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] if the texture reference is not bound to any CUDA array.
    ///
    /// # Parameters
    ///
    /// - `phArray`: Returned array.
    /// - `hTexRef`: Texture reference.
    #[deprecated]
    pub fn cuTexRefGetArray(phArray: *mut CUarray, hTexRef: CUtexref) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the mipmapped array bound to a texture reference.
    ///
    /// Returns in `*phMipmappedArray` the CUDA mipmapped array bound to the texture reference `hTexRef`, or returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] if the texture reference is not bound to any CUDA mipmapped array.
    ///
    /// # Parameters
    ///
    /// - `phMipmappedArray`: Returned mipmapped array.
    /// - `hTexRef`: Texture reference.
    #[deprecated]
    pub fn cuTexRefGetMipmappedArray(
        phMipmappedArray: *mut CUmipmappedArray,
        hTexRef: CUtexref,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the addressing mode used by a texture reference.
    ///
    /// Returns in `*pam` the addressing mode corresponding to the dimension `dim` of the texture reference `hTexRef`. Currently, the only valid value for `dim` are 0 and 1.
    ///
    /// # Parameters
    ///
    /// - `pam`: Returned addressing mode.
    /// - `hTexRef`: Texture reference.
    /// - `dim`: Dimension.
    #[deprecated]
    pub fn cuTexRefGetAddressMode(
        pam: *mut CUaddress_mode,
        hTexRef: CUtexref,
        dim: ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the filter-mode used by a texture reference.
    ///
    /// Returns in `*pfm` the filtering mode of the texture reference `hTexRef`.
    ///
    /// # Parameters
    ///
    /// - `pfm`: Returned filtering mode.
    /// - `hTexRef`: Texture reference.
    #[deprecated]
    pub fn cuTexRefGetFilterMode(pfm: *mut CUfilter_mode, hTexRef: CUtexref) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the format used by a texture reference.
    ///
    /// Returns in `*pFormat` and `*pNumChannels` the format and number of components of the CUDA array bound to the texture reference `hTexRef`. If `pFormat` or `pNumChannels` is NULL, it will be ignored.
    ///
    /// # Parameters
    ///
    /// - `pFormat`: Returned format.
    /// - `pNumChannels`: Returned number of components.
    /// - `hTexRef`: Texture reference.
    #[deprecated]
    pub fn cuTexRefGetFormat(
        pFormat: *mut CUarray_format,
        pNumChannels: *mut ::core::ffi::c_int,
        hTexRef: CUtexref,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the mipmap filtering mode for a texture reference.
    ///
    /// Returns the mipmap filtering mode in `pfm` that’s used when reading memory through the texture reference `hTexRef`.
    ///
    /// # Parameters
    ///
    /// - `pfm`: Returned mipmap filtering mode.
    /// - `hTexRef`: Texture reference.
    #[deprecated]
    pub fn cuTexRefGetMipmapFilterMode(
        pfm: *mut CUfilter_mode,
        hTexRef: CUtexref,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the mipmap level bias for a texture reference.
    ///
    /// Returns the mipmap level bias in `pBias` that’s added to the specified mipmap level when reading memory through the texture reference `hTexRef`.
    ///
    /// # Parameters
    ///
    /// - `pbias`: Returned mipmap level bias.
    /// - `hTexRef`: Texture reference.
    #[deprecated]
    pub fn cuTexRefGetMipmapLevelBias(pbias: *mut f32, hTexRef: CUtexref) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the min/max mipmap level clamps for a texture reference.
    ///
    /// Returns the min/max mipmap level clamps in `pminMipmapLevelClamp` and `pmaxMipmapLevelClamp` that’s used when reading memory through the texture reference `hTexRef`.
    ///
    /// # Parameters
    ///
    /// - `pminMipmapLevelClamp`: Returned mipmap min level clamp.
    /// - `pmaxMipmapLevelClamp`: Returned mipmap max level clamp.
    /// - `hTexRef`: Texture reference.
    #[deprecated]
    pub fn cuTexRefGetMipmapLevelClamp(
        pminMipmapLevelClamp: *mut f32,
        pmaxMipmapLevelClamp: *mut f32,
        hTexRef: CUtexref,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the maximum anisotropy for a texture reference.
    ///
    /// Returns the maximum anisotropy in `pmaxAniso` that’s used when reading memory through the texture reference `hTexRef`.
    ///
    /// # Parameters
    ///
    /// - `pmaxAniso`: Returned maximum anisotropy.
    /// - `hTexRef`: Texture reference.
    #[deprecated]
    pub fn cuTexRefGetMaxAnisotropy(
        pmaxAniso: *mut ::core::ffi::c_int,
        hTexRef: CUtexref,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the border color used by a texture reference.
    ///
    /// Returns in `pBorderColor`, values of the RGBA color used by the texture reference `hTexRef`. The color value is of type float and holds color components in the following sequence: pBorderColor\[0\] holds ‘R’ component pBorderColor\[1\] holds ‘G’ component pBorderColor\[2\] holds ‘B’ component pBorderColor\[3\] holds ‘A’ component.
    ///
    /// # Parameters
    ///
    /// - `pBorderColor`: Returned Type and Value of RGBA color.
    /// - `hTexRef`: Texture reference.
    #[deprecated]
    pub fn cuTexRefGetBorderColor(pBorderColor: *mut f32, hTexRef: CUtexref) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Gets the flags used by a texture reference.
    ///
    /// Returns in `*pFlags` the flags of the texture reference `hTexRef`.
    ///
    /// # Parameters
    ///
    /// - `pFlags`: Returned flags.
    /// - `hTexRef`: Texture reference.
    #[deprecated]
    pub fn cuTexRefGetFlags(
        pFlags: *mut ::core::ffi::c_uint,
        hTexRef: CUtexref,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a texture reference.
    ///
    /// Creates a texture reference and returns its handle in `*pTexRef`. Once created, the application must call [`cuTexRefSetArray`] or cuTexRefSetAddress() to associate the reference with allocated memory. Other texture reference functions are used to specify the format and interpretation (addressing, filtering, etc.) to be used when the memory is read through this texture reference.
    ///
    /// # Parameters
    ///
    /// - `pTexRef`: - Returned texture reference
    #[deprecated]
    pub fn cuTexRefCreate(pTexRef: *mut CUtexref) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys a texture reference.
    ///
    /// Destroys the texture reference specified by `hTexRef`.
    ///
    /// # Parameters
    ///
    /// - `hTexRef`: - Texture reference to destroy
    #[deprecated]
    pub fn cuTexRefDestroy(hTexRef: CUtexref) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets the CUDA array for a surface reference.
    ///
    /// Sets the CUDA array `hArray` to be read and written by the surface reference `hSurfRef`. Any previous CUDA array state associated with the surface reference is superseded by this function. `Flags` must be set to 0. The [`CUDA_ARRAY3D_SURFACE_LDST`] flag must have been set for the CUDA array. Any CUDA array previously bound to `hSurfRef` is unbound.
    ///
    /// # Parameters
    ///
    /// - `hSurfRef`: Surface reference handle.
    /// - `hArray`: CUDA array handle.
    /// - `Flags`: set to 0.
    #[deprecated]
    pub fn cuSurfRefSetArray(
        hSurfRef: CUsurfref,
        hArray: CUarray,
        Flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Passes back the CUDA array bound to a surface reference.
    ///
    /// Returns in `*phArray` the CUDA array bound to the surface reference `hSurfRef`, or returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] if the surface reference is not bound to any CUDA array.
    ///
    /// # Parameters
    ///
    /// - `phArray`: Surface reference handle.
    /// - `hSurfRef`: Surface reference handle.
    #[deprecated]
    pub fn cuSurfRefGetArray(phArray: *mut CUarray, hSurfRef: CUsurfref) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a texture object.
    ///
    /// Creates a texture object and returns it in `pTexObject`. `pResDesc` describes the data to texture from. `pTexDesc` describes how the data should be sampled. `pResViewDesc` is an optional argument that specifies an alternate format for the data described by `pResDesc`, and also describes the subresource region to restrict access to when texturing. `pResViewDesc` can only be specified if the type of resource is a CUDA array or a CUDA mipmapped array not in a block compressed format.
    ///
    /// Texture objects are only supported on devices of compute capability 3.0 or higher. Additionally, a texture object is an opaque value, and, as such, should only be accessed through CUDA API calls.
    ///
    /// The CUDA_RESOURCE_DESC structure is defined as:
    ///
    /// The CUDA_TEXTURE_DESC struct is defined as
    ///
    /// The CUDA_RESOURCE_VIEW_DESC struct is defined as.
    ///
    /// # Parameters
    ///
    /// - `pTexObject`: Texture object to create.
    /// - `pResDesc`: Resource descriptor.
    /// - `pTexDesc`: Texture descriptor.
    /// - `pResViewDesc`: Resource view descriptor.
    pub fn cuTexObjectCreate(
        pTexObject: *mut CUtexObject,
        pResDesc: *const CUDA_RESOURCE_DESC,
        pTexDesc: *const CUDA_TEXTURE_DESC,
        pResViewDesc: *const CUDA_RESOURCE_VIEW_DESC,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys a texture object.
    ///
    /// Destroys the texture object specified by `texObject`.
    ///
    /// # Parameters
    ///
    /// - `texObject`: - Texture object to destroy
    pub fn cuTexObjectDestroy(texObject: CUtexObject) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a texture object’s resource descriptor.
    ///
    /// Returns the resource descriptor for the texture object specified by `texObject`.
    ///
    /// # Parameters
    ///
    /// - `pResDesc`: Resource descriptor.
    /// - `texObject`: Texture object.
    pub fn cuTexObjectGetResourceDesc(
        pResDesc: *mut CUDA_RESOURCE_DESC,
        texObject: CUtexObject,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a texture object’s texture descriptor.
    ///
    /// Returns the texture descriptor for the texture object specified by `texObject`.
    ///
    /// # Parameters
    ///
    /// - `pTexDesc`: Texture descriptor.
    /// - `texObject`: Texture object.
    pub fn cuTexObjectGetTextureDesc(
        pTexDesc: *mut CUDA_TEXTURE_DESC,
        texObject: CUtexObject,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a texture object’s resource view descriptor.
    ///
    /// Returns the resource view descriptor for the texture object specified by `texObject`. If no resource view was set for `texObject`, the [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] is returned.
    ///
    /// # Parameters
    ///
    /// - `pResViewDesc`: Resource view descriptor.
    /// - `texObject`: Texture object.
    pub fn cuTexObjectGetResourceViewDesc(
        pResViewDesc: *mut CUDA_RESOURCE_VIEW_DESC,
        texObject: CUtexObject,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Creates a surface object.
    ///
    /// Creates a surface object and returns it in `pSurfObject`. `pResDesc` describes the data to perform surface load/stores on. [CUDA_RESOURCE_DESC::resType](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__RESOURCE__DESC__v1.html#structcuda__resource__desc__v1_1afe341889f4a57165e7acc0efcfc38b64) must be [`CUresourcetype_enum::CU_RESOURCE_TYPE_ARRAY`] and [CUDA_RESOURCE_DESC::res::array::hArray](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__RESOURCE__DESC__v1.html#structcuda__resource__desc__v1_1ae6a102dea60961fe2cb7beb001798ca0) must be set to a valid CUDA array handle. [CUDA_RESOURCE_DESC::flags](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUDA__RESOURCE__DESC__v1.html#structcuda__resource__desc__v1_1a857d9251dec54700bd8cd071accc3bdf) must be set to zero.
    ///
    /// Surface objects are only supported on devices of compute capability 3.0 or higher. Additionally, a surface object is an opaque value, and, as such, should only be accessed through CUDA API calls.
    ///
    /// # Parameters
    ///
    /// - `pSurfObject`: Surface object to create.
    /// - `pResDesc`: Resource descriptor.
    pub fn cuSurfObjectCreate(
        pSurfObject: *mut CUsurfObject,
        pResDesc: *const CUDA_RESOURCE_DESC,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys a surface object.
    ///
    /// Destroys the surface object specified by `surfObject`.
    ///
    /// # Parameters
    ///
    /// - `surfObject`: - Surface object to destroy
    pub fn cuSurfObjectDestroy(surfObject: CUsurfObject) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a surface object’s resource descriptor.
    ///
    /// Returns the resource descriptor for the surface object specified by `surfObject`.
    ///
    /// # Parameters
    ///
    /// - `pResDesc`: Resource descriptor.
    /// - `surfObject`: Surface object.
    pub fn cuSurfObjectGetResourceDesc(
        pResDesc: *mut CUDA_RESOURCE_DESC,
        surfObject: CUsurfObject,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Create a tensor map descriptor object representing tiled memory region.
    ///
    /// Creates a descriptor for Tensor Memory Access (TMA) object specified by the parameters describing a tiled region and returns it in `tensorMap`.
    ///
    /// Tensor map objects are only supported on devices of compute capability 9.0 or higher. Additionally, a tensor map object is an opaque value, and, as such, should only be accessed through CUDA APIs and PTX.
    ///
    /// The parameters passed are bound to the following requirements:
    ///
    /// `globalDim` array, which specifies tensor size of each of the `tensorRank` dimensions, must be non-zero and less than or equal to 2^32. Additionally, the following requirements need to be met for the packed data types:
    ///
    /// `globalStrides` array, which specifies tensor stride of each of the lower `tensorRank` - 1 dimensions in bytes, must be a multiple of 16 and less than 2^40. Additionally, the following requirements need to be met:
    ///
    /// `boxDim` array, which specifies number of elements to be traversed along each of the `tensorRank` dimensions, must be non-zero and less than or equal to 256. Additionally, the following requirements need to be met:
    ///
    /// `elementStrides` array, which specifies the iteration step along each of the `tensorRank` dimensions, must be non-zero and less than or equal to 8. Note that when `interleave` is [`CUtensorMapInterleave::CU_TENSOR_MAP_INTERLEAVE_NONE`], the first element of this array is ignored since TMA doesn’t support the stride for dimension zero. When all elements of `elementStrides` array is one, `boxDim` specifies the number of elements to load. However, if the `elementStrides`\[i\] is not equal to one, then TMA loads ceil( `boxDim`\[i\] / `elementStrides`\[i\]) number of elements along i-th dimension. To load N elements along i-th dimension, `boxDim`\[i\] must be set to N \* `elementStrides`\[i\].
    ///
    /// # Parameters
    ///
    /// - `tensorMap`: Tensor map object to create.
    /// - `tensorDataType`: Tensor data type.
    /// - `tensorRank`: Dimensionality of tensor.
    /// - `globalAddress`: Starting address of memory region described by tensor.
    /// - `globalDim`: Array containing tensor size (number of elements) along each of the `tensorRank` dimensions.
    /// - `globalStrides`: Array containing stride size (in bytes) along each of the `tensorRank` - 1 dimensions.
    /// - `boxDim`: Array containing traversal box size (number of elments) along each of the `tensorRank` dimensions. Specifies how many elements to be traversed along each tensor dimension.
    /// - `elementStrides`: Array containing traversal stride in each of the `tensorRank` dimensions.
    /// - `interleave`: Type of interleaved layout the tensor addresses.
    /// - `swizzle`: Bank swizzling pattern inside shared memory.
    /// - `l2Promotion`: L2 promotion size.
    /// - `oobFill`: Indicate whether zero or special NaN constant must be used to fill out-of-bound elements.
    pub fn cuTensorMapEncodeTiled(
        tensorMap: *mut CUtensorMap,
        tensorDataType: CUtensorMapDataType,
        tensorRank: cuuint32_t,
        globalAddress: *mut ::core::ffi::c_void,
        globalDim: *const cuuint64_t,
        globalStrides: *const cuuint64_t,
        boxDim: *const cuuint32_t,
        elementStrides: *const cuuint32_t,
        interleave: CUtensorMapInterleave,
        swizzle: CUtensorMapSwizzle,
        l2Promotion: CUtensorMapL2promotion,
        oobFill: CUtensorMapFloatOOBfill,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Create a tensor map descriptor object representing im2col memory region.
    ///
    /// Creates a descriptor for Tensor Memory Access (TMA) object specified by the parameters describing a im2col memory layout and returns it in `tensorMap`.
    ///
    /// Tensor map objects are only supported on devices of compute capability 9.0 or higher. Additionally, a tensor map object is an opaque value, and, as such, should only be accessed through CUDA APIs and PTX.
    ///
    /// The parameters passed are bound to the following requirements.
    ///
    /// # Parameters
    ///
    /// - `tensorMap`: Tensor map object to create.
    /// - `tensorDataType`: Tensor data type.
    /// - `tensorRank`: Dimensionality of tensor; must be at least 3.
    /// - `globalAddress`: Starting address of memory region described by tensor.
    /// - `globalDim`: Array containing tensor size (number of elements) along each of the `tensorRank` dimensions.
    /// - `globalStrides`: Array containing stride size (in bytes) along each of the `tensorRank` - 1 dimensions.
    /// - `pixelBoxLowerCorner`: Array containing DHW dimensions of lower box corner.
    /// - `pixelBoxUpperCorner`: Array containing DHW dimensions of upper box corner.
    /// - `channelsPerPixel`: Number of channels per pixel.
    /// - `pixelsPerColumn`: Number of pixels per column.
    /// - `elementStrides`: Array containing traversal stride in each of the `tensorRank` dimensions.
    /// - `interleave`: Type of interleaved layout the tensor addresses.
    /// - `swizzle`: Bank swizzling pattern inside shared memory.
    /// - `l2Promotion`: L2 promotion size.
    /// - `oobFill`: Indicate whether zero or special NaN constant will be used to fill out-of-bound elements.
    pub fn cuTensorMapEncodeIm2col(
        tensorMap: *mut CUtensorMap,
        tensorDataType: CUtensorMapDataType,
        tensorRank: cuuint32_t,
        globalAddress: *mut ::core::ffi::c_void,
        globalDim: *const cuuint64_t,
        globalStrides: *const cuuint64_t,
        pixelBoxLowerCorner: *const ::core::ffi::c_int,
        pixelBoxUpperCorner: *const ::core::ffi::c_int,
        channelsPerPixel: cuuint32_t,
        pixelsPerColumn: cuuint32_t,
        elementStrides: *const cuuint32_t,
        interleave: CUtensorMapInterleave,
        swizzle: CUtensorMapSwizzle,
        l2Promotion: CUtensorMapL2promotion,
        oobFill: CUtensorMapFloatOOBfill,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Create a tensor map descriptor object representing im2col memory region, but where the elements are exclusively loaded along the W dimension.
    ///
    /// Creates a descriptor for Tensor Memory Access (TMA) object specified by the parameters describing a im2col memory layout and where the row is always loaded along the W dimensuin and returns it in `tensorMap`. This assumes the tensor layout in memory is either NDHWC, NHWC, or NWC.
    ///
    /// This API is only supported on devices of compute capability 10.0 or higher. Additionally, a tensor map object is an opaque value, and, as such, should only be accessed through CUDA APIs and PTX.
    ///
    /// The parameters passed are bound to the following requirements:
    ///
    /// `globalDim` array, which specifies tensor size of each of the `tensorRank` dimensions, must be non-zero and less than or equal to 2^32. Additionally, the following requirements need to be met for the packed data types:
    ///
    /// `globalStrides` array, which specifies tensor stride of each of the lower `tensorRank` - 1 dimensions in bytes, must be a multiple of 16 and less than 2^40. Additionally, the following requirements need to be met:
    ///
    /// `pixelBoxLowerCornerWidth` specifies the coordinate offset W of the bounding box from left corner. The offset must be within range \[-32768, 32767\].
    ///
    /// The bounding box specified by `pixelBoxLowerCornerWidth` and `pixelBoxUpperCornerWidth` must have non-zero area. Note that the size of the box along D and H dimensions is always equal to one.
    ///
    /// Additionally, ::CU_TENSOR_MAP_SWIZZLE_96B is supported only when `mode` is [`CUtensorMapIm2ColWideMode::CU_TENSOR_MAP_IM2COL_WIDE_MODE_W`].
    ///
    /// # Parameters
    ///
    /// - `tensorMap`: Tensor map object to create.
    /// - `tensorDataType`: Tensor data type.
    /// - `tensorRank`: Dimensionality of tensor; must be at least 3.
    /// - `globalAddress`: Starting address of memory region described by tensor.
    /// - `globalDim`: Array containing tensor size (number of elements) along each of the `tensorRank` dimensions.
    /// - `globalStrides`: Array containing stride size (in bytes) along each of the `tensorRank` - 1 dimensions.
    /// - `pixelBoxLowerCornerWidth`: Width offset of left box corner.
    /// - `pixelBoxUpperCornerWidth`: Width offset of right box corner.
    /// - `channelsPerPixel`: Number of channels per pixel.
    /// - `pixelsPerColumn`: Number of pixels per column.
    /// - `elementStrides`: Array containing traversal stride in each of the `tensorRank` dimensions.
    /// - `interleave`: Type of interleaved layout the tensor addresses.
    /// - `mode`: W or W128 mode.
    /// - `swizzle`: Bank swizzling pattern inside shared memory.
    /// - `l2Promotion`: L2 promotion size.
    /// - `oobFill`: Indicate whether zero or special NaN constant will be used to fill out-of-bound elements.
    pub fn cuTensorMapEncodeIm2colWide(
        tensorMap: *mut CUtensorMap,
        tensorDataType: CUtensorMapDataType,
        tensorRank: cuuint32_t,
        globalAddress: *mut ::core::ffi::c_void,
        globalDim: *const cuuint64_t,
        globalStrides: *const cuuint64_t,
        pixelBoxLowerCornerWidth: ::core::ffi::c_int,
        pixelBoxUpperCornerWidth: ::core::ffi::c_int,
        channelsPerPixel: cuuint32_t,
        pixelsPerColumn: cuuint32_t,
        elementStrides: *const cuuint32_t,
        interleave: CUtensorMapInterleave,
        mode: CUtensorMapIm2ColWideMode,
        swizzle: CUtensorMapSwizzle,
        l2Promotion: CUtensorMapL2promotion,
        oobFill: CUtensorMapFloatOOBfill,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Modify an existing tensor map descriptor with an updated global address.
    ///
    /// Modifies the descriptor for Tensor Memory Access (TMA) object passed in `tensorMap` with an updated `globalAddress`.
    ///
    /// Tensor map objects are only supported on devices of compute capability 9.0 or higher. Additionally, a tensor map object is an opaque value, and, as such, should only be accessed through CUDA API calls.
    ///
    /// # Parameters
    ///
    /// - `tensorMap`: Tensor map object to modify.
    /// - `globalAddress`: Starting address of memory region described by tensor, must follow previous alignment requirements.
    pub fn cuTensorMapReplaceAddress(
        tensorMap: *mut CUtensorMap,
        globalAddress: *mut ::core::ffi::c_void,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Queries if a device may directly access a peer device’s memory.
    ///
    /// Returns in `*canAccessPeer` a value of 1 if contexts on `dev` are capable of directly accessing memory from contexts on `peerDev` and 0 otherwise. If direct access of `peerDev` from `dev` is possible, then access may be enabled on two specific contexts by calling [`cuCtxEnablePeerAccess`].
    ///
    /// # Parameters
    ///
    /// - `canAccessPeer`: Returned access capability.
    /// - `dev`: Device from which allocations on `peerDev` are to be directly accessed.
    /// - `peerDev`: Device on which the allocations to be directly accessed by `dev` reside.
    pub fn cuDeviceCanAccessPeer(
        canAccessPeer: *mut ::core::ffi::c_int,
        dev: CUdevice,
        peerDev: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Enables direct access to memory allocations in a peer context.
    ///
    /// If both the current context and `peerContext` are on devices which support unified addressing (as may be queried using [`CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING`]) and same major compute capability, then on success all allocations from `peerContext` will immediately be accessible by the current context. See [Unified Addressing](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__UNIFIED.html#group__cuda__unified) for additional details.
    ///
    /// Note that access granted by this call is unidirectional and that in order to access memory from the current context in `peerContext`, a separate symmetric call to [`cuCtxEnablePeerAccess`] is required.
    ///
    /// Note that there are both device-wide and system-wide limitations per system configuration, as noted in the CUDA Programming Guide under the section “Peer-to-Peer Memory Access”.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_PEER_ACCESS_UNSUPPORTED`] if [`cuDeviceCanAccessPeer`] indicates that the [CUdevice](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga41ca2a24a242b36ef2ca77330b5fb72a) of the current context cannot directly access memory from the [CUdevice](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga41ca2a24a242b36ef2ca77330b5fb72a) of `peerContext`.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED`] if direct access of `peerContext` from the current context has already been enabled.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_TOO_MANY_PEERS`] if direct peer access is not possible because hardware resources required for peer access have been exhausted.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_INVALID_CONTEXT`] if there is no current context, `peerContext` is not a valid context, or if the current context is `peerContext`.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] if `Flags` is not 0.
    ///
    /// # Parameters
    ///
    /// - `peerContext`: Peer context to enable direct access to from the current context.
    /// - `Flags`: Reserved for future use and must be set to 0.
    pub fn cuCtxEnablePeerAccess(
        peerContext: CUcontext,
        Flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Disables direct access to memory allocations in a peer context and unregisters any registered allocations.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_PEER_ACCESS_NOT_ENABLED`] if direct peer access has not yet been enabled from `peerContext` to the current context.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_INVALID_CONTEXT`] if there is no current context, or if `peerContext` is not a valid context.
    ///
    /// # Parameters
    ///
    /// - `peerContext`: - Peer context to disable direct access to
    pub fn cuCtxDisablePeerAccess(peerContext: CUcontext) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Queries attributes of the link between two devices.
    ///
    /// Returns in `*value` the value of the requested attribute `attrib` of the link between `srcDevice` and `dstDevice`. The supported attributes are:
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_INVALID_DEVICE`] if `srcDevice` or `dstDevice` are not valid or if they represent the same device.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] if `attrib` is not valid or if `value` is a null pointer.
    ///
    /// # Parameters
    ///
    /// - `value`: Returned value of the requested attribute.
    /// - `attrib`: The requested attribute of the link between `srcDevice` and `dstDevice`.
    /// - `srcDevice`: The source device of the target link.
    /// - `dstDevice`: The destination device of the target link.
    pub fn cuDeviceGetP2PAttribute(
        value: *mut ::core::ffi::c_int,
        attrib: CUdevice_P2PAttribute,
        srcDevice: CUdevice,
        dstDevice: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Queries details about atomic operations supported between two devices.
    ///
    /// Returns in `*capabilities` the details about requested atomic `*operations` over the link between `srcDevice` and `dstDevice`. The allocated size of `*operations` and `*capabilities` must be `count`.
    ///
    /// For each [CUatomicOperation](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gafd7012de0abfe50cee089f3f00d6dcf3) in `*operations`, the corresponding result in `*capabilities` will be a bitmask indicating which of [CUatomicOperationCapability](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1gaf8fbc0f84fd6461c5611b3935b26e22c) the link supports natively.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_INVALID_DEVICE`] if `srcDevice` or `dstDevice` are not valid or if they represent the same device.
    ///
    /// Returns [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] if `*capabilities` or `*operations` is NULL, if `count` is 0, or if any of `*operations` is not valid.
    ///
    /// # Parameters
    ///
    /// - `capabilities`: Returned capability details of each requested operation.
    /// - `operations`: Requested operations.
    /// - `count`: Count of requested operations and size of capabilities.
    /// - `srcDevice`: The source device of the target link.
    /// - `dstDevice`: The destination device of the target link.
    pub fn cuDeviceGetP2PAtomicCapabilities(
        capabilities: *mut ::core::ffi::c_uint,
        operations: *const CUatomicOperation,
        count: ::core::ffi::c_uint,
        srcDevice: CUdevice,
        dstDevice: CUdevice,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Unregisters a graphics resource for access by CUDA.
    ///
    /// Unregisters the graphics resource `resource` so it is not accessible by CUDA unless registered again.
    ///
    /// If `resource` is invalid then [`cudaError_enum::CUDA_ERROR_INVALID_HANDLE`] is returned.
    ///
    /// # Parameters
    ///
    /// - `resource`: - Resource to unregister
    pub fn cuGraphicsUnregisterResource(resource: CUgraphicsResource) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get an array through which to access a subresource of a mapped graphics resource.
    ///
    /// Returns in `*pArray` an array through which the subresource of the mapped graphics resource `resource` which corresponds to array index `arrayIndex` and mipmap level `mipLevel` may be accessed. The value set in `*pArray` may change every time that `resource` is mapped.
    ///
    /// If `resource` is not a texture then it cannot be accessed via an array and [`cudaError_enum::CUDA_ERROR_NOT_MAPPED_AS_ARRAY`] is returned. If `arrayIndex` is not a valid array index for `resource` then [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] is returned. If `mipLevel` is not a valid mipmap level for `resource` then [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`] is returned. If `resource` is not mapped then [`cudaError_enum::CUDA_ERROR_NOT_MAPPED`] is returned.
    ///
    /// # Parameters
    ///
    /// - `pArray`: Returned array through which a subresource of `resource` may be accessed.
    /// - `resource`: Mapped resource to access.
    /// - `arrayIndex`: Array index for array textures or cubemap face index as defined by [CUarray_cubemap_face](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/group__CUDA__TYPES.html#group__cuda__types_1ga012fda14b50e7db8798a340627c4c330) for cubemap textures for the subresource to access.
    /// - `mipLevel`: Mipmap level for the subresource to access.
    pub fn cuGraphicsSubResourceGetMappedArray(
        pArray: *mut CUarray,
        resource: CUgraphicsResource,
        arrayIndex: ::core::ffi::c_uint,
        mipLevel: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get a mipmapped array through which to access a mapped graphics resource.
    ///
    /// Returns in `*pMipmappedArray` a mipmapped array through which the mapped graphics resource `resource`. The value set in `*pMipmappedArray` may change every time that `resource` is mapped.
    ///
    /// If `resource` is not a texture then it cannot be accessed via a mipmapped array and [`cudaError_enum::CUDA_ERROR_NOT_MAPPED_AS_ARRAY`] is returned. If `resource` is not mapped then [`cudaError_enum::CUDA_ERROR_NOT_MAPPED`] is returned.
    ///
    /// # Parameters
    ///
    /// - `pMipmappedArray`: Returned mipmapped array through which `resource` may be accessed.
    /// - `resource`: Mapped resource to access.
    pub fn cuGraphicsResourceGetMappedMipmappedArray(
        pMipmappedArray: *mut CUmipmappedArray,
        resource: CUgraphicsResource,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get a device pointer through which to access a mapped graphics resource.
    ///
    /// Returns in `*pDevPtr` a pointer through which the mapped graphics resource `resource` may be accessed. Returns in `pSize` the size of the memory in bytes which may be accessed from that pointer. The value set in `pPointer` may change every time that `resource` is mapped.
    ///
    /// If `resource` is not a buffer then it cannot be accessed via a pointer and ::CUDA_ERROR_NOT_MAPPED_AS_POINTER is returned. If `resource` is not mapped then ::CUDA_ERROR_NOT_MAPPED is returned. *
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_NOT_MAPPED, ::CUDA_ERROR_NOT_MAPPED_AS_POINTER
    ///
    ///
    ///
    /// See also: ::cuGraphicsMapResources, ::cuGraphicsSubResourceGetMappedArray, ::cudaGraphicsResourceGetMappedPointer
    ///
    /// # Parameters
    ///
    /// - `pDevPtr`: - Returned pointer through which `resource` may be accessed
    /// - `pSize`: - Returned size of the buffer accessible starting at `*pPointer`
    /// - `resource`: - Mapped resource to access
    pub fn cuGraphicsResourceGetMappedPointer_v2(
        pDevPtr: *mut CUdeviceptr,
        pSize: *mut size_t,
        resource: CUgraphicsResource,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Set usage flags for mapping a graphics resource
    ///
    /// Set `flags` for mapping the graphics resource `resource`.
    ///
    /// Changes to `flags` will take effect the next time `resource` is mapped. The `flags` argument may be any of the following:
    ///
    /// - ::CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. It is therefore assumed that this resource will be read from and written to by CUDA kernels.  This is the default value.
    /// - ::CU_GRAPHICS_MAP_RESOURCE_FLAGS_READONLY: Specifies that CUDA kernels which access this resource will not write to this resource.
    /// - ::CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITEDISCARD: Specifies that CUDA kernels which access this resource will not read from this resource and will write over the entire contents of the resource, so none of the data previously stored in the resource will be preserved.
    ///
    /// If `resource` is presently mapped for access by CUDA then ::CUDA_ERROR_ALREADY_MAPPED is returned. If `flags` is not one of the above values then ::CUDA_ERROR_INVALID_VALUE is returned.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_ALREADY_MAPPED
    ///
    ///
    ///
    /// See also: ::cuGraphicsMapResources, ::cudaGraphicsResourceSetMapFlags
    ///
    /// # Parameters
    ///
    /// - `resource`: - Registered resource to set flags for
    /// - `flags`: - Parameters for resource mapping
    pub fn cuGraphicsResourceSetMapFlags_v2(
        resource: CUgraphicsResource,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Map graphics resources for access by CUDA.
    ///
    /// Maps the `count` graphics resources in `resources` for access by CUDA.
    ///
    /// The resources in `resources` may be accessed by CUDA until they are unmapped. The graphics API from which `resources` were registered should not access any resources while they are mapped by CUDA. If an application does so, the results are undefined.
    ///
    /// This function provides the synchronization guarantee that any graphics calls issued before [`cuGraphicsMapResources`] will complete before any subsequent CUDA work issued in `stream` begins.
    ///
    /// If `resources` includes any duplicate entries then [`cudaError_enum::CUDA_ERROR_INVALID_HANDLE`] is returned. If any of `resources` are presently mapped for access by CUDA then [`cudaError_enum::CUDA_ERROR_ALREADY_MAPPED`] is returned.
    ///
    /// # Parameters
    ///
    /// - `count`: Number of resources to map.
    /// - `resources`: Resources to map for CUDA usage.
    /// - `hStream`: Stream with which to synchronize.
    pub fn cuGraphicsMapResources(
        count: ::core::ffi::c_uint,
        resources: *mut CUgraphicsResource,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Unmap graphics resources.
    ///
    /// Unmaps the `count` graphics resources in `resources`.
    ///
    /// Once unmapped, the resources in `resources` may not be accessed by CUDA until they are mapped again.
    ///
    /// This function provides the synchronization guarantee that any CUDA work issued in `stream` before [`cuGraphicsUnmapResources`] will complete before any subsequently issued graphics work begins.
    ///
    /// If `resources` includes any duplicate entries then [`cudaError_enum::CUDA_ERROR_INVALID_HANDLE`] is returned. If any of `resources` are not presently mapped for access by CUDA then [`cudaError_enum::CUDA_ERROR_NOT_MAPPED`] is returned.
    ///
    /// # Parameters
    ///
    /// - `count`: Number of resources to unmap.
    /// - `resources`: Resources to unmap.
    /// - `hStream`: Stream with which to synchronize.
    pub fn cuGraphicsUnmapResources(
        count: ::core::ffi::c_uint,
        resources: *mut CUgraphicsResource,
        hStream: CUstream,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the requested driver API function pointer
    ///
    /// Returns in `**pfn` the address of the CUDA driver function for the requested CUDA version and flags.
    ///
    /// The CUDA version is specified as (1000 * major + 10 * minor), so CUDA 11.2 should be specified as 11020. For a requested driver symbol, if the specified CUDA version is greater than or equal to the CUDA version in which the driver symbol was introduced, this API will return the function pointer to the corresponding versioned function. If the specified CUDA version is greater than the driver version, the API will return ::CUDA_ERROR_INVALID_VALUE.
    ///
    /// The pointer returned by the API should be cast to a function pointer matching the requested driver function's definition in the API header file. The function pointer typedef can be picked up from the corresponding typedefs header file. For example, cudaTypedefs.h consists of function pointer typedefs for driver APIs defined in cuda.h.
    ///
    /// The API will return ::CUDA_SUCCESS and set the returned `pfn` to NULL if the requested driver function is not supported on the platform, no ABI compatible driver function exists for the specified `cudaVersion` or if the driver symbol is invalid.
    ///
    /// It will also set the optional `symbolStatus` to one of the values in ::CUdriverProcAddressQueryResult with the following meanings:
    /// - ::CU_GET_PROC_ADDRESS_SUCCESS - The requested symbol was succesfully found based on input arguments and `pfn` is valid
    /// - ::CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND - The requested symbol was not found
    /// - ::CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT - The requested symbol was found but is not supported by cudaVersion specified
    ///
    /// The requested flags can be:
    /// - ::CU_GET_PROC_ADDRESS_DEFAULT: This is the default mode. This is equivalent to ::CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM if the code is compiled with --default-stream per-thread compilation flag or the macro CUDA_API_PER_THREAD_DEFAULT_STREAM is defined; ::CU_GET_PROC_ADDRESS_LEGACY_STREAM otherwise.
    /// - ::CU_GET_PROC_ADDRESS_LEGACY_STREAM: This will enable the search for all driver symbols that match the requested driver symbol name except the corresponding per-thread versions.
    /// - ::CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM: This will enable the search for all driver symbols that match the requested driver symbol name including the per-thread versions. If a per-thread version is not found, the API will return the legacy version of the driver function.
    ///
    ///
    ///
    ///
    ///
    /// # Return value
    ///
    /// ::CUDA_SUCCESS, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_NOT_SUPPORTED
    ///
    /// Note: _version_mixing
    ///
    ///
    ///
    /// See also: ::cudaGetDriverEntryPointByVersion
    ///
    /// # Parameters
    ///
    /// - `symbol`: - The base name of the driver API function to look for. As an example, for the driver API ::cuMemAlloc_v2, `symbol` would be cuMemAlloc and `cudaVersion` would be the ABI compatible CUDA version for the _v2 variant.
    /// - `pfn`: - Location to return the function pointer to the requested driver function
    /// - `cudaVersion`: - The CUDA version to look for the requested driver symbol
    /// - `flags`: -  Flags to specify search options.
    /// - `symbolStatus`: - Optional location to store the status of the search for `symbol` based on `cudaVersion`. See ::CUdriverProcAddressQueryResult for possible values.
    pub fn cuGetProcAddress_v2(
        symbol: *const ::core::ffi::c_char,
        pfn: *mut *mut ::core::ffi::c_void,
        cudaVersion: ::core::ffi::c_int,
        flags: cuuint64_t,
        symbolStatus: *mut CUdriverProcAddressQueryResult,
    ) -> CUresult;
}
impl CUcoredumpSettings_enum {
    /// Bool where ::true means that GPU exceptions from this context will create a coredump at the location specified by ::CU_COREDUMP_FILE. The default value is ::false unless set to ::true globally or locally, or the CU_CTX_USER_COREDUMP_ENABLE flag was set during context creation.
    pub const CU_COREDUMP_ENABLE_ON_EXCEPTION: CUcoredumpSettings_enum = CUcoredumpSettings_enum(
        1,
    );
    /// Bool where ::true means that the host CPU will also create a coredump. The default value is ::true unless set to ::false globally or or locally. This value is deprecated as of CUDA 12.5 - raise the ::CU_COREDUMP_SKIP_ABORT flag to disable host device abort() if needed.
    pub const CU_COREDUMP_TRIGGER_HOST: CUcoredumpSettings_enum = CUcoredumpSettings_enum(
        2,
    );
    /// Bool where ::true means that any resulting coredumps will not have a dump of GPU memory or non-reloc ELF images. The default value is ::false unless set to ::true globally or locally. This attribute is deprecated as of CUDA 12.5, please use ::CU_COREDUMP_GENERATION_FLAGS instead.
    pub const CU_COREDUMP_LIGHTWEIGHT: CUcoredumpSettings_enum = CUcoredumpSettings_enum(
        3,
    );
    /// Bool where ::true means that a coredump can be created by writing to the system pipe specified by ::CU_COREDUMP_PIPE. The default value is ::false unless set to ::true globally or locally.
    pub const CU_COREDUMP_ENABLE_USER_TRIGGER: CUcoredumpSettings_enum = CUcoredumpSettings_enum(
        4,
    );
    /// String of up to 1023 characters that defines the location where any coredumps generated by this context will be written. The default value is ::core.cuda.HOSTNAME.PID where ::HOSTNAME is the host name of the machine running the CUDA applications and ::PID is the process ID of the CUDA application.
    pub const CU_COREDUMP_FILE: CUcoredumpSettings_enum = CUcoredumpSettings_enum(5);
    /// String of up to 1023 characters that defines the name of the pipe that will be monitored if user-triggered coredumps are enabled. The default value is ::corepipe.cuda.HOSTNAME.PID where ::HOSTNAME is the host name of the machine running the CUDA application and ::PID is the process ID of the CUDA application.
    pub const CU_COREDUMP_PIPE: CUcoredumpSettings_enum = CUcoredumpSettings_enum(6);
    /// An integer with values to allow granular control the data contained in a coredump specified as a bitwise OR combination of the following values:
    pub const CU_COREDUMP_GENERATION_FLAGS: CUcoredumpSettings_enum = CUcoredumpSettings_enum(
        7,
    );
    /// End marker for native GPU coredump setting identifiers.
    pub const CU_COREDUMP_MAX: CUcoredumpSettings_enum = CUcoredumpSettings_enum(8);
}
/// Flags for choosing a coredump attribute to get/set
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUcoredumpSettings_enum(pub ::core::ffi::c_uint);
pub use self::CUcoredumpSettings_enum as CUcoredumpSettings;
impl CUCoredumpGenerationFlags {
    /// if set by itself, coredump generation returns to its default settings of including all memory regions that it is able to access
    pub const CU_COREDUMP_DEFAULT_FLAGS: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        0,
    );
    /// Coredump will not include the data from CUDA source modules that are not relocated at runtime.
    pub const CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        1,
    );
    /// Coredump will not include device-side global data that does not belong to any context.
    pub const CU_COREDUMP_SKIP_GLOBAL_MEMORY: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        2,
    );
    /// Coredump will not include grid-scale shared memory for the warp that the dumped kernel belonged to.
    pub const CU_COREDUMP_SKIP_SHARED_MEMORY: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        4,
    );
    /// Coredump will not include local memory from the kernel.
    pub const CU_COREDUMP_SKIP_LOCAL_MEMORY: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        8,
    );
    /// If set, GPU exceptions will not raise an abort() in the host CPU process. Same functional goal as ::CU_COREDUMP_TRIGGER_HOST but better reflects the default behavior.
    pub const CU_COREDUMP_SKIP_ABORT: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        16,
    );
    /// Coredump will not include constbank memory.
    pub const CU_COREDUMP_SKIP_CONSTBANK_MEMORY: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        32,
    );
    /// The generated coredump will be compressed with gzip, and .gz suffix will be appended to the filename, if it's not a part of it already.
    pub const CU_COREDUMP_GZIP_COMPRESS: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        64,
    );
    /// The coredump will only include contexts that have encountered an exception or a trap.
    pub const CU_COREDUMP_FAULTED_CONTEXTS_ONLY: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        128,
    );
    /// By default, when coredumps are requested, the GPU will ensure memory faults and other errors prevent warps from exiting, if possible. This can potentially affect the performance of the application. Setting this flag will disable this functionality, making it possible for faulted warps to exit, but also avoiding the potential performance hit.
    pub const CU_COREDUMP_NO_ERRBAR_AT_EXIT: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        1073741824,
    );
    /// Setting this flag will disable actual generation of the coredump file, but exception details will still be logged.
    pub const CU_COREDUMP_LOG_ONLY: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        -2147483648,
    );
    /// Enables all of the above options. Equiavlent to setting the ::CU_COREDUMP_LIGHTWEIGHT attribute to ::true.
    pub const CU_COREDUMP_LIGHTWEIGHT_FLAGS: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(
        47,
    );
}
/// Flags for controlling coredump contents.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUCoredumpGenerationFlags(pub ::core::ffi::c_int);
singe_loader::functions! { crate::DRIVER;
    /// Allows caller to fetch a coredump attribute value for the current context.
    ///
    /// Returns in `*value` the requested value specified by `attrib`. It is up to the caller to ensure that the data type and size of `*value` matches the request.
    ///
    /// If the caller calls this function with `*value` equal to NULL, the size of the memory region (in bytes) expected for `attrib` will be placed in `size`.
    ///
    /// The supported attributes are.
    ///
    /// # Parameters
    ///
    /// - `attrib`: The enum defining which value to fetch.
    /// - `value`: void\* containing the requested data.
    /// - `size`: The size of the memory region `value` points to.
    pub fn cuCoredumpGetAttribute(
        attrib: CUcoredumpSettings,
        value: *mut ::core::ffi::c_void,
        size: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Allows caller to fetch a coredump attribute value for the entire application.
    ///
    /// Returns in `*value` the requested value specified by `attrib`. It is up to the caller to ensure that the data type and size of `*value` matches the request.
    ///
    /// If the caller calls this function with `*value` equal to NULL, the size of the memory region (in bytes) expected for `attrib` will be placed in `size`.
    ///
    /// The supported attributes are.
    ///
    /// # Parameters
    ///
    /// - `attrib`: The enum defining which value to fetch.
    /// - `value`: void\* containing the requested data.
    /// - `size`: The size of the memory region `value` points to.
    pub fn cuCoredumpGetAttributeGlobal(
        attrib: CUcoredumpSettings,
        value: *mut ::core::ffi::c_void,
        size: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Allows caller to set a coredump attribute value for the current context.
    ///
    /// This function should be considered an alternate interface to the CUDA-GDB environment variables defined in this document: <https://docs.nvidia.com/cuda/cuda-gdb/index.html#gpu-coredump>
    ///
    /// An important design decision to note is that any coredump environment variable values set before CUDA initializes will take permanent precedence over any values set with this function. This decision was made to ensure no change in behavior for any users that may be currently using these variables to get coredumps.
    ///
    /// `*value` shall contain the requested value specified by `set`. It is up to the caller to ensure that the data type and size of `*value` matches the request.
    ///
    /// If the caller calls this function with `*value` equal to NULL, the size of the memory region (in bytes) expected for `set` will be placed in `size`.
    ///
    /// /note This function will return [`cudaError_enum::CUDA_ERROR_NOT_SUPPORTED`] if the caller attempts to set [`CUcoredumpSettings::CU_COREDUMP_ENABLE_ON_EXCEPTION`] on a GPU of with Compute Capability &lt; 6.0. [`cuCoredumpSetAttributeGlobal`] works on those platforms as an alternative.
    ///
    /// /note [`CUcoredumpSettings::CU_COREDUMP_ENABLE_USER_TRIGGER`] and [`CUcoredumpSettings::CU_COREDUMP_PIPE`] cannot be set on a per-context basis.
    ///
    /// The supported attributes are.
    ///
    /// # Parameters
    ///
    /// - `attrib`: The enum defining which value to set.
    /// - `value`: void\* containing the requested data.
    /// - `size`: The size of the memory region `value` points to.
    pub fn cuCoredumpSetAttribute(
        attrib: CUcoredumpSettings,
        value: *mut ::core::ffi::c_void,
        size: *mut size_t,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Allows caller to set a coredump attribute value globally.
    ///
    /// This function should be considered an alternate interface to the CUDA-GDB environment variables defined in this document: <https://docs.nvidia.com/cuda/cuda-gdb/index.html#gpu-coredump>
    ///
    /// An important design decision to note is that any coredump environment variable values set before CUDA initializes will take permanent precedence over any values set with this function. This decision was made to ensure no change in behavior for any users that may be currently using these variables to get coredumps.
    ///
    /// `*value` shall contain the requested value specified by `set`. It is up to the caller to ensure that the data type and size of `*value` matches the request.
    ///
    /// If the caller calls this function with `*value` equal to NULL, the size of the memory region (in bytes) expected for `set` will be placed in `size`.
    ///
    /// The supported attributes are.
    ///
    /// # Parameters
    ///
    /// - `attrib`: The enum defining which value to set.
    /// - `value`: void\* containing the requested data.
    /// - `size`: The size of the memory region `value` points to.
    pub fn cuCoredumpSetAttributeGlobal(
        attrib: CUcoredumpSettings,
        value: *mut ::core::ffi::c_void,
        size: *mut size_t,
    ) -> CUresult;
}
/// Incomplete native type used by [`CUcoredumpCallbackHandle`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUcoredumpCallbackEntry_st {
    _unused: [u8; 0],
}
/// Opaque handle representing a registered coredump status callback.
///
/// This handle is returned when registering a callback and must be provided when deregistering the callback.
pub type CUcoredumpCallbackHandle = *mut CUcoredumpCallbackEntry_st;
/// Callback function prototype for GPU coredump status notifications.
///
/// This callback will be invoked when a GPU coredump begins or completes, depending on which registration function was used. The callback executes synchronously during the coredump process.
pub type CUcoredumpStatusCallback = ::core::option::Option<
    unsafe extern "C" fn(
        userData: *mut ::core::ffi::c_void,
        pid: ::core::ffi::c_int,
        dev: CUdevice,
    ),
>;
singe_loader::functions! { crate::DRIVER;
    /// Register a callback to be invoked when a GPU coredump begins.
    ///
    /// This function registers a callback that will be called when a GPU coredump is initiated, before any coredump data is collected. Callbacks are executed in the order they were registered. The same callback function can be registered multiple times with different userData, and each registration will receive a unique handle.
    ///
    /// # Parameters
    ///
    /// - `callback`: The callback function to register.
    /// - `userData`: User data pointer to pass to the callback.
    /// - `callbackOut`: Location to store the callback handle (optional, may be NULL).
    pub fn cuCoredumpRegisterStartCallback(
        callback: CUcoredumpStatusCallback,
        userData: *mut ::core::ffi::c_void,
        callbackOut: *mut CUcoredumpCallbackHandle,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Register a callback to be invoked when a GPU coredump completes.
    ///
    /// This function registers a callback that will be called when a GPU coredump has been fully collected and written to disk. Callbacks are executed in the order they were registered. The same callback function can be registered multiple times with different userData, and each registration will receive a unique handle.
    ///
    /// # Parameters
    ///
    /// - `callback`: The callback function to register.
    /// - `userData`: User data pointer to pass to the callback.
    /// - `callbackOut`: Location to store the callback handle (optional, may be NULL).
    pub fn cuCoredumpRegisterCompleteCallback(
        callback: CUcoredumpStatusCallback,
        userData: *mut ::core::ffi::c_void,
        callbackOut: *mut CUcoredumpCallbackHandle,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Deregister a previously registered coredump start callback.
    ///
    /// This function removes a callback that was registered with [`cuCoredumpRegisterStartCallback`]. The callback handle becomes invalid after this call.
    ///
    /// # Parameters
    ///
    /// - `callback`: - The callback handle to deregister
    pub fn cuCoredumpDeregisterStartCallback(
        callback: CUcoredumpCallbackHandle,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Deregister a previously registered coredump complete callback.
    ///
    /// This function removes a callback that was registered with [`cuCoredumpRegisterCompleteCallback`]. The callback handle becomes invalid after this call.
    ///
    /// # Parameters
    ///
    /// - `callback`: - The callback handle to deregister
    pub fn cuCoredumpDeregisterCompleteCallback(
        callback: CUcoredumpCallbackHandle,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Retrieves a driver export table identified by `pExportTableId` and writes its address to `ppExportTable`. The table layout is defined by the interface associated with that identifier. Returns a CUDA driver status code.
    pub fn cuGetExportTable(
        ppExportTable: *mut *const ::core::ffi::c_void,
        pExportTableId: *const CUuuid,
    ) -> CUresult;
}
/// Incomplete native type used by [`CUdevResourceDesc`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUdevResourceDesc_st {
    _unused: [u8; 0],
}
/// An opaque descriptor handle. The descriptor encapsulates multiple created and configured resources. Created via [`cuDevResourceGenerateDesc`].
pub type CUdevResourceDesc = *mut CUdevResourceDesc_st;
impl CUgreenCtxCreate_flags {
    /// Default behavior.
    pub const CU_GREEN_CTX_NONE: CUgreenCtxCreate_flags = CUgreenCtxCreate_flags(0);
    /// Creates a default stream to use inside the green context.
    pub const CU_GREEN_CTX_DEFAULT_STREAM: CUgreenCtxCreate_flags = CUgreenCtxCreate_flags(
        1,
    );
}
/// Flags for green context creation.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUgreenCtxCreate_flags(pub ::core::ffi::c_uint);
impl CUdevSmResourceGroup_flags {
    /// Uses the default SM-resource grouping policy.
    pub const CU_DEV_SM_RESOURCE_GROUP_DEFAULT: CUdevSmResourceGroup_flags = CUdevSmResourceGroup_flags(
        0,
    );
    /// Treats constraints as a hint, ignoring them if necessary to reach the requested `smCount`. Lets `smCount` be a non-multiple of `coscheduledSmCount`, filling the difference between SM count and already assigned co-scheduled groupings with other SMs. This lets any resulting group behave similar to the `remainder` group for example. When used with [`CUdevSmResourceGroup_flags::CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID`], backfill fills up to the requested `smCount` using the target locality domain first, then SMs not attributed to any locality domain, then SMs from other locality domains. If no SMs can be found in the requested locality domain, CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned.
    pub const CU_DEV_SM_RESOURCE_GROUP_BACKFILL: CUdevSmResourceGroup_flags = CUdevSmResourceGroup_flags(
        1,
    );
    /// The SMs must be located on a specific locality domain, specified by localityDomainId.
    pub const CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID: CUdevSmResourceGroup_flags = CUdevSmResourceGroup_flags(
        2,
    );
}
/// Flags for a [CUdevSmResource](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUdevSmResource.html#structcudevsmresource) group.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdevSmResourceGroup_flags(pub ::core::ffi::c_uint);
impl CUdevSmResourceSplitByCount_flags {
    /// Lower the minimum SM count and alignment, and treat each SM independent of its hierarchy. This allows more fine grained partitions but at the cost of advanced features (such as large clusters on compute capability 9.0+).
    pub const CU_DEV_SM_RESOURCE_SPLIT_IGNORE_SM_COSCHEDULING: CUdevSmResourceSplitByCount_flags = CUdevSmResourceSplitByCount_flags(
        1,
    );
    /// Compute Capability 9.0+ only. Attempt to create groups that may allow for maximally sized thread clusters. This can be queried post green context creation using ::cuOccupancyMaxPotentialClusterSize.
    pub const CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE: CUdevSmResourceSplitByCount_flags = CUdevSmResourceSplitByCount_flags(
        2,
    );
}
/// Flags controlling SM-resource partition granularity and supported thread-block cluster sizes.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdevSmResourceSplitByCount_flags(pub ::core::ffi::c_uint);
impl CUdevResourceType {
    /// No valid device resource kind is selected.
    pub const CU_DEV_RESOURCE_TYPE_INVALID: CUdevResourceType = CUdevResourceType(0);
    /// Streaming multiprocessors related information.
    pub const CU_DEV_RESOURCE_TYPE_SM: CUdevResourceType = CUdevResourceType(1);
    /// Workqueue configuration related information.
    pub const CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG: CUdevResourceType = CUdevResourceType(
        1000,
    );
    /// Pre-existing workqueue related information.
    pub const CU_DEV_RESOURCE_TYPE_WORKQUEUE: CUdevResourceType = CUdevResourceType(
        10000,
    );
}
/// Type of resource.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdevResourceType(pub ::core::ffi::c_uint);
/// Data for SM-related resources All parameters in this structure are OUTPUT only. Do not write to any of the fields in this structure.
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdevSmResource_st {
    /// The amount of streaming multiprocessors available in this resource.
    pub smCount: ::core::ffi::c_uint,
    /// The minimum number of streaming multiprocessors required to partition this resource.
    pub minSmPartitionSize: ::core::ffi::c_uint,
    /// The number of streaming multiprocessors in this resource that are guaranteed to be co-scheduled on the same GPU processing cluster. smCount will be a multiple of this value, unless the backfill flag is set.
    pub smCoscheduledAlignment: ::core::ffi::c_uint,
    /// The flags set on this SM resource. For possible values see ::CUdevSmResourceGroup_flags.
    pub flags: ::core::ffi::c_uint,
    /// Locality domain that the SM must be located on. Only valid if CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags. If the backfill flag is set, SMs may be assigned from other locality domains.
    pub localityDomainId: ::core::ffi::c_uint,
}
/// Data for SM-related resources All parameters in this structure are OUTPUT only. Do not write to any of the fields in this structure.
pub type CUdevSmResource = CUdevSmResource_st;
impl CUdevWorkqueueConfigScope {
    /// Use all shared workqueue resources across all contexts.
    ///
    /// Default driver behavior.
    pub const CU_WORKQUEUE_SCOPE_DEVICE_CTX: CUdevWorkqueueConfigScope = CUdevWorkqueueConfigScope(
        0,
    );
    /// When possible, use non-overlapping workqueue resources with other balanced green contexts.
    pub const CU_WORKQUEUE_SCOPE_GREEN_CTX_BALANCED: CUdevWorkqueueConfigScope = CUdevWorkqueueConfigScope(
        1,
    );
}
/// Sharing scope for workqueues.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdevWorkqueueConfigScope(pub ::core::ffi::c_uint);
/// Data for workqueue configuration related resources
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdevWorkqueueConfigResource_st {
    /// The device on which the workqueue resources are available
    pub device: CUdevice,
    /// The expected maximum number of concurrent stream-ordered workloads
    pub wqConcurrencyLimit: ::core::ffi::c_uint,
    /// The sharing scope for the workqueue resources
    pub sharingScope: CUdevWorkqueueConfigScope,
}
impl Default for CUdevWorkqueueConfigResource_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Data for workqueue configuration related resources.
pub type CUdevWorkqueueConfigResource = CUdevWorkqueueConfigResource_st;
/// Handle to a pre-existing workqueue related resource
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUdevWorkqueueResource_st {
    /// Reserved for future use
    pub reserved: [::core::ffi::c_uchar; 40usize],
}
impl Default for CUdevWorkqueueResource_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Handle to a pre-existing workqueue related resource.
pub type CUdevWorkqueueResource = CUdevWorkqueueResource_st;
/// Input data for splitting SMs
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CU_DEV_SM_RESOURCE_GROUP_PARAMS_st {
    /// The amount of SMs available in this resource.
    pub smCount: ::core::ffi::c_uint,
    /// The amount of co-scheduled SMs grouped together for locality purposes.
    pub coscheduledSmCount: ::core::ffi::c_uint,
    /// When possible, combine co-scheduled groups together into larger groups of this size.
    pub preferredCoscheduledSmCount: ::core::ffi::c_uint,
    /// The flags set on this SM resource group. For possible values see ::CUdevSmResourceGroup_flags.
    pub flags: ::core::ffi::c_uint,
    /// Locality domain that the SM must be located on. Only valid if CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags
    pub localityDomainId: ::core::ffi::c_uint,
    /// Reserved storage in the native ABI.
    pub reserved: [::core::ffi::c_uint; 11usize],
}
/// Input data for splitting SMs.
pub type CU_DEV_SM_RESOURCE_GROUP_PARAMS = CU_DEV_SM_RESOURCE_GROUP_PARAMS_st;
/// A tagged union describing different resources identified by the type field. This structure should not be directly modified outside of the API that created it.
///
///
///
/// ```text
///  struct {
///      CUdevResourceType type;
///      union {
///          CUdevSmResource sm;
///            CUdevWorkqueueConfigResource wqConfig;
///            CUdevWorkqueueResource wq;
///      };
///  };
/// ```
///
/// - If `type` is [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_INVALID`], this resoure is not valid and cannot be further accessed.
/// - If `type` is [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_SM`], the ::CUdevSmResource structure `sm` is filled in. For example, `sm.smCount` will reflect the amount of streaming multiprocessors available in this resource.
/// - If `type` is [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG`], the ::CUdevWorkqueueConfigResource structure `wqConfig` is filled in.
/// - If `type` is [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_WORKQUEUE`], the ::CUdevWorkqueueResource structure `wq` is filled in.
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CUdevResource_st {
    /// Type of resource, dictates which union field was last set.
    pub type_: CUdevResourceType,
    /// Internal padding in the native ABI layout.
    pub _internal_padding: [::core::ffi::c_uchar; 92usize],
    /// Anonymous native member. See [`CUdevResource_st__bindgen_ty_1`] for its fields.
    pub __bindgen_anon_1: CUdevResource_st__bindgen_ty_1,
    /// Link to another resource in a native device-resource chain.
    pub nextResource: *mut CUdevResource_st,
}
/// Anonymous native union in [`CUdevResource_st`]. Its members share the same storage.
#[repr(C)]
#[derive(Copy, Clone)]
pub union CUdevResource_st__bindgen_ty_1 {
    /// Resource corresponding to CU_DEV_RESOURCE_TYPE_SM `type`.
    pub sm: CUdevSmResource,
    /// Resource corresponding to CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG `type`.
    pub wqConfig: CUdevWorkqueueConfigResource,
    /// Resource corresponding to CU_DEV_RESOURCE_TYPE_WORKQUEUE `type`.
    pub wq: CUdevWorkqueueResource,
    /// Storage that fixes the native union's ABI size.
    pub _oversize: [::core::ffi::c_uchar; 40usize],
}
impl Default for CUdevResource_st__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for CUdevResource_st {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// A tagged union describing different resources identified by the type field. This structure should not be directly modified outside of the API that created it.
///
///
///
/// ```text
///  struct {
///      CUdevResourceType type;
///      union {
///          CUdevSmResource sm;
///            CUdevWorkqueueConfigResource wqConfig;
///            CUdevWorkqueueResource wq;
///      };
///  };
/// ```
///
/// - If `type` is [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_INVALID`], this resoure is not valid and cannot be further accessed.
/// - If `type` is [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_SM`], the ::CUdevSmResource structure `sm` is filled in. For example, `sm.smCount` will reflect the amount of streaming multiprocessors available in this resource.
/// - If `type` is [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG`], the ::CUdevWorkqueueConfigResource structure `wqConfig` is filled in.
/// - If `type` is [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_WORKQUEUE`], the ::CUdevWorkqueueResource structure `wq` is filled in.
pub type CUdevResource_v1 = CUdevResource_st;
/// A tagged union describing different resources identified by the type field. This structure should not be directly modified outside of the API that created it.
pub type CUdevResource = CUdevResource_v1;
singe_loader::functions! { crate::DRIVER;
    /// Creates a green context with a specified set of resources.
    ///
    /// This API creates a green context with the resources specified in the descriptor `desc` and returns it in the handle represented by `phCtx`. This API will retain the primary context on device `dev`, which will is released when the green context is destroyed. It is advised to have the primary context active before calling this API to avoid the heavy cost of triggering primary context initialization and deinitialization multiple times.
    ///
    /// The API does not set the green context current. In order to set it current, you need to explicitly set it current by first converting the green context to a CUcontext using [`cuCtxFromGreenCtx`] and subsequently calling [`cuCtxSetCurrent`] / cuCtxPushCurrent. It should be noted that a green context can be current to only one thread at a time. There is no internal synchronization to make API calls accessing the same green context from multiple threads work.
    ///
    /// Note: The API is not supported on 32-bit platforms.
    ///
    /// The supported flags are.
    ///
    /// # Parameters
    ///
    /// - `phCtx`: Pointer for the output handle to the green context.
    /// - `desc`: Descriptor generated via [`cuDevResourceGenerateDesc`] which contains the set of resources to be used.
    /// - `dev`: Device on which to create the green context.
    /// - `flags`: One of the supported green context creation flags.
    pub fn cuGreenCtxCreate(
        phCtx: *mut CUgreenCtx,
        desc: CUdevResourceDesc,
        dev: CUdevice,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Destroys a green context.
    ///
    /// Destroys the green context, releasing the primary context of the device that this green context was created for. Any resources provisioned for this green context (that were initially available via the resource descriptor) are released as well. The API does not destroy streams created via [`cuGreenCtxStreamCreate`], [`cuStreamCreate`], or [`cuStreamCreateWithPriority`]. Users are expected to destroy these streams explicitly using cuStreamDestroy to avoid resource leaks. Once the green context is destroyed, any subsequent API calls involving these streams will return [`cudaError_enum::CUDA_ERROR_STREAM_DETACHED`] with the exception of the following APIs:
    ///
    /// Additionally, the API will invalidate all active captures on these streams.
    ///
    /// # Parameters
    ///
    /// - `hCtx`: - Green context to be destroyed
    pub fn cuGreenCtxDestroy(hCtx: CUgreenCtx) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns a [`CUcontext`] handle for a green context.
    ///
    /// This API returns in `pContext` a [`CUcontext`] handle that represents the specified green context `hCtx`. The returned handle can be passed to CUDA APIs that accept a [`CUcontext`] and will be treated as if it were a primary context, while still honoring the resources and configuration associated with `hCtx` as applicable.
    ///
    /// Applications that wish to use a green context with CUDA APIs that require a [`CUcontext`] must use this API to obtain a handle to a [`CUcontext`] representing the green context. Otherwise, passing a green context to such APIs will fail with [`cudaError_enum::CUDA_ERROR_INVALID_CONTEXT`].
    ///
    /// The [`CUcontext`] returned by [`cuCtxFromGreenCtx`] may be passed to CUDA Driver APIs that accept a [`CUcontext`].
    ///
    /// This call does not create a new independent context and does not change the underlying context lifetime. The validity of the returned `pContext` is tied to `hCtx`, and no additional destruction or release is required beyond correctly managing `hCtx` with the green context APIs. Destroying `pContext` via cuCtxDestroy is undefined behavior.
    ///
    /// # Parameters
    ///
    /// - `pContext`: Returned [`CUcontext`] with green context resources.
    /// - `hCtx`: Green context to convert.
    pub fn cuCtxFromGreenCtx(pContext: *mut CUcontext, hCtx: CUgreenCtx) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get device resources.
    ///
    /// Get the `type` resources available to the `device`. This may often be the starting point for further partitioning or configuring of resources.
    ///
    /// Note: The API is not supported on 32-bit platforms.
    ///
    /// # Parameters
    ///
    /// - `device`: Device to get resource for.
    /// - `resource`: Output pointer to a [CUdevResource](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUdevResource.html#structcudevresource) structure.
    /// - `type_`: Type of resource to retrieve.
    pub fn cuDeviceGetDevResource(
        device: CUdevice,
        resource: *mut CUdevResource,
        type_: CUdevResourceType,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get context resources.
    ///
    /// Get the `type` resources available to the context represented by `hCtx`
    /// Note: The API is not supported on 32-bit platforms.
    ///
    /// # Parameters
    ///
    /// - `hCtx`: Context to get resource for.
    /// - `resource`: Output pointer to a [CUdevResource](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUdevResource.html#structcudevresource) structure.
    /// - `type_`: Type of resource to retrieve.
    pub fn cuCtxGetDevResource(
        hCtx: CUcontext,
        resource: *mut CUdevResource,
        type_: CUdevResourceType,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get green context resources.
    ///
    /// Get the `type` resources available to the green context represented by `hCtx`.
    ///
    /// # Parameters
    ///
    /// - `hCtx`: Green context to get resource for.
    /// - `resource`: Output pointer to a [CUdevResource](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUdevResource.html#structcudevresource) structure.
    /// - `type_`: Type of resource to retrieve.
    pub fn cuGreenCtxGetDevResource(
        hCtx: CUgreenCtx,
        resource: *mut CUdevResource,
        type_: CUdevResourceType,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Splits [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_SM`] resources.
    ///
    /// Splits [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_SM`] resources into `nbGroups`, adhering to the minimum SM count specified in `minCount` and the usage flags in `flags`. If `result` is NULL, the API simulates a split and provides the amount of groups that would be created in `nbGroups`. Otherwise, `nbGroups` must point to the amount of elements in `result` and on return, the API will overwrite `nbGroups` with the amount actually created. The groups are written to the array in `result`. `nbGroups` can be less than the total amount if a smaller number of groups is needed.
    ///
    /// This API is used to spatially partition the input resource. The input resource needs to come from one of [`cuDeviceGetDevResource`], [`cuCtxGetDevResource`], or [`cuGreenCtxGetDevResource`]. A limitation of the API is that the output results cannot be split again without first creating a descriptor and a green context with that descriptor.
    ///
    /// When creating the groups, the API will take into account the performance and functional characteristics of the input resource, and guarantee a split that will create a disjoint set of symmetrical partitions. This may lead to fewer groups created than purely dividing the total SM count by the `minCount` due to cluster requirements or alignment and granularity requirements for the minCount. These requirements can be queried with [`cuDeviceGetDevResource`], [`cuCtxGetDevResource`], and [`cuGreenCtxGetDevResource`] for [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_SM`], using the `minSmPartitionSize` and `smCoscheduledAlignment` fields to determine minimum partition size and alignment granularity, respectively.
    ///
    /// The `remainder` set does not have the same functional or performance guarantees as the groups in `result`. Its use should be carefully planned and future partitions of the `remainder` set are discouraged.
    ///
    /// The following flags are supported:
    ///
    /// A successful API call must either have:
    ///
    /// Note: The API is not supported on 32-bit platforms.
    ///
    /// # Parameters
    ///
    /// - `result`: Output array of `CUdevResource` resources. Can be NULL to query the number of groups.
    /// - `nbGroups`: This is a pointer, specifying the number of groups that would be or should be created as described below.
    /// - `input`: Input SM resource to be split. Must be a valid [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_SM`] resource.
    /// - `remainder`: If the input resource cannot be cleanly split among `nbGroups`, the remainder is placed in here. Can be ommitted (NULL) if the user does not need the remaining set.
    /// - `flags`: Flags specifying how these partitions are used or which constraints to abide by when splitting the input. Zero is valid for default behavior.
    /// - `minCount`: Minimum number of SMs required.
    pub fn cuDevSmResourceSplitByCount(
        result: *mut CUdevResource,
        nbGroups: *mut ::core::ffi::c_uint,
        input: *const CUdevResource,
        remainder: *mut CUdevResource,
        flags: ::core::ffi::c_uint,
        minCount: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Splits a [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_SM`] resource into structured groups.
    ///
    /// This API will split a resource of [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_SM`] into `nbGroups` structured device resource groups (the `result` array), as well as an optional `remainder`, according to a set of requirements specified in the `groupParams` array. The term “structured” is a trait that specifies the `result` has SMs that are co-scheduled together. This co-scheduling can be specified via the `coscheduledSmCount` field of the `groupParams` structure, while the `smCount` will specify how many SMs are required in total for that result. The remainder is always “unstructured”, it does not have any set guarantees with respect to co-scheduling and those properties will need to either be queried via the occupancy set of APIs or further split into structured groups by this API.
    ///
    /// The API has a discovery mode for use cases where it is difficult to know ahead of time what the SM count should be. Discovery happens when the `smCount` field of a given `groupParams` array entry is set to 0 - the smCount will be filled in by the API with the derived SM count according to the provided `groupParams` fields and constraints. Discovery can be used with both a valid result array and with a NULL `result` pointer value. The latter is useful in situations where the smCount will end up being zero, which is an invalid value to create a result entry with, but allowed for discovery purposes when the `result` is NULL.
    ///
    /// The `groupParams` array is evaluated from index 0 to `nbGroups` - 1. For each index in the `groupParams` array, the API will evaluate which SMs may be a good fit based on constraints and assign those SMs to `result`. This evaluation order is important to consider when using discovery mode, as it helps discover the remaining SMs.
    ///
    /// For a valid call:
    ///
    /// **Example params and their effect:**
    ///
    /// A groupParams array element is defined in the following order:
    ///
    /// The difference between a catch-all param group as the last entry and the remainder is in two aspects:
    ///
    /// Splitting an input into N groups, can be accomplished by repeatedly splitting off 1 group and re-splitting the remainder (a bisect operation). However, it’s recommended to accomplish this with a single call wherever possible.
    ///
    /// # Parameters
    ///
    /// - `result`: Output array of `CUdevResource` resources. Can be NULL, alongside an smCount of 0, for discovery purpose.
    /// - `nbGroups`: Specifies the number of groups in `result` and `groupParams`.
    /// - `input`: Input SM resource to be split. Must be a valid [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_SM`] resource.
    /// - `remainder`: If splitting the input resource leaves any SMs, the remainder is placed in here.
    /// - `flags`: Flags specifying how the API should behave. The value should be 0 for now.
    /// - `groupParams`: Description of how the SMs should be split and assigned to the corresponding result entry.
    pub fn cuDevSmResourceSplit(
        result: *mut CUdevResource,
        nbGroups: ::core::ffi::c_uint,
        input: *const CUdevResource,
        remainder: *mut CUdevResource,
        flags: ::core::ffi::c_uint,
        groupParams: *mut CU_DEV_SM_RESOURCE_GROUP_PARAMS,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Generate a resource descriptor.
    ///
    /// Generates a single resource descriptor with the set of resources specified in `resources`. The generated resource descriptor is necessary for the creation of green contexts via the [`cuGreenCtxCreate`] API. Resources of the same type can be passed in, provided they meet the requirements as noted below.
    ///
    /// A successful API call must have:
    ///
    /// The output descriptor `phDesc` will remain valid for the lifetime of the process.
    ///
    /// Note: The API is not supported on 32-bit platforms.
    ///
    /// # Parameters
    ///
    /// - `phDesc`: Output descriptor.
    /// - `resources`: Array of resources to be included in the descriptor.
    /// - `nbResources`: Number of resources passed in `resources`.
    pub fn cuDevResourceGenerateDesc(
        phDesc: *mut CUdevResourceDesc,
        resources: *mut CUdevResource,
        nbResources: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Records an event.
    ///
    /// Captures in `hEvent` all the activities of the green context of `hCtx` at the time of this call. `hEvent` and `hCtx` must be from the same primary context otherwise [`cudaError_enum::CUDA_ERROR_INVALID_HANDLE`] is returned. Calls such as [`cuEventQuery`] or [`cuGreenCtxWaitEvent`] will then examine or wait for completion of the work that was captured. Uses of `hCtx` after this call do not modify `hEvent`.
    ///
    /// # Parameters
    ///
    /// - `hCtx`: Green context to record event for.
    /// - `hEvent`: Event to record.
    pub fn cuGreenCtxRecordEvent(hCtx: CUgreenCtx, hEvent: CUevent) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Make a green context wait on an event.
    ///
    /// Makes all future work submitted to green context `hCtx` wait for all work captured in `hEvent`. The synchronization will be performed on the device and will not block the calling CPU thread. See [`cuGreenCtxRecordEvent`] or [`cuEventRecord`], for details on what is captured by an event.
    ///
    /// # Parameters
    ///
    /// - `hCtx`: Green context to wait.
    /// - `hEvent`: Event to wait on.
    pub fn cuGreenCtxWaitEvent(hCtx: CUgreenCtx, hEvent: CUevent) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Query the green context associated with a stream.
    ///
    /// Returns the CUDA green context that the stream is associated with, or NULL if the stream is not associated with any green context.
    ///
    /// The stream handle `hStream` can refer to any of the following.
    ///
    /// # Parameters
    ///
    /// - `hStream`: Handle to the stream to be queried.
    /// - `phCtx`: Returned green context associated with the stream.
    pub fn cuStreamGetGreenCtx(hStream: CUstream, phCtx: *mut CUgreenCtx) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Create a stream for use in the green context.
    ///
    /// Creates a stream for use in the specified green context `greenCtx` and returns a handle in `phStream`. The stream can be destroyed by calling cuStreamDestroy(). Note that the API ignores the context that is current to the calling thread and creates a stream in the specified green context `greenCtx`.
    ///
    /// The supported values for `flags` are:
    ///
    /// Specifying `priority` affects the scheduling priority of work in the stream. Priorities provide a hint to preferentially run work with higher priority when possible, but do not preempt already-running work or provide any other functional guarantee on execution order. `priority` follows a convention where lower numbers represent higher priorities. ‘0’ represents default priority. The range of meaningful numerical priorities can be queried using [`cuCtxGetStreamPriorityRange`]. If the specified priority is outside the numerical range returned by [`cuCtxGetStreamPriorityRange`], it will automatically be clamped to the lowest or the highest number in the range.
    ///
    /// # Parameters
    ///
    /// - `phStream`: Returned newly created stream.
    /// - `greenCtx`: Green context for which to create the stream for.
    /// - `flags`: Flags for stream creation. [`CUstream_flags::CU_STREAM_NON_BLOCKING`] must be specified.
    /// - `priority`: Stream priority. Lower numbers represent higher priorities. See [`cuCtxGetStreamPriorityRange`] for more information about meaningful stream priorities that can be passed.
    pub fn cuGreenCtxStreamCreate(
        phStream: *mut CUstream,
        greenCtx: CUgreenCtx,
        flags: ::core::ffi::c_uint,
        priority: ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the unique Id associated with the green context supplied.
    ///
    /// Returns in `greenCtxId` the unique Id which is associated with a given green context. The Id is unique for the life of the program for this instance of CUDA. If green context is supplied as NULL and the current context is set to a green context, the Id of the current green context is returned.
    ///
    /// # Parameters
    ///
    /// - `greenCtx`: Green context for which to obtain the Id.
    /// - `greenCtxId`: Pointer to store the Id of the green context.
    pub fn cuGreenCtxGetId(
        greenCtx: CUgreenCtx,
        greenCtxId: *mut ::core::ffi::c_ulonglong,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Get stream resources.
    ///
    /// Get the `type` resources available to the `hStream` and store them in `resource`.
    ///
    /// Note: The API will return [`cudaError_enum::CUDA_ERROR_INVALID_RESOURCE_TYPE`] is `type` is [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG`] or [`CUdevResourceType::CU_DEV_RESOURCE_TYPE_WORKQUEUE`].
    ///
    /// # Parameters
    ///
    /// - `hStream`: Stream to get resource for.
    /// - `resource`: Output pointer to a [CUdevResource](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUdevResource.html#structcudevresource) structure.
    /// - `type_`: Type of resource to retrieve.
    pub fn cuStreamGetDevResource(
        hStream: CUstream,
        resource: *mut CUdevResource,
        type_: CUdevResourceType,
    ) -> CUresult;
}
impl CUlogLevel_enum {
    /// A CUDA driver error message.
    pub const CU_LOG_LEVEL_ERROR: CUlogLevel_enum = CUlogLevel_enum(0);
    /// A CUDA driver warning message.
    pub const CU_LOG_LEVEL_WARNING: CUlogLevel_enum = CUlogLevel_enum(1);
}
/// ___MANBRIEF___ error log management functions for the low-level CUDA API (___CURRENT_FILE___) ___ENDMANBRIEF___
///
/// This section describes the error log management functions of the low-level CUDA driver application programming interface.
///
/// @{
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct CUlogLevel_enum(pub ::core::ffi::c_uint);
pub use self::CUlogLevel_enum as CUlogLevel;
/// Incomplete native type used by [`CUlogsCallbackHandle`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CUlogsCallbackEntry_st {
    _unused: [u8; 0],
}
/// Opaque registration handle returned by the CUDA driver logging callback API.
pub type CUlogsCallbackHandle = *mut CUlogsCallbackEntry_st;
/// ___MANBRIEF___ error log management functions for the low-level CUDA API (___CURRENT_FILE___) ___ENDMANBRIEF___
///
/// This section describes the error log management functions of the low-level CUDA driver application programming interface.
///
/// @{
pub type CUlogsCallback = ::core::option::Option<
    unsafe extern "C" fn(
        data: *mut ::core::ffi::c_void,
        logLevel: CUlogLevel,
        message: *mut ::core::ffi::c_char,
        length: size_t,
    ),
>;
/// Native cursor used to iterate through CUDA driver log messages.
pub type CUlogIterator = ::core::ffi::c_uint;
singe_loader::functions! { crate::DRIVER;
    /// Register a callback function to receive error log messages.
    ///
    /// # Parameters
    ///
    /// - `callbackFunc`: The function to register as a callback.
    /// - `userData`: A generic pointer to user data. This is passed into the callback function.
    /// - `callback_out`: Optional location to store the callback handle after it is registered.
    pub fn cuLogsRegisterCallback(
        callbackFunc: CUlogsCallback,
        userData: *mut ::core::ffi::c_void,
        callback_out: *mut CUlogsCallbackHandle,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Unregister a log message callback.
    ///
    /// # Parameters
    ///
    /// - `callback`: - The callback instance to unregister from receiving log messages
    pub fn cuLogsUnregisterCallback(callback: CUlogsCallbackHandle) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Sets log iterator to point to the end of log buffer, where the next message would be written.
    ///
    /// # Parameters
    ///
    /// - `iterator_out`: Location to store an iterator to the current tail of the logs.
    /// - `flags`: Reserved for future use, must be 0.
    pub fn cuLogsCurrent(
        iterator_out: *mut CUlogIterator,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Dump accumulated driver logs into a file.
    ///
    /// Logs generated by the driver are stored in an internal buffer and can be copied out using this API. This API dumps all driver logs starting from `iterator` into `pathToFile` provided.
    ///
    /// # Parameters
    ///
    /// - `iterator`: Optional auto-advancing iterator specifying the starting log to read. NULL value dumps all logs.
    /// - `pathToFile`: Path to output file for dumping logs.
    /// - `flags`: Reserved for future use, must be 0.
    pub fn cuLogsDumpToFile(
        iterator: *mut CUlogIterator,
        pathToFile: *const ::core::ffi::c_char,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Dump accumulated driver logs into a buffer.
    ///
    /// Logs generated by the driver are stored in an internal buffer and can be copied out using this API. This API dumps driver logs from `iterator` into `buffer` up to the size specified in `*size`. The driver will always null terminate the buffer but there will not be a null character between log entries, only a newline \n. The driver will then return the actual number of bytes written in `*size`, excluding the null terminator. If there are no messages to dump, `*size` will be set to 0 and the function will return [`cudaError_enum::CUDA_SUCCESS`]. If the provided `buffer` is not large enough to hold any messages, `*size` will be set to 0 and the function will return [`cudaError_enum::CUDA_ERROR_INVALID_VALUE`].
    ///
    /// # Parameters
    ///
    /// - `iterator`: Optional auto-advancing iterator specifying the starting log to read. NULL value dumps all logs.
    /// - `buffer`: Pointer to dump logs.
    /// - `size`: See description.
    /// - `flags`: Reserved for future use, must be 0.
    pub fn cuLogsDumpToMemory(
        iterator: *mut CUlogIterator,
        buffer: *mut ::core::ffi::c_char,
        size: *mut size_t,
        flags: ::core::ffi::c_uint,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the restore thread ID for a CUDA process.
    ///
    /// Returns in `*tid` the thread ID of the CUDA restore thread for the process specified by `pid`.
    ///
    /// # Parameters
    ///
    /// - `pid`: The process ID of the CUDA process.
    /// - `tid`: Returned restore thread ID.
    pub fn cuCheckpointProcessGetRestoreThreadId(
        pid: ::core::ffi::c_int,
        tid: *mut ::core::ffi::c_int,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Returns the process state of a CUDA process.
    ///
    /// Returns in `*state` the current state of the CUDA process specified by `pid`.
    ///
    /// # Parameters
    ///
    /// - `pid`: The process ID of the CUDA process.
    /// - `state`: Returned CUDA process state.
    pub fn cuCheckpointProcessGetState(
        pid: ::core::ffi::c_int,
        state: *mut CUprocessState,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Lock a running CUDA process.
    ///
    /// Lock the CUDA process specified by `pid` which will block further CUDA API calls. Process must be in the RUNNING state in order to lock.
    ///
    /// Upon successful return the process will be in the LOCKED state.
    ///
    /// If timeoutMs is specified and the timeout is reached the process will be left in the RUNNING state upon return.
    ///
    /// # Parameters
    ///
    /// - `pid`: The process ID of the CUDA process.
    /// - `args`: Optional lock operation arguments.
    pub fn cuCheckpointProcessLock(
        pid: ::core::ffi::c_int,
        args: *mut CUcheckpointLockArgs,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Checkpoint a CUDA process’s GPU memory contents.
    ///
    /// Checkpoints a CUDA process specified by `pid`. The GPU memory contents will be brought into host memory or mapped onto the calling process’s GPUs for user-defined behavior. Underlying GPU references are released when checkpointing completes. The process must be in the [`CUprocessState_enum::CU_PROCESS_STATE_LOCKED`] state to checkpoint.
    ///
    /// When [CUcheckpointCheckpointArgs::customStorageInfo_out](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointCheckpointArgs.html#structcucheckpointcheckpointargs_1ac3c629ce05a8d1e251f4bda72050f183) is not NULL, all the GPU memory allocated by the process with `pid` will be mapped onto the calling process’s GPUs so the application can copy the memory to custom storage. Upon return of this call, the pointer referenced by [CUcheckpointCheckpointArgs::customStorageInfo_out](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointCheckpointArgs.html#structcucheckpointcheckpointargs_1ac3c629ce05a8d1e251f4bda72050f183) will point to a [CUcheckpointCustomStorageInfo](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointCustomStorageInfo.html#structcucheckpointcustomstorageinfo) struct allocated and populated by the driver. For each GPU which contains data from the checkpointed process, there is a corresponding entry in the [CUcheckpointCustomStoragePerDeviceData](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointCustomStoragePerDeviceData.html#structcucheckpointcustomstorageperdevicedata) array.
    ///
    /// The application is responsible for copying the mapped data from the GPU at the specified device address to custom storage. When checkpointing to custom storage, the application is expected to call [`cuCheckpointOperationComplete`]. The [CUcheckpointCustomStorageInfo::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointCustomStorageInfo.html#structcucheckpointcustomstorageinfo_1a9095a23e289a5e9f42b9ce9949d04d2c) set by this call should be passed to [`cuCheckpointOperationComplete`] in `handle`. The driver synchronizes all the streams in [`cuCheckpointOperationComplete`], at which point the copy to custom storage is considered complete.
    ///
    /// When checkpointing to custom storage, the application is expected to retain primary contexts of all the devices used by the process to be checkpointed. Otherwise [`cuCheckpointProcessCheckpoint`] will return [`cudaError_enum::CUDA_ERROR_INVALID_CONTEXT`]. Unlike other checkpoint operations, checkpointing to custom storage requires [`cuInit`] to have been called before execution. Checkpointing the calling process’s GPU memory to custom storage is not supported. Upon successful return, the target process will be in the [`CUprocessState_enum::CU_PROCESS_STATE_CHECKPOINTING`] state.
    ///
    /// When [CUcheckpointCheckpointArgs::customStorageInfo_out](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointCheckpointArgs.html#structcucheckpointcheckpointargs_1ac3c629ce05a8d1e251f4bda72050f183) is NULL, the GPU memory contents will be brought into host memory by [`cuCheckpointProcessCheckpoint`]. The application is not expected to copy the GPU memory contents. The application is also not expected to call [`cuCheckpointOperationComplete`]. Upon successful return, the target process will be in the [`CUprocessState_enum::CU_PROCESS_STATE_CHECKPOINTED`] state.
    ///
    /// # Parameters
    ///
    /// - `pid`: The process ID of the CUDA process.
    /// - `args`: Optional checkpoint operation arguments.
    pub fn cuCheckpointProcessCheckpoint(
        pid: ::core::ffi::c_int,
        args: *mut CUcheckpointCheckpointArgs,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Restore a CUDA process’s GPU memory contents from its last checkpoint.
    ///
    /// Restores a CUDA process specified by `pid` from its last checkpoint. Process must be in the [`CUprocessState_enum::CU_PROCESS_STATE_CHECKPOINTED`] state to restore.
    ///
    /// GPU UUID pairs can be specified in `args` to remap the process old GPUs onto new GPUs. The GPU to restore onto needs to have enough memory and be of the same chip type as the old GPU. If an array of GPU UUID pairs is specified, it must contain every checkpointed GPU.
    ///
    /// CUDA process restore requires persistence mode to be enabled or [`cuInit`] to have been called before execution.
    ///
    /// When [CUcheckpointRestoreArgs::customStorageInfo_out](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointRestoreArgs.html#structcucheckpointrestoreargs_1a0dcad30bf1005161fe90f512da4b9aec) is not NULL, all the GPU memory to be restored for the process with `pid` will be mapped onto the calling process’s GPUs so the application can copy the memory back to the GPU.
    ///
    /// Upon return of this call, the pointer referenced by [CUcheckpointRestoreArgs::customStorageInfo_out](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointRestoreArgs.html#structcucheckpointrestoreargs_1a0dcad30bf1005161fe90f512da4b9aec) will point to a [CUcheckpointCustomStorageInfo](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointCustomStorageInfo.html#structcucheckpointcustomstorageinfo) struct allocated and populated by the driver. For each GPU which contains data from the restored process, there is a corresponding entry in the [CUcheckpointCustomStoragePerDeviceData](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointCustomStoragePerDeviceData.html#structcucheckpointcustomstorageperdevicedata) array.
    ///
    /// The application is responsible for copying the data from custom storage to the GPU at the specified device address. When restoring from custom storage, the application is expected to call [`cuCheckpointOperationComplete`]. The [CUcheckpointCustomStorageInfo::handle](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointCustomStorageInfo.html#structcucheckpointcustomstorageinfo_1a9095a23e289a5e9f42b9ce9949d04d2c) set by this call should be passed to [`cuCheckpointOperationComplete`] in `handle`. The driver synchronizes all the streams in [`cuCheckpointOperationComplete`], at which point the copy from custom storage is considered complete.
    ///
    /// When restoring from custom storage, the application is expected to retain primary contexts of all the devices used by the process to be restored. Otherwise [`cuCheckpointProcessRestore`] will return [`cudaError_enum::CUDA_ERROR_INVALID_CONTEXT`]
    ///
    /// . Restoring the calling process’s
    ///
    /// GPU memory from custom storage is not supported. Upon successful return, the target process will be in the
    ///
    /// When [CUcheckpointRestoreArgs::customStorageInfo_out](https://docs.nvidia.com/cuda/archive/13.4.2/cuda-driver-api/cuda_driver_api/structCUcheckpointRestoreArgs.html#structcucheckpointrestoreargs_1a0dcad30bf1005161fe90f512da4b9aec) is NULL, the GPU memory contents will be restored from host memory by [`cuCheckpointProcessRestore`]. The application is not expected to copy back the GPU memory contents. The application is also not expected to call [`cuCheckpointOperationComplete`]. Upon successful return, the target process will be in the [`CUprocessState_enum::CU_PROCESS_STATE_LOCKED`] state.
    ///
    /// # Parameters
    ///
    /// - `pid`: The process ID of the CUDA process.
    /// - `args`: Optional restore operation arguments.
    pub fn cuCheckpointProcessRestore(
        pid: ::core::ffi::c_int,
        args: *mut CUcheckpointRestoreArgs,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Complete a custom-storage checkpoint or restore operation.
    ///
    /// After [`cuCheckpointProcessCheckpoint`] or [`cuCheckpointProcessRestore`] with custom storage, [`cuCheckpointOperationComplete`] should be called when the application has finished or enqueued (on a stream) the required copies (for checkpoint, GPU mappings to custom storage and for restore, custom storage into GPU mappings) so the driver can finish the operation.
    ///
    /// [`cuCheckpointOperationComplete`] will first synchronize on the streams returned by [`cuCheckpointProcessCheckpoint`] or [`cuCheckpointProcessRestore`]. The driver assumes that the application has completed copying the memory to or from custom storage once synchronization is done. None of the streams returned by [`cuCheckpointProcessCheckpoint`] or [`cuCheckpointProcessRestore`] should be in stream capture mode; any attempt to do so would result in [`cudaError_enum::CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED`]. Once the synchronization is done, [`cuCheckpointOperationComplete`] will unmap the GPU memory that was mapped on each GPU in a particular [`cuCheckpointProcessCheckpoint`] or [`cuCheckpointProcessRestore`] operation. [`cuCheckpointOperationComplete`] identifies the operation to be completed using `handle`. This handle is set by [`cuCheckpointProcessCheckpoint`] or [`cuCheckpointProcessRestore`].
    ///
    /// When the call returns successfully, the target process will be in the [`CUprocessState_enum::CU_PROCESS_STATE_CHECKPOINTED`] state when completing a checkpoint operation or the [`CUprocessState_enum::CU_PROCESS_STATE_LOCKED`] state when completing a restore operation.
    ///
    /// # Parameters
    ///
    /// - `handle`: - ::CUcheckpointCustomStorageInfo::handle set by a prior ::cuCheckpointProcessCheckpoint or ::cuCheckpointProcessRestore call
    pub fn cuCheckpointOperationComplete(
        handle: CUcheckpointOperationHandle,
    ) -> CUresult;
}
singe_loader::functions! { crate::DRIVER;
    /// Unlock a CUDA process to allow CUDA API calls.
    ///
    /// Unlocks a process specified by `pid` allowing it to resume making CUDA API calls. Process must be in the LOCKED state.
    ///
    /// Upon successful return the process will be in the RUNNING state.
    ///
    /// # Parameters
    ///
    /// - `pid`: The process ID of the CUDA process.
    /// - `args`: Optional unlock operation arguments.
    pub fn cuCheckpointProcessUnlock(
        pid: ::core::ffi::c_int,
        args: *mut CUcheckpointUnlockArgs,
    ) -> CUresult;
}